knip 5.77.3 → 5.77.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.
@@ -11,9 +11,9 @@ import { _load } from './loader.js';
11
11
  import { getKeysByValue } from './object.js';
12
12
  import { isAbsolute, join, normalize, toAbsolute, toPosix } from './path.js';
13
13
  import { splitTags } from './tag.js';
14
- const pcwd = process.cwd();
15
14
  export const createOptions = async (options) => {
16
15
  const { args = {} } = options;
16
+ const pcwd = process.cwd();
17
17
  const cwd = normalize(toPosix(toAbsolute(options.cwd ?? args.directory ?? pcwd, pcwd)));
18
18
  const manifestPath = findFile(cwd, 'package.json');
19
19
  const manifest = manifestPath && (await loadJSON(manifestPath));
@@ -1 +1,5 @@
1
- export declare const jiti: import("jiti").Jiti;
1
+ export declare const jiti: {
2
+ import: (id: string, opts?: {
3
+ default?: true;
4
+ }) => Promise<unknown>;
5
+ };
package/dist/util/jiti.js CHANGED
@@ -8,5 +8,10 @@ const options = {
8
8
  '@rushstack/eslint-patch/modern-module-resolution': empty,
9
9
  },
10
10
  };
11
- const createLoader = (options) => createJiti(process.cwd(), options);
12
- export const jiti = createLoader(options);
11
+ let _jiti;
12
+ export const jiti = {
13
+ import: (id, opts) => {
14
+ _jiti ??= createJiti(process.cwd(), options);
15
+ return _jiti.import(id, opts);
16
+ },
17
+ };
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "5.77.3";
1
+ export declare const version = "5.77.4";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '5.77.3';
1
+ export const version = '5.77.4';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knip",
3
- "version": "5.77.3",
3
+ "version": "5.77.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": {