1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 14:48:08 +02:00

Fix npm publish warnings about the package.json format

This commit removes the following warnings from the `npm publish` output:

```
npm warn publish npm auto-corrected some errors in your package.json when publishing.  Please run "npm pkg fix" to address these errors.
npm warn publish errors corrected:
npm warn publish Removed invalid "scripts"
npm warn publish "repository.url" was normalized to "git+https://github.com/mozilla/pdfjs-dist.git"
```

For the "scripts" section it turns out that if the package doesn't have
any scripts it's expected to explicitly set it to an empty object; refer
to https://github.com/npm/cli/issues/6918 and
https://github.com/denoland/dnt/pull/414.
This commit is contained in:
Tim van der Meij 2024-06-30 15:47:14 +02:00
parent a5f2b9faeb
commit dddb74d5e4
No known key found for this signature in database
GPG key ID: 8C3FD2925A5F2762

View file

@ -2226,11 +2226,12 @@ function packageJson() {
},
repository: {
type: "git",
url: DIST_REPO_URL,
url: `git+${DIST_REPO_URL}.git`,
},
engines: {
node: ">=18",
},
scripts: {},
};
return createStringSource(