Skip to content

Commit

Permalink
Add metadata to mark peer dependencies as optional for npm7+
Browse files Browse the repository at this point in the history
In npm 7 and npm 8, peer dependencies are installed by default.

iltorb and node-zopfli-es are only required for older versions of Node, and it doesn't make sense for them to be installed automatically when shrink-ray-current is installed.

This change adds a peerDependenciesMeta field to mark these peer dependencies as optional https://docs.npmjs.com/cli/v8/configuring-npm/package-json#peerdependenciesmeta
  • Loading branch information
keeganstreet authored Feb 4, 2022
1 parent 9696b1c commit 318a619
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@
"iltorb": "^2.0.0",
"node-zopfli-es": "^1.0.3"
},
"peerDependenciesMeta": {
"iltorb": {
"optional": true
},
"node-zopfli-es": {
"optional": true
}
},
"engines": {
"node": ">=8.0"
},
Expand Down

0 comments on commit 318a619

Please sign in to comment.