Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
cargo-fmt:
if: github.event.pull_request.draft == false
name: 'fmt'
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v2
Expand All @@ -53,7 +53,7 @@ jobs:
cargo-clippy:
if: github.event.pull_request.draft == false
name: 'cargo clippy'
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v4
- name: Install deps
Expand All @@ -67,7 +67,7 @@ jobs:
cargo-test:
if: github.event.pull_request.draft == false
name: 'cargo test'
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Install deps
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:

jobs:
mirror:
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
permissions:
contents: read
packages: write
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:

jobs:
release:
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
outputs:
published: ${{ steps.semantic.outputs.new_release_published }}
version: ${{ steps.semantic.outputs.new_release_version }}
Expand All @@ -34,7 +34,7 @@ jobs:
needs:
- release
if: needs.release.outputs.published == 'true'
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
env:
arch: amd64
outputs:
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:

merge_manifest:
needs: [release, publish_x86, publish_arm]
runs-on: ubuntu-latest
runs-on: blacksmith-4vcpu-ubuntu-2404
permissions:
contents: read
packages: write
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ fn main() -> Result<ExitCode, anyhow::Error> {
"{}",
concat!(
"if `oneshot` policy is enabled, the maximum ",
"parallelism is fixed to `1` as forcibly"
"parallelism is fixed to `1` as forcibly ^^"
)
);
}
Expand Down
1 change: 1 addition & 0 deletions crates/base/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ tokio-util = { workspace = true, features = ["rt", "compat"] }
tracing-subscriber = { workspace = true, features = ["env-filter", "tracing-log"] }

async-tungstenite = { version = "0.25.0", default-features = false }
diff = "0.1"
tungstenite = { version = "0.21.0", default-features = false, features = ["handshake"] }

[build-dependencies]
Expand Down
28 changes: 27 additions & 1 deletion crates/base/tests/eszip_migration.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use std::borrow::Cow;
use std::fs::read_dir;
use std::path::Path;
use std::path::PathBuf;
Expand Down Expand Up @@ -33,6 +34,7 @@ async fn test_eszip_migration() {
let mut passed = 0;
let mut failed = 0;
let mut snapshot_created = 0;
let mut diff_msgs = vec![];

println!("running {} eszip tests", paths.len());
for path in paths {
Expand All @@ -54,12 +56,22 @@ async fn test_eszip_migration() {
passed += 1;
snapshot_created += 1;
} else {
let snapshot_buf = read(snapshot_path).await.unwrap();
let snapshot_buf = read(&snapshot_path).await.unwrap();
if snapshot_buf == buf {
println!("ok");
passed += 1;
} else {
println!("FAILED");
diff_msgs.push(format!("{}", snapshot_path.to_string_lossy()).into());
diff_msgs.push(Cow::Borrowed("--------------------"));
diff_msgs.extend(
render_diff(
&String::from_utf8_lossy(&snapshot_buf),
&String::from_utf8_lossy(buf),
)
.map(Cow::Owned),
);
diff_msgs.push(Cow::Borrowed("\n"));
failed += 1;
}
}
Expand All @@ -68,6 +80,9 @@ async fn test_eszip_migration() {
let msg =
format!("eszip test result: {status}. {passed} passed ({snapshot_created} snapshot created); {failed} failed");
if failed > 0 {
for line in diff_msgs {
eprintln!("{line}");
}
panic!("{msg}");
} else {
eprintln!("{msg}");
Expand Down Expand Up @@ -324,3 +339,14 @@ fn get_bool_from_json_value(
) -> Option<bool> {
value.get(key).and_then(|it| it.as_bool())
}

fn render_diff<'l>(
left: &'l str,
right: &'l str,
) -> impl Iterator<Item = String> + 'l {
diff::lines(left, right).into_iter().map(|it| match it {
diff::Result::Left(l) => format!("-{l}"),
diff::Result::Both(l, _) => format!(" {l}"),
diff::Result::Right(r) => format!("+{r}"),
})
}
2 changes: 1 addition & 1 deletion crates/deno_facade/module_loader/standalone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ pub async fn create_module_loader_for_eszip(
)
.context("Failed to load npm vfs.")?;

let fs = DenoCompileFileSystem::new(vfs);
let fs = DenoCompileFileSystem::new(vfs).use_real_fs(false);
let fs_backed_vfs = fs.file_backed_vfs().clone();

(
Expand Down
Loading
Loading