knip 3.8.1 → 3.8.2
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/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/plugins/svelte/index.js +4 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ export const main = async (unresolvedConfiguration) => {
|
|
|
31
31
|
const report = chief.getIssueTypesToReport();
|
|
32
32
|
const rules = chief.getRules();
|
|
33
33
|
const filters = chief.getFilters();
|
|
34
|
-
const fixer = new IssueFixer({ isEnabled: isFix
|
|
34
|
+
const fixer = new IssueFixer({ isEnabled: isFix, cwd, fixTypes });
|
|
35
35
|
const isReportDependencies = report.dependencies || report.unlisted || report.unresolved;
|
|
36
36
|
const isReportValues = report.exports || report.nsExports || report.classMembers;
|
|
37
37
|
const isReportTypes = report.types || report.nsTypes || report.enumMembers;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { timerify } from '../../util/Performance.js';
|
|
2
2
|
import { hasDependency } from '../../util/plugin.js';
|
|
3
3
|
import { toEntryPattern, toProductionEntryPattern } from '../../util/protocols.js';
|
|
4
|
+
import { CONFIG_FILE_PATTERNS as VITE_CONFIG_FILE_PATTERNS } from '../vite/index.js';
|
|
4
5
|
export const NAME = 'Svelte';
|
|
5
6
|
export const ENABLERS = ['svelte'];
|
|
6
7
|
export const isEnabled = ({ dependencies }) => hasDependency(dependencies, ENABLERS);
|
|
7
|
-
export const ENTRY_FILE_PATTERNS = ['svelte.config.js',
|
|
8
|
+
export const ENTRY_FILE_PATTERNS = ['svelte.config.js', ...VITE_CONFIG_FILE_PATTERNS];
|
|
8
9
|
export const PRODUCTION_ENTRY_FILE_PATTERNS = [
|
|
9
10
|
'src/routes/**/+{page,server,page.server,error,layout,layout.server}{,@*}.{js,ts,svelte}',
|
|
11
|
+
'src/hooks.{server,client}.{js,ts}',
|
|
12
|
+
'src/params/*{js,ts}',
|
|
10
13
|
];
|
|
11
14
|
export const PROJECT_FILE_PATTERNS = ['src/**/*.{js,ts,svelte}'];
|
|
12
15
|
const findSvelteDependencies = async () => {
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "3.8.
|
|
1
|
+
export declare const version = "3.8.2";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '3.8.
|
|
1
|
+
export const version = '3.8.2';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "knip",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.2",
|
|
4
4
|
"description": "Find unused files, dependencies and exports in your TypeScript and JavaScript projects",
|
|
5
5
|
"homepage": "https://knip.dev",
|
|
6
6
|
"repository": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"qa": "npm run lint && npm run build && npm run knip && npm run knip:production && npm test",
|
|
46
46
|
"release": "release-it",
|
|
47
47
|
"create-plugin": "tsx --no-warnings ./scripts/create-new-plugin.ts",
|
|
48
|
-
"postcreate-plugin": "prettier schema.json schema-jsonc.json src/ConfigurationValidator.ts --write --config .prettierrc
|
|
48
|
+
"postcreate-plugin": "prettier schema.json schema-jsonc.json src/ConfigurationValidator.ts --write --config .prettierrc.json"
|
|
49
49
|
},
|
|
50
50
|
"files": [
|
|
51
51
|
"dist",
|