这是indexloc提供的服务,不要输入任何密码
Skip to content

🐛 Shadowed monorepo packages of builtins falsely reported as unused #1312

@samhh

Description

@samhh

Prerequisites

Reproduction url

https://git.sr.ht/~samhh/knip-shadowed-builtin-repro

Reproduction access

  • I've made sure the reproduction is publicly accessible

Description of the issue

Hello again 👋

Imports of a monorepo package that shares a name with a Node builtin, such as domain, will falsely be reported as unused.

I appreciate in an ideal world domain would probably be called @org/domain to entirely bypass this kind of issue - notably this shadowing only works at subpaths - however on the basis that all other software in our monorepo is happy with this I think it qualifies as a bug in module resolution in Knip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions