提交 ae8b753a 编写于 作者: fxy060608's avatar fxy060608

chore: update checkVersion.js

上级 f256d633
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
}, },
"dependencies": { "dependencies": {
"@ampproject/remapping": "^2.1.2", "@ampproject/remapping": "^2.1.2",
"@babel/core": "^7.17.9", "@babel/core": "^7.18.13",
"@babel/parser": "^7.17.9", "@babel/parser": "^7.18.13",
"@babel/types": "^7.17.0", "@babel/types": "^7.17.0",
"@dcloudio/uni-i18n": "3.0.0-alpha-3060420220922001", "@dcloudio/uni-i18n": "3.0.0-alpha-3060420220922001",
"@dcloudio/uni-shared": "3.0.0-alpha-3060420220922001", "@dcloudio/uni-shared": "3.0.0-alpha-3060420220922001",
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
"fs-extra": "^10.0.0", "fs-extra": "^10.0.0",
"hash-sum": "^2.0.0", "hash-sum": "^2.0.0",
"jsonc-parser": "^3.0.0", "jsonc-parser": "^3.0.0",
"magic-string": "^0.26.1", "magic-string": "^0.26.3",
"merge": "^2.1.1", "merge": "^2.1.1",
"mime": "^3.0.0", "mime": "^3.0.0",
"module-alias": "^2.2.2", "module-alias": "^2.2.2",
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
"postcss-load-config": "^3.1.1", "postcss-load-config": "^3.1.1",
"postcss-modules": "^4.3.0", "postcss-modules": "^4.3.0",
"postcss-selector-parser": "^6.0.6", "postcss-selector-parser": "^6.0.6",
"resolve": "^1.22.0", "resolve": "^1.22.1",
"tapable": "^2.2.0", "tapable": "^2.2.0",
"xregexp": "3.1.0" "xregexp": "3.1.0"
}, },
......
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
"license": "Apache-2.0", "license": "Apache-2.0",
"gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da", "gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
"dependencies": { "dependencies": {
"@babel/generator": "^7.17.9", "@babel/generator": "^7.18.13",
"@babel/parser": "^7.17.9", "@babel/parser": "^7.18.13",
"@babel/types": "^7.17.0", "@babel/types": "^7.17.0",
"@dcloudio/uni-cli-shared": "3.0.0-alpha-3060420220922001", "@dcloudio/uni-cli-shared": "3.0.0-alpha-3060420220922001",
"@dcloudio/uni-shared": "3.0.0-alpha-3060420220922001", "@dcloudio/uni-shared": "3.0.0-alpha-3060420220922001",
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
"@vue/compiler-sfc": "3.2.39", "@vue/compiler-sfc": "3.2.39",
"@vue/shared": "3.2.39", "@vue/shared": "3.2.39",
"debug": "^4.3.3", "debug": "^4.3.3",
"magic-string": "^0.26.1" "magic-string": "^0.26.3"
}, },
"gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da", "gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
"devDependencies": { "devDependencies": {
......
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
}, },
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@babel/core": "^7.17.9", "@babel/core": "^7.18.13",
"@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-import-meta": "^7.10.4",
"@babel/plugin-transform-typescript": "^7.16.8", "@babel/plugin-transform-typescript": "^7.18.12",
"@dcloudio/uni-cli-shared": "3.0.0-alpha-3060420220922001", "@dcloudio/uni-cli-shared": "3.0.0-alpha-3060420220922001",
"@dcloudio/uni-shared": "3.0.0-alpha-3060420220922001", "@dcloudio/uni-shared": "3.0.0-alpha-3060420220922001",
"@rollup/pluginutils": "^4.2.0", "@rollup/pluginutils": "^4.2.0",
......
const fs = require('fs')
const path = require('path')
function resolvePkgPath(pkg) {
const pkgPath = path.resolve(require.resolve(pkg), '../../package.json')
if (fs.existsSync(pkgPath)) {
return pkgPath
}
throw `${pkgPath} not found`
}
module.exports = {
vuePkgs: [
require.resolve('vite/package.json'),
resolvePkgPath('@vitejs/plugin-vue'),
resolvePkgPath('@vitejs/plugin-vue-jsx'),
resolvePkgPath('@vitejs/plugin-legacy'),
require.resolve('@vue/compiler-core/package.json'),
require.resolve('@vue/compiler-dom/package.json'),
require.resolve('@vue/compiler-sfc/package.json'),
],
}
...@@ -299,8 +299,8 @@ importers: ...@@ -299,8 +299,8 @@ importers:
packages/uni-cli-shared: packages/uni-cli-shared:
specifiers: specifiers:
'@ampproject/remapping': ^2.1.2 '@ampproject/remapping': ^2.1.2
'@babel/core': ^7.17.9 '@babel/core': ^7.18.13
'@babel/parser': ^7.17.9 '@babel/parser': ^7.18.13
'@babel/types': ^7.17.0 '@babel/types': ^7.17.0
'@dcloudio/uni-i18n': 3.0.0-alpha-3060420220922001 '@dcloudio/uni-i18n': 3.0.0-alpha-3060420220922001
'@dcloudio/uni-shared': 3.0.0-alpha-3060420220922001 '@dcloudio/uni-shared': 3.0.0-alpha-3060420220922001
...@@ -336,7 +336,7 @@ importers: ...@@ -336,7 +336,7 @@ importers:
fs-extra: ^10.0.0 fs-extra: ^10.0.0
hash-sum: ^2.0.0 hash-sum: ^2.0.0
jsonc-parser: ^3.0.0 jsonc-parser: ^3.0.0
magic-string: ^0.26.1 magic-string: ^0.26.3
merge: ^2.1.1 merge: ^2.1.1
mime: ^3.0.0 mime: ^3.0.0
module-alias: ^2.2.2 module-alias: ^2.2.2
...@@ -347,7 +347,7 @@ importers: ...@@ -347,7 +347,7 @@ importers:
postcss-load-config: ^3.1.1 postcss-load-config: ^3.1.1
postcss-modules: ^4.3.0 postcss-modules: ^4.3.0
postcss-selector-parser: ^6.0.6 postcss-selector-parser: ^6.0.6
resolve: ^1.22.0 resolve: ^1.22.1
tapable: ^2.2.0 tapable: ^2.2.0
vue: 3.2.39 vue: 3.2.39
xregexp: 3.1.0 xregexp: 3.1.0
...@@ -570,8 +570,8 @@ importers: ...@@ -570,8 +570,8 @@ importers:
packages/uni-mp-compiler: packages/uni-mp-compiler:
specifiers: specifiers:
'@babel/generator': ^7.17.9 '@babel/generator': ^7.18.13
'@babel/parser': ^7.17.9 '@babel/parser': ^7.18.13
'@babel/types': ^7.17.0 '@babel/types': ^7.17.0
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060420220922001 '@dcloudio/uni-cli-shared': 3.0.0-alpha-3060420220922001
'@dcloudio/uni-shared': 3.0.0-alpha-3060420220922001 '@dcloudio/uni-shared': 3.0.0-alpha-3060420220922001
...@@ -692,7 +692,7 @@ importers: ...@@ -692,7 +692,7 @@ importers:
'@vue/compiler-sfc': 3.2.39 '@vue/compiler-sfc': 3.2.39
'@vue/shared': 3.2.39 '@vue/shared': 3.2.39
debug: ^4.3.3 debug: ^4.3.3
magic-string: ^0.26.1 magic-string: ^0.26.3
dependencies: dependencies:
'@dcloudio/uni-cli-shared': link:../uni-cli-shared '@dcloudio/uni-cli-shared': link:../uni-cli-shared
'@dcloudio/uni-i18n': link:../uni-i18n '@dcloudio/uni-i18n': link:../uni-i18n
...@@ -866,9 +866,9 @@ importers: ...@@ -866,9 +866,9 @@ importers:
packages/vite-plugin-uni: packages/vite-plugin-uni:
specifiers: specifiers:
'@babel/core': ^7.17.9 '@babel/core': ^7.18.13
'@babel/plugin-syntax-import-meta': ^7.10.4 '@babel/plugin-syntax-import-meta': ^7.10.4
'@babel/plugin-transform-typescript': ^7.16.8 '@babel/plugin-transform-typescript': ^7.18.12
'@dcloudio/uni-cli-shared': 3.0.0-alpha-3060420220922001 '@dcloudio/uni-cli-shared': 3.0.0-alpha-3060420220922001
'@dcloudio/uni-shared': 3.0.0-alpha-3060420220922001 '@dcloudio/uni-shared': 3.0.0-alpha-3060420220922001
'@rollup/pluginutils': ^4.2.0 '@rollup/pluginutils': ^4.2.0
...@@ -3084,7 +3084,7 @@ packages: ...@@ -3084,7 +3084,7 @@ packages:
'@babel/plugin-syntax-import-meta': 7.10.4_@babel+core@7.19.1 '@babel/plugin-syntax-import-meta': 7.10.4_@babel+core@7.19.1
'@babel/plugin-transform-typescript': 7.19.1_@babel+core@7.19.1 '@babel/plugin-transform-typescript': 7.19.1_@babel+core@7.19.1
'@vue/babel-plugin-jsx': 1.1.1_@babel+core@7.19.1 '@vue/babel-plugin-jsx': 1.1.1_@babel+core@7.19.1
vite: 3.1.3_terser@5.15.0 vite: 3.1.3
vue: 3.2.39 vue: 3.2.39
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
......
...@@ -106,19 +106,7 @@ function resolvePkgDeps(pkgPath) { ...@@ -106,19 +106,7 @@ function resolvePkgDeps(pkgPath) {
resolveDeps(name, peerDependencies) resolveDeps(name, peerDependencies)
} }
const paths = [ const { vuePkgs } = require('../packages/vite-plugin-uni/script.js')
path.resolve(__dirname, '../packages/vite-plugin-uni/node_modules'),
]
const vuePkgs = [
require.resolve('vite/package.json'),
require.resolve('@vitejs/plugin-vue/package.json'),
require.resolve('@vitejs/plugin-vue-jsx/package.json'),
require.resolve('@vitejs/plugin-legacy/package.json', { paths }),
require.resolve('@vue/compiler-core/package.json', { paths }),
require.resolve('@vue/compiler-dom/package.json', { paths }),
require.resolve('@vue/compiler-sfc/package.json', { paths }),
]
function checkDeps() { function checkDeps() {
vuePkgs.forEach((pkg) => resolvePkgDeps(pkg)) vuePkgs.forEach((pkg) => resolvePkgDeps(pkg))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册