knip 3.3.4 → 3.3.5
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/ConfigurationChief.js +1 -1
- package/dist/util/cli-arguments.js +1 -1
- package/dist/util/git.js +1 -1
- package/dist/util/unwrap-function.d.ts +1 -0
- package/dist/util/{unwrapFunction.js → unwrap-function.js} +4 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -5
- package/dist/util/unwrapFunction.d.ts +0 -1
- /package/dist/util/{parseArgs.d.ts → parse-args.d.ts} +0 -0
- /package/dist/util/{parseArgs.js → parse-args.js} +0 -0
|
@@ -18,7 +18,7 @@ import { getKeysByValue } from './util/object.js';
|
|
|
18
18
|
import { join, relative, toPosix } from './util/path.js';
|
|
19
19
|
import { normalizePluginConfig, toCamelCase } from './util/plugin.js';
|
|
20
20
|
import { _require } from './util/require.js';
|
|
21
|
-
import { unwrapFunction } from './util/
|
|
21
|
+
import { unwrapFunction } from './util/unwrap-function.js';
|
|
22
22
|
import { byPathDepth } from './util/workspace.js';
|
|
23
23
|
const { config: rawConfigArg, workspace: rawWorkspaceArg, include = [], exclude = [], dependencies = false, exports = false, } = parsedArgValues;
|
|
24
24
|
const workspaceArg = rawWorkspaceArg ? toPosix(rawWorkspaceArg).replace(/^\.\//, '').replace(/\/$/, '') : undefined;
|
package/dist/util/git.js
CHANGED
|
@@ -8,7 +8,7 @@ const hookFileNames = [
|
|
|
8
8
|
];
|
|
9
9
|
const getGitHooksPath = (defaultPath = '.git/hooks') => {
|
|
10
10
|
try {
|
|
11
|
-
return execSync('git config --get core.hooksPath', { encoding: 'utf8' }).trim();
|
|
11
|
+
return execSync('git config --get core.hooksPath 2>/dev/null', { encoding: 'utf8' }).trim();
|
|
12
12
|
}
|
|
13
13
|
catch (error) {
|
|
14
14
|
return defaultPath;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const unwrapFunction: (maybeFunction: unknown) => Promise<any>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { debugLogObject } from './debug.js';
|
|
2
|
-
export const unwrapFunction = async (
|
|
3
|
-
if (typeof
|
|
2
|
+
export const unwrapFunction = async (maybeFunction) => {
|
|
3
|
+
if (typeof maybeFunction === 'function') {
|
|
4
4
|
try {
|
|
5
|
-
return await
|
|
5
|
+
return await maybeFunction();
|
|
6
6
|
}
|
|
7
7
|
catch (error) {
|
|
8
8
|
debugLogObject('*', 'Error executing function:', error);
|
|
9
9
|
throw error;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
return
|
|
12
|
+
return maybeFunction;
|
|
13
13
|
};
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "3.3.
|
|
1
|
+
export declare const version = "3.3.5";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '3.3.
|
|
1
|
+
export const version = '3.3.5';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "knip",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.5",
|
|
4
4
|
"description": "Find unused files, dependencies and exports in your TypeScript and JavaScript projects",
|
|
5
5
|
"homepage": "https://knip.dev",
|
|
6
6
|
"repository": {
|
|
@@ -72,21 +72,21 @@
|
|
|
72
72
|
"@npmcli/package-json": "5.0.0",
|
|
73
73
|
"@release-it/bumper": "^6.0.1",
|
|
74
74
|
"@swc/cli": "^0.1.63",
|
|
75
|
-
"@swc/core": "^1.3.
|
|
75
|
+
"@swc/core": "^1.3.100",
|
|
76
76
|
"@types/js-yaml": "^4.0.9",
|
|
77
77
|
"@types/micromatch": "^4.0.6",
|
|
78
78
|
"@types/minimist": "^1.2.5",
|
|
79
|
-
"@types/node": "^20.10.
|
|
79
|
+
"@types/node": "^20.10.1",
|
|
80
80
|
"@types/npmcli__map-workspaces": "^3.0.4",
|
|
81
81
|
"@types/npmcli__package-json": "^4.0.3",
|
|
82
82
|
"@types/pkgjs__parseargs": "^0.10.3",
|
|
83
83
|
"@types/webpack": "^5.28.5",
|
|
84
84
|
"c8": "8.0.1",
|
|
85
85
|
"eslint": "^8.54.0",
|
|
86
|
-
"playwright": "^1.40.
|
|
86
|
+
"playwright": "^1.40.1",
|
|
87
87
|
"prettier": "^3.1.0",
|
|
88
88
|
"release-it": "^17.0.0",
|
|
89
|
-
"tsx": "^4.
|
|
89
|
+
"tsx": "^4.6.1",
|
|
90
90
|
"type-fest": "^4.8.2",
|
|
91
91
|
"typescript": "5.3.2"
|
|
92
92
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const unwrapFunction: (possibleFunction: unknown) => Promise<any>;
|
|
File without changes
|
|
File without changes
|