Skip to content
This repository was archived by the owner on Jun 16, 2025. It is now read-only.
This repository was archived by the owner on Jun 16, 2025. It is now read-only.

Module imports defined in packages.json should not show as missing dependencies #666

@Mossop

Description

@Mossop

Bug Description

It is possible to define import mappings in package.json: https://nodejs.org/api/packages.html#packages_imports. Currently depcheck flags imports from these as missing dependencies.

Code snippets

Where the dependency is used:

import { TaskController } from "#schema";

Where the dependency is listed in package.json:

{
  "imports": {
    "#schema": {
      "default": "./dist/schema/index.js"
    }
}

Versions

  • node -v: v16.6.1
  • npm -v: 7.20.3
  • depcheck --version: 1.4.2

Extra info

I tried just adding "#*" to depcheck's ignores but that didn't help, it wasn't clear if ignores is meant to apply to missing dependencies or not.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions