knip 5.59.0 → 5.59.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.
@@ -23,8 +23,8 @@ import { splitTags } from './util/tag.js';
23
23
  import { unwrapFunction } from './util/unwrap-function.js';
24
24
  import { byPathDepth } from './util/workspace.js';
25
25
  const { config: rawConfigArg } = parsedArgValues;
26
- const getDefaultWorkspaceConfig = (extensions) => {
27
- const exts = [...DEFAULT_EXTENSIONS, ...(extensions ?? [])].map(ext => ext.slice(1)).join(',');
26
+ const getDefaultWorkspaceConfig = (extensions = []) => {
27
+ const exts = [...DEFAULT_EXTENSIONS, ...extensions].map(ext => ext.slice(1)).join(',');
28
28
  return {
29
29
  entry: [`{index,cli,main}.{${exts}}!`, `src/{index,cli,main}.{${exts}}!`],
30
30
  project: [`**/*.{${exts}}!`],
package/dist/constants.js CHANGED
@@ -28,10 +28,11 @@ export const IGNORED_GLOBAL_BINARIES = new Set([
28
28
  'bun',
29
29
  'bundle',
30
30
  'bunx',
31
+ 'cargo',
31
32
  'cat',
32
33
  'cd',
33
- 'chown',
34
34
  'chmod',
35
+ 'chown',
35
36
  'cksum',
36
37
  'cmd',
37
38
  'comm',
@@ -73,8 +74,8 @@ export const IGNORED_GLOBAL_BINARIES = new Set([
73
74
  'mv',
74
75
  'nice',
75
76
  'nl',
76
- 'nohup',
77
77
  'node',
78
+ 'nohup',
78
79
  'npm',
79
80
  'nproc',
80
81
  'npx',
@@ -90,9 +91,9 @@ export const IGNORED_GLOBAL_BINARIES = new Set([
90
91
  'scp',
91
92
  'seq',
92
93
  'set',
94
+ 'sh',
93
95
  'sha1sum',
94
96
  'sha512sum',
95
- 'sh',
96
97
  'shred',
97
98
  'shuf',
98
99
  'sort',
@@ -30,9 +30,8 @@ export async function build({ cacheLocation, chief, collector, cwd, deputy, fact
30
30
  const { name, dir, ancestors, pkgName } = workspace;
31
31
  streamer.cast('Analyzing workspace', name);
32
32
  const manifest = chief.getManifestForWorkspace(name);
33
- if (!manifest) {
33
+ if (!manifest)
34
34
  continue;
35
- }
36
35
  const dependencies = deputy.getDependencies(name);
37
36
  const compilers = getIncludedCompilers(chief.config.syncCompilers, chief.config.asyncCompilers, dependencies);
38
37
  const extensions = getCompilerExtensions(compilers);
@@ -21,6 +21,8 @@ export const getFilteredScripts = (scripts) => {
21
21
  const productionScripts = {};
22
22
  const developmentScripts = {};
23
23
  for (const scriptName in scripts) {
24
+ if (!/^\w/.test(scriptName))
25
+ continue;
24
26
  if (scriptFilter.has(scriptName))
25
27
  productionScripts[scriptName] = scripts[scriptName];
26
28
  else
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "5.59.0";
1
+ export declare const version = "5.59.1";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '5.59.0';
1
+ export const version = '5.59.1';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knip",
3
- "version": "5.59.0",
3
+ "version": "5.59.1",
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": {