For historic reasons, Dub may attempt to load package.json files (older name for dub.json). However, npm uses this file name too.
When Dub can't find a dub.json file but finds a package.json file belonging to npm, it will still attempt to load it. Because Dub ignores unknown fields in the file, and there is sufficient overlap between the two formats that Dub may try to make sense of the declarations therein, it can lead to very confusing messages.
Proposal: when Dub detects top-level keys which are used by npm but not Dub, raise a hard error and refuse to parse the file completely. Some keys we can use for this are packageManager, scripts, devDependencies, and workspaces.
For historic reasons, Dub may attempt to load
package.jsonfiles (older name fordub.json). However, npm uses this file name too.When Dub can't find a
dub.jsonfile but finds apackage.jsonfile belonging to npm, it will still attempt to load it. Because Dub ignores unknown fields in the file, and there is sufficient overlap between the two formats that Dub may try to make sense of the declarations therein, it can lead to very confusing messages.Proposal: when Dub detects top-level keys which are used by npm but not Dub, raise a hard error and refuse to parse the file completely. Some keys we can use for this are
packageManager,scripts,devDependencies, andworkspaces.