mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 18:38:33 +00:00
fix: avoid global declaration collisions in cjs (#15608)
* Use a default stack size * 2 in debug for Windows because swc using so much stack size. We should look into this more later though.
This commit is contained in:
parent
0fe590bbcb
commit
376665d115
15 changed files with 267 additions and 16 deletions
|
@ -210,7 +210,16 @@ impl NpmCache {
|
|||
if response.status() == 404 {
|
||||
bail!("Could not find npm package tarball at: {}", dist.tarball);
|
||||
} else if !response.status().is_success() {
|
||||
bail!("Bad response: {:?}", response.status());
|
||||
let status = response.status();
|
||||
let maybe_response_text = response.text().await.ok();
|
||||
bail!(
|
||||
"Bad response: {:?}{}",
|
||||
status,
|
||||
match maybe_response_text {
|
||||
Some(text) => format!("\n\n{}", text),
|
||||
None => String::new(),
|
||||
}
|
||||
);
|
||||
} else {
|
||||
let bytes = response.bytes().await?;
|
||||
|
||||
|
|
|
@ -302,7 +302,16 @@ impl NpmRegistryApi {
|
|||
if response.status() == 404 {
|
||||
Ok(None)
|
||||
} else if !response.status().is_success() {
|
||||
bail!("Bad response: {:?}", response.status());
|
||||
let status = response.status();
|
||||
let maybe_response_text = response.text().await.ok();
|
||||
bail!(
|
||||
"Bad response: {:?}{}",
|
||||
status,
|
||||
match maybe_response_text {
|
||||
Some(text) => format!("\n\n{}", text),
|
||||
None => String::new(),
|
||||
}
|
||||
);
|
||||
} else {
|
||||
let bytes = response.bytes().await?;
|
||||
let package_info = serde_json::from_slice(&bytes)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue