knip 5.9.2 → 5.9.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.
@@ -1,7 +1,9 @@
1
1
  import micromatch from 'micromatch';
2
2
  import { initCounters, initIssues } from './issues/initializers.js';
3
3
  import { relative } from './util/path.js';
4
+ import { timerify } from './util/Performance.js';
4
5
  const hasHint = (hints, hint) => Array.from(hints).some(item => item.identifier === hint.identifier && item.type === hint.type && item.workspaceName === hint.workspaceName);
6
+ const isMatch = timerify(micromatch.isMatch, 'isMatch');
5
7
  export class IssueCollector {
6
8
  cwd;
7
9
  rules;
@@ -22,7 +24,7 @@ export class IssueCollector {
22
24
  for (const pattern of patterns)
23
25
  this.ignorePatterns.add(pattern);
24
26
  const p = [...this.ignorePatterns];
25
- this.isMatch = (filePath) => micromatch.isMatch(filePath, p, { dot: true });
27
+ this.isMatch = (filePath) => isMatch(filePath, p, { dot: true });
26
28
  }
27
29
  addFileCounts({ processed, unused }) {
28
30
  this.counters.processed += processed;
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "5.9.2";
1
+ export declare const version = "5.9.4";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '5.9.2';
1
+ export const version = '5.9.4';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knip",
3
- "version": "5.9.2",
3
+ "version": "5.9.4",
4
4
  "description": "Find unused files, dependencies and exports in your TypeScript and JavaScript projects",
5
5
  "homepage": "https://knip.dev",
6
6
  "repository": {
@@ -40,7 +40,7 @@
40
40
  "lint": "biome lint .",
41
41
  "format": "biome format --write .",
42
42
  "test": "bun test test/**/*.test.ts",
43
- "test:node": "glob -c \"tsx --test --import ./transform-test.js\" \"test/**/*.test.ts\"",
43
+ "test:node": "glob -c \"node --test --import ./transform-test.js --import tsx/esm\" \"test/**/*.test.ts\"",
44
44
  "watch": "npm link && tsc --watch",
45
45
  "prebuild": "node rmdir.js dist",
46
46
  "build": "tsc",
@@ -57,8 +57,9 @@
57
57
  "dependencies": {
58
58
  "@ericcornelissen/bash-parser": "0.5.2",
59
59
  "@nodelib/fs.walk": "2.0.0",
60
- "@npmcli/map-workspaces": "3.0.4",
61
- "@npmcli/package-json": "5.0.0",
60
+ "@npmcli/map-workspaces": "^3.0.4",
61
+ "@npmcli/package-json": "^5.0.0",
62
+ "@pnpm/logger": "5.0.0",
62
63
  "@pnpm/workspace.pkgs-graph": "2.0.14",
63
64
  "@snyk/github-codeowners": "1.1.0",
64
65
  "@types/picomatch": "2.3.3",
@@ -96,7 +97,7 @@
96
97
  "glob": "^10.3.12",
97
98
  "playwright": "^1.43.0",
98
99
  "release-it": "^17.1.1",
99
- "tsx": "^4.7.2",
100
+ "tsx": "4.7.1",
100
101
  "type-fest": "^4.15.0",
101
102
  "typescript": "^5.4.2"
102
103
  },