Skip to content

Commit

Permalink
Fix npm publish warnings about the package.json format
Browse files Browse the repository at this point in the history
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 npm/cli#6918 and
denoland/dnt#414.
  • Loading branch information
timvandermeij committed Jun 30, 2024
1 parent a5f2b9f commit dddb74d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gulpfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit dddb74d

Please sign in to comment.