knip 5.43.3 → 5.43.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/index.js CHANGED
@@ -358,6 +358,8 @@ export const main = async (unresolvedConfiguration) => {
358
358
  printTrace(traceNode, filePath, identifier);
359
359
  if (isReferenced) {
360
360
  if (report.enumMembers && exportedItem.type === 'enum') {
361
+ if (!report.nsTypes && importsForExport.refs.has(identifier))
362
+ continue;
361
363
  if (hasStrictlyEnumReferences(importsForExport, identifier))
362
364
  continue;
363
365
  for (const member of exportedItem.members) {
@@ -277,16 +277,14 @@ const getImportsAndExports = (sourceFile, resolveModule, typeChecker, options) =
277
277
  imports.refs.add(id);
278
278
  }
279
279
  }
280
- else if (imports.importedNs.has(id)) {
281
- if (isConsiderReferencedNS(node)) {
282
- imports.refs.add(id);
283
- }
284
- else if (isObjectEnumerationCallExpressionArgument(node)) {
285
- imports.refs.add(id);
286
- }
287
- else if (isInForIteration(node)) {
288
- imports.refs.add(id);
289
- }
280
+ else if (imports.importedNs.has(id) && isConsiderReferencedNS(node)) {
281
+ imports.refs.add(id);
282
+ }
283
+ else if (isObjectEnumerationCallExpressionArgument(node)) {
284
+ imports.refs.add(id);
285
+ }
286
+ else if (isInForIteration(node)) {
287
+ imports.refs.add(id);
290
288
  }
291
289
  }
292
290
  }
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "5.43.3";
1
+ export declare const version = "5.43.5";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '5.43.3';
1
+ export const version = '5.43.5';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "knip",
3
- "version": "5.43.3",
3
+ "version": "5.43.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": {