From 722913a48699dd89919c37319f8687bbc74fd9df Mon Sep 17 00:00:00 2001 From: Nathan Whitaker Date: Mon, 23 Sep 2024 14:33:41 -0700 Subject: [PATCH 1/2] Update deno_npm to 0.25.2 --- Cargo.lock | 4 ++-- cli/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f514abb1a688b9..b4ee2d488682d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1870,9 +1870,9 @@ dependencies = [ [[package]] name = "deno_npm" -version = "0.25.1" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e61b112e9bb332e8e6b0d82fcea7664423933de476e1726dd23a924a2d94f4ef" +checksum = "1809e2d77d8a06bc2800dc10c1d4acb664197e518e289a86e336411c1feba785" dependencies = [ "anyhow", "async-trait", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index ad0a840fdde9b7..57d38b83c07b03 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -71,7 +71,7 @@ deno_doc = { version = "0.148.0", features = ["html", "syntect"] } deno_graph = { version = "=0.82.1" } deno_lint = { version = "=0.67.0", features = ["docs"] } deno_lockfile.workspace = true -deno_npm = "=0.25.1" +deno_npm = "=0.25.2" deno_package_json.workspace = true deno_runtime = { workspace = true, features = ["include_js_files_for_snapshotting"] } deno_semver.workspace = true From 04bf1a5f67fef2e68d933b170af52fc002cc6577 Mon Sep 17 00:00:00 2001 From: Nathan Whitaker Date: Mon, 23 Sep 2024 18:10:03 -0700 Subject: [PATCH 2/2] Add test --- .../non-existent-optional-peer/1.0.0/index.js | 0 .../non-existent-optional-peer/1.0.0/package.json | 12 ++++++++++++ .../non_existent_optional_peer/__test__.jsonc | 11 +++++++++++ .../install/non_existent_optional_peer/install.out | 6 ++++++ .../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 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 00000000000000..e69de29bb2d1d6 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 00000000000000..e1eaf20b7d7c5d --- /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 00000000000000..b6527f614c6e51 --- /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 00000000000000..292c1a4e2f9944 --- /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 00000000000000..c8216ee3d5561c --- /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" + } +}