knip 5.66.3 → 5.66.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.
@@ -8,8 +8,8 @@ const config = ['next.config.{js,ts,cjs,mjs}'];
8
8
  const defaultPageExtensions = ['{js,jsx,ts,tsx}'];
9
9
  const productionEntryFilePatterns = [
10
10
  '{instrumentation,instrumentation-client,middleware,proxy}.{js,ts}',
11
- 'app/global-error.{js,jsx,ts,tsx}',
12
- 'app/**/{error,layout,loading,not-found,page,template,default}.{js,jsx,ts,tsx}',
11
+ 'app/global-{error,not-found}.{js,jsx,ts,tsx}',
12
+ 'app/**/{error,layout,loading,not-found,page,template,default,forbidden,unauthorized}.{js,jsx,ts,tsx}',
13
13
  'app/**/route.{js,jsx,ts,tsx}',
14
14
  'app/{manifest,robots}.{js,ts}',
15
15
  'app/**/sitemap.{js,ts}',
@@ -82,7 +82,7 @@ export const createOptions = async (options) => {
82
82
  isCache: parsedCLIArgs.cache ?? false,
83
83
  isDebug: parsedCLIArgs.debug ?? false,
84
84
  isDisableConfigHints: parsedCLIArgs['no-config-hints'] || isProduction || Boolean(parsedCLIArgs.workspace),
85
- isFix: parsedCLIArgs.fix ?? rest.isFix ?? false,
85
+ isFix: parsedCLIArgs.fix ?? rest.isFix ?? isFixFiles ?? fixTypes.length > 0,
86
86
  isFixDependencies: fixTypes.length === 0 || fixTypes.includes('dependencies'),
87
87
  isFixFiles,
88
88
  isFixUnusedExports: fixTypes.length === 0 || fixTypes.includes('exports'),
@@ -57,7 +57,7 @@ export const removeExport = ({ text, start, end, flags }) => {
57
57
  const openingBracketIndex = getOpeningBracketIndex(beforeStart);
58
58
  if (closingBracketOffset !== -1 && openingBracketIndex !== -1) {
59
59
  const beforeBracket = beforeStart.substring(0, openingBracketIndex).trim();
60
- const exportLength = beforeBracket.endsWith('export') ? 6 : beforeBracket.endsWith('export type') ? 12 : 0;
60
+ const exportLength = beforeBracket.endsWith('export') ? 6 : beforeBracket.endsWith('export type') ? 11 : 0;
61
61
  const exportKeywordOffset = beforeBracket.length - exportLength;
62
62
  if (exportLength) {
63
63
  const fromBracket = afterEnd.substring(closingBracketOffset).trim();
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "5.66.3";
1
+ export declare const version = "5.66.4";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '5.66.3';
1
+ export const version = '5.66.4';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knip",
3
- "version": "5.66.3",
3
+ "version": "5.66.4",
4
4
  "description": "Find and fix unused dependencies, exports and files in your TypeScript and JavaScript projects",
5
5
  "homepage": "https://knip.dev",
6
6
  "repository": {
@@ -63,7 +63,7 @@
63
63
  "jiti": "^2.6.0",
64
64
  "js-yaml": "^4.1.0",
65
65
  "minimist": "^1.2.8",
66
- "oxc-resolver": "^11.8.3",
66
+ "oxc-resolver": "^11.12.0",
67
67
  "picocolors": "^1.1.1",
68
68
  "picomatch": "^4.0.1",
69
69
  "smol-toml": "^1.4.1",