From 62ac4eb1bc285d1c77620ed441ca6f66d45f34c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ari=20Perkki=C3=B6?= Date: Tue, 15 Oct 2024 12:37:23 +0300 Subject: [PATCH] chore(deps): update `magic-string` (#6711) --- package.json | 2 +- packages/browser/package.json | 2 +- packages/coverage-v8/package.json | 2 +- packages/mocker/package.json | 2 +- packages/snapshot/package.json | 2 +- packages/vitest/package.json | 2 +- pnpm-lock.yaml | 69 +++++++++---------- test/coverage-test/package.json | 2 +- .../__snapshots__/bundled-v8.snapshot.json | 22 ------ ...stom-file-covered-1-istanbul.snapshot.json | 12 ++-- .../custom-file-covered-1-v8.snapshot.json | 22 ------ ...stom-file-covered-2-istanbul.snapshot.json | 12 ++-- .../custom-file-covered-2-v8.snapshot.json | 22 ------ ...om-file-uncovered-1-istanbul.snapshot.json | 6 +- ...om-file-uncovered-2-istanbul.snapshot.json | 6 +- .../test/workspace.multi-transform.test.ts | 8 +-- 16 files changed, 61 insertions(+), 132 deletions(-) diff --git a/package.json b/package.json index 8779dda227f8..4cb3f527c7f6 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "changelogithub": "^0.13.11", "esbuild": "^0.24.0", "eslint": "^9.12.0", - "magic-string": "^0.30.11", + "magic-string": "^0.30.12", "pathe": "^1.1.2", "rimraf": "^6.0.1", "rollup": "^4.24.0", diff --git a/packages/browser/package.json b/packages/browser/package.json index fef3ae1a2f25..9e769223e80d 100644 --- a/packages/browser/package.json +++ b/packages/browser/package.json @@ -88,7 +88,7 @@ "@testing-library/user-event": "^14.5.2", "@vitest/mocker": "workspace:*", "@vitest/utils": "workspace:*", - "magic-string": "^0.30.11", + "magic-string": "^0.30.12", "msw": "^2.4.9", "sirv": "^3.0.0", "tinyrainbow": "^1.2.0", diff --git a/packages/coverage-v8/package.json b/packages/coverage-v8/package.json index e77366c7d6c3..4f56da4833bb 100644 --- a/packages/coverage-v8/package.json +++ b/packages/coverage-v8/package.json @@ -61,7 +61,7 @@ "istanbul-lib-report": "^3.0.1", "istanbul-lib-source-maps": "^5.0.6", "istanbul-reports": "^3.1.7", - "magic-string": "^0.30.11", + "magic-string": "^0.30.12", "magicast": "^0.3.5", "std-env": "^3.7.0", "test-exclude": "^7.0.1", diff --git a/packages/mocker/package.json b/packages/mocker/package.json index 0567ca70e051..33741a960b66 100644 --- a/packages/mocker/package.json +++ b/packages/mocker/package.json @@ -69,7 +69,7 @@ "dependencies": { "@vitest/spy": "workspace:*", "estree-walker": "^3.0.3", - "magic-string": "^0.30.11" + "magic-string": "^0.30.12" }, "devDependencies": { "@types/estree": "^1.0.6", diff --git a/packages/snapshot/package.json b/packages/snapshot/package.json index 6db5bd24860e..98bbd27ed9d7 100644 --- a/packages/snapshot/package.json +++ b/packages/snapshot/package.json @@ -43,7 +43,7 @@ }, "dependencies": { "@vitest/pretty-format": "workspace:*", - "magic-string": "^0.30.11", + "magic-string": "^0.30.12", "pathe": "^1.1.2" }, "devDependencies": { diff --git a/packages/vitest/package.json b/packages/vitest/package.json index 28ca8241930d..8696035f405d 100644 --- a/packages/vitest/package.json +++ b/packages/vitest/package.json @@ -160,7 +160,7 @@ "chai": "^5.1.1", "debug": "^4.3.7", "expect-type": "^1.1.0", - "magic-string": "^0.30.11", + "magic-string": "^0.30.12", "pathe": "^1.1.2", "std-env": "^3.7.0", "tinybench": "^2.9.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f63a2bcb8938..910d6569aeca 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -86,8 +86,8 @@ importers: specifier: ^9.12.0 version: 9.12.0(jiti@1.21.6) magic-string: - specifier: ^0.30.11 - version: 0.30.11 + specifier: ^0.30.12 + version: 0.30.12 pathe: specifier: ^1.1.2 version: 1.1.2 @@ -358,8 +358,8 @@ importers: specifier: workspace:* version: link:../utils magic-string: - specifier: ^0.30.11 - version: 0.30.11 + specifier: ^0.30.12 + version: 0.30.12 msw: specifier: ^2.4.9 version: 2.4.11(typescript@5.6.3) @@ -510,8 +510,8 @@ importers: specifier: ^3.1.7 version: 3.1.7 magic-string: - specifier: ^0.30.11 - version: 0.30.11 + specifier: ^0.30.12 + version: 0.30.12 magicast: specifier: ^0.3.5 version: 0.3.5 @@ -593,8 +593,8 @@ importers: specifier: ^3.0.3 version: 3.0.3 magic-string: - specifier: ^0.30.11 - version: 0.30.11 + specifier: ^0.30.12 + version: 0.30.12 devDependencies: '@types/estree': specifier: ^1.0.6 @@ -643,8 +643,8 @@ importers: specifier: workspace:* version: link:../pretty-format magic-string: - specifier: ^0.30.11 - version: 0.30.11 + specifier: ^0.30.12 + version: 0.30.12 pathe: specifier: ^1.1.2 version: 1.1.2 @@ -869,8 +869,8 @@ importers: specifier: ^1.1.0 version: 1.1.0 magic-string: - specifier: ^0.30.11 - version: 0.30.11 + specifier: ^0.30.12 + version: 0.30.12 pathe: specifier: ^1.1.2 version: 1.1.2 @@ -1238,8 +1238,8 @@ importers: specifier: ^3.0.1 version: 3.0.1 magic-string: - specifier: ^0.30.10 - version: 0.30.10 + specifier: ^0.30.12 + version: 0.30.12 magicast: specifier: ^0.3.3 version: 0.3.3 @@ -3074,9 +3074,6 @@ packages: '@jridgewell/sourcemap-codec@1.4.14': resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} - '@jridgewell/sourcemap-codec@1.4.15': - resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} - '@jridgewell/sourcemap-codec@1.5.0': resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} @@ -6923,12 +6920,12 @@ packages: resolution: {integrity: sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==} engines: {node: '>=12'} - magic-string@0.30.10: - resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==} - magic-string@0.30.11: resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} + magic-string@0.30.12: + resolution: {integrity: sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==} + magicast@0.3.3: resolution: {integrity: sha512-ZbrP1Qxnpoes8sz47AM0z08U+jW6TyRgZzcWy3Ma3vDhJttwMwAFDMMQFobwdBxByBD46JYmxRzeF7w2+wJEuw==} @@ -11313,8 +11310,6 @@ snapshots: '@jridgewell/sourcemap-codec@1.4.14': {} - '@jridgewell/sourcemap-codec@1.4.15': {} - '@jridgewell/sourcemap-codec@1.5.0': {} '@jridgewell/trace-mapping@0.3.18': @@ -11456,7 +11451,7 @@ snapshots: estree-walker: 2.0.2 fdir: 6.3.0(picomatch@2.3.1) is-reference: 1.2.1 - magic-string: 0.30.11 + magic-string: 0.30.12 picomatch: 2.3.1 optionalDependencies: rollup: 4.24.0 @@ -11701,7 +11696,7 @@ snapshots: debug: 4.3.7 deepmerge: 4.3.1 kleur: 4.1.5 - magic-string: 0.30.11 + magic-string: 0.30.12 svelte: 3.59.1 svelte-hmr: 0.15.3(svelte@3.59.1) vite: 5.4.0(@types/node@22.7.5)(terser@5.34.1) @@ -12229,7 +12224,7 @@ snapshots: chokidar: 3.6.0 colorette: 2.0.20 consola: 3.2.3 - magic-string: 0.30.11 + magic-string: 0.30.12 pathe: 1.1.2 perfect-debounce: 1.0.0 tinyglobby: 0.2.9 @@ -12318,7 +12313,7 @@ snapshots: '@unocss/rule-utils@0.63.4': dependencies: '@unocss/core': 0.63.4 - magic-string: 0.30.11 + magic-string: 0.30.12 '@unocss/transformer-attributify-jsx@0.63.4': dependencies: @@ -12346,7 +12341,7 @@ snapshots: '@unocss/core': 0.63.4 '@unocss/inspector': 0.63.4 chokidar: 3.6.0 - magic-string: 0.30.11 + magic-string: 0.30.12 tinyglobby: 0.2.9 vite: 5.4.0(@types/node@22.7.5)(terser@5.34.1) transitivePeerDependencies: @@ -12445,7 +12440,7 @@ snapshots: '@vue/compiler-ssr': 3.5.12 '@vue/shared': 3.5.12 estree-walker: 2.0.2 - magic-string: 0.30.11 + magic-string: 0.30.12 postcss: 8.4.47 source-map-js: 1.2.1 @@ -15929,13 +15924,13 @@ snapshots: magic-string@0.27.0: dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 - magic-string@0.30.10: + magic-string@0.30.11: dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 - magic-string@0.30.11: + magic-string@0.30.12: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 @@ -17165,7 +17160,7 @@ snapshots: rollup-plugin-dts@6.1.1(rollup@4.24.0)(typescript@5.6.3): dependencies: - magic-string: 0.30.11 + magic-string: 0.30.12 rollup: 4.24.0 typescript: 5.6.3 optionalDependencies: @@ -17187,7 +17182,7 @@ snapshots: commenting: 1.1.0 fdir: 6.3.0(picomatch@2.3.1) lodash: 4.17.21 - magic-string: 0.30.11 + magic-string: 0.30.12 moment: 2.30.1 package-name-regex: 2.0.6 rollup: 4.24.0 @@ -17501,7 +17496,7 @@ snapshots: sorcery@0.11.0: dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 buffer-crc32: 0.2.13 minimist: 1.2.8 sander: 0.5.1 @@ -18174,7 +18169,7 @@ snapshots: estree-walker: 3.0.3 fast-glob: 3.3.2 local-pkg: 0.5.0 - magic-string: 0.30.11 + magic-string: 0.30.12 mlly: 1.7.2 pathe: 1.1.2 pkg-types: 1.2.1 @@ -18256,7 +18251,7 @@ snapshots: '@rollup/pluginutils': 5.1.2(rollup@4.24.0) fast-glob: 3.3.2 local-pkg: 0.5.0 - magic-string: 0.30.11 + magic-string: 0.30.12 minimatch: 9.0.5 unimport: 3.13.1(rollup@4.24.0)(webpack-sources@3.2.3) unplugin: 1.14.1(webpack-sources@3.2.3) diff --git a/test/coverage-test/package.json b/test/coverage-test/package.json index f0d5d3c21d4c..025065247d74 100644 --- a/test/coverage-test/package.json +++ b/test/coverage-test/package.json @@ -18,7 +18,7 @@ "happy-dom": "latest", "istanbul-lib-coverage": "^3.2.0", "istanbul-lib-report": "^3.0.1", - "magic-string": "^0.30.10", + "magic-string": "^0.30.12", "magicast": "^0.3.3", "unplugin-swc": "^1.4.4", "vite": "latest", diff --git a/test/coverage-test/test/__snapshots__/bundled-v8.snapshot.json b/test/coverage-test/test/__snapshots__/bundled-v8.snapshot.json index 5aa335888476..919e9830bb60 100644 --- a/test/coverage-test/test/__snapshots__/bundled-v8.snapshot.json +++ b/test/coverage-test/test/__snapshots__/bundled-v8.snapshot.json @@ -33,16 +33,6 @@ "column": 1 } }, - "3": { - "start": { - "line": 4, - "column": 0 - }, - "end": { - "line": 4, - "column": 0 - } - }, "4": { "start": { "line": 5, @@ -78,7 +68,6 @@ "0": 1, "1": 1, "2": 1, - "3": 1, "4": 1, "5": 0, "6": 0 @@ -205,16 +194,6 @@ "column": 1 } }, - "3": { - "start": { - "line": 4, - "column": 0 - }, - "end": { - "line": 4, - "column": 0 - } - }, "4": { "start": { "line": 5, @@ -250,7 +229,6 @@ "0": 1, "1": 1, "2": 1, - "3": 1, "4": 1, "5": 0, "6": 0 diff --git a/test/coverage-test/test/__snapshots__/custom-file-covered-1-istanbul.snapshot.json b/test/coverage-test/test/__snapshots__/custom-file-covered-1-istanbul.snapshot.json index 8ebdab27587b..b81022cc1e41 100644 --- a/test/coverage-test/test/__snapshots__/custom-file-covered-1-istanbul.snapshot.json +++ b/test/coverage-test/test/__snapshots__/custom-file-covered-1-istanbul.snapshot.json @@ -8,7 +8,7 @@ }, "end": { "line": 1, - "column": 18 + "column": null } }, "1": { @@ -18,7 +18,7 @@ }, "end": { "line": 3, - "column": 20 + "column": null } } }, @@ -32,7 +32,7 @@ }, "end": { "line": 1, - "column": 18 + "column": null } }, "loc": { @@ -42,7 +42,7 @@ }, "end": { "line": 1, - "column": 18 + "column": null } } }, @@ -55,7 +55,7 @@ }, "end": { "line": 3, - "column": 20 + "column": null } }, "loc": { @@ -65,7 +65,7 @@ }, "end": { "line": 3, - "column": 20 + "column": null } } } diff --git a/test/coverage-test/test/__snapshots__/custom-file-covered-1-v8.snapshot.json b/test/coverage-test/test/__snapshots__/custom-file-covered-1-v8.snapshot.json index 35a17c7894b8..57761bd3df9c 100644 --- a/test/coverage-test/test/__snapshots__/custom-file-covered-1-v8.snapshot.json +++ b/test/coverage-test/test/__snapshots__/custom-file-covered-1-v8.snapshot.json @@ -12,16 +12,6 @@ "column": 18 } }, - "1": { - "start": { - "line": 2, - "column": 0 - }, - "end": { - "line": 2, - "column": 0 - } - }, "2": { "start": { "line": 3, @@ -32,16 +22,6 @@ "column": 20 } }, - "3": { - "start": { - "line": 4, - "column": 0 - }, - "end": { - "line": 4, - "column": 0 - } - }, "4": { "start": { "line": 5, @@ -55,9 +35,7 @@ }, "s": { "0": 1, - "1": 1, "2": 0, - "3": 1, "4": 1 }, "branchMap": { diff --git a/test/coverage-test/test/__snapshots__/custom-file-covered-2-istanbul.snapshot.json b/test/coverage-test/test/__snapshots__/custom-file-covered-2-istanbul.snapshot.json index 996a4a66c39e..ba40f8a1c0ec 100644 --- a/test/coverage-test/test/__snapshots__/custom-file-covered-2-istanbul.snapshot.json +++ b/test/coverage-test/test/__snapshots__/custom-file-covered-2-istanbul.snapshot.json @@ -8,7 +8,7 @@ }, "end": { "line": 1, - "column": 18 + "column": null } }, "1": { @@ -18,7 +18,7 @@ }, "end": { "line": 3, - "column": 20 + "column": null } } }, @@ -32,7 +32,7 @@ }, "end": { "line": 1, - "column": 18 + "column": null } }, "loc": { @@ -42,7 +42,7 @@ }, "end": { "line": 1, - "column": 18 + "column": null } } }, @@ -55,7 +55,7 @@ }, "end": { "line": 3, - "column": 20 + "column": null } }, "loc": { @@ -65,7 +65,7 @@ }, "end": { "line": 3, - "column": 20 + "column": null } } } diff --git a/test/coverage-test/test/__snapshots__/custom-file-covered-2-v8.snapshot.json b/test/coverage-test/test/__snapshots__/custom-file-covered-2-v8.snapshot.json index e5380af0ec31..abd76cf8b128 100644 --- a/test/coverage-test/test/__snapshots__/custom-file-covered-2-v8.snapshot.json +++ b/test/coverage-test/test/__snapshots__/custom-file-covered-2-v8.snapshot.json @@ -12,16 +12,6 @@ "column": 18 } }, - "1": { - "start": { - "line": 2, - "column": 0 - }, - "end": { - "line": 2, - "column": 0 - } - }, "2": { "start": { "line": 3, @@ -32,16 +22,6 @@ "column": 20 } }, - "3": { - "start": { - "line": 4, - "column": 0 - }, - "end": { - "line": 4, - "column": 0 - } - }, "4": { "start": { "line": 5, @@ -55,9 +35,7 @@ }, "s": { "0": 1, - "1": 1, "2": 0, - "3": 1, "4": 1 }, "branchMap": { diff --git a/test/coverage-test/test/__snapshots__/custom-file-uncovered-1-istanbul.snapshot.json b/test/coverage-test/test/__snapshots__/custom-file-uncovered-1-istanbul.snapshot.json index af9efc13611e..0aee29151fa3 100644 --- a/test/coverage-test/test/__snapshots__/custom-file-uncovered-1-istanbul.snapshot.json +++ b/test/coverage-test/test/__snapshots__/custom-file-uncovered-1-istanbul.snapshot.json @@ -8,7 +8,7 @@ }, "end": { "line": 1, - "column": 20 + "column": null } } }, @@ -22,7 +22,7 @@ }, "end": { "line": 1, - "column": 20 + "column": null } }, "loc": { @@ -32,7 +32,7 @@ }, "end": { "line": 1, - "column": 20 + "column": null } } } diff --git a/test/coverage-test/test/__snapshots__/custom-file-uncovered-2-istanbul.snapshot.json b/test/coverage-test/test/__snapshots__/custom-file-uncovered-2-istanbul.snapshot.json index eb4119bb3faa..066d319d2680 100644 --- a/test/coverage-test/test/__snapshots__/custom-file-uncovered-2-istanbul.snapshot.json +++ b/test/coverage-test/test/__snapshots__/custom-file-uncovered-2-istanbul.snapshot.json @@ -8,7 +8,7 @@ }, "end": { "line": 1, - "column": 20 + "column": null } } }, @@ -22,7 +22,7 @@ }, "end": { "line": 1, - "column": 20 + "column": null } }, "loc": { @@ -32,7 +32,7 @@ }, "end": { "line": 1, - "column": 20 + "column": null } } } diff --git a/test/coverage-test/test/workspace.multi-transform.test.ts b/test/coverage-test/test/workspace.multi-transform.test.ts index 0eb2b63df398..a563dcdb4ae6 100644 --- a/test/coverage-test/test/workspace.multi-transform.test.ts +++ b/test/coverage-test/test/workspace.multi-transform.test.ts @@ -32,10 +32,10 @@ test('{ all: true } includes uncovered files that require custom transform', asy const uncovered2 = coverageMap.fileCoverageFor('/fixtures/workspaces/custom-2/src/uncovered.custom-2') // Coverage maps indicate whether source maps are correct. Check html-report if these change - expect(JSON.stringify(covered1, null, 2)).toMatchFileSnapshot(snapshotName('covered-1')) - expect(JSON.stringify(uncovered1, null, 2)).toMatchFileSnapshot(snapshotName('uncovered-1')) - expect(JSON.stringify(covered2, null, 2)).toMatchFileSnapshot(snapshotName('covered-2')) - expect(JSON.stringify(uncovered2, null, 2)).toMatchFileSnapshot(snapshotName('uncovered-2')) + await expect(JSON.stringify(covered1, null, 2)).toMatchFileSnapshot(snapshotName('covered-1')) + await expect(JSON.stringify(uncovered1, null, 2)).toMatchFileSnapshot(snapshotName('uncovered-1')) + await expect(JSON.stringify(covered2, null, 2)).toMatchFileSnapshot(snapshotName('covered-2')) + await expect(JSON.stringify(uncovered2, null, 2)).toMatchFileSnapshot(snapshotName('uncovered-2')) }) function snapshotName(label: string) {