From 1e261c9756e232b5d8ef1e7a6627f6f03695ab16 Mon Sep 17 00:00:00 2001 From: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> Date: Mon, 23 Sep 2024 19:12:48 -0700 Subject: fix: Update deno_npm to fix `deno install` with crossws (#25837) Partially addresses https://github.com/denoland/deno/issues/25648. This allows packages that use `crossws` to be installed with `deno install`. `crossws` specifies an optional peer dependency on `uWebSockets`, but `uWebSockets` is not on npm (it is used with `git:` or `github:` specifiers). Previously we would error on this, now we don't error on non-existent optional peer dependencies. --- .../npm/@denotest/non-existent-optional-peer/1.0.0/index.js | 0 .../@denotest/non-existent-optional-peer/1.0.0/package.json | 12 ++++++++++++ .../specs/install/non_existent_optional_peer/__test__.jsonc | 11 +++++++++++ tests/specs/install/non_existent_optional_peer/install.out | 6 ++++++ tests/specs/install/non_existent_optional_peer/package.json | 5 +++++ 5 files changed, 34 insertions(+) create mode 100644 tests/registry/npm/@denotest/non-existent-optional-peer/1.0.0/index.js create mode 100644 tests/registry/npm/@denotest/non-existent-optional-peer/1.0.0/package.json create mode 100644 tests/specs/install/non_existent_optional_peer/__test__.jsonc create mode 100644 tests/specs/install/non_existent_optional_peer/install.out create mode 100644 tests/specs/install/non_existent_optional_peer/package.json (limited to 'tests') diff --git a/tests/registry/npm/@denotest/non-existent-optional-peer/1.0.0/index.js b/tests/registry/npm/@denotest/non-existent-optional-peer/1.0.0/index.js new file mode 100644 index 000000000..e69de29bb diff --git a/tests/registry/npm/@denotest/non-existent-optional-peer/1.0.0/package.json b/tests/registry/npm/@denotest/non-existent-optional-peer/1.0.0/package.json new file mode 100644 index 000000000..e1eaf20b7 --- /dev/null +++ b/tests/registry/npm/@denotest/non-existent-optional-peer/1.0.0/package.json @@ -0,0 +1,12 @@ +{ + "name": "@denotest/non-existent-optional-peer", + "version": "1.0.0", + "peerDependencies": { + "uWebSockets.js": "*" + }, + "peerDependenciesMeta": { + "uWebSockets.js": { + "optional": true + } + } +} \ No newline at end of file diff --git a/tests/specs/install/non_existent_optional_peer/__test__.jsonc b/tests/specs/install/non_existent_optional_peer/__test__.jsonc new file mode 100644 index 000000000..b6527f614 --- /dev/null +++ b/tests/specs/install/non_existent_optional_peer/__test__.jsonc @@ -0,0 +1,11 @@ +// test imitates what crossws 0.2.4 has https://www.npmjs.com/package/crossws/v/0.2.4 +// where uWebSockets.js is an optional peer dep, but doesn't exist on npm +{ + "tempDir": true, + "steps": [ + { + "args": "install", + "output": "install.out" + } + ] +} diff --git a/tests/specs/install/non_existent_optional_peer/install.out b/tests/specs/install/non_existent_optional_peer/install.out new file mode 100644 index 000000000..292c1a4e2 --- /dev/null +++ b/tests/specs/install/non_existent_optional_peer/install.out @@ -0,0 +1,6 @@ +[UNORDERED_START] +Download http://localhost:4260/@denotest/non-existent-optional-peer +Download http://localhost:4260/uWebSockets.js +Download http://localhost:4260/@denotest/non-existent-optional-peer/1.0.0.tgz +[UNORDERED_END] +Initialize @denotest/non-existent-optional-peer@1.0.0 diff --git a/tests/specs/install/non_existent_optional_peer/package.json b/tests/specs/install/non_existent_optional_peer/package.json new file mode 100644 index 000000000..c8216ee3d --- /dev/null +++ b/tests/specs/install/non_existent_optional_peer/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "@denotest/non-existent-optional-peer": "1.0.0" + } +} -- cgit v1.2.3