knip 5.46.3 → 5.46.4

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.
@@ -2,4 +2,4 @@ import type { SyncCompilerFn } from './types.js';
2
2
  export declare const fencedCodeBlockMatcher: RegExp;
3
3
  export declare const importMatcher: RegExp;
4
4
  export declare const importsWithinScripts: SyncCompilerFn;
5
- export declare const tsScriptBodies: SyncCompilerFn;
5
+ export declare const scriptBodies: SyncCompilerFn;
@@ -11,11 +11,11 @@ export const importsWithinScripts = (text) => {
11
11
  }
12
12
  return scripts.join(';\n');
13
13
  };
14
- const tsScriptExtractor = /<script\b[^>]*lang="ts"[^>]*>(?<body>[\s\S]*?)<\/script>/gm;
15
- export const tsScriptBodies = (text) => {
14
+ const scriptBodyExtractor = /<script\b[^>]*>(?<body>[\s\S]*?)<\/script>/gm;
15
+ export const scriptBodies = (text) => {
16
16
  const scripts = [];
17
17
  let scriptMatch;
18
- while ((scriptMatch = tsScriptExtractor.exec(text))) {
18
+ while ((scriptMatch = scriptBodyExtractor.exec(text))) {
19
19
  if (scriptMatch.groups?.body)
20
20
  scripts.push(scriptMatch.groups.body);
21
21
  }
@@ -1,4 +1,4 @@
1
- import { tsScriptBodies } from './compilers.js';
1
+ import { scriptBodies } from './compilers.js';
2
2
  const condition = (hasDependency) => hasDependency('vue') || hasDependency('nuxt');
3
- const compiler = tsScriptBodies;
3
+ const compiler = scriptBodies;
4
4
  export default { condition, compiler };
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "5.46.3";
1
+ export declare const version = "5.46.4";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '5.46.3';
1
+ export const version = '5.46.4';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knip",
3
- "version": "5.46.3",
3
+ "version": "5.46.4",
4
4
  "description": "Find and fix unused files, dependencies and exports in your TypeScript and JavaScript projects",
5
5
  "homepage": "https://knip.dev",
6
6
  "repository": {
@@ -62,7 +62,7 @@
62
62
  "@nodelib/fs.walk": "3.0.1",
63
63
  "@snyk/github-codeowners": "1.1.0",
64
64
  "easy-table": "1.2.0",
65
- "enhanced-resolve": "^5.18.0",
65
+ "enhanced-resolve": "^5.18.1",
66
66
  "fast-glob": "^3.3.3",
67
67
  "jiti": "^2.4.2",
68
68
  "js-yaml": "^4.1.0",
@@ -83,7 +83,7 @@
83
83
  "devDependencies": {
84
84
  "@jest/types": "^29.6.3",
85
85
  "@release-it/bumper": "^7.0.2",
86
- "@types/bun": "1.2.4",
86
+ "@types/bun": "1.2.8",
87
87
  "@types/js-yaml": "^4.0.9",
88
88
  "@types/minimist": "^1.2.5",
89
89
  "@types/picomatch": "3.0.1",