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.
Cross-ecosystem note: historically Dub (D's package manager) also used
package.jsonas a recipe filename. Overlapping keys make ownership ambiguous. Dub is moving toward refusing obvious npm files (dlang/dub#3118, dlang/dub#3136) and preferringdub.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.jsonmeaning). 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.jsonownership—only to consider documenting a positive claim so other tools can skip or accept the file unambiguously.