mirror of
https://github.com/denoland/deno.git
synced 2024-12-18 05:14:21 -05:00
fix: do not error when subpath has an @ symbol (#27290)
Closes https://github.com/denoland/deno/issues/27243
This commit is contained in:
parent
44d76975d5
commit
da3a676d1c
6 changed files with 13 additions and 15 deletions
6
Cargo.lock
generated
6
Cargo.lock
generated
|
@ -2192,9 +2192,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "deno_semver"
|
||||
version = "0.6.0"
|
||||
version = "0.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4756be7351289726087408984db18b9eb5e0186907673f39f858d119d0162071"
|
||||
checksum = "7d1259270d66a5e6d29bb75c9289656541874f79ae9ff6c9f1c790846d5c07ba"
|
||||
dependencies = [
|
||||
"deno_error",
|
||||
"monch",
|
||||
|
@ -4569,7 +4569,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"windows-targets 0.48.5",
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
@ -58,7 +58,7 @@ deno_npm = "=0.26.0"
|
|||
deno_path_util = "=0.2.1"
|
||||
deno_permissions = { version = "0.41.0", path = "./runtime/permissions" }
|
||||
deno_runtime = { version = "0.190.0", path = "./runtime" }
|
||||
deno_semver = "=0.6.0"
|
||||
deno_semver = "=0.6.1"
|
||||
deno_terminal = "0.2.0"
|
||||
napi_sym = { version = "0.111.0", path = "./ext/napi/sym" }
|
||||
test_util = { package = "test_server", path = "./tests/util/server" }
|
||||
|
|
|
@ -432,9 +432,8 @@ pub async fn add(
|
|||
let mut package_reqs = Vec::with_capacity(add_flags.packages.len());
|
||||
|
||||
for entry_text in add_flags.packages.iter() {
|
||||
let req = AddRmPackageReq::parse(entry_text).with_context(|| {
|
||||
format!("Failed to parse package required: {}", entry_text)
|
||||
})?;
|
||||
let req = AddRmPackageReq::parse(entry_text)
|
||||
.with_context(|| format!("Failed to parse package: {}", entry_text))?;
|
||||
|
||||
match req {
|
||||
Ok(add_req) => package_reqs.push(add_req),
|
||||
|
@ -805,9 +804,8 @@ pub async fn remove(
|
|||
let mut removed_packages = vec![];
|
||||
|
||||
for package in &remove_flags.packages {
|
||||
let req = AddRmPackageReq::parse(package).with_context(|| {
|
||||
format!("Failed to parse package required: {}", package)
|
||||
})?;
|
||||
let req = AddRmPackageReq::parse(package)
|
||||
.with_context(|| format!("Failed to parse package: {}", package))?;
|
||||
let mut parsed_pkg_name = None;
|
||||
for config in configs.iter_mut().flatten() {
|
||||
match &req {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
error: Failed to parse package required: jsr:@std/testing/bdd@1
|
||||
error: Failed to parse package: jsr:@std/testing/bdd@1
|
||||
|
||||
Caused by:
|
||||
Invalid package specifier 'jsr:@std/testing/bdd@1'. Did you mean to write 'jsr:@std/testing@1/bdd'?
|
||||
Invalid package specifier 'jsr:@std/testing/bdd@1'. Did you mean to write 'jsr:@std/testing@1/bdd'? If not, add a version requirement to the specifier.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
error: Failed to parse package required: npm:preact/hooks@10
|
||||
error: Failed to parse package: npm:preact/hooks@10
|
||||
|
||||
Caused by:
|
||||
Invalid package specifier 'npm:preact/hooks@10'. Did you mean to write 'npm:preact@10/hooks'?
|
||||
Invalid package specifier 'npm:preact/hooks@10'. Did you mean to write 'npm:preact@10/hooks'? If not, add a version requirement to the specifier.
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
error: Invalid package specifier 'npm:react-dom/server@18.2.0'. Did you mean to write 'npm:react-dom@18.2.0/server'?
|
||||
error: Invalid package specifier 'npm:react-dom/server@18.2.0'. Did you mean to write 'npm:react-dom@18.2.0/server'? If not, add a version requirement to the specifier.
|
||||
at [WILDCARD]/error_version_after_subpath/main.js:1:8
|
||||
|
|
Loading…
Reference in a new issue