knip 5.44.0 → 5.44.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.
@@ -49,7 +49,7 @@ export declare class DependencyDeputy {
49
49
  setInstalledBinaries(workspaceName: string, installedBinaries: Map<string, Set<string>>): void;
50
50
  getInstalledBinaries(workspaceName: string): InstalledBinaries | undefined;
51
51
  setHasTypesIncluded(workspaceName: string, hasTypesIncluded: Set<string>): void;
52
- getHasTypesIncluded(workspaceName: string): InstalledBinaries | undefined;
52
+ getHasTypesIncluded(workspaceName: string): Set<string> | undefined;
53
53
  addReferencedDependency(workspaceName: string, packageName: string): void;
54
54
  addReferencedBinary(workspaceName: string, binaryName: string): void;
55
55
  setHostDependencies(workspaceName: string, hostDependencies: HostDependencies): void;
@@ -93,7 +93,7 @@ export class DependencyDeputy {
93
93
  this.hasTypesIncluded.set(workspaceName, hasTypesIncluded);
94
94
  }
95
95
  getHasTypesIncluded(workspaceName) {
96
- return this.installedBinaries.get(workspaceName);
96
+ return this.hasTypesIncluded.get(workspaceName);
97
97
  }
98
98
  addReferencedDependency(workspaceName, packageName) {
99
99
  if (!this.referencedDependencies.has(workspaceName)) {
@@ -133,7 +133,7 @@ export class DependencyDeputy {
133
133
  if (closestWorkspaceName || closestWorkspaceNameForTypes) {
134
134
  if (closestWorkspaceName)
135
135
  this.addReferencedDependency(closestWorkspaceName, packageName);
136
- if (closestWorkspaceNameForTypes)
136
+ if (closestWorkspaceNameForTypes && !this.hasTypesIncluded.get(closestWorkspaceNameForTypes)?.has(packageName))
137
137
  this.addReferencedDependency(closestWorkspaceNameForTypes, typesPackageName);
138
138
  return true;
139
139
  }
@@ -185,7 +185,7 @@ export class DependencyDeputy {
185
185
  const typedPackageName = getPackageFromDefinitelyTyped(typedDependency);
186
186
  if (IGNORE_DEFINITELY_TYPED.has(typedPackageName))
187
187
  return true;
188
- if (hasTypesIncluded?.has(typedDependency))
188
+ if (hasTypesIncluded?.has(typedPackageName))
189
189
  return false;
190
190
  const hostDependencies = [
191
191
  ...this.getHostDependenciesFor(workspace, dependency),
@@ -193,7 +193,7 @@ export class DependencyDeputy {
193
193
  ];
194
194
  if (hostDependencies.length)
195
195
  return !!hostDependencies.find(host => isReferencedDependency(host.name, true));
196
- if (!referencedDependencies)
196
+ if (!referencedDependencies?.has(dependency))
197
197
  return false;
198
198
  return referencedDependencies.has(typedPackageName);
199
199
  }
@@ -3,7 +3,7 @@ import { toEntry } from '../../util/input.js';
3
3
  import { join } from '../../util/path.js';
4
4
  import { hasDependency, load } from '../../util/plugin.js';
5
5
  import vite from '../vite/index.js';
6
- const title = 'react-router';
6
+ const title = 'React Router';
7
7
  const enablers = ['@react-router/dev'];
8
8
  const isEnabled = ({ dependencies }) => hasDependency(dependencies, enablers);
9
9
  const config = ['react-router.config.{js,ts}', ...vite.config];
@@ -8,7 +8,7 @@ const config = ['package.json', ...toCosmiconfig('stylelint')];
8
8
  const resolve = (config) => {
9
9
  const extend = config.extends ?? [];
10
10
  const plugins = config.plugins ?? [];
11
- const customSyntax = config.customSyntax ? [config.customSyntax] : [];
11
+ const customSyntax = typeof config.customSyntax === 'string' ? [config.customSyntax] : [];
12
12
  const overrideConfigs = 'overrides' in config ? config.overrides.flatMap(resolve) : [];
13
13
  return [...[extend, plugins, customSyntax].flat().map(toDeferResolve), ...overrideConfigs];
14
14
  };
@@ -1,5 +1,5 @@
1
1
  export type BaseStyleLintConfig = {
2
- customSyntax?: string;
2
+ customSyntax?: unknown;
3
3
  extends?: string | string[];
4
4
  plugins?: string[];
5
5
  };
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "5.44.0";
1
+ export declare const version = "5.44.1";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '5.44.0';
1
+ export const version = '5.44.1';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knip",
3
- "version": "5.44.0",
3
+ "version": "5.44.1",
4
4
  "description": "Find and fix unused files, dependencies and exports in your TypeScript and JavaScript projects",
5
5
  "homepage": "https://knip.dev",
6
6
  "repository": {