You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've made sure the reproduction is publicly accessible
Description of the issue
In packages that are meant to run in a non-node context (such as RN or the browser), it is common to depend on packages such as assert. The DependencyDuty (love the name btw) exits early when hitting a node built-in and doesn't consider it referenced. This results in false positives for unused dependencies being reported for packages that match node built-in module names.
Our current workaround is to ignore those dependencies, but it might be more ideal to have a way to let knip know that node built-ins are not available.
The text was updated successfully, but these errors were encountered:
Prerequisites
Reproduction url
https://codesandbox.io/p/devbox/2kk4rm?migrateFrom=fq39nt
Reproduction access
Description of the issue
In packages that are meant to run in a non-node context (such as RN or the browser), it is common to depend on packages such as assert. The DependencyDuty (love the name btw) exits early when hitting a node built-in and doesn't consider it referenced. This results in false positives for unused dependencies being reported for packages that match node built-in module names.
knip/packages/knip/src/DependencyDeputy.ts
Line 193 in 4a3f84c
Our current workaround is to ignore those dependencies, but it might be more ideal to have a way to let knip know that node built-ins are not available.
The text was updated successfully, but these errors were encountered: