From 32fb79df41f8c3f5de8ca01545a4dfeb26326709 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 17:38:13 +0800 Subject: [PATCH 1/4] chore(deps): update all non-major dependencies (#9636) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 6 ++-- packages/compiler-sfc/package.json | 2 +- pnpm-lock.yaml | 52 ++++++++++++++---------------- 3 files changed, 29 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index 5f76a0495..59d405b8a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "version": "3.3.8", - "packageManager": "pnpm@8.10.3", + "packageManager": "pnpm@8.10.5", "type": "module", "scripts": { "dev": "node scripts/dev.js", @@ -66,7 +66,7 @@ "@rollup/plugin-replace": "^5.0.4", "@rollup/plugin-terser": "^0.4.4", "@types/hash-sum": "^1.0.2", - "@types/node": "^20.9.0", + "@types/node": "^20.9.2", "@typescript-eslint/parser": "^6.11.0", "@vitest/coverage-istanbul": "^0.34.6", "@vue/consolidate": "0.17.3", @@ -102,7 +102,7 @@ "terser": "^5.22.0", "todomvc-app-css": "^2.4.3", "tslib": "^2.6.2", - "tsx": "^4.1.3", + "tsx": "^4.1.4", "typescript": "^5.2.2", "vite": "^5.0.0", "vitest": "^0.34.6" diff --git a/packages/compiler-sfc/package.json b/packages/compiler-sfc/package.json index 4d55ffb08..ee615474c 100644 --- a/packages/compiler-sfc/package.json +++ b/packages/compiler-sfc/package.json @@ -47,7 +47,7 @@ "@babel/types": "^7.23.3", "@vue/consolidate": "^0.17.3", "hash-sum": "^2.0.0", - "lru-cache": "^10.0.2", + "lru-cache": "^10.0.3", "merge-source-map": "^1.1.0", "minimatch": "^9.0.3", "postcss-modules": "^4.3.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cbe0a58f6..d7e00c67f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,8 +36,8 @@ importers: specifier: ^1.0.2 version: 1.0.2 '@types/node': - specifier: ^20.9.0 - version: 20.9.0 + specifier: ^20.9.2 + version: 20.9.2 '@typescript-eslint/parser': specifier: ^6.11.0 version: 6.11.0(eslint@8.54.0)(typescript@5.2.2) @@ -144,14 +144,14 @@ importers: specifier: ^2.6.2 version: 2.6.2 tsx: - specifier: ^4.1.3 - version: 4.1.3 + specifier: ^4.1.4 + version: 4.1.4 typescript: specifier: ^5.2.2 version: 5.2.2 vite: specifier: ^5.0.0 - version: 5.0.0(@types/node@20.9.0)(terser@5.22.0) + version: 5.0.0(@types/node@20.9.2)(terser@5.22.0) vitest: specifier: ^0.34.6 version: 0.34.6(jsdom@22.1.0)(terser@5.22.0) @@ -227,8 +227,8 @@ importers: specifier: ^2.0.0 version: 2.0.0 lru-cache: - specifier: ^10.0.2 - version: 10.0.2 + specifier: ^10.0.3 + version: 10.0.3 merge-source-map: specifier: ^1.1.0 version: 1.1.0 @@ -371,7 +371,7 @@ importers: version: 4.4.0(vite@5.0.0)(vue@packages+vue) vite: specifier: ^5.0.0 - version: 5.0.0(@types/node@20.9.0)(terser@5.22.0) + version: 5.0.0(@types/node@20.9.2)(terser@5.22.0) packages/shared: {} @@ -1539,8 +1539,8 @@ packages: resolution: {integrity: sha512-U3PUjAudAdJBeC2pgN8uTIKgxrb4nlDF3SF0++EldXQvQBGkpFZMSnwQiIoDU77tv45VgNkl/L4ouD+rEomujw==} dev: true - /@types/node@20.9.0: - resolution: {integrity: sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==} + /@types/node@20.9.2: + resolution: {integrity: sha512-WHZXKFCEyIUJzAwh3NyyTHYSR35SevJ6mZ1nWwJafKtiQbqRTIKSRcw3Ma3acqgsent3RRDqeVwpHntMk+9irg==} dependencies: undici-types: 5.26.5 dev: true @@ -1561,7 +1561,7 @@ packages: resolution: {integrity: sha512-Km7XAtUIduROw7QPgvcft0lIupeG8a8rdKL8RiSyKvlE7dYY31fEn41HVuQsRFDuROA8tA4K2UVL+WdfFmErBA==} requiresBuild: true dependencies: - '@types/node': 20.9.0 + '@types/node': 20.9.2 dev: true optional: true @@ -1701,7 +1701,7 @@ packages: vite: ^4.0.0 vue: ^3.2.25 dependencies: - vite: 5.0.0(@types/node@20.9.0)(terser@5.22.0) + vite: 5.0.0(@types/node@20.9.2)(terser@5.22.0) vue: link:packages/vue dev: true @@ -3456,7 +3456,7 @@ packages: resolution: {integrity: sha512-+K84LB1DYwMHoHSgaOY/Jfhw3ucPmSET5v98Ke/HdNSw4a0UktWzyW1mjhjpuxxTqOOsfWT/7iVshHmVZ4IpOA==} engines: {node: ^16.14.0 || >=18.0.0} dependencies: - lru-cache: 10.0.2 + lru-cache: 10.0.3 dev: true /html-encoding-sniffer@3.0.0: @@ -4139,11 +4139,9 @@ packages: get-func-name: 2.0.2 dev: true - /lru-cache@10.0.2: - resolution: {integrity: sha512-Yj9mA8fPiVgOUpByoTZO5pNrcl5Yk37FcSHsUINpAsaBIEZIuqcCclDZJCVxqQShDsmYX8QG63svJiTbOATZwg==} + /lru-cache@10.0.3: + resolution: {integrity: sha512-B7gr+F6MkqB3uzINHXNctGieGsRTMwIBgxkp0yq/5BwcuDzD4A8wQpHQW6vDAm1uKSLQghmRdD9sKqf2vJ1cEg==} engines: {node: 14 || >=16.14} - dependencies: - semver: 7.5.4 dev: true /lru-cache@5.1.1: @@ -4615,7 +4613,7 @@ packages: resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} engines: {node: '>=16 || 14 >=14.17'} dependencies: - lru-cache: 10.0.2 + lru-cache: 10.0.3 minipass: 7.0.4 dev: true @@ -5785,8 +5783,8 @@ packages: typescript: 5.2.2 dev: true - /tsx@4.1.3: - resolution: {integrity: sha512-DLiTy1eri4nhqgVVy+15YKC6Ij2BMFxGdDMkVrSDkNuISUJLv7n0NgZpFLpdM+qmwXar34XllgYi4cxkNMbDwQ==} + /tsx@4.1.4: + resolution: {integrity: sha512-9X7uBCIyUsvMzIH+o8m+5o/5eL461cChCF+XUtOZsPr1a4pZx2lTQx0Muu5G5VwJWZwAGKBe3sJHLk82BENAVw==} engines: {node: '>=18.0.0'} hasBin: true dependencies: @@ -5969,7 +5967,7 @@ packages: engines: {node: '>= 0.8'} dev: true - /vite-node@0.34.6(@types/node@20.9.0)(terser@5.22.0): + /vite-node@0.34.6(@types/node@20.9.2)(terser@5.22.0): resolution: {integrity: sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA==} engines: {node: '>=v14.18.0'} hasBin: true @@ -5979,7 +5977,7 @@ packages: mlly: 1.4.2 pathe: 1.1.1 picocolors: 1.0.0 - vite: 5.0.0(@types/node@20.9.0)(terser@5.22.0) + vite: 5.0.0(@types/node@20.9.2)(terser@5.22.0) transitivePeerDependencies: - '@types/node' - less @@ -5991,7 +5989,7 @@ packages: - terser dev: true - /vite@5.0.0(@types/node@20.9.0)(terser@5.22.0): + /vite@5.0.0(@types/node@20.9.2)(terser@5.22.0): resolution: {integrity: sha512-ESJVM59mdyGpsiNAeHQOR/0fqNoOyWPYesFto8FFZugfmhdHx8Fzd8sF3Q/xkVhZsyOxHfdM7ieiVAorI9RjFw==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -6019,7 +6017,7 @@ packages: terser: optional: true dependencies: - '@types/node': 20.9.0 + '@types/node': 20.9.2 esbuild: 0.19.5 postcss: 8.4.31 rollup: 4.4.1 @@ -6061,7 +6059,7 @@ packages: dependencies: '@types/chai': 4.3.9 '@types/chai-subset': 1.3.4 - '@types/node': 20.9.0 + '@types/node': 20.9.2 '@vitest/expect': 0.34.6 '@vitest/runner': 0.34.6 '@vitest/snapshot': 0.34.6 @@ -6081,8 +6079,8 @@ packages: strip-literal: 1.3.0 tinybench: 2.5.1 tinypool: 0.7.0 - vite: 5.0.0(@types/node@20.9.0)(terser@5.22.0) - vite-node: 0.34.6(@types/node@20.9.0)(terser@5.22.0) + vite: 5.0.0(@types/node@20.9.2)(terser@5.22.0) + vite-node: 0.34.6(@types/node@20.9.2)(terser@5.22.0) why-is-node-running: 2.2.2 transitivePeerDependencies: - less From 8fddb19c3af01c99bd017e4c2e851e9d580aa945 Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 21 Nov 2023 09:16:14 +0800 Subject: [PATCH 2/4] workflow: use workspace deps --- packages/compiler-core/package.json | 2 +- packages/compiler-dom/package.json | 4 +- packages/compiler-sfc/package.json | 10 ++-- packages/compiler-ssr/package.json | 4 +- packages/reactivity-transform/package.json | 4 +- packages/reactivity/package.json | 2 +- packages/runtime-core/package.json | 4 +- packages/runtime-dom/package.json | 4 +- packages/runtime-test/package.json | 4 +- packages/server-renderer/package.json | 6 +-- packages/vue-compat/package.json | 2 +- packages/vue/package.json | 10 ++-- pnpm-lock.yaml | 56 +++++++++++----------- scripts/release.js | 27 ++++++++--- 14 files changed, 76 insertions(+), 63 deletions(-) diff --git a/packages/compiler-core/package.json b/packages/compiler-core/package.json index 948861435..23ad71935 100644 --- a/packages/compiler-core/package.json +++ b/packages/compiler-core/package.json @@ -33,7 +33,7 @@ "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme", "dependencies": { "@babel/parser": "^7.23.3", - "@vue/shared": "3.3.8", + "@vue/shared": "workspace:*", "estree-walker": "^2.0.2", "source-map-js": "^1.0.2" }, diff --git a/packages/compiler-dom/package.json b/packages/compiler-dom/package.json index c2bed3837..7f69c5662 100644 --- a/packages/compiler-dom/package.json +++ b/packages/compiler-dom/package.json @@ -37,7 +37,7 @@ }, "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-dom#readme", "dependencies": { - "@vue/shared": "3.3.8", - "@vue/compiler-core": "3.3.8" + "@vue/shared": "workspace:*", + "@vue/compiler-core": "workspace:*" } } diff --git a/packages/compiler-sfc/package.json b/packages/compiler-sfc/package.json index ee615474c..93fff05e4 100644 --- a/packages/compiler-sfc/package.json +++ b/packages/compiler-sfc/package.json @@ -33,11 +33,11 @@ "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-sfc#readme", "dependencies": { "@babel/parser": "^7.23.3", - "@vue/compiler-core": "3.3.8", - "@vue/compiler-dom": "3.3.8", - "@vue/compiler-ssr": "3.3.8", - "@vue/reactivity-transform": "3.3.8", - "@vue/shared": "3.3.8", + "@vue/compiler-core": "workspace:*", + "@vue/compiler-dom": "workspace:*", + "@vue/compiler-ssr": "workspace:*", + "@vue/reactivity-transform": "workspace:*", + "@vue/shared": "workspace:*", "estree-walker": "^2.0.2", "magic-string": "^0.30.5", "postcss": "^8.4.31", diff --git a/packages/compiler-ssr/package.json b/packages/compiler-ssr/package.json index 6ba159703..115b20fcc 100644 --- a/packages/compiler-ssr/package.json +++ b/packages/compiler-ssr/package.json @@ -28,7 +28,7 @@ }, "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-ssr#readme", "dependencies": { - "@vue/shared": "3.3.8", - "@vue/compiler-dom": "3.3.8" + "@vue/shared": "workspace:*", + "@vue/compiler-dom": "workspace:*" } } diff --git a/packages/reactivity-transform/package.json b/packages/reactivity-transform/package.json index 48749f0bb..4a430fb0e 100644 --- a/packages/reactivity-transform/package.json +++ b/packages/reactivity-transform/package.json @@ -29,8 +29,8 @@ "homepage": "https://github.com/vuejs/core/tree/dev/packages/reactivity-transform#readme", "dependencies": { "@babel/parser": "^7.23.3", - "@vue/compiler-core": "3.3.8", - "@vue/shared": "3.3.8", + "@vue/compiler-core": "workspace:*", + "@vue/shared": "workspace:*", "estree-walker": "^2.0.2", "magic-string": "^0.30.5" }, diff --git a/packages/reactivity/package.json b/packages/reactivity/package.json index 6582c7683..bf7713d0a 100644 --- a/packages/reactivity/package.json +++ b/packages/reactivity/package.json @@ -36,6 +36,6 @@ }, "homepage": "https://github.com/vuejs/core/tree/main/packages/reactivity#readme", "dependencies": { - "@vue/shared": "3.3.8" + "@vue/shared": "workspace:*" } } diff --git a/packages/runtime-core/package.json b/packages/runtime-core/package.json index 03e85e307..adb79adf9 100644 --- a/packages/runtime-core/package.json +++ b/packages/runtime-core/package.json @@ -32,7 +32,7 @@ }, "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme", "dependencies": { - "@vue/shared": "3.3.8", - "@vue/reactivity": "3.3.8" + "@vue/shared": "workspace:*", + "@vue/reactivity": "workspace:*" } } diff --git a/packages/runtime-dom/package.json b/packages/runtime-dom/package.json index 4ab6e8122..9415dcf97 100644 --- a/packages/runtime-dom/package.json +++ b/packages/runtime-dom/package.json @@ -35,8 +35,8 @@ }, "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-dom#readme", "dependencies": { - "@vue/shared": "3.3.8", - "@vue/runtime-core": "3.3.8", + "@vue/shared": "workspace:*", + "@vue/runtime-core": "workspace:*", "csstype": "^3.1.2" } } diff --git a/packages/runtime-test/package.json b/packages/runtime-test/package.json index 0012e3ff6..e76d8e4e5 100644 --- a/packages/runtime-test/package.json +++ b/packages/runtime-test/package.json @@ -25,7 +25,7 @@ }, "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-test#readme", "dependencies": { - "@vue/shared": "3.3.8", - "@vue/runtime-core": "3.3.8" + "@vue/shared": "workspace:*", + "@vue/runtime-core": "workspace:*" } } diff --git a/packages/server-renderer/package.json b/packages/server-renderer/package.json index 06d57b660..f1d458b69 100644 --- a/packages/server-renderer/package.json +++ b/packages/server-renderer/package.json @@ -32,10 +32,10 @@ }, "homepage": "https://github.com/vuejs/core/tree/main/packages/server-renderer#readme", "peerDependencies": { - "vue": "3.3.8" + "vue": "workspace:*" }, "dependencies": { - "@vue/shared": "3.3.8", - "@vue/compiler-ssr": "3.3.8" + "@vue/shared": "workspace:*", + "@vue/compiler-ssr": "workspace:*" } } diff --git a/packages/vue-compat/package.json b/packages/vue-compat/package.json index e44b68cc8..ff0c8a9ce 100644 --- a/packages/vue-compat/package.json +++ b/packages/vue-compat/package.json @@ -43,6 +43,6 @@ "source-map-js": "^1.0.2" }, "peerDependencies": { - "vue": "3.3.8" + "vue": "workspace:*" } } diff --git a/packages/vue/package.json b/packages/vue/package.json index 8835706df..9a90a9213 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -96,11 +96,11 @@ }, "homepage": "https://github.com/vuejs/core/tree/main/packages/vue#readme", "dependencies": { - "@vue/shared": "3.3.8", - "@vue/compiler-dom": "3.3.8", - "@vue/runtime-dom": "3.3.8", - "@vue/compiler-sfc": "3.3.8", - "@vue/server-renderer": "3.3.8" + "@vue/shared": "workspace:*", + "@vue/compiler-dom": "workspace:*", + "@vue/runtime-dom": "workspace:*", + "@vue/compiler-sfc": "workspace:*", + "@vue/server-renderer": "workspace:*" }, "peerDependencies": { "typescript": "*" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d7e00c67f..48560ad8f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -162,7 +162,7 @@ importers: specifier: ^7.23.3 version: 7.23.3 '@vue/shared': - specifier: 3.3.8 + specifier: workspace:* version: link:../shared estree-walker: specifier: ^2.0.2 @@ -178,10 +178,10 @@ importers: packages/compiler-dom: dependencies: '@vue/compiler-core': - specifier: 3.3.8 + specifier: workspace:* version: link:../compiler-core '@vue/shared': - specifier: 3.3.8 + specifier: workspace:* version: link:../shared packages/compiler-sfc: @@ -190,19 +190,19 @@ importers: specifier: ^7.23.3 version: 7.23.3 '@vue/compiler-core': - specifier: 3.3.8 + specifier: workspace:* version: link:../compiler-core '@vue/compiler-dom': - specifier: 3.3.8 + specifier: workspace:* version: link:../compiler-dom '@vue/compiler-ssr': - specifier: 3.3.8 + specifier: workspace:* version: link:../compiler-ssr '@vue/reactivity-transform': - specifier: 3.3.8 + specifier: workspace:* version: link:../reactivity-transform '@vue/shared': - specifier: 3.3.8 + specifier: workspace:* version: link:../shared estree-walker: specifier: ^2.0.2 @@ -251,10 +251,10 @@ importers: packages/compiler-ssr: dependencies: '@vue/compiler-dom': - specifier: 3.3.8 + specifier: workspace:* version: link:../compiler-dom '@vue/shared': - specifier: 3.3.8 + specifier: workspace:* version: link:../shared packages/dts-built-test: @@ -281,7 +281,7 @@ importers: packages/reactivity: dependencies: '@vue/shared': - specifier: 3.3.8 + specifier: workspace:* version: link:../shared packages/reactivity-transform: @@ -290,10 +290,10 @@ importers: specifier: ^7.23.3 version: 7.23.3 '@vue/compiler-core': - specifier: 3.3.8 + specifier: workspace:* version: link:../compiler-core '@vue/shared': - specifier: 3.3.8 + specifier: workspace:* version: link:../shared estree-walker: specifier: ^2.0.2 @@ -312,19 +312,19 @@ importers: packages/runtime-core: dependencies: '@vue/reactivity': - specifier: 3.3.8 + specifier: workspace:* version: link:../reactivity '@vue/shared': - specifier: 3.3.8 + specifier: workspace:* version: link:../shared packages/runtime-dom: dependencies: '@vue/runtime-core': - specifier: 3.3.8 + specifier: workspace:* version: link:../runtime-core '@vue/shared': - specifier: 3.3.8 + specifier: workspace:* version: link:../shared csstype: specifier: ^3.1.2 @@ -333,22 +333,22 @@ importers: packages/runtime-test: dependencies: '@vue/runtime-core': - specifier: 3.3.8 + specifier: workspace:* version: link:../runtime-core '@vue/shared': - specifier: 3.3.8 + specifier: workspace:* version: link:../shared packages/server-renderer: dependencies: '@vue/compiler-ssr': - specifier: 3.3.8 + specifier: workspace:* version: link:../compiler-ssr '@vue/shared': - specifier: 3.3.8 + specifier: workspace:* version: link:../shared vue: - specifier: 3.3.8 + specifier: workspace:* version: link:../vue packages/sfc-playground: @@ -387,19 +387,19 @@ importers: packages/vue: dependencies: '@vue/compiler-dom': - specifier: 3.3.8 + specifier: workspace:* version: link:../compiler-dom '@vue/compiler-sfc': - specifier: 3.3.8 + specifier: workspace:* version: link:../compiler-sfc '@vue/runtime-dom': - specifier: 3.3.8 + specifier: workspace:* version: link:../runtime-dom '@vue/server-renderer': - specifier: 3.3.8 + specifier: workspace:* version: link:../server-renderer '@vue/shared': - specifier: 3.3.8 + specifier: workspace:* version: link:../shared typescript: specifier: '*' @@ -417,7 +417,7 @@ importers: specifier: ^1.0.2 version: 1.0.2 vue: - specifier: 3.3.8 + specifier: workspace:* version: link:../vue packages: diff --git a/scripts/release.js b/scripts/release.js index a64cba03b..ec6d3cfde 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -325,10 +325,22 @@ async function isInSyncWithRemote() { `https://api.github.com/repos/vuejs/core/commits/${branch}?per_page=1` ) const data = await res.json() - return data.sha === sha + if (data.sha === sha) { + return true + } else { + // @ts-ignore + const { yes } = await prompt({ + type: 'confirm', + name: 'yes', + message: pico.red( + `Local HEAD is not up-to-date with remote. Are you sure you want to continue?` + ) + }) + return yes + } } catch (e) { console.error( - 'Failed to check whether local HEAD is up-to-date with remote.' + pico.red('Failed to check whether local HEAD is up-to-date with remote.') ) return false } @@ -348,8 +360,10 @@ function updatePackage(pkgRoot, version, getNewPackageName) { const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8')) pkg.name = getNewPackageName(pkg.name) pkg.version = version - updateDeps(pkg, 'dependencies', version, getNewPackageName) - updateDeps(pkg, 'peerDependencies', version, getNewPackageName) + if (isCanary) { + updateDeps(pkg, 'dependencies', version, getNewPackageName) + updateDeps(pkg, 'peerDependencies', version, getNewPackageName) + } fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n') } @@ -357,9 +371,6 @@ function updateDeps(pkg, depType, version, getNewPackageName) { const deps = pkg[depType] if (!deps) return Object.keys(deps).forEach(dep => { - if (deps[dep] === 'workspace:*') { - return - } if (isCorePackage(dep)) { const newName = getNewPackageName(dep) const newVersion = newName === dep ? version : `npm:${newName}@${version}` @@ -395,6 +406,8 @@ async function publishPackage(pkgName, version) { step(`Publishing ${pkgName}...`) try { + // Don't change the package manager here as we rely on pnpm to handle + // workspace:* deps await run( 'pnpm', [ From fc772dbf7398e8ce961025556594b4a7d3f64871 Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 21 Nov 2023 09:37:37 +0800 Subject: [PATCH 3/4] chore: exclude private packages from version updates --- packages/dts-built-test/package.json | 4 ++-- packages/dts-test/package.json | 4 ++-- packages/runtime-test/package.json | 4 ++-- packages/sfc-playground/package.json | 4 ++-- packages/template-explorer/package.json | 2 +- scripts/release.js | 18 ++++++++++-------- 6 files changed, 19 insertions(+), 17 deletions(-) diff --git a/packages/dts-built-test/package.json b/packages/dts-built-test/package.json index 427bd9c0c..dca0f80fa 100644 --- a/packages/dts-built-test/package.json +++ b/packages/dts-built-test/package.json @@ -1,11 +1,11 @@ { "name": "@vue/dts-built-test", "private": true, + "version": "0.0.0", "types": "dist/dts-built-test.d.ts", "dependencies": { "@vue/shared": "workspace:*", "@vue/reactivity": "workspace:*", "vue": "workspace:*" - }, - "version": "3.3.8" + } } diff --git a/packages/dts-test/package.json b/packages/dts-test/package.json index 07710bcc8..a6ea96bfa 100644 --- a/packages/dts-test/package.json +++ b/packages/dts-test/package.json @@ -1,9 +1,9 @@ { "name": "dts-test", "private": true, + "version": "0.0.0", "dependencies": { "vue": "workspace:*", "@vue/dts-built-test": "workspace:*" - }, - "version": "3.3.8" + } } diff --git a/packages/runtime-test/package.json b/packages/runtime-test/package.json index e76d8e4e5..c0586a8a2 100644 --- a/packages/runtime-test/package.json +++ b/packages/runtime-test/package.json @@ -1,8 +1,8 @@ { "name": "@vue/runtime-test", - "version": "3.3.8", - "description": "@vue/runtime-test", "private": true, + "version": "0.0.0", + "description": "@vue/runtime-test", "main": "index.js", "module": "dist/runtime-test.esm-bundler.js", "types": "dist/runtime-test.d.ts", diff --git a/packages/sfc-playground/package.json b/packages/sfc-playground/package.json index d95afb24c..769ec8d77 100644 --- a/packages/sfc-playground/package.json +++ b/packages/sfc-playground/package.json @@ -1,8 +1,8 @@ { "name": "@vue/sfc-playground", - "version": "3.3.8", - "type": "module", "private": true, + "version": "0.0.0", + "type": "module", "scripts": { "dev": "vite", "build": "vite build", diff --git a/packages/template-explorer/package.json b/packages/template-explorer/package.json index 351768f60..75073e078 100644 --- a/packages/template-explorer/package.json +++ b/packages/template-explorer/package.json @@ -1,7 +1,7 @@ { "name": "@vue/template-explorer", - "version": "3.3.8", "private": true, + "version": "0.0.0", "buildOptions": { "formats": [ "global" diff --git a/scripts/release.js b/scripts/release.js index ec6d3cfde..10623eedb 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -33,7 +33,15 @@ const skipGit = args.skipGit || args.canary const packages = fs .readdirSync(path.resolve(__dirname, '../packages')) - .filter(p => !p.endsWith('.ts') && !p.startsWith('.')) + .filter(p => { + const pkgRoot = path.resolve(__dirname, '../packages', p) + if (fs.statSync(pkgRoot).isDirectory()) { + const pkg = JSON.parse( + fs.readFileSync(path.resolve(pkgRoot, 'package.json'), 'utf-8') + ) + return !pkg.private + } + }) const isCorePackage = pkgName => { if (!pkgName) return @@ -386,12 +394,6 @@ async function publishPackage(pkgName, version) { if (skippedPackages.includes(pkgName)) { return } - const pkgRoot = getPkgRoot(pkgName) - const pkgPath = path.resolve(pkgRoot, 'package.json') - const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8')) - if (pkg.private) { - return - } let releaseTag = null if (args.tag) { @@ -419,7 +421,7 @@ async function publishPackage(pkgName, version) { ...(skipGit ? ['--no-git-checks'] : []) ], { - cwd: pkgRoot, + cwd: getPkgRoot(pkgName), stdio: 'pipe' } ) From 1c525f75a3d17a6356d5f66765623c0ae7c0ebcc Mon Sep 17 00:00:00 2001 From: Carlos Rodrigues Date: Wed, 22 Nov 2023 14:18:02 +0000 Subject: [PATCH 4/4] types: support app.component to be `defineComponent` (#9662) --- packages/dts-test/appUse.test-d.ts | 14 +++++++++++++- packages/runtime-core/src/apiCreateApp.ts | 3 ++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/dts-test/appUse.test-d.ts b/packages/dts-test/appUse.test-d.ts index c1bebcd53..ebfc986a7 100644 --- a/packages/dts-test/appUse.test-d.ts +++ b/packages/dts-test/appUse.test-d.ts @@ -1,4 +1,4 @@ -import { createApp, App, Plugin } from 'vue' +import { createApp, App, Plugin, defineComponent } from 'vue' const app = createApp({}) @@ -93,3 +93,15 @@ const PluginTyped: Plugin = (app, options) => {} // @ts-expect-error: needs options app.use(PluginTyped) app.use(PluginTyped, { option2: 2, option3: true }) + +// vuetify usage +const key: string = '' +const aliases: Record = {} +app.component( + key, + defineComponent({ + ...aliases[key], + name: key, + aliasName: aliases[key].name + }) +) diff --git a/packages/runtime-core/src/apiCreateApp.ts b/packages/runtime-core/src/apiCreateApp.ts index 8e4ab1f3a..8e58e6937 100644 --- a/packages/runtime-core/src/apiCreateApp.ts +++ b/packages/runtime-core/src/apiCreateApp.ts @@ -27,6 +27,7 @@ import { version } from '.' import { installAppCompatProperties } from './compat/global' import { NormalizedPropsOptions } from './componentProps' import { ObjectEmitsOptions } from './componentEmits' +import { DefineComponent } from './apiDefineComponent' export interface App { version: string @@ -40,7 +41,7 @@ export interface App { mixin(mixin: ComponentOptions): this component(name: string): Component | undefined - component(name: string, component: Component): this + component(name: string, component: Component | DefineComponent): this directive(name: string): Directive | undefined directive(name: string, directive: Directive): this mount(