From 318a6194f3e5b12dfca85ffb4699cfdb1a4dabed Mon Sep 17 00:00:00 2001 From: Keegan Street Date: Fri, 4 Feb 2022 14:27:16 +1100 Subject: [PATCH] Add metadata to mark peer dependencies as optional for npm7+ 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 --- package.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package.json b/package.json index f22e61e..0aadb11 100644 --- a/package.json +++ b/package.json @@ -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" },