Skip to content

Commit 1e261c9

Browse files
authored
fix: Update deno_npm to fix deno install with crossws (#25837)
Partially addresses #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.
1 parent 74e294c commit 1e261c9

File tree

7 files changed

+37
-3
lines changed

7 files changed

+37
-3
lines changed

Cargo.lock

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ deno_doc = { version = "0.148.0", features = ["html", "syntect"] }
7171
deno_graph = { version = "=0.82.1" }
7272
deno_lint = { version = "=0.67.0", features = ["docs"] }
7373
deno_lockfile.workspace = true
74-
deno_npm = "=0.25.1"
74+
deno_npm = "=0.25.2"
7575
deno_package_json.workspace = true
7676
deno_runtime = { workspace = true, features = ["include_js_files_for_snapshotting"] }
7777
deno_semver.workspace = true

tests/registry/npm/@denotest/non-existent-optional-peer/1.0.0/index.js

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "@denotest/non-existent-optional-peer",
3+
"version": "1.0.0",
4+
"peerDependencies": {
5+
"uWebSockets.js": "*"
6+
},
7+
"peerDependenciesMeta": {
8+
"uWebSockets.js": {
9+
"optional": true
10+
}
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// test imitates what crossws 0.2.4 has https://www.npmjs.com/package/crossws/v/0.2.4
2+
// where uWebSockets.js is an optional peer dep, but doesn't exist on npm
3+
{
4+
"tempDir": true,
5+
"steps": [
6+
{
7+
"args": "install",
8+
"output": "install.out"
9+
}
10+
]
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[UNORDERED_START]
2+
Download http://localhost:4260/@denotest/non-existent-optional-peer
3+
Download http://localhost:4260/uWebSockets.js
4+
Download http://localhost:4260/@denotest/non-existent-optional-peer/1.0.0.tgz
5+
[UNORDERED_END]
6+
Initialize @denotest/[email protected]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"dependencies": {
3+
"@denotest/non-existent-optional-peer": "1.0.0"
4+
}
5+
}

0 commit comments

Comments
 (0)