Running npm install with npm v7 undesirably modifies the package.json funding field from a URL string, to an object with a url property.
Running npm install should not modify a valid format for the package.json funding field.
package.json, add a funding field with a URL string as a value.npm install.Notice the resulting change to package.json, e.g:
- "funding": "https://github.com/sponsors/jaydenseric",
+ "funding": {
+ "url": "https://github.com/sponsors/jaydenseric"
+ },
It also modifies the bin field, e.g.:
{
"name": "foo",
- "bin": "bar.js"
+ "bin": {
+ "foo": "bar.js"
+ }
}
I have a similar issue with using relative paths in the "bin" field.
My steps (npm v7.0.5):
npm init -y"bin": {
"foo": "./bin/bar.js"
},
npm i"bin": {
- "foo": "./bin/bar.js"
+ "foo": "bin/bar.js"
},
If anything, it should include the ./ - but ideally it wouldn't modify the field value at all.