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/17] 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 ef5030239b4..cd8db0b4726 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 b63cb4112a5..6d6948bc5d2 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/17] 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 016092409c9..dafe74a2253 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/17] 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 dafe74a2253..89541a50dfe 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/17] 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 b2a894f970f..cbe2eb2b1e8 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/17] 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 93b3ad94305..b5faa856eca 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/17] 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 da1bd5ec453..5b9206a8529 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/17] 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 e7f9a4c8d82..24f012a9d71 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/17] 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 545c0537929..b17d7f76507 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 53344bbd74a..c0bea5f73fd 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 624d2512e55..e9d25751ef7 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/17] 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 b17d7f76507..51af819ee7f 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 e9d25751ef7..159b1ee050c 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/17] 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 51af819ee7f..b28fc69b833 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 159b1ee050c..f9171b9b831 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/17] 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 89541a50dfe..eb0d7d4fd83 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 6c303eacd14b7b0de0accc228f6abeb43d706f63 Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 28 Jun 2024 09:28:51 +0800 Subject: [PATCH 12/17] 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 9a91eed6389..0122f4e4391 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 e764b60248c..91eac36012f 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 6817931f0e5..40868545b4b 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 13/17] 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 0122f4e4391..10c09109fdb 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 91eac36012f..da63fe84750 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 4898d691703..baa75d61644 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 40868545b4b..1528f4b1d89 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 14/17] 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 0987bfd5d79..f9afd0dd42c 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 f9171b9b831..47389dd7e5f 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 15/17] 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 10c09109fdb..20faa18a323 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 16/17] 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 ffd93d791ca..7ca831f0ce8 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 7482494e17a..67997798864 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 35aa9a373a4..de450491e7c 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 8a0aaeaf717..2fa2241a7de 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 e4a59aca7d5..dd54ab85ba9 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 38320b81e04..1bae0b929fb 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 17/17] 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 cbe2eb2b1e8..41f21c0647b 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 b28fc69b833..bb2576a67b9 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 def06be90ca..42b8e9f5b79 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 c0ce85cfd97..b18785c7d74 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 c0bea5f73fd..22ee88edb57 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 4a8b30f859d..a7b71e94cba 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 6746efb4bde..8f989994260 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 b7dc8a755b5..48ff50e8f8a 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 514df0d53b6..490be0fbd28 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 005900141e7..cace5e23b1b 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 3e5a46509a1..a332a6ac4e0 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 435e62ef1d3..1745f1424e0 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 a6160739a20..3b83a6b70a2 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",