From 0126cfff9d93bcec70e5745519f6378e3cd3f39c Mon Sep 17 00:00:00 2001 From: skirtle <65301168+skirtles-code@users.noreply.github.com> Date: Sun, 23 Jun 2024 02:34:52 +0100 Subject: [PATCH 01/84] fix(shared): unwrap refs in toDisplayString (#7306) close #5578 close #5593 close #11199 close #11201 --- .../shared/__tests__/toDisplayString.spec.ts | 16 ++++++++++++++++ packages/shared/src/toDisplayString.ts | 14 ++++++++++---- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/packages/shared/__tests__/toDisplayString.spec.ts b/packages/shared/__tests__/toDisplayString.spec.ts index ef5030239..cd8db0b47 100644 --- a/packages/shared/__tests__/toDisplayString.spec.ts +++ b/packages/shared/__tests__/toDisplayString.spec.ts @@ -11,12 +11,28 @@ describe('toDisplayString', () => { }) test('primitive values', () => { + expect(toDisplayString(0)).toBe('0') expect(toDisplayString(1)).toBe('1') + expect(toDisplayString(NaN)).toBe('NaN') expect(toDisplayString(true)).toBe('true') expect(toDisplayString(false)).toBe('false') expect(toDisplayString('hello')).toBe('hello') }) + test('primitive values in refs', () => { + expect(toDisplayString(ref(0))).toBe('0') + expect(toDisplayString(ref(1))).toBe('1') + expect(toDisplayString(ref(NaN))).toBe('NaN') + expect(toDisplayString(ref(true))).toBe('true') + expect(toDisplayString(ref(false))).toBe('false') + expect(toDisplayString(ref('hello'))).toBe('hello') + }) + + test('symbol values', () => { + expect(toDisplayString(Symbol('hello'))).toBe('Symbol(hello)') + expect(toDisplayString(ref(Symbol('hello')))).toBe('Symbol(hello)') + }) + test('Object and Arrays', () => { const obj = { foo: 123 } expect(toDisplayString(obj)).toBe(JSON.stringify(obj, null, 2)) diff --git a/packages/shared/src/toDisplayString.ts b/packages/shared/src/toDisplayString.ts index b63cb4112..6d6948bc5 100644 --- a/packages/shared/src/toDisplayString.ts +++ b/packages/shared/src/toDisplayString.ts @@ -10,6 +10,11 @@ import { objectToString, } from './general' +// can't use isRef here since @vue/shared has no deps +const isRef = (val: any): val is { value: unknown } => { + return !!(val && val.__v_isRef === true) +} + /** * For converting {{ interpolation }} values to displayed strings. * @private @@ -22,13 +27,14 @@ export const toDisplayString = (val: unknown): string => { : isArray(val) || (isObject(val) && (val.toString === objectToString || !isFunction(val.toString))) - ? JSON.stringify(val, replacer, 2) + ? isRef(val) + ? toDisplayString(val.value) + : JSON.stringify(val, replacer, 2) : String(val) } -const replacer = (_key: string, val: any): any => { - // can't use isRef here since @vue/shared has no deps - if (val && val.__v_isRef) { +const replacer = (_key: string, val: unknown): any => { + if (isRef(val)) { return replacer(_key, val.value) } else if (isMap(val)) { return { From 423b462e59d71dbde51cb025c38272673b047a89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Fern=C3=A1ndez?= Date: Sun, 23 Jun 2024 15:43:40 +0200 Subject: [PATCH 02/84] ci: fix size-report (#11203) --- .github/workflows/size-report.yml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/size-report.yml b/.github/workflows/size-report.yml index 016092409..dafe74a22 100644 --- a/.github/workflows/size-report.yml +++ b/.github/workflows/size-report.yml @@ -13,6 +13,7 @@ permissions: env: PUPPETEER_SKIP_DOWNLOAD: 'true' + COMMENT_MARKER: jobs: size-report: @@ -52,20 +53,15 @@ jobs: path: temp/size-prev if_no_artifact_found: warn - - name: Compare size - run: pnpm tsx scripts/size-report.ts > size-report.md - - - name: Read Size Report - id: size-report - uses: juliangruber/read-file-action@v1 - with: - path: ./size-report.md + - name: Prepare report + run: | + pnpm tsx scripts/size-report.ts > size-report.md + echo '${{ env.COMMENT_MARKER }}' >> size-report.md - name: Create Comment - uses: actions-cool/maintain-one-comment@v3 + uses: thollander/actions-comment-pull-request@v2.5.0 with: - token: ${{ secrets.GITHUB_TOKEN }} - body: | - ${{ steps.size-report.outputs.content }} - - body-include: '' + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + filePath: size-report.md + comment_tag: ${{ env.COMMENT_MARKER }} + pr_number: ${{ github.event.workflow_run.pull_requests[0].number }} From 4e8045b18e4771e937508e01af31ab31472675d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Fern=C3=A1ndez?= Date: Sun, 23 Jun 2024 21:00:38 +0200 Subject: [PATCH 03/84] ci: re-fix size report (#11204) --- .github/workflows/size-report.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/size-report.yml b/.github/workflows/size-report.yml index dafe74a22..89541a50d 100644 --- a/.github/workflows/size-report.yml +++ b/.github/workflows/size-report.yml @@ -13,7 +13,6 @@ permissions: env: PUPPETEER_SKIP_DOWNLOAD: 'true' - COMMENT_MARKER: jobs: size-report: @@ -54,14 +53,12 @@ jobs: if_no_artifact_found: warn - name: Prepare report - run: | - pnpm tsx scripts/size-report.ts > size-report.md - echo '${{ env.COMMENT_MARKER }}' >> size-report.md + run: pnpm tsx scripts/size-report.ts > size-report.md - name: Create Comment uses: thollander/actions-comment-pull-request@v2.5.0 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} filePath: size-report.md - comment_tag: ${{ env.COMMENT_MARKER }} pr_number: ${{ github.event.workflow_run.pull_requests[0].number }} + comment_tag: VUE_CORE_SIZE From b16e272def3039429ecea178b4087073b321b316 Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 24 Jun 2024 10:25:25 +0800 Subject: [PATCH 04/84] chore: update changelog with vue-tsc notes for 3.4.30 [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2a894f97..cbe2eb2b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## [3.4.30](https://github.com/vuejs/core/compare/v3.4.29...v3.4.30) (2024-06-22) +**Note: this release contains a fix (#11150) that requires `vue-tsc` to also be updated in sync to ^2.0.22. See #11196** ### Bug Fixes From 00341e8d6684fb2297c7a12970c7f7a731e9f94f Mon Sep 17 00:00:00 2001 From: Tycho Date: Mon, 24 Jun 2024 10:26:17 +0800 Subject: [PATCH 05/84] chore: fix typo (#11195) [ci skip] --- packages/runtime-core/src/component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-core/src/component.ts b/packages/runtime-core/src/component.ts index 93b3ad943..b5faa856e 100644 --- a/packages/runtime-core/src/component.ts +++ b/packages/runtime-core/src/component.ts @@ -94,7 +94,7 @@ export type Data = Record * the usage of `InstanceType` which only works for * constructor-based component definition types. * - * Exmaple: + * @example * ```ts * const MyComp = { ... } * declare const instance: ComponentInstance From ccca42fe54f59c434feab810b27282f5eb207761 Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 24 Jun 2024 10:51:13 +0800 Subject: [PATCH 06/84] chore: add more details on what PRs are accepted in contribution guide [ci skip] --- .github/contributing.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/contributing.md b/.github/contributing.md index da1bd5ec4..5b9206a85 100644 --- a/.github/contributing.md +++ b/.github/contributing.md @@ -17,6 +17,27 @@ Hi! I'm really excited that you are interested in contributing to Vue.js. Before ## Pull Request Guidelines +### What kinds of Pull Requests are accepted? + +- Bug fix that addresses a clearly identified bug. **"Clearly identified bug"** means the bug has a proper reproduction either from a related open issue, or is included in the PR itself. Avoid submitting PRs that claim to fix something but do not sufficiently explain what is being fixed. + +- New feature that addresses a clearly explained and widely applicable use case. **"Widely applicable"** means the new feature should provide non-trivial improvements to the majority of the user base. Vue already has a large API surface so we are quite cautious about adding new features - if the use case is niche and can be addressed via userland implementations, it likely isn't suitable to go into core. + + The feature implementation should also consider the trade-off between the added complexity vs. the benefits gained. For example, if a small feature requires significant changes that spreads across the codebase, it is likely not worth it, or the approach should be reconsidered. + + If the feature has a non-trivial API surface addition, or significantly affects the way a common use case is approached by the users, it should go through a discussion first in the [RFC repo](https://github.com/vuejs/rfcs/discussions). PRs of such features without prior discussion make it really difficult to steer / adjust the API design due to coupling with concrete implementations, and can lead to wasted work. + +- Chore: typos, comment improvements, build config, CI config, etc. For typos and comment changes, try to combine multiple of them into a single PR. + +- **It should be noted that we discourage contributors from submitting code refactors that are largely stylistic.** Code refactors are only accepted if it improves performance, or comes with sufficient explanations on why it objectively improves the code quality (e.g. makes a related feature implementation easier). + + The reason is that code readability is subjective. The maintainers of this project have chosen to write the code in its current style based on our preferences, and we do not want to spend time explaining our stylistic preferences. Contributors should just respect the established conventions when contributing code. + + Another aspect of it is that large scale stylistic changes result in massive diffs that touch multiple files, adding noise to the git history and makes tracing behavior changes across commits more cumbersome. + + +### Pull Request Checklist + - Vue core has two primary work branches: `main` and `minor`. - If your pull request is a feature that adds new API surface, it should be submitted against the `minor` branch. From cdd867b98f16322fbb8dd9c9264f4e26bb5d656c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 10:52:54 +0800 Subject: [PATCH 07/84] chore(deps): update autofix-ci/action digest to dd55f44 (#11206) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/autofix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index e7f9a4c8d..24f012a9d 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -31,4 +31,4 @@ jobs: - name: Run prettier run: pnpm run format - - uses: autofix-ci/action@ea32e3a12414e6d3183163c3424a7d7a8631ad84 + - uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a From a1170db9e0f516698fc0a30b58bb17b41bf69a1d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 10:53:17 +0800 Subject: [PATCH 08/84] chore(deps): update all non-major dependencies (#11207) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 10 +- packages/compiler-sfc/package.json | 2 +- pnpm-lock.yaml | 190 ++++++++++++++--------------- 3 files changed, 101 insertions(+), 101 deletions(-) diff --git a/package.json b/package.json index 545c05379..b17d7f765 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "version": "3.4.30", - "packageManager": "pnpm@9.3.0", + "packageManager": "pnpm@9.4.0", "type": "module", "scripts": { "dev": "node scripts/dev.js", @@ -67,10 +67,10 @@ "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-replace": "5.0.4", - "@swc/core": "^1.6.1", + "@swc/core": "^1.6.5", "@types/hash-sum": "^1.0.2", "@types/minimist": "^1.2.5", - "@types/node": "^20.14.2", + "@types/node": "^20.14.8", "@types/semver": "^7.5.8", "@vitest/coverage-istanbul": "^1.6.0", "@vue/consolidate": "1.0.0", @@ -82,7 +82,7 @@ "eslint-plugin-import-x": "^0.5.1", "eslint-plugin-vitest": "^0.5.4", "estree-walker": "^2.0.2", - "execa": "^9.2.0", + "execa": "^9.3.0", "jsdom": "^24.1.0", "lint-staged": "^15.2.7", "lodash": "^4.17.21", @@ -107,7 +107,7 @@ "terser": "^5.31.1", "todomvc-app-css": "^2.4.3", "tslib": "^2.6.3", - "tsx": "^4.15.5", + "tsx": "^4.15.7", "typescript": "~5.4.5", "typescript-eslint": "^7.13.0", "vite": "^5.3.1", diff --git a/packages/compiler-sfc/package.json b/packages/compiler-sfc/package.json index 53344bbd7..c0bea5f73 100644 --- a/packages/compiler-sfc/package.json +++ b/packages/compiler-sfc/package.json @@ -62,6 +62,6 @@ "postcss-modules": "^6.0.0", "postcss-selector-parser": "^6.1.0", "pug": "^3.0.3", - "sass": "^1.77.5" + "sass": "^1.77.6" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 624d2512e..e9d25751e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,7 +16,7 @@ importers: version: 7.24.7 '@codspeed/vitest-plugin': specifier: ^3.1.0 - version: 3.1.0(vite@5.3.1(@types/node@20.14.2)(sass@1.77.5)(terser@5.31.1))(vitest@1.6.0(@types/node@20.14.2)(jsdom@24.1.0)(sass@1.77.5)(terser@5.31.1)) + version: 3.1.0(vite@5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1))(vitest@1.6.0(@types/node@20.14.8)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1)) '@rollup/plugin-alias': specifier: ^5.1.0 version: 5.1.0(rollup@4.18.0) @@ -33,8 +33,8 @@ importers: specifier: 5.0.4 version: 5.0.4(rollup@4.18.0) '@swc/core': - specifier: ^1.6.1 - version: 1.6.1 + specifier: ^1.6.5 + version: 1.6.5 '@types/hash-sum': specifier: ^1.0.2 version: 1.0.2 @@ -42,14 +42,14 @@ importers: specifier: ^1.2.5 version: 1.2.5 '@types/node': - specifier: ^20.14.2 - version: 20.14.2 + specifier: ^20.14.8 + version: 20.14.8 '@types/semver': specifier: ^7.5.8 version: 7.5.8 '@vitest/coverage-istanbul': specifier: ^1.6.0 - version: 1.6.0(vitest@1.6.0(@types/node@20.14.2)(jsdom@24.1.0)(sass@1.77.5)(terser@5.31.1)) + version: 1.6.0(vitest@1.6.0(@types/node@20.14.8)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1)) '@vue/consolidate': specifier: 1.0.0 version: 1.0.0 @@ -73,13 +73,13 @@ importers: version: 0.5.1(eslint@9.5.0)(typescript@5.4.5) eslint-plugin-vitest: specifier: ^0.5.4 - version: 0.5.4(eslint@9.5.0)(typescript@5.4.5)(vitest@1.6.0(@types/node@20.14.2)(jsdom@24.1.0)(sass@1.77.5)(terser@5.31.1)) + version: 0.5.4(eslint@9.5.0)(typescript@5.4.5)(vitest@1.6.0(@types/node@20.14.8)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1)) estree-walker: specifier: ^2.0.2 version: 2.0.2 execa: - specifier: ^9.2.0 - version: 9.2.0 + specifier: ^9.3.0 + version: 9.3.0 jsdom: specifier: ^24.1.0 version: 24.1.0 @@ -153,8 +153,8 @@ importers: specifier: ^2.6.3 version: 2.6.3 tsx: - specifier: ^4.15.5 - version: 4.15.5 + specifier: ^4.15.7 + version: 4.15.7 typescript: specifier: ~5.4.5 version: 5.4.5 @@ -163,10 +163,10 @@ importers: version: 7.13.0(eslint@9.5.0)(typescript@5.4.5) vite: specifier: ^5.3.1 - version: 5.3.1(@types/node@20.14.2)(sass@1.77.5)(terser@5.31.1) + version: 5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1) vitest: specifier: ^1.6.0 - version: 1.6.0(@types/node@20.14.2)(jsdom@24.1.0)(sass@1.77.5)(terser@5.31.1) + version: 1.6.0(@types/node@20.14.8)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1) packages/compiler-core: dependencies: @@ -257,8 +257,8 @@ importers: specifier: ^3.0.3 version: 3.0.3 sass: - specifier: ^1.77.5 - version: 1.77.5 + specifier: ^1.77.6 + version: 1.77.6 packages/compiler-ssr: dependencies: @@ -358,10 +358,10 @@ importers: devDependencies: '@vitejs/plugin-vue': specifier: ^5.0.5 - version: 5.0.5(vite@5.3.1(@types/node@20.14.2)(sass@1.77.5)(terser@5.31.1))(vue@packages+vue) + version: 5.0.5(vite@5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1))(vue@packages+vue) vite: specifier: ^5.3.1 - version: 5.3.1(@types/node@20.14.2)(sass@1.77.5)(terser@5.31.1) + version: 5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1) packages/shared: {} @@ -906,68 +906,68 @@ packages: resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==} engines: {node: '>=18'} - '@swc/core-darwin-arm64@1.6.1': - resolution: {integrity: sha512-u6GdwOXsOEdNAdSI6nWq6G2BQw5HiSNIZVcBaH1iSvBnxZvWbnIKyDiZKaYnDwTLHLzig2GuUjjE2NaCJPy4jg==} + '@swc/core-darwin-arm64@1.6.5': + resolution: {integrity: sha512-RGQhMdni2v1/ANQ/2K+F+QYdzaucekYBewZcX1ogqJ8G5sbPaBdYdDN1qQ4kHLCIkPtGP6qC7c71qPEqL2RidQ==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] - '@swc/core-darwin-x64@1.6.1': - resolution: {integrity: sha512-/tXwQibkDNLVbAtr7PUQI0iQjoB708fjhDDDfJ6WILSBVZ3+qs/LHjJ7jHwumEYxVq1XA7Fv2Q7SE/ZSQoWHcQ==} + '@swc/core-darwin-x64@1.6.5': + resolution: {integrity: sha512-/pSN0/Jtcbbb9+ovS9rKxR3qertpFAM3OEJr/+Dh/8yy7jK5G5EFPIrfsw/7Q5987ERPIJIH6BspK2CBB2tgcg==} engines: {node: '>=10'} cpu: [x64] os: [darwin] - '@swc/core-linux-arm-gnueabihf@1.6.1': - resolution: {integrity: sha512-aDgipxhJTms8iH78emHVutFR2c16LNhO+NTRCdYi+X4PyIn58/DyYTH6VDZ0AeEcS5f132ZFldU5AEgExwihXA==} + '@swc/core-linux-arm-gnueabihf@1.6.5': + resolution: {integrity: sha512-B0g/dROCE747RRegs/jPHuKJgwXLracDhnqQa80kFdgWEMjlcb7OMCgs5OX86yJGRS4qcYbiMGD0Pp7Kbqn3yw==} engines: {node: '>=10'} cpu: [arm] os: [linux] - '@swc/core-linux-arm64-gnu@1.6.1': - resolution: {integrity: sha512-XkJ+eO4zUKG5g458RyhmKPyBGxI0FwfWFgpfIj5eDybxYJ6s4HBT5MoxyBLorB5kMlZ0XoY/usUMobPVY3nL0g==} + '@swc/core-linux-arm64-gnu@1.6.5': + resolution: {integrity: sha512-W8meapgXTq8AOtSvDG4yKR8ant2WWD++yOjgzAleB5VAC+oC+aa8YJROGxj8HepurU8kurqzcialwoMeq5SZZQ==} engines: {node: '>=10'} cpu: [arm64] os: [linux] - '@swc/core-linux-arm64-musl@1.6.1': - resolution: {integrity: sha512-dr6YbLBg/SsNxs1hDqJhxdcrS8dGMlOXJwXIrUvACiA8jAd6S5BxYCaqsCefLYXtaOmu0bbx1FB/evfodqB70Q==} + '@swc/core-linux-arm64-musl@1.6.5': + resolution: {integrity: sha512-jyCKqoX50Fg8rJUQqh4u5PqnE7nqYKXHjVH2WcYr114/MU21zlsI+YL6aOQU1XP8bJQ2gPQ1rnlnGJdEHiKS/w==} engines: {node: '>=10'} cpu: [arm64] os: [linux] - '@swc/core-linux-x64-gnu@1.6.1': - resolution: {integrity: sha512-A0b/3V+yFy4LXh3O9umIE7LXPC7NBWdjl6AQYqymSMcMu0EOb1/iygA6s6uWhz9y3e172Hpb9b/CGsuD8Px/bg==} + '@swc/core-linux-x64-gnu@1.6.5': + resolution: {integrity: sha512-G6HmUn/RRIlXC0YYFfBz2qh6OZkHS/KUPkhoG4X9ADcgWXXjOFh6JrefwsYj8VBAJEnr5iewzjNfj+nztwHaeA==} engines: {node: '>=10'} cpu: [x64] os: [linux] - '@swc/core-linux-x64-musl@1.6.1': - resolution: {integrity: sha512-5dJjlzZXhC87nZZZWbpiDP8kBIO0ibis893F/rtPIQBI5poH+iJuA32EU3wN4/WFHeK4et8z6SGSVghPtWyk4g==} + '@swc/core-linux-x64-musl@1.6.5': + resolution: {integrity: sha512-AQpBjBnelQDSbeTJA50AXdS6+CP66LsXIMNTwhPSgUfE7Bx1ggZV11Fsi4Q5SGcs6a8Qw1cuYKN57ZfZC5QOuA==} engines: {node: '>=10'} cpu: [x64] os: [linux] - '@swc/core-win32-arm64-msvc@1.6.1': - resolution: {integrity: sha512-HBi1ZlwvfcUibLtT3g/lP57FaDPC799AD6InolB2KSgkqyBbZJ9wAXM8/CcH67GLIP0tZ7FqblrJTzGXxetTJQ==} + '@swc/core-win32-arm64-msvc@1.6.5': + resolution: {integrity: sha512-MZTWM8kUwS30pVrtbzSGEXtek46aXNb/mT9D6rsS7NvOuv2w+qZhjR1rzf4LNbbn5f8VnR4Nac1WIOYZmfC5ng==} engines: {node: '>=10'} cpu: [arm64] os: [win32] - '@swc/core-win32-ia32-msvc@1.6.1': - resolution: {integrity: sha512-AKqHohlWERclexar5y6ux4sQ8yaMejEXNxeKXm7xPhXrp13/1p4/I3E5bPVX/jMnvpm4HpcKSP0ee2WsqmhhPw==} + '@swc/core-win32-ia32-msvc@1.6.5': + resolution: {integrity: sha512-WZdu4gISAr3yOm1fVwKhhk6+MrP7kVX0KMP7+ZQFTN5zXQEiDSDunEJKVgjMVj3vlR+6mnAqa/L0V9Qa8+zKlQ==} engines: {node: '>=10'} cpu: [ia32] os: [win32] - '@swc/core-win32-x64-msvc@1.6.1': - resolution: {integrity: sha512-0dLdTLd+ONve8kgC5T6VQ2Y5G+OZ7y0ujjapnK66wpvCBM6BKYGdT/OKhZKZydrC5gUKaxFN6Y5oOt9JOFUrOQ==} + '@swc/core-win32-x64-msvc@1.6.5': + resolution: {integrity: sha512-ezXgucnMTzlFIxQZw7ls/5r2hseFaRoDL04cuXUOs97E8r+nJSmFsRQm/ygH5jBeXNo59nyZCalrjJAjwfgACA==} engines: {node: '>=10'} cpu: [x64] os: [win32] - '@swc/core@1.6.1': - resolution: {integrity: sha512-Yz5uj5hNZpS5brLtBvKY0L4s2tBAbQ4TjmW8xF1EC3YLFxQRrUjMP49Zm1kp/KYyYvTkSaG48Ffj2YWLu9nChw==} + '@swc/core@1.6.5': + resolution: {integrity: sha512-tyVvUK/HDOUUsK6/GmWvnqUtD9oDpPUA4f7f7JCOV8hXxtfjMtAZeBKf93yrB1XZet69TDR7EN0hFC6i4MF0Ig==} engines: {node: '>=10'} peerDependencies: '@swc/helpers': '*' @@ -978,8 +978,8 @@ packages: '@swc/counter@0.1.3': resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} - '@swc/types@0.1.8': - resolution: {integrity: sha512-RNFA3+7OJFNYY78x0FYwi1Ow+iF1eF5WvmfY1nXPOEH4R2p/D4Cr1vzje7dNAI2aLFqpv8Wyz4oKSWqIZArpQA==} + '@swc/types@0.1.9': + resolution: {integrity: sha512-qKnCno++jzcJ4lM4NTfYifm1EFSCeIfKiAHAfkENZAV5Kl9PjJIyd2yeeVv6c/2CckuLyv2NmRC5pv6pm2WQBg==} '@tootallnate/quickjs-emscripten@0.23.0': resolution: {integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==} @@ -996,8 +996,8 @@ packages: '@types/minimist@1.2.5': resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} - '@types/node@20.14.2': - resolution: {integrity: sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==} + '@types/node@20.14.8': + resolution: {integrity: sha512-DO+2/jZinXfROG7j7WKFn/3C6nFwxy2lLpgLjEXJz+0XKphZlTLJ14mo8Vfg8X5BWN6XjyESXq+LcYdT7tR3bA==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -1793,8 +1793,8 @@ packages: resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} engines: {node: '>=16.17'} - execa@9.2.0: - resolution: {integrity: sha512-vpOyYg7UAVKLAWWtRS2gAdgkT7oJbCn0me3gmUmxZih4kd3MF/oo8kNTBTIbkO3yuuF5uB4ZCZfn8BOolITYhg==} + execa@9.3.0: + resolution: {integrity: sha512-l6JFbqnHEadBoVAVpN5dl2yCyfX28WoBAGaoQcNmLLSedOxTxcn2Qa83s8I/PA5i56vWru2OHOtrwF7Om2vqlg==} engines: {node: ^18.19.0 || >=20.5.0} extract-zip@2.0.1: @@ -2940,8 +2940,8 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - sass@1.77.5: - resolution: {integrity: sha512-oDfX1mukIlxacPdQqNb6mV2tVCrnE+P3nVYioy72V5tlk56CPNcO4TCuFcaCRKKfJ1M3lH95CleRS+dVKL2qMg==} + sass@1.77.6: + resolution: {integrity: sha512-ByXE1oLD79GVq9Ht1PeHWCPMPB8XHpBuz1r85oByKHjZY6qV6rWnQovQzXJXuQ/XyE1Oj3iPk3lo28uzaRA2/Q==} engines: {node: '>=14.0.0'} hasBin: true @@ -3214,8 +3214,8 @@ packages: tslib@2.6.3: resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} - tsx@4.15.5: - resolution: {integrity: sha512-iKi8jQ2VBmZ2kU/FkGkL2OSHBHsazsUzsdC/W/RwhKIEsIoZ1alCclZHP5jGfNHEaEWUJFM1GquzCf+4db3b0w==} + tsx@4.15.7: + resolution: {integrity: sha512-u3H0iSFDZM3za+VxkZ1kywdCeHCn+8/qHQS1MNoO2sONDgD95HlWtt8aB23OzeTmFP9IU4/8bZUdg58Uu5J4cg==} engines: {node: '>=18.0.0'} hasBin: true @@ -3640,11 +3640,11 @@ snapshots: transitivePeerDependencies: - debug - '@codspeed/vitest-plugin@3.1.0(vite@5.3.1(@types/node@20.14.2)(sass@1.77.5)(terser@5.31.1))(vitest@1.6.0(@types/node@20.14.2)(jsdom@24.1.0)(sass@1.77.5)(terser@5.31.1))': + '@codspeed/vitest-plugin@3.1.0(vite@5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1))(vitest@1.6.0(@types/node@20.14.8)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1))': dependencies: '@codspeed/core': 3.1.0 - vite: 5.3.1(@types/node@20.14.2)(sass@1.77.5)(terser@5.31.1) - vitest: 1.6.0(@types/node@20.14.2)(jsdom@24.1.0)(sass@1.77.5)(terser@5.31.1) + vite: 5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1) + vitest: 1.6.0(@types/node@20.14.8)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1) transitivePeerDependencies: - debug @@ -3934,55 +3934,55 @@ snapshots: '@sindresorhus/merge-streams@4.0.0': {} - '@swc/core-darwin-arm64@1.6.1': + '@swc/core-darwin-arm64@1.6.5': optional: true - '@swc/core-darwin-x64@1.6.1': + '@swc/core-darwin-x64@1.6.5': optional: true - '@swc/core-linux-arm-gnueabihf@1.6.1': + '@swc/core-linux-arm-gnueabihf@1.6.5': optional: true - '@swc/core-linux-arm64-gnu@1.6.1': + '@swc/core-linux-arm64-gnu@1.6.5': optional: true - '@swc/core-linux-arm64-musl@1.6.1': + '@swc/core-linux-arm64-musl@1.6.5': optional: true - '@swc/core-linux-x64-gnu@1.6.1': + '@swc/core-linux-x64-gnu@1.6.5': optional: true - '@swc/core-linux-x64-musl@1.6.1': + '@swc/core-linux-x64-musl@1.6.5': optional: true - '@swc/core-win32-arm64-msvc@1.6.1': + '@swc/core-win32-arm64-msvc@1.6.5': optional: true - '@swc/core-win32-ia32-msvc@1.6.1': + '@swc/core-win32-ia32-msvc@1.6.5': optional: true - '@swc/core-win32-x64-msvc@1.6.1': + '@swc/core-win32-x64-msvc@1.6.5': optional: true - '@swc/core@1.6.1': + '@swc/core@1.6.5': dependencies: '@swc/counter': 0.1.3 - '@swc/types': 0.1.8 + '@swc/types': 0.1.9 optionalDependencies: - '@swc/core-darwin-arm64': 1.6.1 - '@swc/core-darwin-x64': 1.6.1 - '@swc/core-linux-arm-gnueabihf': 1.6.1 - '@swc/core-linux-arm64-gnu': 1.6.1 - '@swc/core-linux-arm64-musl': 1.6.1 - '@swc/core-linux-x64-gnu': 1.6.1 - '@swc/core-linux-x64-musl': 1.6.1 - '@swc/core-win32-arm64-msvc': 1.6.1 - '@swc/core-win32-ia32-msvc': 1.6.1 - '@swc/core-win32-x64-msvc': 1.6.1 + '@swc/core-darwin-arm64': 1.6.5 + '@swc/core-darwin-x64': 1.6.5 + '@swc/core-linux-arm-gnueabihf': 1.6.5 + '@swc/core-linux-arm64-gnu': 1.6.5 + '@swc/core-linux-arm64-musl': 1.6.5 + '@swc/core-linux-x64-gnu': 1.6.5 + '@swc/core-linux-x64-musl': 1.6.5 + '@swc/core-win32-arm64-msvc': 1.6.5 + '@swc/core-win32-ia32-msvc': 1.6.5 + '@swc/core-win32-x64-msvc': 1.6.5 '@swc/counter@0.1.3': {} - '@swc/types@0.1.8': + '@swc/types@0.1.9': dependencies: '@swc/counter': 0.1.3 @@ -3996,7 +3996,7 @@ snapshots: '@types/minimist@1.2.5': {} - '@types/node@20.14.2': + '@types/node@20.14.8': dependencies: undici-types: 5.26.5 @@ -4008,7 +4008,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 20.14.2 + '@types/node': 20.14.8 optional: true '@typescript-eslint/eslint-plugin@7.13.0(@typescript-eslint/parser@7.13.0(eslint@9.5.0)(typescript@5.4.5))(eslint@9.5.0)(typescript@5.4.5)': @@ -4133,12 +4133,12 @@ snapshots: '@typescript-eslint/types': 7.8.0 eslint-visitor-keys: 3.4.3 - '@vitejs/plugin-vue@5.0.5(vite@5.3.1(@types/node@20.14.2)(sass@1.77.5)(terser@5.31.1))(vue@packages+vue)': + '@vitejs/plugin-vue@5.0.5(vite@5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1))(vue@packages+vue)': dependencies: - vite: 5.3.1(@types/node@20.14.2)(sass@1.77.5)(terser@5.31.1) + vite: 5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1) vue: link:packages/vue - '@vitest/coverage-istanbul@1.6.0(vitest@1.6.0(@types/node@20.14.2)(jsdom@24.1.0)(sass@1.77.5)(terser@5.31.1))': + '@vitest/coverage-istanbul@1.6.0(vitest@1.6.0(@types/node@20.14.8)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1))': dependencies: debug: 4.3.4 istanbul-lib-coverage: 3.2.2 @@ -4149,7 +4149,7 @@ snapshots: magicast: 0.3.4 picocolors: 1.0.1 test-exclude: 6.0.0 - vitest: 1.6.0(@types/node@20.14.2)(jsdom@24.1.0)(sass@1.77.5)(terser@5.31.1) + vitest: 1.6.0(@types/node@20.14.8)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1) transitivePeerDependencies: - supports-color @@ -4793,12 +4793,12 @@ snapshots: - supports-color - typescript - eslint-plugin-vitest@0.5.4(eslint@9.5.0)(typescript@5.4.5)(vitest@1.6.0(@types/node@20.14.2)(jsdom@24.1.0)(sass@1.77.5)(terser@5.31.1)): + eslint-plugin-vitest@0.5.4(eslint@9.5.0)(typescript@5.4.5)(vitest@1.6.0(@types/node@20.14.8)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1)): dependencies: '@typescript-eslint/utils': 7.8.0(eslint@9.5.0)(typescript@5.4.5) eslint: 9.5.0 optionalDependencies: - vitest: 1.6.0(@types/node@20.14.2)(jsdom@24.1.0)(sass@1.77.5)(terser@5.31.1) + vitest: 1.6.0(@types/node@20.14.8)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1) transitivePeerDependencies: - supports-color - typescript @@ -4903,7 +4903,7 @@ snapshots: signal-exit: 4.1.0 strip-final-newline: 3.0.0 - execa@9.2.0: + execa@9.3.0: dependencies: '@sindresorhus/merge-streams': 4.0.0 cross-spawn: 7.0.3 @@ -6107,7 +6107,7 @@ snapshots: safer-buffer@2.1.2: {} - sass@1.77.5: + sass@1.77.6: dependencies: chokidar: 3.6.0 immutable: 4.3.5 @@ -6378,7 +6378,7 @@ snapshots: tslib@2.6.3: {} - tsx@4.15.5: + tsx@4.15.7: dependencies: esbuild: 0.21.5 get-tsconfig: 4.7.5 @@ -6457,13 +6457,13 @@ snapshots: vary@1.1.2: {} - vite-node@1.6.0(@types/node@20.14.2)(sass@1.77.5)(terser@5.31.1): + vite-node@1.6.0(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1): dependencies: cac: 6.7.14 debug: 4.3.5 pathe: 1.1.2 picocolors: 1.0.1 - vite: 5.3.1(@types/node@20.14.2)(sass@1.77.5)(terser@5.31.1) + vite: 5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1) transitivePeerDependencies: - '@types/node' - less @@ -6474,18 +6474,18 @@ snapshots: - supports-color - terser - vite@5.3.1(@types/node@20.14.2)(sass@1.77.5)(terser@5.31.1): + vite@5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1): dependencies: esbuild: 0.21.5 postcss: 8.4.38 rollup: 4.18.0 optionalDependencies: - '@types/node': 20.14.2 + '@types/node': 20.14.8 fsevents: 2.3.3 - sass: 1.77.5 + sass: 1.77.6 terser: 5.31.1 - vitest@1.6.0(@types/node@20.14.2)(jsdom@24.1.0)(sass@1.77.5)(terser@5.31.1): + vitest@1.6.0(@types/node@20.14.8)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1): dependencies: '@vitest/expect': 1.6.0 '@vitest/runner': 1.6.0 @@ -6504,11 +6504,11 @@ snapshots: strip-literal: 2.1.0 tinybench: 2.7.0 tinypool: 0.8.4 - vite: 5.3.1(@types/node@20.14.2)(sass@1.77.5)(terser@5.31.1) - vite-node: 1.6.0(@types/node@20.14.2)(sass@1.77.5)(terser@5.31.1) + vite: 5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1) + vite-node: 1.6.0(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1) why-is-node-running: 2.2.2 optionalDependencies: - '@types/node': 20.14.2 + '@types/node': 20.14.8 jsdom: 24.1.0 transitivePeerDependencies: - less From 89946f8f6f70730f2a180348e6b46da7603db95f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 10:53:36 +0800 Subject: [PATCH 09/84] chore(deps): update dependency typescript-eslint to ^7.13.1 (#11209) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 102 ++++++++++++++++++++++++------------------------- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/package.json b/package.json index b17d7f765..51af819ee 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "tslib": "^2.6.3", "tsx": "^4.15.7", "typescript": "~5.4.5", - "typescript-eslint": "^7.13.0", + "typescript-eslint": "^7.13.1", "vite": "^5.3.1", "vitest": "^1.6.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e9d25751e..159b1ee05 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -159,8 +159,8 @@ importers: specifier: ~5.4.5 version: 5.4.5 typescript-eslint: - specifier: ^7.13.0 - version: 7.13.0(eslint@9.5.0)(typescript@5.4.5) + specifier: ^7.13.1 + version: 7.13.1(eslint@9.5.0)(typescript@5.4.5) vite: specifier: ^5.3.1 version: 5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1) @@ -1011,8 +1011,8 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@7.13.0': - resolution: {integrity: sha512-FX1X6AF0w8MdVFLSdqwqN/me2hyhuQg4ykN6ZpVhh1ij/80pTvDKclX1sZB9iqex8SjQfVhwMKs3JtnnMLzG9w==} + '@typescript-eslint/eslint-plugin@7.13.1': + resolution: {integrity: sha512-kZqi+WZQaZfPKnsflLJQCz6Ze9FFSMfXrrIOcyargekQxG37ES7DJNpJUE9Q/X5n3yTIP/WPutVNzgknQ7biLg==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: '@typescript-eslint/parser': ^7.0.0 @@ -1022,8 +1022,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@7.13.0': - resolution: {integrity: sha512-EjMfl69KOS9awXXe83iRN7oIEXy9yYdqWfqdrFAYAAr6syP8eLEFI7ZE4939antx2mNgPRW/o1ybm2SFYkbTVA==} + '@typescript-eslint/parser@7.13.1': + resolution: {integrity: sha512-1ELDPlnLvDQ5ybTSrMhRTFDfOQEOXNM+eP+3HT/Yq7ruWpciQw+Avi73pdEbA4SooCawEWo3dtYbF68gN7Ed1A==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1032,16 +1032,16 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@7.13.0': - resolution: {integrity: sha512-ZrMCe1R6a01T94ilV13egvcnvVJ1pxShkE0+NDjDzH4nvG1wXpwsVI5bZCvE7AEDH1mXEx5tJSVR68bLgG7Dng==} + '@typescript-eslint/scope-manager@7.13.1': + resolution: {integrity: sha512-adbXNVEs6GmbzaCpymHQ0MB6E4TqoiVbC0iqG3uijR8ZYfpAXMGttouQzF4Oat3P2GxDVIrg7bMI/P65LiQZdg==} engines: {node: ^18.18.0 || >=20.0.0} '@typescript-eslint/scope-manager@7.8.0': resolution: {integrity: sha512-viEmZ1LmwsGcnr85gIq+FCYI7nO90DVbE37/ll51hjv9aG+YZMb4WDE2fyWpUR4O/UrhGRpYXK/XajcGTk2B8g==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/type-utils@7.13.0': - resolution: {integrity: sha512-xMEtMzxq9eRkZy48XuxlBFzpVMDurUAfDu5Rz16GouAtXm0TaAoTFzqWUFPPuQYXI/CDaH/Bgx/fk/84t/Bc9A==} + '@typescript-eslint/type-utils@7.13.1': + resolution: {integrity: sha512-aWDbLu1s9bmgPGXSzNCxELu+0+HQOapV/y+60gPXafR8e2g1Bifxzevaa+4L2ytCWm+CHqpELq4CSoN9ELiwCg==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1050,16 +1050,16 @@ packages: typescript: optional: true - '@typescript-eslint/types@7.13.0': - resolution: {integrity: sha512-QWuwm9wcGMAuTsxP+qz6LBBd3Uq8I5Nv8xb0mk54jmNoCyDspnMvVsOxI6IsMmway5d1S9Su2+sCKv1st2l6eA==} + '@typescript-eslint/types@7.13.1': + resolution: {integrity: sha512-7K7HMcSQIAND6RBL4kDl24sG/xKM13cA85dc7JnmQXw2cBDngg7c19B++JzvJHRG3zG36n9j1i451GBzRuHchw==} engines: {node: ^18.18.0 || >=20.0.0} '@typescript-eslint/types@7.8.0': resolution: {integrity: sha512-wf0peJ+ZGlcH+2ZS23aJbOv+ztjeeP8uQ9GgwMJGVLx/Nj9CJt17GWgWWoSmoRVKAX2X+7fzEnAjxdvK2gqCLw==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/typescript-estree@7.13.0': - resolution: {integrity: sha512-cAvBvUoobaoIcoqox1YatXOnSl3gx92rCZoMRPzMNisDiM12siGilSM4+dJAekuuHTibI2hVC2fYK79iSFvWjw==} + '@typescript-eslint/typescript-estree@7.13.1': + resolution: {integrity: sha512-uxNr51CMV7npU1BxZzYjoVz9iyjckBduFBP0S5sLlh1tXYzHzgZ3BR9SVsNed+LmwKrmnqN3Kdl5t7eZ5TS1Yw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: typescript: '*' @@ -1076,8 +1076,8 @@ packages: typescript: optional: true - '@typescript-eslint/utils@7.13.0': - resolution: {integrity: sha512-jceD8RgdKORVnB4Y6BqasfIkFhl4pajB1wVxrF4akxD2QPM8GNYjgGwEzYS+437ewlqqrg7Dw+6dhdpjMpeBFQ==} + '@typescript-eslint/utils@7.13.1': + resolution: {integrity: sha512-h5MzFBD5a/Gh/fvNdp9pTfqJAbuQC4sCN2WzuXme71lqFJsZtLbjxfSk4r3p02WIArOF9N94pdsLiGutpDbrXQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -1088,8 +1088,8 @@ packages: peerDependencies: eslint: ^8.56.0 - '@typescript-eslint/visitor-keys@7.13.0': - resolution: {integrity: sha512-nxn+dozQx+MK61nn/JP+M4eCkHDSxSLDpgE3WcQo0+fkjEolnaB5jswvIKC4K56By8MMgIho7f1PVxERHEo8rw==} + '@typescript-eslint/visitor-keys@7.13.1': + resolution: {integrity: sha512-k/Bfne7lrP7hcb7m9zSsgcBmo+8eicqqfNAJ7uUY+jkTFpKeH2FSkWpFRtimBxgkyvqfu9jTPRbYOvud6isdXA==} engines: {node: ^18.18.0 || >=20.0.0} '@typescript-eslint/visitor-keys@7.8.0': @@ -3239,8 +3239,8 @@ packages: resolution: {integrity: sha512-tB9lu0pQpX5KJq54g+oHOLumOx+pMep4RaM6liXh2PKmVRFF+/vAtUP0ZaJ0kOySfVNjF6doBWPHhBhISKdlIA==} engines: {node: '>=16'} - typescript-eslint@7.13.0: - resolution: {integrity: sha512-upO0AXxyBwJ4BbiC6CRgAJKtGYha2zw4m1g7TIVPSonwYEuf7vCicw3syjS1OxdDMTz96sZIXl3Jx3vWJLLKFw==} + typescript-eslint@7.13.1: + resolution: {integrity: sha512-pvLEuRs8iS9s3Cnp/Wt//hpK8nKc8hVa3cLljHqzaJJQYP8oys8GUyIFqtlev+2lT/fqMPcyQko+HJ6iYK3nFA==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -4011,14 +4011,14 @@ snapshots: '@types/node': 20.14.8 optional: true - '@typescript-eslint/eslint-plugin@7.13.0(@typescript-eslint/parser@7.13.0(eslint@9.5.0)(typescript@5.4.5))(eslint@9.5.0)(typescript@5.4.5)': + '@typescript-eslint/eslint-plugin@7.13.1(@typescript-eslint/parser@7.13.1(eslint@9.5.0)(typescript@5.4.5))(eslint@9.5.0)(typescript@5.4.5)': dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.13.0(eslint@9.5.0)(typescript@5.4.5) - '@typescript-eslint/scope-manager': 7.13.0 - '@typescript-eslint/type-utils': 7.13.0(eslint@9.5.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.13.0(eslint@9.5.0)(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.13.0 + '@typescript-eslint/parser': 7.13.1(eslint@9.5.0)(typescript@5.4.5) + '@typescript-eslint/scope-manager': 7.13.1 + '@typescript-eslint/type-utils': 7.13.1(eslint@9.5.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.13.1(eslint@9.5.0)(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.13.1 eslint: 9.5.0 graphemer: 1.4.0 ignore: 5.3.1 @@ -4029,12 +4029,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.13.0(eslint@9.5.0)(typescript@5.4.5)': + '@typescript-eslint/parser@7.13.1(eslint@9.5.0)(typescript@5.4.5)': dependencies: - '@typescript-eslint/scope-manager': 7.13.0 - '@typescript-eslint/types': 7.13.0 - '@typescript-eslint/typescript-estree': 7.13.0(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.13.0 + '@typescript-eslint/scope-manager': 7.13.1 + '@typescript-eslint/types': 7.13.1 + '@typescript-eslint/typescript-estree': 7.13.1(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.13.1 debug: 4.3.5 eslint: 9.5.0 optionalDependencies: @@ -4042,20 +4042,20 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@7.13.0': + '@typescript-eslint/scope-manager@7.13.1': dependencies: - '@typescript-eslint/types': 7.13.0 - '@typescript-eslint/visitor-keys': 7.13.0 + '@typescript-eslint/types': 7.13.1 + '@typescript-eslint/visitor-keys': 7.13.1 '@typescript-eslint/scope-manager@7.8.0': dependencies: '@typescript-eslint/types': 7.8.0 '@typescript-eslint/visitor-keys': 7.8.0 - '@typescript-eslint/type-utils@7.13.0(eslint@9.5.0)(typescript@5.4.5)': + '@typescript-eslint/type-utils@7.13.1(eslint@9.5.0)(typescript@5.4.5)': dependencies: - '@typescript-eslint/typescript-estree': 7.13.0(typescript@5.4.5) - '@typescript-eslint/utils': 7.13.0(eslint@9.5.0)(typescript@5.4.5) + '@typescript-eslint/typescript-estree': 7.13.1(typescript@5.4.5) + '@typescript-eslint/utils': 7.13.1(eslint@9.5.0)(typescript@5.4.5) debug: 4.3.5 eslint: 9.5.0 ts-api-utils: 1.3.0(typescript@5.4.5) @@ -4064,14 +4064,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/types@7.13.0': {} + '@typescript-eslint/types@7.13.1': {} '@typescript-eslint/types@7.8.0': {} - '@typescript-eslint/typescript-estree@7.13.0(typescript@5.4.5)': + '@typescript-eslint/typescript-estree@7.13.1(typescript@5.4.5)': dependencies: - '@typescript-eslint/types': 7.13.0 - '@typescript-eslint/visitor-keys': 7.13.0 + '@typescript-eslint/types': 7.13.1 + '@typescript-eslint/visitor-keys': 7.13.1 debug: 4.3.5 globby: 11.1.0 is-glob: 4.0.3 @@ -4098,12 +4098,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.13.0(eslint@9.5.0)(typescript@5.4.5)': + '@typescript-eslint/utils@7.13.1(eslint@9.5.0)(typescript@5.4.5)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.5.0) - '@typescript-eslint/scope-manager': 7.13.0 - '@typescript-eslint/types': 7.13.0 - '@typescript-eslint/typescript-estree': 7.13.0(typescript@5.4.5) + '@typescript-eslint/scope-manager': 7.13.1 + '@typescript-eslint/types': 7.13.1 + '@typescript-eslint/typescript-estree': 7.13.1(typescript@5.4.5) eslint: 9.5.0 transitivePeerDependencies: - supports-color @@ -4123,9 +4123,9 @@ snapshots: - supports-color - typescript - '@typescript-eslint/visitor-keys@7.13.0': + '@typescript-eslint/visitor-keys@7.13.1': dependencies: - '@typescript-eslint/types': 7.13.0 + '@typescript-eslint/types': 7.13.1 eslint-visitor-keys: 3.4.3 '@typescript-eslint/visitor-keys@7.8.0': @@ -6397,11 +6397,11 @@ snapshots: type-fest@4.15.0: {} - typescript-eslint@7.13.0(eslint@9.5.0)(typescript@5.4.5): + typescript-eslint@7.13.1(eslint@9.5.0)(typescript@5.4.5): dependencies: - '@typescript-eslint/eslint-plugin': 7.13.0(@typescript-eslint/parser@7.13.0(eslint@9.5.0)(typescript@5.4.5))(eslint@9.5.0)(typescript@5.4.5) - '@typescript-eslint/parser': 7.13.0(eslint@9.5.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.13.0(eslint@9.5.0)(typescript@5.4.5) + '@typescript-eslint/eslint-plugin': 7.13.1(@typescript-eslint/parser@7.13.1(eslint@9.5.0)(typescript@5.4.5))(eslint@9.5.0)(typescript@5.4.5) + '@typescript-eslint/parser': 7.13.1(eslint@9.5.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.13.1(eslint@9.5.0)(typescript@5.4.5) eslint: 9.5.0 optionalDependencies: typescript: 5.4.5 From 01ff603a959935a4ea3e5f69b0180fc452be8015 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 10:53:54 +0800 Subject: [PATCH 10/84] chore(deps): update dependency puppeteer to ~22.12.0 (#11210) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 42 ++++++++++++++---------------------------- 2 files changed, 15 insertions(+), 29 deletions(-) diff --git a/package.json b/package.json index 51af819ee..b28fc69b8 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "prettier": "^3.3.2", "pretty-bytes": "^6.1.1", "pug": "^3.0.3", - "puppeteer": "~22.11.0", + "puppeteer": "~22.12.0", "rimraf": "^5.0.7", "rollup": "^4.18.0", "rollup-plugin-dts": "^6.1.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 159b1ee05..f9171b9b8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -117,8 +117,8 @@ importers: specifier: ^3.0.3 version: 3.0.3 puppeteer: - specifier: ~22.11.0 - version: 22.11.0(typescript@5.4.5) + specifier: ~22.12.0 + version: 22.12.0(typescript@5.4.5) rimraf: specifier: ^5.0.7 version: 5.0.7 @@ -1369,8 +1369,8 @@ packages: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} - chromium-bidi@0.5.23: - resolution: {integrity: sha512-1o/gLU9wDqbN5nL2MtfjykjOuighGXc3/hnWueO1haiEoFgX8h5vbvcA4tgdQfjw1mkZ1OEF4x/+HVeqEX6NoA==} + chromium-bidi@0.5.24: + resolution: {integrity: sha512-5xQNN2SVBdZv4TxeMLaI+PelrnZsHDhn8h2JtyriLr+0qHcZS8BMuo93qN6J1VmtmrgYP+rmcLHcbpnA8QJh+w==} peerDependencies: devtools-protocol: '*' @@ -2805,12 +2805,12 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} - puppeteer-core@22.11.0: - resolution: {integrity: sha512-57YUjhRoSpZWg9lCssWsgzM1/X/1jQnkKbbspbeW0bhZTt3TD4WdNXEYI7KrFFnSvx21tyHhfWW0zlxzbwYSAA==} + puppeteer-core@22.12.0: + resolution: {integrity: sha512-9gY+JwBW/Fp3/x9+cOGK7ZcwqjvtvY2xjqRqsAA0B3ZFMzBauVTSZ26iWTmvOQX2sk78TN/rd5rnetxVxmK5CQ==} engines: {node: '>=18'} - puppeteer@22.11.0: - resolution: {integrity: sha512-U5U0Dx5Tsd/ec39BmflhcSFIK9UnZxGQfyUzvQVHivt6gIi6RgJqYL9MJaU90OG6tTz65XqzN4wF0ZyDyY0NuA==} + puppeteer@22.12.0: + resolution: {integrity: sha512-kyUYI12SyJIjf9UGTnHfhNMYv4oVK321Jb9QZDBiGVNx5453SplvbdKI7UrF+S//3RtCneuUFCyHxnvQXQjpxg==} engines: {node: '>=18'} hasBin: true @@ -3422,18 +3422,6 @@ packages: wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - ws@8.17.0: - resolution: {integrity: sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==} - engines: {node: '>=10.0.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: '>=5.0.2' - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - ws@8.17.1: resolution: {integrity: sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==} engines: {node: '>=10.0.0'} @@ -4430,7 +4418,7 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - chromium-bidi@0.5.23(devtools-protocol@0.0.1299070): + chromium-bidi@0.5.24(devtools-protocol@0.0.1299070): dependencies: devtools-protocol: 0.0.1299070 mitt: 3.0.1 @@ -5936,24 +5924,24 @@ snapshots: punycode@2.3.1: {} - puppeteer-core@22.11.0: + puppeteer-core@22.12.0: dependencies: '@puppeteer/browsers': 2.2.3 - chromium-bidi: 0.5.23(devtools-protocol@0.0.1299070) + chromium-bidi: 0.5.24(devtools-protocol@0.0.1299070) debug: 4.3.5 devtools-protocol: 0.0.1299070 - ws: 8.17.0 + ws: 8.17.1 transitivePeerDependencies: - bufferutil - supports-color - utf-8-validate - puppeteer@22.11.0(typescript@5.4.5): + puppeteer@22.12.0(typescript@5.4.5): dependencies: '@puppeteer/browsers': 2.2.3 cosmiconfig: 9.0.0(typescript@5.4.5) devtools-protocol: 0.0.1299070 - puppeteer-core: 22.11.0 + puppeteer-core: 22.12.0 transitivePeerDependencies: - bufferutil - supports-color @@ -6580,8 +6568,6 @@ snapshots: wrappy@1.0.2: {} - ws@8.17.0: {} - ws@8.17.1: {} xml-name-validator@5.0.0: {} From 261fb7ced144363947213af7be72ad9cbef0056f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 17:07:19 +0800 Subject: [PATCH 11/84] chore(deps): update dawidd6/action-download-artifact action to v6 (#11212) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/size-report.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/size-report.yml b/.github/workflows/size-report.yml index 89541a50d..eb0d7d4fd 100644 --- a/.github/workflows/size-report.yml +++ b/.github/workflows/size-report.yml @@ -36,14 +36,14 @@ jobs: run: pnpm install - name: Download Size Data - uses: dawidd6/action-download-artifact@v4 + uses: dawidd6/action-download-artifact@v6 with: name: size-data run_id: ${{ github.event.workflow_run.id }} path: temp/size - name: Download Previous Size Data - uses: dawidd6/action-download-artifact@v4 + uses: dawidd6/action-download-artifact@v6 with: branch: main workflow: size-data.yml From 912494318f692af1a69fb5f2534b8fd4f852240d Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 26 Jun 2024 08:43:24 +0800 Subject: [PATCH 12/84] chore(types): reduce as any in reactivity --- .../reactivity/src/arrayInstrumentations.ts | 10 ++++++---- packages/reactivity/src/baseHandlers.ts | 18 ++++++++++------- packages/reactivity/src/collectionHandlers.ts | 20 +++++++++---------- 3 files changed, 27 insertions(+), 21 deletions(-) diff --git a/packages/reactivity/src/arrayInstrumentations.ts b/packages/reactivity/src/arrayInstrumentations.ts index a16eabdf7..f77c5723a 100644 --- a/packages/reactivity/src/arrayInstrumentations.ts +++ b/packages/reactivity/src/arrayInstrumentations.ts @@ -198,7 +198,7 @@ export const arrayInstrumentations: Record = { // instrument iterators to take ARRAY_ITERATE dependency function iterator( self: unknown[], - method: keyof Array, + method: keyof Array, wrapValue: (value: any) => unknown, ) { // note that taking ARRAY_ITERATE dependency here is not strictly equivalent @@ -210,11 +210,13 @@ function iterator( // given that JS iterator can only be read once, this doesn't seem like // a plausible use-case, so this tracking simplification seems ok. const arr = shallowReadArray(self) - const iter = (arr[method] as any)() + const iter = (arr[method] as any)() as IterableIterator & { + _next: IterableIterator['next'] + } if (arr !== self && !isShallow(self)) { - ;(iter as any)._next = iter.next + iter._next = iter.next iter.next = () => { - const result = (iter as any)._next() + const result = iter._next() if (result.value) { result.value = wrapValue(result.value) } diff --git a/packages/reactivity/src/baseHandlers.ts b/packages/reactivity/src/baseHandlers.ts index 9a899c955..1b3031aae 100644 --- a/packages/reactivity/src/baseHandlers.ts +++ b/packages/reactivity/src/baseHandlers.ts @@ -34,7 +34,7 @@ const builtInSymbols = new Set( // but accessing them on Symbol leads to TypeError because Symbol is a strict mode // function .filter(key => key !== 'arguments' && key !== 'caller') - .map(key => (Symbol as any)[key]) + .map(key => Symbol[key as keyof SymbolConstructor]) .filter(isSymbol), ) @@ -137,12 +137,12 @@ class MutableReactiveHandler extends BaseReactiveHandler { } set( - target: object, + target: Record, key: string | symbol, value: unknown, receiver: object, ): boolean { - let oldValue = (target as any)[key] + let oldValue = target[key] if (!this._isShallow) { const isOldValueReadonly = isReadonly(oldValue) if (!isShallow(value) && !isReadonly(value)) { @@ -177,9 +177,12 @@ class MutableReactiveHandler extends BaseReactiveHandler { return result } - deleteProperty(target: object, key: string | symbol): boolean { + deleteProperty( + target: Record, + key: string | symbol, + ): boolean { const hadKey = hasOwn(target, key) - const oldValue = (target as any)[key] + const oldValue = target[key] const result = Reflect.deleteProperty(target, key) if (result && hadKey) { trigger(target, TriggerOpTypes.DELETE, key, undefined, oldValue) @@ -187,14 +190,15 @@ class MutableReactiveHandler extends BaseReactiveHandler { return result } - has(target: object, key: string | symbol): boolean { + has(target: Record, key: string | symbol): boolean { const result = Reflect.has(target, key) if (!isSymbol(key) || !builtInSymbols.has(key)) { track(target, TrackOpTypes.HAS, key) } return result } - ownKeys(target: object): (string | symbol)[] { + + ownKeys(target: Record): (string | symbol)[] { track( target, TrackOpTypes.ITERATE, diff --git a/packages/reactivity/src/collectionHandlers.ts b/packages/reactivity/src/collectionHandlers.ts index 629868edb..9e05ee480 100644 --- a/packages/reactivity/src/collectionHandlers.ts +++ b/packages/reactivity/src/collectionHandlers.ts @@ -1,4 +1,4 @@ -import { toRaw, toReactive, toReadonly } from './reactive' +import { type Target, toRaw, toReactive, toReadonly } from './reactive' import { ITERATE_KEY, MAP_KEY_ITERATE_KEY, track, trigger } from './dep' import { ReactiveFlags, TrackOpTypes, TriggerOpTypes } from './constants' import { capitalize, hasChanged, hasOwn, isMap, toRawType } from '@vue/shared' @@ -6,10 +6,10 @@ import { warn } from './warning' type CollectionTypes = IterableCollections | WeakCollections -type IterableCollections = Map | Set -type WeakCollections = WeakMap | WeakSet -type MapTypes = Map | WeakMap -type SetTypes = Set | WeakSet +type IterableCollections = (Map | Set) & Target +type WeakCollections = (WeakMap | WeakSet) & Target +type MapTypes = (Map | WeakMap) & Target +type SetTypes = (Set | WeakSet) & Target const toShallow = (value: T): T => value @@ -24,7 +24,7 @@ function get( ) { // #1772: readonly(reactive(Map)) should return readonly + reactive version // of the value - target = (target as any)[ReactiveFlags.RAW] + target = target[ReactiveFlags.RAW] const rawTarget = toRaw(target) const rawKey = toRaw(key) if (!isReadonly) { @@ -47,7 +47,7 @@ function get( } function has(this: CollectionTypes, key: unknown, isReadonly = false): boolean { - const target = (this as any)[ReactiveFlags.RAW] + const target = this[ReactiveFlags.RAW] const rawTarget = toRaw(target) const rawKey = toRaw(key) if (!isReadonly) { @@ -62,7 +62,7 @@ function has(this: CollectionTypes, key: unknown, isReadonly = false): boolean { } function size(target: IterableCollections, isReadonly = false) { - target = (target as any)[ReactiveFlags.RAW] + target = target[ReactiveFlags.RAW] !isReadonly && track(toRaw(target), TrackOpTypes.ITERATE, ITERATE_KEY) return Reflect.get(target, 'size', target) } @@ -144,7 +144,7 @@ function createForEach(isReadonly: boolean, isShallow: boolean) { callback: Function, thisArg?: unknown, ) { - const observed = this as any + const observed = this const target = observed[ReactiveFlags.RAW] const rawTarget = toRaw(target) const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive @@ -180,7 +180,7 @@ function createIterableMethod( this: IterableCollections, ...args: unknown[] ): Iterable & Iterator { - const target = (this as any)[ReactiveFlags.RAW] + const target = this[ReactiveFlags.RAW] const rawTarget = toRaw(target) const targetIsMap = isMap(rawTarget) const isPair = From 6c303eacd14b7b0de0accc228f6abeb43d706f63 Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 28 Jun 2024 09:28:51 +0800 Subject: [PATCH 13/84] Revert "fix(reactivity): fix side effect computed dirty level (#11183)" This reverts commit 3bd79e3e5ed960fc42cbf77bc61a97d2c03557c0. --- .../reactivity/__tests__/computed.spec.ts | 57 ------------------- packages/reactivity/src/computed.ts | 6 +- packages/reactivity/src/effect.ts | 4 +- 3 files changed, 2 insertions(+), 65 deletions(-) diff --git a/packages/reactivity/__tests__/computed.spec.ts b/packages/reactivity/__tests__/computed.spec.ts index 9a91eed63..0122f4e43 100644 --- a/packages/reactivity/__tests__/computed.spec.ts +++ b/packages/reactivity/__tests__/computed.spec.ts @@ -708,63 +708,6 @@ describe('reactivity/computed', () => { expect(COMPUTED_SIDE_EFFECT_WARN).toHaveBeenWarned() }) - it('should chained computeds keep reactivity when computed effect happens', async () => { - const v = ref('Hello') - const c = computed(() => { - v.value += ' World' - return v.value - }) - const d = computed(() => c.value) - const e = computed(() => d.value) - const Comp = { - setup: () => { - return () => d.value + ' | ' + e.value - }, - } - const root = nodeOps.createElement('div') - - render(h(Comp), root) - await nextTick() - expect(serializeInner(root)).toBe('Hello World | Hello World') - - v.value += ' World' - await nextTick() - expect(serializeInner(root)).toBe( - 'Hello World World World | Hello World World World', - ) - expect(COMPUTED_SIDE_EFFECT_WARN).toHaveBeenWarned() - }) - - it('should keep dirty level when side effect computed value changed', () => { - const v = ref(0) - const c = computed(() => { - v.value += 1 - return v.value - }) - const d = computed(() => { - return { d: c.value } - }) - - const Comp = { - setup: () => { - return () => { - return [d.value.d, d.value.d] - } - }, - } - - const root = nodeOps.createElement('div') - render(h(Comp), root) - - expect(d.value.d).toBe(1) - expect(serializeInner(root)).toBe('11') - expect(c.effect._dirtyLevel).toBe( - DirtyLevels.MaybeDirty_ComputedSideEffect_Origin, - ) - expect(d.effect._dirtyLevel).toBe(DirtyLevels.MaybeDirty_ComputedSideEffect) - expect(COMPUTED_SIDE_EFFECT_WARN).toHaveBeenWarned() - }) - it('debug: onTrigger (ref)', () => { let events: DebuggerEvent[] = [] const onTrigger = vi.fn((e: DebuggerEvent) => { diff --git a/packages/reactivity/src/computed.ts b/packages/reactivity/src/computed.ts index e764b6024..91eac3601 100644 --- a/packages/reactivity/src/computed.ts +++ b/packages/reactivity/src/computed.ts @@ -71,15 +71,11 @@ export class ComputedRefImpl { get value() { // the computed ref may get wrapped by other proxies e.g. readonly() #3376 const self = toRaw(this) - const lastDirtyLevel = self.effect._dirtyLevel if ( (!self._cacheable || self.effect.dirty) && hasChanged(self._value, (self._value = self.effect.run()!)) ) { - // keep dirty level when side effect computed's value changed - if (lastDirtyLevel !== DirtyLevels.MaybeDirty_ComputedSideEffect) { - triggerRefValue(self, DirtyLevels.Dirty) - } + triggerRefValue(self, DirtyLevels.Dirty) } trackRefValue(self) if ( diff --git a/packages/reactivity/src/effect.ts b/packages/reactivity/src/effect.ts index 6817931f0..40868545b 100644 --- a/packages/reactivity/src/effect.ts +++ b/packages/reactivity/src/effect.ts @@ -93,10 +93,8 @@ export class ReactiveEffect { if ( dep.computed.effect._dirtyLevel === DirtyLevels.MaybeDirty_ComputedSideEffect_Origin - ) { - resetTracking() + ) return true - } triggerComputed(dep.computed) if (this._dirtyLevel >= DirtyLevels.Dirty) { break From e0df985f0317fb65c5b461bf224375c7763f0269 Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 28 Jun 2024 09:31:14 +0800 Subject: [PATCH 14/84] fix: Revert "fix(reactivity): avoid infinite loop when render access a side effect computed (#11135)" This reverts commit 8296e19855e369a7826f5ea26540a6da01dc7093. --- .../reactivity/__tests__/computed.spec.ts | 101 ++---------------- packages/reactivity/src/computed.ts | 5 +- packages/reactivity/src/constants.ts | 11 +- packages/reactivity/src/effect.ts | 29 ----- 4 files changed, 12 insertions(+), 134 deletions(-) diff --git a/packages/reactivity/__tests__/computed.spec.ts b/packages/reactivity/__tests__/computed.spec.ts index 0122f4e43..10c09109f 100644 --- a/packages/reactivity/__tests__/computed.spec.ts +++ b/packages/reactivity/__tests__/computed.spec.ts @@ -456,78 +456,6 @@ describe('reactivity/computed', () => { expect(fnSpy).toBeCalledTimes(2) }) - it('should mark dirty as MaybeDirty_ComputedSideEffect_Origin', () => { - const v = ref(1) - const c = computed(() => { - v.value += 1 - return v.value - }) - - c.value - expect(c.effect._dirtyLevel).toBe( - DirtyLevels.MaybeDirty_ComputedSideEffect_Origin, - ) - expect(COMPUTED_SIDE_EFFECT_WARN).toHaveBeenWarned() - }) - - it('should not infinite re-run effect when effect access original side effect computed', async () => { - const spy = vi.fn() - const v = ref(0) - const c = computed(() => { - v.value += 1 - return v.value - }) - const Comp = { - setup: () => { - return () => { - spy() - return v.value + c.value - } - }, - } - const root = nodeOps.createElement('div') - - render(h(Comp), root) - expect(spy).toBeCalledTimes(1) - await nextTick() - expect(c.effect._dirtyLevel).toBe( - DirtyLevels.MaybeDirty_ComputedSideEffect_Origin, - ) - expect(serializeInner(root)).toBe('2') - expect(COMPUTED_SIDE_EFFECT_WARN).toHaveBeenWarned() - }) - - it('should not infinite re-run effect when effect access chained side effect computed', async () => { - const spy = vi.fn() - const v = ref(0) - const c1 = computed(() => { - v.value += 1 - return v.value - }) - const c2 = computed(() => v.value + c1.value) - const Comp = { - setup: () => { - return () => { - spy() - return v.value + c1.value + c2.value - } - }, - } - const root = nodeOps.createElement('div') - - render(h(Comp), root) - expect(spy).toBeCalledTimes(1) - await nextTick() - expect(c1.effect._dirtyLevel).toBe( - DirtyLevels.MaybeDirty_ComputedSideEffect_Origin, - ) - expect(c2.effect._dirtyLevel).toBe( - DirtyLevels.MaybeDirty_ComputedSideEffect, - ) - expect(serializeInner(root)).toBe('4') - expect(COMPUTED_SIDE_EFFECT_WARN).toHaveBeenWarned() - }) - it('should chained recurse effects clear dirty after trigger', () => { const v = ref(1) const c1 = computed(() => v.value) @@ -554,9 +482,7 @@ describe('reactivity/computed', () => { c3.value - expect(c1.effect._dirtyLevel).toBe( - DirtyLevels.MaybeDirty_ComputedSideEffect_Origin, - ) + expect(c1.effect._dirtyLevel).toBe(DirtyLevels.Dirty) expect(c2.effect._dirtyLevel).toBe( DirtyLevels.MaybeDirty_ComputedSideEffect, ) @@ -576,9 +502,7 @@ describe('reactivity/computed', () => { }) const c2 = computed(() => v.value + c1.value) expect(c2.value).toBe('0foo') - expect(c2.effect._dirtyLevel).toBe( - DirtyLevels.MaybeDirty_ComputedSideEffect, - ) + expect(c2.effect._dirtyLevel).toBe(DirtyLevels.Dirty) expect(c2.value).toBe('1foo') expect(COMPUTED_SIDE_EFFECT_WARN).toHaveBeenWarned() }) @@ -599,12 +523,8 @@ describe('reactivity/computed', () => { c2.value }) expect(fnSpy).toBeCalledTimes(1) - expect(c1.effect._dirtyLevel).toBe( - DirtyLevels.MaybeDirty_ComputedSideEffect_Origin, - ) - expect(c2.effect._dirtyLevel).toBe( - DirtyLevels.MaybeDirty_ComputedSideEffect, - ) + expect(c1.effect._dirtyLevel).toBe(DirtyLevels.Dirty) + expect(c2.effect._dirtyLevel).toBe(DirtyLevels.Dirty) v.value = 2 expect(fnSpy).toBeCalledTimes(2) expect(COMPUTED_SIDE_EFFECT_WARN).toHaveBeenWarned() @@ -637,9 +557,7 @@ describe('reactivity/computed', () => { expect(c3.effect._dirtyLevel).toBe(DirtyLevels.MaybeDirty) c3.value - expect(c1.effect._dirtyLevel).toBe( - DirtyLevels.MaybeDirty_ComputedSideEffect_Origin, - ) + expect(c1.effect._dirtyLevel).toBe(DirtyLevels.Dirty) expect(c2.effect._dirtyLevel).toBe( DirtyLevels.MaybeDirty_ComputedSideEffect, ) @@ -693,18 +611,11 @@ describe('reactivity/computed', () => { render(h(Comp), root) await nextTick() - expect(c.effect._dirtyLevel).toBe( - DirtyLevels.MaybeDirty_ComputedSideEffect_Origin, - ) expect(serializeInner(root)).toBe('Hello World') v.value += ' World' - expect(c.effect._dirtyLevel).toBe(DirtyLevels.Dirty) await nextTick() - expect(c.effect._dirtyLevel).toBe( - DirtyLevels.MaybeDirty_ComputedSideEffect_Origin, - ) - expect(serializeInner(root)).toBe('Hello World World World') + expect(serializeInner(root)).toBe('Hello World World World World') expect(COMPUTED_SIDE_EFFECT_WARN).toHaveBeenWarned() }) diff --git a/packages/reactivity/src/computed.ts b/packages/reactivity/src/computed.ts index 91eac3601..da63fe847 100644 --- a/packages/reactivity/src/computed.ts +++ b/packages/reactivity/src/computed.ts @@ -78,10 +78,7 @@ export class ComputedRefImpl { triggerRefValue(self, DirtyLevels.Dirty) } trackRefValue(self) - if ( - self.effect._dirtyLevel >= - DirtyLevels.MaybeDirty_ComputedSideEffect_Origin - ) { + if (self.effect._dirtyLevel >= DirtyLevels.MaybeDirty_ComputedSideEffect) { if (__DEV__ && (__TEST__ || this._warnRecursive)) { warn(COMPUTED_SIDE_EFFECT_WARN, `\n\ngetter: `, this.getter) } diff --git a/packages/reactivity/src/constants.ts b/packages/reactivity/src/constants.ts index 4898d6917..baa75d616 100644 --- a/packages/reactivity/src/constants.ts +++ b/packages/reactivity/src/constants.ts @@ -23,10 +23,9 @@ export enum ReactiveFlags { } export enum DirtyLevels { - NotDirty, - QueryingDirty, - MaybeDirty_ComputedSideEffect_Origin, - MaybeDirty_ComputedSideEffect, - MaybeDirty, - Dirty, + NotDirty = 0, + QueryingDirty = 1, + MaybeDirty_ComputedSideEffect = 2, + MaybeDirty = 3, + Dirty = 4, } diff --git a/packages/reactivity/src/effect.ts b/packages/reactivity/src/effect.ts index 40868545b..1528f4b1d 100644 --- a/packages/reactivity/src/effect.ts +++ b/packages/reactivity/src/effect.ts @@ -76,9 +76,6 @@ export class ReactiveEffect { } public get dirty() { - // treat original side effect computed as not dirty to avoid infinite loop - if (this._dirtyLevel === DirtyLevels.MaybeDirty_ComputedSideEffect_Origin) - return false if ( this._dirtyLevel === DirtyLevels.MaybeDirty_ComputedSideEffect || this._dirtyLevel === DirtyLevels.MaybeDirty @@ -88,13 +85,6 @@ export class ReactiveEffect { for (let i = 0; i < this._depsLength; i++) { const dep = this.deps[i] if (dep.computed) { - // treat chained side effect computed as dirty to force it re-run - // since we know the original side effect computed is dirty - if ( - dep.computed.effect._dirtyLevel === - DirtyLevels.MaybeDirty_ComputedSideEffect_Origin - ) - return true triggerComputed(dep.computed) if (this._dirtyLevel >= DirtyLevels.Dirty) { break @@ -308,30 +298,11 @@ export function triggerEffects( for (const effect of dep.keys()) { // dep.get(effect) is very expensive, we need to calculate it lazily and reuse the result let tracking: boolean | undefined - - if (!dep.computed && effect.computed) { - if ( - effect._runnings > 0 && - (tracking ??= dep.get(effect) === effect._trackId) - ) { - effect._dirtyLevel = DirtyLevels.MaybeDirty_ComputedSideEffect_Origin - continue - } - } - if ( effect._dirtyLevel < dirtyLevel && (tracking ??= dep.get(effect) === effect._trackId) ) { effect._shouldSchedule ||= effect._dirtyLevel === DirtyLevels.NotDirty - // always schedule if the computed is original side effect - // since we know it is actually dirty - if ( - effect.computed && - effect._dirtyLevel === DirtyLevels.MaybeDirty_ComputedSideEffect_Origin - ) { - effect._shouldSchedule = true - } effect._dirtyLevel = dirtyLevel } if ( From b1d1f44e9f488b049dc33544e819c6590caca560 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 28 Jun 2024 09:36:19 +0800 Subject: [PATCH 15/84] chore(deps): update dependency monaco-editor to ^0.50.0 (#11211) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- packages/template-explorer/package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/template-explorer/package.json b/packages/template-explorer/package.json index 0987bfd5d..f9afd0dd4 100644 --- a/packages/template-explorer/package.json +++ b/packages/template-explorer/package.json @@ -11,7 +11,7 @@ "enableNonBrowserBranches": true }, "dependencies": { - "monaco-editor": "^0.49.0", + "monaco-editor": "^0.50.0", "source-map-js": "^1.2.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f9171b9b8..47389dd7e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -368,8 +368,8 @@ importers: packages/template-explorer: dependencies: monaco-editor: - specifier: ^0.49.0 - version: 0.49.0 + specifier: ^0.50.0 + version: 0.50.0 source-map-js: specifier: ^1.2.0 version: 1.2.0 @@ -2475,8 +2475,8 @@ packages: mlly@1.6.1: resolution: {integrity: sha512-vLgaHvaeunuOXHSmEbZ9izxPx3USsk8KCQ8iC+aTlp5sKRSoZvwhHh5L9VbKSaVC6sJDqbyohIS76E2VmHIPAA==} - monaco-editor@0.49.0: - resolution: {integrity: sha512-2I8/T3X/hLxB2oPHgqcNYUVdA/ZEFShT7IAujifIPMfKkNbLOqY8XCoyHCXrsdjb36dW9MwoTwBCFpXKMwNwaQ==} + monaco-editor@0.50.0: + resolution: {integrity: sha512-8CclLCmrRRh+sul7C08BmPBP3P8wVWfBHomsTcndxg5NRCEPfu/mc2AGU8k37ajjDVXcXFc12ORAMUkmk+lkFA==} ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} @@ -5575,7 +5575,7 @@ snapshots: pkg-types: 1.0.3 ufo: 1.5.3 - monaco-editor@0.49.0: {} + monaco-editor@0.50.0: {} ms@2.0.0: {} From ad22879dd258b6af5a80e4a0cc6f80fafb85463d Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Fri, 28 Jun 2024 09:45:34 +0800 Subject: [PATCH 16/84] test(reactivity): add a failed test for computed (#11243) to avoid regressions like in #11135 --- packages/reactivity/__tests__/computed.spec.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/reactivity/__tests__/computed.spec.ts b/packages/reactivity/__tests__/computed.spec.ts index 10c09109f..20faa18a3 100644 --- a/packages/reactivity/__tests__/computed.spec.ts +++ b/packages/reactivity/__tests__/computed.spec.ts @@ -619,6 +619,22 @@ describe('reactivity/computed', () => { expect(COMPUTED_SIDE_EFFECT_WARN).toHaveBeenWarned() }) + it('should be recomputed without being affected by side effects', () => { + const v = ref(0) + const c1 = computed(() => { + v.value = 1 + return 0 + }) + const c2 = computed(() => { + return v.value + ',' + c1.value + }) + + expect(c2.value).toBe('0,0') + v.value = 1 + expect(c2.value).toBe('1,0') + expect(COMPUTED_SIDE_EFFECT_WARN).toHaveBeenWarned() + }) + it('debug: onTrigger (ref)', () => { let events: DebuggerEvent[] = [] const onTrigger = vi.fn((e: DebuggerEvent) => { From 746352a14d62e9d3d9a38c359d2c54d418c1e0ac Mon Sep 17 00:00:00 2001 From: Tycho Date: Fri, 28 Jun 2024 09:48:23 +0800 Subject: [PATCH 17/84] fix(compiler-core): handle inline comments with undefined bindings (#11217) close #11216 --- .../transforms/transformExpressions.spec.ts | 11 +++++++++++ packages/compiler-core/src/babelUtils.ts | 10 +++++----- .../src/transforms/transformExpression.ts | 13 +++++++++---- packages/compiler-sfc/src/compileScript.ts | 2 +- .../src/script/definePropsDestructure.ts | 4 ++-- packages/global.d.ts | 4 ++-- 6 files changed, 30 insertions(+), 14 deletions(-) diff --git a/packages/compiler-core/__tests__/transforms/transformExpressions.spec.ts b/packages/compiler-core/__tests__/transforms/transformExpressions.spec.ts index ffd93d791..7ca831f0c 100644 --- a/packages/compiler-core/__tests__/transforms/transformExpressions.spec.ts +++ b/packages/compiler-core/__tests__/transforms/transformExpressions.spec.ts @@ -384,6 +384,17 @@ describe('compiler: expression transform', () => { ) }) + test('should not error', () => { + const onError = vi.fn() + parseWithExpressionTransform( + `

`, + { + onError, + }, + ) + expect(onError).not.toHaveBeenCalled() + }) + test('should prefix in assignment', () => { const node = parseWithExpressionTransform( `{{ x = 1 }}`, diff --git a/packages/compiler-core/src/babelUtils.ts b/packages/compiler-core/src/babelUtils.ts index 7482494e1..679977988 100644 --- a/packages/compiler-core/src/babelUtils.ts +++ b/packages/compiler-core/src/babelUtils.ts @@ -17,7 +17,7 @@ export function walkIdentifiers( root: Node, onIdentifier: ( node: Identifier, - parent: Node, + parent: Node | null, parentStack: Node[], isReference: boolean, isLocal: boolean, @@ -36,7 +36,7 @@ export function walkIdentifiers( : root walk(root, { - enter(node: Node & { scopeIds?: Set }, parent: Node | undefined) { + enter(node: Node & { scopeIds?: Set }, parent: Node | null) { parent && parentStack.push(parent) if ( parent && @@ -47,9 +47,9 @@ export function walkIdentifiers( } if (node.type === 'Identifier') { const isLocal = !!knownIds[node.name] - const isRefed = isReferencedIdentifier(node, parent!, parentStack) + const isRefed = isReferencedIdentifier(node, parent, parentStack) if (includeAll || (isRefed && !isLocal)) { - onIdentifier(node, parent!, parentStack, isRefed, isLocal) + onIdentifier(node, parent, parentStack, isRefed, isLocal) } } else if ( node.type === 'ObjectProperty' && @@ -79,7 +79,7 @@ export function walkIdentifiers( } } }, - leave(node: Node & { scopeIds?: Set }, parent: Node | undefined) { + leave(node: Node & { scopeIds?: Set }, parent: Node | null) { parent && parentStack.pop() if (node !== rootExp && node.scopeIds) { for (const id of node.scopeIds) { diff --git a/packages/compiler-core/src/transforms/transformExpression.ts b/packages/compiler-core/src/transforms/transformExpression.ts index 35aa9a373..de450491e 100644 --- a/packages/compiler-core/src/transforms/transformExpression.ts +++ b/packages/compiler-core/src/transforms/transformExpression.ts @@ -116,7 +116,11 @@ export function processExpression( } const { inline, bindingMetadata } = context - const rewriteIdentifier = (raw: string, parent?: Node, id?: Identifier) => { + const rewriteIdentifier = ( + raw: string, + parent?: Node | null, + id?: Identifier, + ) => { const type = hasOwn(bindingMetadata, raw) && bindingMetadata[raw] if (inline) { // x = y @@ -313,9 +317,10 @@ export function processExpression( // local scope variable (a v-for alias, or a v-slot prop) if ( !(needPrefix && isLocal) && - parent.type !== 'CallExpression' && - parent.type !== 'NewExpression' && - parent.type !== 'MemberExpression' + (!parent || + (parent.type !== 'CallExpression' && + parent.type !== 'NewExpression' && + parent.type !== 'MemberExpression')) ) { ;(node as QualifiedId).isConstant = true } diff --git a/packages/compiler-sfc/src/compileScript.ts b/packages/compiler-sfc/src/compileScript.ts index 8a0aaeaf7..2fa2241a7 100644 --- a/packages/compiler-sfc/src/compileScript.ts +++ b/packages/compiler-sfc/src/compileScript.ts @@ -616,7 +616,7 @@ export function compileScript( ) { const scope: Statement[][] = [scriptSetupAst.body] walk(node, { - enter(child: Node, parent: Node | undefined) { + enter(child: Node, parent: Node | null) { if (isFunctionType(child)) { this.skip() } diff --git a/packages/compiler-sfc/src/script/definePropsDestructure.ts b/packages/compiler-sfc/src/script/definePropsDestructure.ts index e4a59aca7..dd54ab85b 100644 --- a/packages/compiler-sfc/src/script/definePropsDestructure.ts +++ b/packages/compiler-sfc/src/script/definePropsDestructure.ts @@ -239,7 +239,7 @@ export function transformDestructuredProps( const ast = ctx.scriptSetupAst! walkScope(ast, true) walk(ast, { - enter(node: Node, parent?: Node) { + enter(node: Node, parent: Node | null) { parent && parentStack.push(parent) // skip type nodes @@ -294,7 +294,7 @@ export function transformDestructuredProps( } } }, - leave(node: Node, parent?: Node) { + leave(node: Node, parent: Node | null) { parent && parentStack.pop() if ( (node.type === 'BlockStatement' && !isFunctionType(parent!)) || diff --git a/packages/global.d.ts b/packages/global.d.ts index 38320b81e..1bae0b929 100644 --- a/packages/global.d.ts +++ b/packages/global.d.ts @@ -38,8 +38,8 @@ declare module 'estree-walker' { export function walk( root: T, options: { - enter?: (node: T, parent: T | undefined) => any - leave?: (node: T, parent: T | undefined) => any + enter?: (node: T, parent: T | null) => any + leave?: (node: T, parent: T | null) => any exit?: (node: T) => any } & ThisType<{ skip: () => void }>, ) From f2acd51340b85ae88bfd16bf5e61df967e0b92ec Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 28 Jun 2024 10:14:29 +0800 Subject: [PATCH 18/84] release: v3.4.31 --- CHANGELOG.md | 16 ++++++++++++++++ package.json | 2 +- packages/compiler-core/package.json | 2 +- packages/compiler-dom/package.json | 2 +- packages/compiler-sfc/package.json | 2 +- packages/compiler-ssr/package.json | 2 +- packages/reactivity/package.json | 2 +- packages/runtime-core/package.json | 2 +- packages/runtime-dom/package.json | 2 +- packages/server-renderer/package.json | 2 +- packages/shared/package.json | 2 +- packages/vue-compat/package.json | 2 +- packages/vue/package.json | 2 +- 13 files changed, 28 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cbe2eb2b1..41f21c064 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +## [3.4.31](https://github.com/vuejs/core/compare/v3.4.30...v3.4.31) (2024-06-28) + + +### Bug Fixes + +* **compiler-core:** handle inline comments with undefined bindings ([#11217](https://github.com/vuejs/core/issues/11217)) ([746352a](https://github.com/vuejs/core/commit/746352a14d62e9d3d9a38c359d2c54d418c1e0ac)), closes [#11216](https://github.com/vuejs/core/issues/11216) +* **shared:** unwrap refs in toDisplayString ([#7306](https://github.com/vuejs/core/issues/7306)) ([0126cff](https://github.com/vuejs/core/commit/0126cfff9d93bcec70e5745519f6378e3cd3f39c)), closes [#5578](https://github.com/vuejs/core/issues/5578) [#5593](https://github.com/vuejs/core/issues/5593) [#11199](https://github.com/vuejs/core/issues/11199) [#11201](https://github.com/vuejs/core/issues/11201) + + +### Reverts + +* Revert "fix(reactivity): avoid infinite loop when render access a side effect computed ([#11135](https://github.com/vuejs/core/issues/11135))" ([e0df985](https://github.com/vuejs/core/commit/e0df985f0317fb65c5b461bf224375c7763f0269)) +* Revert "fix(reactivity): fix side effect computed dirty level (#11183)" ([6c303ea](https://github.com/vuejs/core/commit/6c303eacd14b7b0de0accc228f6abeb43d706f63)), closes [#11183](https://github.com/vuejs/core/issues/11183) + + + ## [3.4.30](https://github.com/vuejs/core/compare/v3.4.29...v3.4.30) (2024-06-22) **Note: this release contains a fix (#11150) that requires `vue-tsc` to also be updated in sync to ^2.0.22. See #11196** diff --git a/package.json b/package.json index b28fc69b8..bb2576a67 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "3.4.30", + "version": "3.4.31", "packageManager": "pnpm@9.4.0", "type": "module", "scripts": { diff --git a/packages/compiler-core/package.json b/packages/compiler-core/package.json index def06be90..42b8e9f5b 100644 --- a/packages/compiler-core/package.json +++ b/packages/compiler-core/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-core", - "version": "3.4.30", + "version": "3.4.31", "description": "@vue/compiler-core", "main": "index.js", "module": "dist/compiler-core.esm-bundler.js", diff --git a/packages/compiler-dom/package.json b/packages/compiler-dom/package.json index c0ce85cfd..b18785c7d 100644 --- a/packages/compiler-dom/package.json +++ b/packages/compiler-dom/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-dom", - "version": "3.4.30", + "version": "3.4.31", "description": "@vue/compiler-dom", "main": "index.js", "module": "dist/compiler-dom.esm-bundler.js", diff --git a/packages/compiler-sfc/package.json b/packages/compiler-sfc/package.json index c0bea5f73..22ee88edb 100644 --- a/packages/compiler-sfc/package.json +++ b/packages/compiler-sfc/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-sfc", - "version": "3.4.30", + "version": "3.4.31", "description": "@vue/compiler-sfc", "main": "dist/compiler-sfc.cjs.js", "module": "dist/compiler-sfc.esm-browser.js", diff --git a/packages/compiler-ssr/package.json b/packages/compiler-ssr/package.json index 4a8b30f85..a7b71e94c 100644 --- a/packages/compiler-ssr/package.json +++ b/packages/compiler-ssr/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compiler-ssr", - "version": "3.4.30", + "version": "3.4.31", "description": "@vue/compiler-ssr", "main": "dist/compiler-ssr.cjs.js", "types": "dist/compiler-ssr.d.ts", diff --git a/packages/reactivity/package.json b/packages/reactivity/package.json index 6746efb4b..8f9899942 100644 --- a/packages/reactivity/package.json +++ b/packages/reactivity/package.json @@ -1,6 +1,6 @@ { "name": "@vue/reactivity", - "version": "3.4.30", + "version": "3.4.31", "description": "@vue/reactivity", "main": "index.js", "module": "dist/reactivity.esm-bundler.js", diff --git a/packages/runtime-core/package.json b/packages/runtime-core/package.json index b7dc8a755..48ff50e8f 100644 --- a/packages/runtime-core/package.json +++ b/packages/runtime-core/package.json @@ -1,6 +1,6 @@ { "name": "@vue/runtime-core", - "version": "3.4.30", + "version": "3.4.31", "description": "@vue/runtime-core", "main": "index.js", "module": "dist/runtime-core.esm-bundler.js", diff --git a/packages/runtime-dom/package.json b/packages/runtime-dom/package.json index 514df0d53..490be0fbd 100644 --- a/packages/runtime-dom/package.json +++ b/packages/runtime-dom/package.json @@ -1,6 +1,6 @@ { "name": "@vue/runtime-dom", - "version": "3.4.30", + "version": "3.4.31", "description": "@vue/runtime-dom", "main": "index.js", "module": "dist/runtime-dom.esm-bundler.js", diff --git a/packages/server-renderer/package.json b/packages/server-renderer/package.json index 005900141..cace5e23b 100644 --- a/packages/server-renderer/package.json +++ b/packages/server-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@vue/server-renderer", - "version": "3.4.30", + "version": "3.4.31", "description": "@vue/server-renderer", "main": "index.js", "module": "dist/server-renderer.esm-bundler.js", diff --git a/packages/shared/package.json b/packages/shared/package.json index 3e5a46509..a332a6ac4 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@vue/shared", - "version": "3.4.30", + "version": "3.4.31", "description": "internal utils shared across @vue packages", "main": "index.js", "module": "dist/shared.esm-bundler.js", diff --git a/packages/vue-compat/package.json b/packages/vue-compat/package.json index 435e62ef1..1745f1424 100644 --- a/packages/vue-compat/package.json +++ b/packages/vue-compat/package.json @@ -1,6 +1,6 @@ { "name": "@vue/compat", - "version": "3.4.30", + "version": "3.4.31", "description": "Vue 3 compatibility build for Vue 2", "main": "index.js", "module": "dist/vue.runtime.esm-bundler.js", diff --git a/packages/vue/package.json b/packages/vue/package.json index a6160739a..3b83a6b70 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "vue", - "version": "3.4.30", + "version": "3.4.31", "description": "The progressive JavaScript framework for building modern web UI.", "main": "index.js", "module": "dist/vue.runtime.esm-bundler.js", From 2f11a455e0a861237d51758cb37293b58f9d029a Mon Sep 17 00:00:00 2001 From: Tycho Date: Fri, 28 Jun 2024 22:58:34 +0800 Subject: [PATCH 19/84] ci: correct PR number retrieval to fix size-report action (#11223) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 三咲智子 Kevin Deng --- .github/workflows/size-data.yml | 10 ++++++++++ .github/workflows/size-report.yml | 33 +++++++++++++++++++++++++------ 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/.github/workflows/size-data.yml b/.github/workflows/size-data.yml index 767114e0d..a702d0fef 100644 --- a/.github/workflows/size-data.yml +++ b/.github/workflows/size-data.yml @@ -41,3 +41,13 @@ jobs: with: name: size-data path: temp/size + + - name: Save PR number + if: ${{github.event_name == 'pull_request'}} + run: echo ${{ github.event.number }} > ./pr.txt + + - uses: actions/upload-artifact@v4 + if: ${{github.event_name == 'pull_request'}} + with: + name: pr-number + path: pr.txt diff --git a/.github/workflows/size-report.yml b/.github/workflows/size-report.yml index eb0d7d4fd..9c0efadf5 100644 --- a/.github/workflows/size-report.yml +++ b/.github/workflows/size-report.yml @@ -35,6 +35,19 @@ jobs: - name: Install dependencies run: pnpm install + - name: Download PR number + uses: dawidd6/action-download-artifact@v3 + with: + name: pr-number + run_id: ${{ github.event.workflow_run.id }} + path: /tmp/pr-number + + - name: Read PR Number + id: pr-number + uses: juliangruber/read-file-action@v1 + with: + path: /tmp/pr-number/pr.txt + - name: Download Size Data uses: dawidd6/action-download-artifact@v6 with: @@ -55,10 +68,18 @@ jobs: - name: Prepare report run: pnpm tsx scripts/size-report.ts > size-report.md - - name: Create Comment - uses: thollander/actions-comment-pull-request@v2.5.0 + - name: Read Size Report + id: size-report + uses: juliangruber/read-file-action@v1 with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - filePath: size-report.md - pr_number: ${{ github.event.workflow_run.pull_requests[0].number }} - comment_tag: VUE_CORE_SIZE + path: ./size-report.md + + - name: Create Comment + uses: actions-cool/maintain-one-comment@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + number: ${{ steps.pr-number.outputs.content }} + body: | + ${{ steps.size-report.outputs.content }} + + body-include: '' From ae97e5053895eeaaa443306e72cd8f45da001179 Mon Sep 17 00:00:00 2001 From: Tycho Date: Sat, 29 Jun 2024 22:26:30 +0800 Subject: [PATCH 20/84] chore: move custom matcher types to setup-vitest.ts (#11252) --- packages/global.d.ts | 9 --------- scripts/setup-vitest.ts | 11 +++++++++++ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/packages/global.d.ts b/packages/global.d.ts index 1bae0b929..79b551713 100644 --- a/packages/global.d.ts +++ b/packages/global.d.ts @@ -19,15 +19,6 @@ declare var __FEATURE_PROD_DEVTOOLS__: boolean declare var __FEATURE_SUSPENSE__: boolean declare var __FEATURE_PROD_HYDRATION_MISMATCH_DETAILS__: boolean -// for tests -declare namespace jest { - interface Matchers { - toHaveBeenWarned(): R - toHaveBeenWarnedLast(): R - toHaveBeenWarnedTimes(n: number): R - } -} - declare module '*.vue' {} declare module 'file-saver' { diff --git a/scripts/setup-vitest.ts b/scripts/setup-vitest.ts index 53e7f5fff..08203572a 100644 --- a/scripts/setup-vitest.ts +++ b/scripts/setup-vitest.ts @@ -1,5 +1,16 @@ import type { MockInstance } from 'vitest' +declare module 'vitest' { + interface Assertion extends CustomMatchers {} + interface AsymmetricMatchersContaining extends CustomMatchers {} +} + +interface CustomMatchers { + toHaveBeenWarned(): R + toHaveBeenWarnedLast(): R + toHaveBeenWarnedTimes(n: number): R +} + vi.stubGlobal('MathMLElement', class MathMLElement {}) expect.extend({ From 93324b2ec06b26662b77abc2a75d21ecbe8913db Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 5 Jul 2024 11:51:05 +0800 Subject: [PATCH 21/84] chore: refactor scripts to reduce dependencies --- package.json | 3 - packages/sfc-playground/vite.config.ts | 6 +- pnpm-lock.yaml | 111 ------------------------- scripts/build.js | 80 +++++++++++++----- scripts/dev.js | 34 ++++++-- scripts/inline-enums.js | 14 +++- scripts/release.js | 52 ++++++++---- scripts/utils.js | 48 +++++++++++ scripts/verify-treeshaking.js | 4 +- 9 files changed, 189 insertions(+), 163 deletions(-) diff --git a/package.json b/package.json index bb2576a67..2a4d9e777 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,6 @@ "@rollup/plugin-replace": "5.0.4", "@swc/core": "^1.6.5", "@types/hash-sum": "^1.0.2", - "@types/minimist": "^1.2.5", "@types/node": "^20.14.8", "@types/semver": "^7.5.8", "@vitest/coverage-istanbul": "^1.6.0", @@ -82,14 +81,12 @@ "eslint-plugin-import-x": "^0.5.1", "eslint-plugin-vitest": "^0.5.4", "estree-walker": "^2.0.2", - "execa": "^9.3.0", "jsdom": "^24.1.0", "lint-staged": "^15.2.7", "lodash": "^4.17.21", "magic-string": "^0.30.10", "markdown-table": "^3.0.3", "marked": "^12.0.2", - "minimist": "^1.2.8", "npm-run-all2": "^6.2.0", "picocolors": "^1.0.1", "prettier": "^3.3.2", diff --git a/packages/sfc-playground/vite.config.ts b/packages/sfc-playground/vite.config.ts index e30078f4b..ee9bbd4ab 100644 --- a/packages/sfc-playground/vite.config.ts +++ b/packages/sfc-playground/vite.config.ts @@ -2,9 +2,11 @@ import fs from 'node:fs' import path from 'node:path' import { type Plugin, defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' -import { execaSync } from 'execa' +import { spawnSync } from 'node:child_process' -const commit = execaSync('git', ['rev-parse', '--short=7', 'HEAD']).stdout +const commit = spawnSync('git', ['rev-parse', '--short=7', 'HEAD']) + .stdout.toString() + .trim() export default defineConfig({ plugins: [ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 47389dd7e..fab1b94bf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -38,9 +38,6 @@ importers: '@types/hash-sum': specifier: ^1.0.2 version: 1.0.2 - '@types/minimist': - specifier: ^1.2.5 - version: 1.2.5 '@types/node': specifier: ^20.14.8 version: 20.14.8 @@ -77,9 +74,6 @@ importers: estree-walker: specifier: ^2.0.2 version: 2.0.2 - execa: - specifier: ^9.3.0 - version: 9.3.0 jsdom: specifier: ^24.1.0 version: 24.1.0 @@ -98,9 +92,6 @@ importers: marked: specifier: ^12.0.2 version: 12.0.2 - minimist: - specifier: ^1.2.8 - version: 1.2.8 npm-run-all2: specifier: ^6.2.0 version: 6.2.0 @@ -896,16 +887,9 @@ packages: cpu: [x64] os: [win32] - '@sec-ant/readable-stream@0.4.1': - resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} - '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} - '@sindresorhus/merge-streams@4.0.0': - resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==} - engines: {node: '>=18'} - '@swc/core-darwin-arm64@1.6.5': resolution: {integrity: sha512-RGQhMdni2v1/ANQ/2K+F+QYdzaucekYBewZcX1ogqJ8G5sbPaBdYdDN1qQ4kHLCIkPtGP6qC7c71qPEqL2RidQ==} engines: {node: '>=10'} @@ -993,9 +977,6 @@ packages: '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - '@types/minimist@1.2.5': - resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} - '@types/node@20.14.8': resolution: {integrity: sha512-DO+2/jZinXfROG7j7WKFn/3C6nFwxy2lLpgLjEXJz+0XKphZlTLJ14mo8Vfg8X5BWN6XjyESXq+LcYdT7tR3bA==} @@ -1793,10 +1774,6 @@ packages: resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} engines: {node: '>=16.17'} - execa@9.3.0: - resolution: {integrity: sha512-l6JFbqnHEadBoVAVpN5dl2yCyfX28WoBAGaoQcNmLLSedOxTxcn2Qa83s8I/PA5i56vWru2OHOtrwF7Om2vqlg==} - engines: {node: ^18.19.0 || >=20.5.0} - extract-zip@2.0.1: resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==} engines: {node: '>= 10.17.0'} @@ -1827,10 +1804,6 @@ packages: fd-slicer@1.1.0: resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} - figures@6.1.0: - resolution: {integrity: sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==} - engines: {node: '>=18'} - file-entry-cache@8.0.0: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} @@ -1923,10 +1896,6 @@ packages: resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} engines: {node: '>=16'} - get-stream@9.0.1: - resolution: {integrity: sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==} - engines: {node: '>=18'} - get-tsconfig@4.7.5: resolution: {integrity: sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw==} @@ -2049,10 +2018,6 @@ packages: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} engines: {node: '>=16.17.0'} - human-signals@7.0.0: - resolution: {integrity: sha512-74kytxOUSvNbjrT9KisAbaTZ/eJwD/LrbM/kh5j0IhPuJzwuA19dWvniFGwBzN9rVjg+O/e+F310PjObDXS+9Q==} - engines: {node: '>=18.18.0'} - iconv-lite@0.6.3: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} @@ -2158,10 +2123,6 @@ packages: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} - is-plain-obj@4.1.0: - resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} - engines: {node: '>=12'} - is-port-reachable@4.0.0: resolution: {integrity: sha512-9UoipoxYmSk6Xy7QFgRv2HDyaysmgSG75TFQs6S+3pDM7ZhKTF/bskZV+0UlABHzKjNVhPjYCLfeZUEg1wXxig==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -2187,18 +2148,10 @@ packages: resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - is-stream@4.0.1: - resolution: {integrity: sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==} - engines: {node: '>=18'} - is-text-path@2.0.0: resolution: {integrity: sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==} engines: {node: '>=8'} - is-unicode-supported@2.0.0: - resolution: {integrity: sha512-FRdAyx5lusK1iHG0TWpVtk9+1i+GjrzRffhDg4ovQ7mcidMQ6mj+MhKPmvh7Xwyv5gIS06ns49CA7Sqg7lC22Q==} - engines: {node: '>=18'} - is-wsl@2.2.0: resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} engines: {node: '>=8'} @@ -2607,10 +2560,6 @@ packages: resolution: {integrity: sha512-SgOTCX/EZXtZxBE5eJ97P4yGM5n37BwRU+YMsH4vNzFqJV/oWFXXCmwFlgWUM4PrakybVOueJJ6pwHqSVhTFDw==} engines: {node: '>=16'} - parse-ms@4.0.0: - resolution: {integrity: sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==} - engines: {node: '>=18'} - parse5@7.1.2: resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} @@ -2732,10 +2681,6 @@ packages: resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - pretty-ms@9.0.0: - resolution: {integrity: sha512-E9e9HJ9R9NasGOgPaPE8VMeiPKAyWR5jcFpNnwIejslIhWqdqOrb2wShBsncMPUb+BcCd2OPYfh7p2W6oemTng==} - engines: {node: '>=18'} - process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} @@ -3108,10 +3053,6 @@ packages: resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} engines: {node: '>=12'} - strip-final-newline@4.0.0: - resolution: {integrity: sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==} - engines: {node: '>=18'} - strip-json-comments@2.0.1: resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} @@ -3475,10 +3416,6 @@ packages: resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} engines: {node: '>=12.20'} - yoctocolors@2.0.2: - resolution: {integrity: sha512-Ct97huExsu7cWeEjmrXlofevF8CvzUglJ4iGUet5B8xn1oumtAZBpHU4GzYuoE6PVqcZ5hghtBrSlhwHuR1Jmw==} - engines: {node: '>=18'} - zod@3.23.8: resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==} @@ -3916,12 +3853,8 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.18.0': optional: true - '@sec-ant/readable-stream@0.4.1': {} - '@sinclair/typebox@0.27.8': {} - '@sindresorhus/merge-streams@4.0.0': {} - '@swc/core-darwin-arm64@1.6.5': optional: true @@ -3982,8 +3915,6 @@ snapshots: '@types/json-schema@7.0.15': {} - '@types/minimist@1.2.5': {} - '@types/node@20.14.8': dependencies: undici-types: 5.26.5 @@ -4891,21 +4822,6 @@ snapshots: signal-exit: 4.1.0 strip-final-newline: 3.0.0 - execa@9.3.0: - dependencies: - '@sindresorhus/merge-streams': 4.0.0 - cross-spawn: 7.0.3 - figures: 6.1.0 - get-stream: 9.0.1 - human-signals: 7.0.0 - is-plain-obj: 4.1.0 - is-stream: 4.0.1 - npm-run-path: 5.3.0 - pretty-ms: 9.0.0 - signal-exit: 4.1.0 - strip-final-newline: 4.0.0 - yoctocolors: 2.0.2 - extract-zip@2.0.1: dependencies: debug: 4.3.5 @@ -4944,10 +4860,6 @@ snapshots: dependencies: pend: 1.2.0 - figures@6.1.0: - dependencies: - is-unicode-supported: 2.0.0 - file-entry-cache@8.0.0: dependencies: flat-cache: 4.0.1 @@ -5029,11 +4941,6 @@ snapshots: get-stream@8.0.1: {} - get-stream@9.0.1: - dependencies: - '@sec-ant/readable-stream': 0.4.1 - is-stream: 4.0.1 - get-tsconfig@4.7.5: dependencies: resolve-pkg-maps: 1.0.0 @@ -5171,8 +5078,6 @@ snapshots: human-signals@5.0.0: {} - human-signals@7.0.0: {} - iconv-lite@0.6.3: dependencies: safer-buffer: 2.1.2 @@ -5255,8 +5160,6 @@ snapshots: is-path-inside@3.0.3: {} - is-plain-obj@4.1.0: {} - is-port-reachable@4.0.0: {} is-potential-custom-element-name@1.0.1: {} @@ -5276,14 +5179,10 @@ snapshots: is-stream@3.0.0: {} - is-stream@4.0.1: {} - is-text-path@2.0.0: dependencies: text-extensions: 2.4.0 - is-unicode-supported@2.0.0: {} - is-wsl@2.2.0: dependencies: is-docker: 2.2.1 @@ -5712,8 +5611,6 @@ snapshots: lines-and-columns: 2.0.4 type-fest: 3.13.1 - parse-ms@4.0.0: {} - parse5@7.1.2: dependencies: entities: 4.5.0 @@ -5817,10 +5714,6 @@ snapshots: ansi-styles: 5.2.0 react-is: 18.2.0 - pretty-ms@9.0.0: - dependencies: - parse-ms: 4.0.0 - process-nextick-args@2.0.1: {} progress@2.0.3: {} @@ -6272,8 +6165,6 @@ snapshots: strip-final-newline@3.0.0: {} - strip-final-newline@4.0.0: {} - strip-json-comments@2.0.1: {} strip-json-comments@3.1.1: {} @@ -6603,6 +6494,4 @@ snapshots: yocto-queue@1.0.0: {} - yoctocolors@2.0.2: {} - zod@3.23.8: {} diff --git a/scripts/build.js b/scripts/build.js index eacabe0de..ec111a038 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -17,31 +17,67 @@ nr build core --formats cjs */ import fs from 'node:fs/promises' -import { existsSync } from 'node:fs' +import { parseArgs } from 'node:util' +import { existsSync, readFileSync } from 'node:fs' import path from 'node:path' -import minimist from 'minimist' import { brotliCompressSync, gzipSync } from 'node:zlib' import pico from 'picocolors' -import { execa, execaSync } from 'execa' import { cpus } from 'node:os' -import { createRequire } from 'node:module' -import { targets as allTargets, fuzzyMatchTarget } from './utils.js' +import { targets as allTargets, exec, fuzzyMatchTarget } from './utils.js' import { scanEnums } from './inline-enums.js' import prettyBytes from 'pretty-bytes' +import { spawnSync } from 'node:child_process' -const require = createRequire(import.meta.url) -const args = minimist(process.argv.slice(2)) -const targets = args._ -const formats = args.formats || args.f -const devOnly = args.devOnly || args.d -const prodOnly = !devOnly && (args.prodOnly || args.p) -const buildTypes = args.withTypes || args.t -const sourceMap = args.sourcemap || args.s -const isRelease = args.release -/** @type {boolean | undefined} */ -const buildAllMatching = args.all || args.a -const writeSize = args.size -const commit = execaSync('git', ['rev-parse', '--short=7', 'HEAD']).stdout +const commit = spawnSync('git', ['rev-parse', '--short=7', 'HEAD']) + .stdout.toString() + .trim() + +const { values, positionals: targets } = parseArgs({ + allowPositionals: true, + options: { + formats: { + type: 'string', + short: 'f', + }, + devOnly: { + type: 'boolean', + short: 'd', + }, + prodOnly: { + type: 'boolean', + short: 'p', + }, + withTypes: { + type: 'boolean', + short: 't', + }, + sourceMap: { + type: 'boolean', + short: 's', + }, + release: { + type: 'boolean', + }, + all: { + type: 'boolean', + short: 'a', + }, + size: { + type: 'boolean', + }, + }, +}) + +const { + formats, + all: buildAllMatching, + devOnly, + prodOnly, + withTypes: buildTypes, + sourceMap, + release: isRelease, + size: writeSize, +} = values const sizeDir = path.resolve('temp/size') @@ -57,7 +93,7 @@ async function run() { await buildAll(resolvedTargets) await checkAllSizes(resolvedTargets) if (buildTypes) { - await execa( + await exec( 'pnpm', [ 'run', @@ -114,6 +150,7 @@ async function runParallel(maxConcurrency, source, iteratorFn) { } return Promise.all(ret) } + /** * Builds the target. * @param {string} target - The target to build. @@ -121,7 +158,7 @@ async function runParallel(maxConcurrency, source, iteratorFn) { */ async function build(target) { const pkgDir = path.resolve(`packages/${target}`) - const pkg = require(`${pkgDir}/package.json`) + const pkg = JSON.parse(readFileSync(`${pkgDir}/package.json`, 'utf-8')) // if this is a full build (no specific targets), ignore private packages if ((isRelease || !targets.length) && pkg.private) { @@ -136,7 +173,8 @@ async function build(target) { const env = (pkg.buildOptions && pkg.buildOptions.env) || (devOnly ? 'development' : 'production') - await execa( + + await exec( 'rollup', [ '-c', diff --git a/scripts/dev.js b/scripts/dev.js index 7db79442e..4041e61bb 100644 --- a/scripts/dev.js +++ b/scripts/dev.js @@ -8,16 +8,38 @@ import esbuild from 'esbuild' import { dirname, relative, resolve } from 'node:path' import { fileURLToPath } from 'node:url' import { createRequire } from 'node:module' -import minimist from 'minimist' +import { parseArgs } from 'node:util' import { polyfillNode } from 'esbuild-plugin-polyfill-node' const require = createRequire(import.meta.url) const __dirname = dirname(fileURLToPath(import.meta.url)) -const args = minimist(process.argv.slice(2)) -const targets = args._.length ? args._ : ['vue'] -const format = args.f || 'global' -const prod = args.p || false -const inlineDeps = args.i || args.inline + +const { + values: { format: rawFormat, prod, inline: inlineDeps }, + positionals, +} = parseArgs({ + allowPositionals: true, + options: { + format: { + type: 'string', + short: 'f', + default: 'global', + }, + prod: { + type: 'boolean', + short: 'p', + default: false, + }, + inline: { + type: 'boolean', + short: 'i', + default: false, + }, + }, +}) + +const format = rawFormat || 'global' +const targets = positionals.length ? positionals : ['vue'] // resolve output const outputFormat = format.startsWith('global') diff --git a/scripts/inline-enums.js b/scripts/inline-enums.js index 40bd31bfd..b1baaa6c5 100644 --- a/scripts/inline-enums.js +++ b/scripts/inline-enums.js @@ -21,7 +21,7 @@ import { } from 'node:fs' import * as path from 'node:path' import { parse } from '@babel/parser' -import { execaSync } from 'execa' +import { spawnSync } from 'node:child_process' import MagicString from 'magic-string' /** @@ -49,8 +49,16 @@ export function scanEnums() { const defines = Object.create(null) // 1. grep for files with exported enum - const { stdout } = execaSync('git', ['grep', `export enum`]) - const files = [...new Set(stdout.split('\n').map(line => line.split(':')[0]))] + const { stdout } = spawnSync('git', ['grep', `export enum`]) + const files = [ + ...new Set( + stdout + .toString() + .trim() + .split('\n') + .map(line => line.split(':')[0]), + ), + ] // 2. parse matched files to collect enum info for (const relativeFile of files) { diff --git a/scripts/release.js b/scripts/release.js index 4a0c968e2..eed71c2fd 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -1,13 +1,13 @@ // @ts-check -import minimist from 'minimist' import fs from 'node:fs' import path from 'node:path' import pico from 'picocolors' import semver from 'semver' import enquirer from 'enquirer' -import { execa } from 'execa' import { createRequire } from 'node:module' import { fileURLToPath } from 'node:url' +import { exec } from './utils.js' +import { parseArgs } from 'node:util' /** * @typedef {{ @@ -23,12 +23,34 @@ let versionUpdated = false const { prompt } = enquirer const currentVersion = createRequire(import.meta.url)('../package.json').version const __dirname = path.dirname(fileURLToPath(import.meta.url)) -const args = minimist(process.argv.slice(2), { - alias: { - skipBuild: 'skip-build', - skipTests: 'skip-tests', - skipGit: 'skip-git', - skipPrompts: 'skip-prompts', + +const { values: args, positionals } = parseArgs({ + allowPositionals: true, + options: { + preid: { + type: 'string', + }, + dry: { + type: 'boolean', + }, + tag: { + type: 'string', + }, + canary: { + type: 'boolean', + }, + skipBuild: { + type: 'boolean', + }, + skipTests: { + type: 'boolean', + }, + skipGit: { + type: 'boolean', + }, + skipPrompts: { + type: 'boolean', + }, }, }) @@ -94,16 +116,16 @@ const versionIncrements = [ ] const inc = (/** @type {import('semver').ReleaseType} */ i) => - semver.inc(currentVersion, i, preId) + semver.inc(currentVersion, i, typeof preId === 'string' ? preId : undefined) const run = async ( /** @type {string} */ bin, /** @type {ReadonlyArray} */ args, - /** @type {import('execa').Options} */ opts = {}, -) => execa(bin, args, { stdio: 'inherit', ...opts }) + /** @type {import('node:child_process').SpawnOptions} */ opts = {}, +) => exec(bin, args, { stdio: 'inherit', ...opts }) const dryRun = async ( /** @type {string} */ bin, /** @type {ReadonlyArray} */ args, - /** @type {import('execa').Options} */ opts = {}, + /** @type {import('node:child_process').SpawnOptions} */ opts = {}, ) => console.log(pico.blue(`[dryrun] ${bin} ${args.join(' ')}`), opts) const runIfNotDry = isDryRun ? dryRun : run const getPkgRoot = (/** @type {string} */ pkg) => @@ -117,7 +139,7 @@ async function main() { console.log(`${pico.green(`✓`)} commit is up-to-date with remote.\n`) } - let targetVersion = args._[0] + let targetVersion = positionals[0] if (isCanary) { // The canary version string format is `3.yyyyMMdd.0` (or `3.yyyyMMdd.0-minor.0` for minor) @@ -392,11 +414,11 @@ async function isInSyncWithRemote() { } async function getSha() { - return (await execa('git', ['rev-parse', 'HEAD'])).stdout + return (await exec('git', ['rev-parse', 'HEAD'])).stdout } async function getBranch() { - return (await execa('git', ['rev-parse', '--abbrev-ref', 'HEAD'])).stdout + return (await exec('git', ['rev-parse', '--abbrev-ref', 'HEAD'])).stdout } /** diff --git a/scripts/utils.js b/scripts/utils.js index 6c3844dd1..7eec80653 100644 --- a/scripts/utils.js +++ b/scripts/utils.js @@ -2,6 +2,7 @@ import fs from 'node:fs' import pico from 'picocolors' import { createRequire } from 'node:module' +import { spawn } from 'node:child_process' const require = createRequire(import.meta.url) @@ -51,3 +52,50 @@ export function fuzzyMatchTarget(partialTargets, includeAllMatching) { process.exit(1) } } + +/** + * @param {string} command + * @param {ReadonlyArray} args + * @param {object} [options] + */ +export async function exec(command, args, options) { + return new Promise((resolve, reject) => { + const process = spawn(command, args, { + stdio: [ + 'ignore', // stdin + 'pipe', // stdout + 'pipe', // stderr + ], + ...options, + }) + + /** + * @type {Buffer[]} + */ + const stderrChunks = [] + /** + * @type {Buffer[]} + */ + const stdoutChunks = [] + + process.stderr?.on('data', chunk => { + stderrChunks.push(chunk) + }) + + process.stdout?.on('data', chunk => { + stdoutChunks.push(chunk) + }) + + process.on('error', error => { + reject(error) + }) + + process.on('exit', code => { + const ok = code === 0 + const stderr = Buffer.concat(stderrChunks).toString().trim() + const stdout = Buffer.concat(stdoutChunks).toString().trim() + const result = { ok, code, stderr, stdout } + resolve(result) + }) + }) +} diff --git a/scripts/verify-treeshaking.js b/scripts/verify-treeshaking.js index f19fea92d..7cb76cdac 100644 --- a/scripts/verify-treeshaking.js +++ b/scripts/verify-treeshaking.js @@ -1,8 +1,8 @@ // @ts-check import fs from 'node:fs' -import { execa } from 'execa' +import { exec } from './utils.js' -execa('pnpm', ['build', 'vue', '-f', 'global-runtime']).then(() => { +exec('pnpm', ['build', 'vue', '-f', 'global-runtime']).then(() => { const errors = [] const devBuild = fs.readFileSync( From 4e45bf12732ec6209d68733931c32d78edc9c69e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 17:31:20 +0800 Subject: [PATCH 22/84] chore(deps): update all non-major dependencies (#11255) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 12 +- packages/compiler-sfc/package.json | 2 +- pnpm-lock.yaml | 204 ++++++++++++++--------------- 3 files changed, 109 insertions(+), 109 deletions(-) diff --git a/package.json b/package.json index 2a4d9e777..a543221f8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "version": "3.4.31", - "packageManager": "pnpm@9.4.0", + "packageManager": "pnpm@9.5.0", "type": "module", "scripts": { "dev": "node scripts/dev.js", @@ -67,9 +67,9 @@ "@rollup/plugin-json": "^6.1.0", "@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-replace": "5.0.4", - "@swc/core": "^1.6.5", + "@swc/core": "^1.6.13", "@types/hash-sum": "^1.0.2", - "@types/node": "^20.14.8", + "@types/node": "^20.14.10", "@types/semver": "^7.5.8", "@vitest/coverage-istanbul": "^1.6.0", "@vue/consolidate": "1.0.0", @@ -87,13 +87,13 @@ "magic-string": "^0.30.10", "markdown-table": "^3.0.3", "marked": "^12.0.2", - "npm-run-all2": "^6.2.0", + "npm-run-all2": "^6.2.2", "picocolors": "^1.0.1", "prettier": "^3.3.2", "pretty-bytes": "^6.1.1", "pug": "^3.0.3", "puppeteer": "~22.12.0", - "rimraf": "^5.0.7", + "rimraf": "^5.0.8", "rollup": "^4.18.0", "rollup-plugin-dts": "^6.1.1", "rollup-plugin-esbuild": "^6.1.1", @@ -104,7 +104,7 @@ "terser": "^5.31.1", "todomvc-app-css": "^2.4.3", "tslib": "^2.6.3", - "tsx": "^4.15.7", + "tsx": "^4.16.2", "typescript": "~5.4.5", "typescript-eslint": "^7.13.1", "vite": "^5.3.1", diff --git a/packages/compiler-sfc/package.json b/packages/compiler-sfc/package.json index 22ee88edb..ba2079024 100644 --- a/packages/compiler-sfc/package.json +++ b/packages/compiler-sfc/package.json @@ -58,7 +58,7 @@ "hash-sum": "^2.0.0", "lru-cache": "10.1.0", "merge-source-map": "^1.1.0", - "minimatch": "^9.0.4", + "minimatch": "^9.0.5", "postcss-modules": "^6.0.0", "postcss-selector-parser": "^6.1.0", "pug": "^3.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fab1b94bf..bd997de01 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,7 +16,7 @@ importers: version: 7.24.7 '@codspeed/vitest-plugin': specifier: ^3.1.0 - version: 3.1.0(vite@5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1))(vitest@1.6.0(@types/node@20.14.8)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1)) + version: 3.1.0(vite@5.3.1(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.1))(vitest@1.6.0(@types/node@20.14.10)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1)) '@rollup/plugin-alias': specifier: ^5.1.0 version: 5.1.0(rollup@4.18.0) @@ -33,20 +33,20 @@ importers: specifier: 5.0.4 version: 5.0.4(rollup@4.18.0) '@swc/core': - specifier: ^1.6.5 - version: 1.6.5 + specifier: ^1.6.13 + version: 1.6.13 '@types/hash-sum': specifier: ^1.0.2 version: 1.0.2 '@types/node': - specifier: ^20.14.8 - version: 20.14.8 + specifier: ^20.14.10 + version: 20.14.10 '@types/semver': specifier: ^7.5.8 version: 7.5.8 '@vitest/coverage-istanbul': specifier: ^1.6.0 - version: 1.6.0(vitest@1.6.0(@types/node@20.14.8)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1)) + version: 1.6.0(vitest@1.6.0(@types/node@20.14.10)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1)) '@vue/consolidate': specifier: 1.0.0 version: 1.0.0 @@ -70,7 +70,7 @@ importers: version: 0.5.1(eslint@9.5.0)(typescript@5.4.5) eslint-plugin-vitest: specifier: ^0.5.4 - version: 0.5.4(eslint@9.5.0)(typescript@5.4.5)(vitest@1.6.0(@types/node@20.14.8)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1)) + version: 0.5.4(eslint@9.5.0)(typescript@5.4.5)(vitest@1.6.0(@types/node@20.14.10)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1)) estree-walker: specifier: ^2.0.2 version: 2.0.2 @@ -93,8 +93,8 @@ importers: specifier: ^12.0.2 version: 12.0.2 npm-run-all2: - specifier: ^6.2.0 - version: 6.2.0 + specifier: ^6.2.2 + version: 6.2.2 picocolors: specifier: ^1.0.1 version: 1.0.1 @@ -111,8 +111,8 @@ importers: specifier: ~22.12.0 version: 22.12.0(typescript@5.4.5) rimraf: - specifier: ^5.0.7 - version: 5.0.7 + specifier: ^5.0.8 + version: 5.0.8 rollup: specifier: ^4.18.0 version: 4.18.0 @@ -144,8 +144,8 @@ importers: specifier: ^2.6.3 version: 2.6.3 tsx: - specifier: ^4.15.7 - version: 4.15.7 + specifier: ^4.16.2 + version: 4.16.2 typescript: specifier: ~5.4.5 version: 5.4.5 @@ -154,10 +154,10 @@ importers: version: 7.13.1(eslint@9.5.0)(typescript@5.4.5) vite: specifier: ^5.3.1 - version: 5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1) + version: 5.3.1(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.1) vitest: specifier: ^1.6.0 - version: 1.6.0(@types/node@20.14.8)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1) + version: 1.6.0(@types/node@20.14.10)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1) packages/compiler-core: dependencies: @@ -236,8 +236,8 @@ importers: specifier: ^1.1.0 version: 1.1.0 minimatch: - specifier: ^9.0.4 - version: 9.0.4 + specifier: ^9.0.5 + version: 9.0.5 postcss-modules: specifier: ^6.0.0 version: 6.0.0(postcss@8.4.38) @@ -349,10 +349,10 @@ importers: devDependencies: '@vitejs/plugin-vue': specifier: ^5.0.5 - version: 5.0.5(vite@5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1))(vue@packages+vue) + version: 5.0.5(vite@5.3.1(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.1))(vue@packages+vue) vite: specifier: ^5.3.1 - version: 5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1) + version: 5.3.1(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.1) packages/shared: {} @@ -890,68 +890,68 @@ packages: '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} - '@swc/core-darwin-arm64@1.6.5': - resolution: {integrity: sha512-RGQhMdni2v1/ANQ/2K+F+QYdzaucekYBewZcX1ogqJ8G5sbPaBdYdDN1qQ4kHLCIkPtGP6qC7c71qPEqL2RidQ==} + '@swc/core-darwin-arm64@1.6.13': + resolution: {integrity: sha512-SOF4buAis72K22BGJ3N8y88mLNfxLNprTuJUpzikyMGrvkuBFNcxYtMhmomO0XHsgLDzOJ+hWzcgjRNzjMsUcQ==} engines: {node: '>=10'} cpu: [arm64] os: [darwin] - '@swc/core-darwin-x64@1.6.5': - resolution: {integrity: sha512-/pSN0/Jtcbbb9+ovS9rKxR3qertpFAM3OEJr/+Dh/8yy7jK5G5EFPIrfsw/7Q5987ERPIJIH6BspK2CBB2tgcg==} + '@swc/core-darwin-x64@1.6.13': + resolution: {integrity: sha512-AW8akFSC+tmPE6YQQvK9S2A1B8pjnXEINg+gGgw0KRUUXunvu1/OEOeC5L2Co1wAwhD7bhnaefi06Qi9AiwOag==} engines: {node: '>=10'} cpu: [x64] os: [darwin] - '@swc/core-linux-arm-gnueabihf@1.6.5': - resolution: {integrity: sha512-B0g/dROCE747RRegs/jPHuKJgwXLracDhnqQa80kFdgWEMjlcb7OMCgs5OX86yJGRS4qcYbiMGD0Pp7Kbqn3yw==} + '@swc/core-linux-arm-gnueabihf@1.6.13': + resolution: {integrity: sha512-f4gxxvDXVUm2HLYXRd311mSrmbpQF2MZ4Ja6XCQz1hWAxXdhRl1gpnZ+LH/xIfGSwQChrtLLVrkxdYUCVuIjFg==} engines: {node: '>=10'} cpu: [arm] os: [linux] - '@swc/core-linux-arm64-gnu@1.6.5': - resolution: {integrity: sha512-W8meapgXTq8AOtSvDG4yKR8ant2WWD++yOjgzAleB5VAC+oC+aa8YJROGxj8HepurU8kurqzcialwoMeq5SZZQ==} + '@swc/core-linux-arm64-gnu@1.6.13': + resolution: {integrity: sha512-Nf/eoW2CbG8s+9JoLtjl9FByBXyQ5cjdBsA4efO7Zw4p+YSuXDgc8HRPC+E2+ns0praDpKNZtLvDtmF2lL+2Gg==} engines: {node: '>=10'} cpu: [arm64] os: [linux] - '@swc/core-linux-arm64-musl@1.6.5': - resolution: {integrity: sha512-jyCKqoX50Fg8rJUQqh4u5PqnE7nqYKXHjVH2WcYr114/MU21zlsI+YL6aOQU1XP8bJQ2gPQ1rnlnGJdEHiKS/w==} + '@swc/core-linux-arm64-musl@1.6.13': + resolution: {integrity: sha512-2OysYSYtdw79prJYuKIiux/Gj0iaGEbpS2QZWCIY4X9sGoETJ5iMg+lY+YCrIxdkkNYd7OhIbXdYFyGs/w5LDg==} engines: {node: '>=10'} cpu: [arm64] os: [linux] - '@swc/core-linux-x64-gnu@1.6.5': - resolution: {integrity: sha512-G6HmUn/RRIlXC0YYFfBz2qh6OZkHS/KUPkhoG4X9ADcgWXXjOFh6JrefwsYj8VBAJEnr5iewzjNfj+nztwHaeA==} + '@swc/core-linux-x64-gnu@1.6.13': + resolution: {integrity: sha512-PkR4CZYJNk5hcd2+tMWBpnisnmYsUzazI1O5X7VkIGFcGePTqJ/bWlfUIVVExWxvAI33PQFzLbzmN5scyIUyGQ==} engines: {node: '>=10'} cpu: [x64] os: [linux] - '@swc/core-linux-x64-musl@1.6.5': - resolution: {integrity: sha512-AQpBjBnelQDSbeTJA50AXdS6+CP66LsXIMNTwhPSgUfE7Bx1ggZV11Fsi4Q5SGcs6a8Qw1cuYKN57ZfZC5QOuA==} + '@swc/core-linux-x64-musl@1.6.13': + resolution: {integrity: sha512-OdsY7wryTxCKwGQcwW9jwWg3cxaHBkTTHi91+5nm7hFPpmZMz1HivJrWAMwVE7iXFw+M4l6ugB/wCvpYrUAAjA==} engines: {node: '>=10'} cpu: [x64] os: [linux] - '@swc/core-win32-arm64-msvc@1.6.5': - resolution: {integrity: sha512-MZTWM8kUwS30pVrtbzSGEXtek46aXNb/mT9D6rsS7NvOuv2w+qZhjR1rzf4LNbbn5f8VnR4Nac1WIOYZmfC5ng==} + '@swc/core-win32-arm64-msvc@1.6.13': + resolution: {integrity: sha512-ap6uNmYjwk9M/+bFEuWRNl3hq4VqgQ/Lk+ID/F5WGqczNr0L7vEf+pOsRAn0F6EV+o/nyb3ePt8rLhE/wjHpPg==} engines: {node: '>=10'} cpu: [arm64] os: [win32] - '@swc/core-win32-ia32-msvc@1.6.5': - resolution: {integrity: sha512-WZdu4gISAr3yOm1fVwKhhk6+MrP7kVX0KMP7+ZQFTN5zXQEiDSDunEJKVgjMVj3vlR+6mnAqa/L0V9Qa8+zKlQ==} + '@swc/core-win32-ia32-msvc@1.6.13': + resolution: {integrity: sha512-IJ8KH4yIUHTnS/U1jwQmtbfQals7zWPG0a9hbEfIr4zI0yKzjd83lmtS09lm2Q24QBWOCFGEEbuZxR4tIlvfzA==} engines: {node: '>=10'} cpu: [ia32] os: [win32] - '@swc/core-win32-x64-msvc@1.6.5': - resolution: {integrity: sha512-ezXgucnMTzlFIxQZw7ls/5r2hseFaRoDL04cuXUOs97E8r+nJSmFsRQm/ygH5jBeXNo59nyZCalrjJAjwfgACA==} + '@swc/core-win32-x64-msvc@1.6.13': + resolution: {integrity: sha512-f6/sx6LMuEnbuxtiSL/EkR0Y6qUHFw1XVrh6rwzKXptTipUdOY+nXpKoh+1UsBm/r7H0/5DtOdrn3q5ZHbFZjQ==} engines: {node: '>=10'} cpu: [x64] os: [win32] - '@swc/core@1.6.5': - resolution: {integrity: sha512-tyVvUK/HDOUUsK6/GmWvnqUtD9oDpPUA4f7f7JCOV8hXxtfjMtAZeBKf93yrB1XZet69TDR7EN0hFC6i4MF0Ig==} + '@swc/core@1.6.13': + resolution: {integrity: sha512-eailUYex6fkfaQTev4Oa3mwn0/e3mQU4H8y1WPuImYQESOQDtVrowwUGDSc19evpBbHpKtwM+hw8nLlhIsF+Tw==} engines: {node: '>=10'} peerDependencies: '@swc/helpers': '*' @@ -977,8 +977,8 @@ packages: '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - '@types/node@20.14.8': - resolution: {integrity: sha512-DO+2/jZinXfROG7j7WKFn/3C6nFwxy2lLpgLjEXJz+0XKphZlTLJ14mo8Vfg8X5BWN6XjyESXq+LcYdT7tR3bA==} + '@types/node@20.14.10': + resolution: {integrity: sha512-MdiXf+nDuMvY0gJKxyfZ7/6UFsETO7mGKF54MVD/ekJS6HdFtpZFBgrh6Pseu64XTb2MLyFPlbW6hj8HYRQNOQ==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -2411,8 +2411,8 @@ packages: resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} engines: {node: '>=10'} - minimatch@9.0.4: - resolution: {integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==} + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} minimist@1.2.8: @@ -2478,9 +2478,9 @@ packages: resolution: {integrity: sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - npm-run-all2@6.2.0: - resolution: {integrity: sha512-wA7yVIkthe6qJBfiJ2g6aweaaRlw72itsFGF6HuwCHKwtwAx/4BY1vVpk6bw6lS8RLMsexoasOkd0aYOmsFG7Q==} - engines: {node: ^14.18.0 || >=16.0.0, npm: '>= 8'} + npm-run-all2@6.2.2: + resolution: {integrity: sha512-Q+alQAGIW7ZhKcxLt8GcSi3h3ryheD6xnmXahkMRVM5LYmajcUrSITm8h+OPC9RYWMV2GR0Q1ntTUCfxaNoOJw==} + engines: {node: ^14.18.0 || ^16.13.0 || >=18.0.0, npm: '>= 8'} hasBin: true npm-run-path@4.0.1: @@ -2838,9 +2838,9 @@ packages: rfdc@1.3.1: resolution: {integrity: sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==} - rimraf@5.0.7: - resolution: {integrity: sha512-nV6YcJo5wbLW77m+8KjH8aB/7/rxQy9SZ0HY5shnwULfS+9nmTtVXAJET5NdZmCzA4fPI/Hm1wo/Po/4mopOdg==} - engines: {node: '>=14.18'} + rimraf@5.0.8: + resolution: {integrity: sha512-XSh0V2/yNhDEi8HwdIefD8MLgs4LQXPag/nEJWs3YUc3Upn+UHa1GyIkEg9xSSNt7HnkO5FjTvmcRzgf+8UZuw==} + engines: {node: '>=18'} hasBin: true rollup-plugin-dts@6.1.1: @@ -3155,8 +3155,8 @@ packages: tslib@2.6.3: resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} - tsx@4.15.7: - resolution: {integrity: sha512-u3H0iSFDZM3za+VxkZ1kywdCeHCn+8/qHQS1MNoO2sONDgD95HlWtt8aB23OzeTmFP9IU4/8bZUdg58Uu5J4cg==} + tsx@4.16.2: + resolution: {integrity: sha512-C1uWweJDgdtX2x600HjaFaucXTilT7tgUZHbOE4+ypskZ1OP8CRCSDkCxG6Vya9EwaFIVagWwpaVAn5wzypaqQ==} engines: {node: '>=18.0.0'} hasBin: true @@ -3565,11 +3565,11 @@ snapshots: transitivePeerDependencies: - debug - '@codspeed/vitest-plugin@3.1.0(vite@5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1))(vitest@1.6.0(@types/node@20.14.8)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1))': + '@codspeed/vitest-plugin@3.1.0(vite@5.3.1(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.1))(vitest@1.6.0(@types/node@20.14.10)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1))': dependencies: '@codspeed/core': 3.1.0 - vite: 5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1) - vitest: 1.6.0(@types/node@20.14.8)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1) + vite: 5.3.1(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.1) + vitest: 1.6.0(@types/node@20.14.10)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1) transitivePeerDependencies: - debug @@ -3855,51 +3855,51 @@ snapshots: '@sinclair/typebox@0.27.8': {} - '@swc/core-darwin-arm64@1.6.5': + '@swc/core-darwin-arm64@1.6.13': optional: true - '@swc/core-darwin-x64@1.6.5': + '@swc/core-darwin-x64@1.6.13': optional: true - '@swc/core-linux-arm-gnueabihf@1.6.5': + '@swc/core-linux-arm-gnueabihf@1.6.13': optional: true - '@swc/core-linux-arm64-gnu@1.6.5': + '@swc/core-linux-arm64-gnu@1.6.13': optional: true - '@swc/core-linux-arm64-musl@1.6.5': + '@swc/core-linux-arm64-musl@1.6.13': optional: true - '@swc/core-linux-x64-gnu@1.6.5': + '@swc/core-linux-x64-gnu@1.6.13': optional: true - '@swc/core-linux-x64-musl@1.6.5': + '@swc/core-linux-x64-musl@1.6.13': optional: true - '@swc/core-win32-arm64-msvc@1.6.5': + '@swc/core-win32-arm64-msvc@1.6.13': optional: true - '@swc/core-win32-ia32-msvc@1.6.5': + '@swc/core-win32-ia32-msvc@1.6.13': optional: true - '@swc/core-win32-x64-msvc@1.6.5': + '@swc/core-win32-x64-msvc@1.6.13': optional: true - '@swc/core@1.6.5': + '@swc/core@1.6.13': dependencies: '@swc/counter': 0.1.3 '@swc/types': 0.1.9 optionalDependencies: - '@swc/core-darwin-arm64': 1.6.5 - '@swc/core-darwin-x64': 1.6.5 - '@swc/core-linux-arm-gnueabihf': 1.6.5 - '@swc/core-linux-arm64-gnu': 1.6.5 - '@swc/core-linux-arm64-musl': 1.6.5 - '@swc/core-linux-x64-gnu': 1.6.5 - '@swc/core-linux-x64-musl': 1.6.5 - '@swc/core-win32-arm64-msvc': 1.6.5 - '@swc/core-win32-ia32-msvc': 1.6.5 - '@swc/core-win32-x64-msvc': 1.6.5 + '@swc/core-darwin-arm64': 1.6.13 + '@swc/core-darwin-x64': 1.6.13 + '@swc/core-linux-arm-gnueabihf': 1.6.13 + '@swc/core-linux-arm64-gnu': 1.6.13 + '@swc/core-linux-arm64-musl': 1.6.13 + '@swc/core-linux-x64-gnu': 1.6.13 + '@swc/core-linux-x64-musl': 1.6.13 + '@swc/core-win32-arm64-msvc': 1.6.13 + '@swc/core-win32-ia32-msvc': 1.6.13 + '@swc/core-win32-x64-msvc': 1.6.13 '@swc/counter@0.1.3': {} @@ -3915,7 +3915,7 @@ snapshots: '@types/json-schema@7.0.15': {} - '@types/node@20.14.8': + '@types/node@20.14.10': dependencies: undici-types: 5.26.5 @@ -3927,7 +3927,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 20.14.8 + '@types/node': 20.14.10 optional: true '@typescript-eslint/eslint-plugin@7.13.1(@typescript-eslint/parser@7.13.1(eslint@9.5.0)(typescript@5.4.5))(eslint@9.5.0)(typescript@5.4.5)': @@ -3994,7 +3994,7 @@ snapshots: debug: 4.3.5 globby: 11.1.0 is-glob: 4.0.3 - minimatch: 9.0.4 + minimatch: 9.0.5 semver: 7.6.2 ts-api-utils: 1.3.0(typescript@5.4.5) optionalDependencies: @@ -4009,7 +4009,7 @@ snapshots: debug: 4.3.5 globby: 11.1.0 is-glob: 4.0.3 - minimatch: 9.0.4 + minimatch: 9.0.5 semver: 7.6.2 ts-api-utils: 1.3.0(typescript@5.4.5) optionalDependencies: @@ -4052,12 +4052,12 @@ snapshots: '@typescript-eslint/types': 7.8.0 eslint-visitor-keys: 3.4.3 - '@vitejs/plugin-vue@5.0.5(vite@5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1))(vue@packages+vue)': + '@vitejs/plugin-vue@5.0.5(vite@5.3.1(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.1))(vue@packages+vue)': dependencies: - vite: 5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1) + vite: 5.3.1(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.1) vue: link:packages/vue - '@vitest/coverage-istanbul@1.6.0(vitest@1.6.0(@types/node@20.14.8)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1))': + '@vitest/coverage-istanbul@1.6.0(vitest@1.6.0(@types/node@20.14.10)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1))': dependencies: debug: 4.3.4 istanbul-lib-coverage: 3.2.2 @@ -4068,7 +4068,7 @@ snapshots: magicast: 0.3.4 picocolors: 1.0.1 test-exclude: 6.0.0 - vitest: 1.6.0(@types/node@20.14.8)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1) + vitest: 1.6.0(@types/node@20.14.10)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1) transitivePeerDependencies: - supports-color @@ -4705,19 +4705,19 @@ snapshots: eslint-import-resolver-node: 0.3.9 get-tsconfig: 4.7.5 is-glob: 4.0.3 - minimatch: 9.0.4 + minimatch: 9.0.5 semver: 7.6.2 tslib: 2.6.3 transitivePeerDependencies: - supports-color - typescript - eslint-plugin-vitest@0.5.4(eslint@9.5.0)(typescript@5.4.5)(vitest@1.6.0(@types/node@20.14.8)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1)): + eslint-plugin-vitest@0.5.4(eslint@9.5.0)(typescript@5.4.5)(vitest@1.6.0(@types/node@20.14.10)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1)): dependencies: '@typescript-eslint/utils': 7.8.0(eslint@9.5.0)(typescript@5.4.5) eslint: 9.5.0 optionalDependencies: - vitest: 1.6.0(@types/node@20.14.8)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1) + vitest: 1.6.0(@types/node@20.14.10)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1) transitivePeerDependencies: - supports-color - typescript @@ -4977,7 +4977,7 @@ snapshots: dependencies: foreground-child: 3.1.1 jackspeak: 2.3.6 - minimatch: 9.0.4 + minimatch: 9.0.5 minipass: 7.0.4 path-scurry: 1.10.2 @@ -5457,7 +5457,7 @@ snapshots: dependencies: brace-expansion: 2.0.1 - minimatch@9.0.4: + minimatch@9.0.5: dependencies: brace-expansion: 2.0.1 @@ -5507,12 +5507,12 @@ snapshots: npm-normalize-package-bin@3.0.1: {} - npm-run-all2@6.2.0: + npm-run-all2@6.2.2: dependencies: ansi-styles: 6.2.1 cross-spawn: 7.0.3 memorystream: 0.3.1 - minimatch: 9.0.4 + minimatch: 9.0.5 pidtree: 0.6.0 read-package-json-fast: 3.0.2 shell-quote: 1.8.1 @@ -5924,7 +5924,7 @@ snapshots: rfdc@1.3.1: {} - rimraf@5.0.7: + rimraf@5.0.8: dependencies: glob: 10.3.12 @@ -6257,7 +6257,7 @@ snapshots: tslib@2.6.3: {} - tsx@4.15.7: + tsx@4.16.2: dependencies: esbuild: 0.21.5 get-tsconfig: 4.7.5 @@ -6336,13 +6336,13 @@ snapshots: vary@1.1.2: {} - vite-node@1.6.0(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1): + vite-node@1.6.0(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.1): dependencies: cac: 6.7.14 debug: 4.3.5 pathe: 1.1.2 picocolors: 1.0.1 - vite: 5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1) + vite: 5.3.1(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.1) transitivePeerDependencies: - '@types/node' - less @@ -6353,18 +6353,18 @@ snapshots: - supports-color - terser - vite@5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1): + vite@5.3.1(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.1): dependencies: esbuild: 0.21.5 postcss: 8.4.38 rollup: 4.18.0 optionalDependencies: - '@types/node': 20.14.8 + '@types/node': 20.14.10 fsevents: 2.3.3 sass: 1.77.6 terser: 5.31.1 - vitest@1.6.0(@types/node@20.14.8)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1): + vitest@1.6.0(@types/node@20.14.10)(jsdom@24.1.0)(sass@1.77.6)(terser@5.31.1): dependencies: '@vitest/expect': 1.6.0 '@vitest/runner': 1.6.0 @@ -6383,11 +6383,11 @@ snapshots: strip-literal: 2.1.0 tinybench: 2.7.0 tinypool: 0.8.4 - vite: 5.3.1(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1) - vite-node: 1.6.0(@types/node@20.14.8)(sass@1.77.6)(terser@5.31.1) + vite: 5.3.1(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.1) + vite-node: 1.6.0(@types/node@20.14.10)(sass@1.77.6)(terser@5.31.1) why-is-node-running: 2.2.2 optionalDependencies: - '@types/node': 20.14.8 + '@types/node': 20.14.10 jsdom: 24.1.0 transitivePeerDependencies: - less From b3c5f0be9c905e99ba666ec3ce3634c98eaff271 Mon Sep 17 00:00:00 2001 From: PhantomPower82 <121725112+PhantomPower82@users.noreply.github.com> Date: Mon, 8 Jul 2024 18:02:10 +0800 Subject: [PATCH 23/84] chore: fix missing parenthesis (#11271) [ci skip] --- packages/vue/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vue/README.md b/packages/vue/README.md index 2aca524e0..ae9eb402a 100644 --- a/packages/vue/README.md +++ b/packages/vue/README.md @@ -14,7 +14,7 @@ - Contains hard-coded prod/dev branches, and the prod build is pre-minified. Use the `*.prod.js` files for production. - **`vue(.runtime).esm-browser(.prod).js`**: - - For usage via native ES modules imports (in browser via `