Skip to content

Commit 01f6fb2

Browse files
committed
chore: upgrade magic-string
1 parent e42b961 commit 01f6fb2

File tree

4 files changed

+29
-52
lines changed

4 files changed

+29
-52
lines changed

.changeset/sour-rats-laugh.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
chore: upgrade magic-string to 0.30.4

packages/svelte/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
"estree-walker": "^3.0.3",
115115
"is-reference": "^3.0.1",
116116
"locate-character": "^3.0.0",
117-
"magic-string": "^0.30.0",
117+
"magic-string": "^0.30.4",
118118
"periscopic": "^3.1.0"
119119
},
120120
"devDependencies": {

packages/svelte/test/sourcemaps/samples/compile-option-dev/test.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,15 @@ export async function test({ assert, css, js }) {
2121
const sourcefile = 'input.svelte';
2222
[
2323
// TODO: get line and col num from input.svelte rather than hardcoding here
24-
[css, '--keep-me', 13, 2],
25-
// TODO: these should be 7, 2 and 10, 2
26-
// we use locate_1 which means lines are 1-indexed and cols are 0-indexed
27-
// each tab is 1 col
28-
[css, '--done-replace-once', 6, 4],
29-
[css, '--done-replace-twice', 9, 4]
30-
].forEach(([where, content, line, column]) => {
24+
[css, '--keep-me', null, 13, 2],
25+
[css, '--done-replace-once', '--replace-me-once', 7, 2],
26+
[css, '--done-replace-twice', '--replace-me-twice', 10, 2]
27+
].forEach(([where, content, name, line, column]) => {
3128
assert.deepEqual(
3229
where.mapConsumer.originalPositionFor(where.locate_1(content)),
3330
{
3431
source: sourcefile,
35-
name: null,
32+
name,
3633
line,
3734
column
3835
},

pnpm-lock.yaml

Lines changed: 18 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)