Skip to content

[RRFC] Explicit ecosystem claim on package.json for cross-ecosystem disambiguation #913

Description

@AMDphreak

Cross-ecosystem note: historically Dub (D's package manager) also used package.json as a recipe filename. Overlapping keys make ownership ambiguous. Dub is moving toward refusing obvious npm files (dlang/dub#3118, dlang/dub#3136) and preferring dub.json.

A durable fix is an explicit ecosystem claim on package.json (e.g. "packageFormat": "npm" / "packageFormat": "dub"), agreed across ecosystems—not only JS-internal heuristics.

Primary write-up filed with the OpenJS Package Metadata Interoperability group (better fit for field-level package.json meaning). Linking here so the npm CLI RFC track is aware if a CLI-side recommendation is desired later.

OpenJS issue: (will update with URL after open)

Dub issue: (will update with URL after open)

Not asking npm to abandon package.json ownership—only to consider documenting a positive claim so other tools can skip or accept the file unambiguously.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions