diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-02-29 19:12:04 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-29 19:12:04 +0000 |
commit | fb31ae73e40896c1d1dfdb26c265222f49907d32 (patch) | |
tree | f113a07ecf0dd54f7df38b5b3c1f7f481b581498 /tests/util/server/src | |
parent | a9aef0d017bd053d7f4014c363dbc5898ced1a2e (diff) |
feat(unstable): `deno add` subcommand (#22520)
This commit adds "deno add" subcommand that has a basic support for
adding "jsr:" packages to "deno.json" file.
This currently doesn't support "npm:" specifiers and specifying version
constraints.
Diffstat (limited to 'tests/util/server/src')
-rw-r--r-- | tests/util/server/src/servers/registry.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/util/server/src/servers/registry.rs b/tests/util/server/src/servers/registry.rs index 1a0caff1f..09b80c8d5 100644 --- a/tests/util/server/src/servers/registry.rs +++ b/tests/util/server/src/servers/registry.rs @@ -142,7 +142,12 @@ async fn registry_server_handler( // serve the registry package files let mut file_path = testdata_path().to_path_buf().join("jsr").join("registry"); - file_path.push(&req.uri().path()[1..].replace("%2f", "/")); + file_path.push( + &req.uri().path()[1..] + .replace("%2f", "/") + .replace("%2F", "/"), + ); + if let Ok(body) = tokio::fs::read(&file_path).await { let body = if let Some(version) = file_path .file_name() |