knip 2.1.0 → 2.1.1

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.
@@ -4,6 +4,6 @@ export const ENABLERS = ['svelte'];
4
4
  export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABLERS);
5
5
  export const ENTRY_FILE_PATTERNS = ['svelte.config.js', 'vite.config.ts'];
6
6
  export const PRODUCTION_ENTRY_FILE_PATTERNS = [
7
- 'src/routes/**/+{page,page.server,error,layout,layout.server}.{js,ts,svelte}',
7
+ 'src/routes/**/+{page,page.server,error,layout,layout.server}{,@*}.{js,ts,svelte}',
8
8
  ];
9
9
  export const PROJECT_FILE_PATTERNS = ['src/**/*.{js,ts,svelte}'];
@@ -1,4 +1,5 @@
1
1
  import { compact } from '../../util/array.js';
2
+ import { isInternal } from '../../util/path.js';
2
3
  import { timerify } from '../../util/performance.js';
3
4
  import { hasDependency, load } from '../../util/plugin.js';
4
5
  export const NAME = 'TypeScript';
@@ -7,7 +8,7 @@ export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABL
7
8
  export const CONFIG_FILE_PATTERNS = ['tsconfig.json'];
8
9
  const findTypeScriptDependencies = async (configFilePath) => {
9
10
  const config = await load(configFilePath);
10
- const extend = config?.extends && !config.extends.startsWith('.') ? [config.extends] : [];
11
+ const extend = config?.extends ? [config.extends].flat().filter(extend => !isInternal(extend)) : [];
11
12
  const plugins = compact(config?.compilerOptions?.plugins?.map(plugin => plugin.name) ?? []);
12
13
  return [...extend, ...plugins];
13
14
  };
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "2.1.0";
1
+ export declare const version = "2.1.1";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '2.1.0';
1
+ export const version = '2.1.1';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knip",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Find unused files, dependencies and exports in your TypeScript and JavaScript projects",
5
5
  "homepage": "https://github.com/webpro/knip",
6
6
  "repository": "github:webpro/knip",
@@ -66,7 +66,7 @@
66
66
  "@types/js-yaml": "4.0.5",
67
67
  "@types/micromatch": "4.0.2",
68
68
  "@types/minimist": "1.2.2",
69
- "@types/node": "18.15.5",
69
+ "@types/node": "18.15.7",
70
70
  "@types/npmcli__map-workspaces": "3.0.0",
71
71
  "@types/webpack": "5.28.0",
72
72
  "@typescript-eslint/eslint-plugin": "5.56.0",
@@ -76,12 +76,12 @@
76
76
  "eslint-import-resolver-typescript": "3.5.3",
77
77
  "eslint-plugin-import": "2.27.5",
78
78
  "globstar": "1.0.0",
79
- "prettier": "2.8.6",
79
+ "prettier": "2.8.7",
80
80
  "release-it": "15.9.1",
81
81
  "remark-cli": "11.0.0",
82
82
  "remark-preset-webpro": "0.0.2",
83
83
  "tsx": "3.12.6",
84
- "type-fest": "3.6.1"
84
+ "type-fest": "3.7.0"
85
85
  },
86
86
  "engines": {
87
87
  "node": ">=16.17.0 <17 || >=18.6.0"