typescript-svelte-plugin 0.3.51 → 0.3.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.52
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: prevent incorrect $types imports being injected when moving +page.svelte files ([#3010](https://github.com/sveltejs/language-tools/pull/3010))
8
+
9
+ - Updated dependencies [[`8b103ba`](https://github.com/sveltejs/language-tools/commit/8b103bab7a8234397a8d4b88f75c88514354b5c5)]:
10
+ - svelte2tsx@0.7.54
11
+
3
12
  ## 0.3.51
4
13
 
5
14
  ### Patch Changes
@@ -25,9 +25,9 @@ function decorateUpdateImports(ls, snapshotManager, logger) {
25
25
  if (path_1.default.basename(renameLocation.fileName).startsWith('+')) {
26
26
  // Filter out changes to './$type' imports for Kit route files,
27
27
  // you'll likely want these to stay as-is
28
- renameLocation.textChanges = renameLocation.textChanges.filter((change) => {
29
- return !change.newText.includes('.svelte-kit/types/');
30
- });
28
+ renameLocation.textChanges = renameLocation.textChanges.filter((change) => change.newText.endsWith('/$types.js') ||
29
+ change.newText.endsWith('/$types') ||
30
+ change.newText.endsWith('/$types.d.ts'));
31
31
  }
32
32
  return renameLocation;
33
33
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typescript-svelte-plugin",
3
- "version": "0.3.51",
3
+ "version": "0.3.52",
4
4
  "description": "A TypeScript Plugin providing Svelte intellisense",
5
5
  "main": "dist/src/index.js",
6
6
  "keywords": [
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@jridgewell/sourcemap-codec": "^1.5.0",
26
- "svelte2tsx": "~0.7.53"
26
+ "svelte2tsx": "~0.7.54"
27
27
  },
28
28
  "scripts": {
29
29
  "build": "tsc -p ./",