Skip to content

Commit bda9b46

Browse files
authored
Merge branch 'supabase:main' into fix/import-map
2 parents 7985aa7 + 998284f commit bda9b46

File tree

11 files changed

+105
-26
lines changed

11 files changed

+105
-26
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
cargo-fmt:
4242
if: github.event.pull_request.draft == false
4343
name: 'fmt'
44-
runs-on: ubuntu-latest
44+
runs-on: blacksmith-4vcpu-ubuntu-2404
4545
steps:
4646
- uses: actions/checkout@v4
4747
- uses: denoland/setup-deno@v2
@@ -53,7 +53,7 @@ jobs:
5353
cargo-clippy:
5454
if: github.event.pull_request.draft == false
5555
name: 'cargo clippy'
56-
runs-on: ubuntu-latest
56+
runs-on: blacksmith-4vcpu-ubuntu-2404
5757
steps:
5858
- uses: actions/checkout@v4
5959
- name: Install deps
@@ -67,7 +67,7 @@ jobs:
6767
cargo-test:
6868
if: github.event.pull_request.draft == false
6969
name: 'cargo test'
70-
runs-on: ubuntu-latest
70+
runs-on: blacksmith-4vcpu-ubuntu-2404
7171
steps:
7272
- name: Install deps
7373
run: |

.github/workflows/mirror.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313

1414
jobs:
1515
mirror:
16-
runs-on: ubuntu-latest
16+
runs-on: blacksmith-4vcpu-ubuntu-2404
1717
permissions:
1818
contents: read
1919
packages: write

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212

1313
jobs:
1414
release:
15-
runs-on: ubuntu-latest
15+
runs-on: blacksmith-4vcpu-ubuntu-2404
1616
outputs:
1717
published: ${{ steps.semantic.outputs.new_release_published }}
1818
version: ${{ steps.semantic.outputs.new_release_version }}
@@ -37,7 +37,7 @@ jobs:
3737
needs:
3838
- release
3939
if: needs.release.outputs.published == 'true'
40-
runs-on: ubuntu-latest
40+
runs-on: blacksmith-4vcpu-ubuntu-2404
4141
env:
4242
arch: amd64
4343
outputs:
@@ -124,7 +124,7 @@ jobs:
124124
125125
merge_manifest:
126126
needs: [release, publish_x86, publish_arm]
127-
runs-on: ubuntu-latest
127+
runs-on: blacksmith-4vcpu-ubuntu-2404
128128
permissions:
129129
contents: read
130130
packages: write

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DEVELOPERS.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,6 @@ docker build -t supabase/edge-runtime .
4040
docker run -it --rm -p 9000:9000 -v ./examples/:/examples supabase/edge-runtime start --main-service /examples/main
4141
```
4242

43-
Another option would be to install [Orb](https://docs.orbstack.dev/install) and
44-
use an [Orbstack Machine](https://docs.orbstack.dev/machines/) to run a Linux
45-
Machine.
46-
47-
First create a machine:
48-
49-
```
50-
orb create ubuntu new-ubuntu
51-
```
52-
53-
and run `orb` in the base directory to enter the virtual machine.
54-
5543
## How to run tests
5644

5745
```sh

cli/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ fn main() -> Result<ExitCode, anyhow::Error> {
272272
"{}",
273273
concat!(
274274
"if `oneshot` policy is enabled, the maximum ",
275-
"parallelism is fixed to `1` as forcibly"
275+
"parallelism is fixed to `1` as forcibly ^^"
276276
)
277277
);
278278
}

crates/base/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ tokio-util = { workspace = true, features = ["rt", "compat"] }
8787
tracing-subscriber = { workspace = true, features = ["env-filter", "tracing-log"] }
8888

8989
async-tungstenite = { version = "0.25.0", default-features = false }
90+
diff = "0.1"
9091
tungstenite = { version = "0.21.0", default-features = false, features = ["handshake"] }
9192

9293
[build-dependencies]

crates/base/tests/eszip_migration.rs

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use std::borrow::Cow;
12
use std::fs::read_dir;
23
use std::path::Path;
34
use std::path::PathBuf;
@@ -33,6 +34,7 @@ async fn test_eszip_migration() {
3334
let mut passed = 0;
3435
let mut failed = 0;
3536
let mut snapshot_created = 0;
37+
let mut diff_msgs = vec![];
3638

3739
println!("running {} eszip tests", paths.len());
3840
for path in paths {
@@ -54,12 +56,22 @@ async fn test_eszip_migration() {
5456
passed += 1;
5557
snapshot_created += 1;
5658
} else {
57-
let snapshot_buf = read(snapshot_path).await.unwrap();
59+
let snapshot_buf = read(&snapshot_path).await.unwrap();
5860
if snapshot_buf == buf {
5961
println!("ok");
6062
passed += 1;
6163
} else {
6264
println!("FAILED");
65+
diff_msgs.push(format!("{}", snapshot_path.to_string_lossy()).into());
66+
diff_msgs.push(Cow::Borrowed("--------------------"));
67+
diff_msgs.extend(
68+
render_diff(
69+
&String::from_utf8_lossy(&snapshot_buf),
70+
&String::from_utf8_lossy(buf),
71+
)
72+
.map(Cow::Owned),
73+
);
74+
diff_msgs.push(Cow::Borrowed("\n"));
6375
failed += 1;
6476
}
6577
}
@@ -68,6 +80,9 @@ async fn test_eszip_migration() {
6880
let msg =
6981
format!("eszip test result: {status}. {passed} passed ({snapshot_created} snapshot created); {failed} failed");
7082
if failed > 0 {
83+
for line in diff_msgs {
84+
eprintln!("{line}");
85+
}
7186
panic!("{msg}");
7287
} else {
7388
eprintln!("{msg}");
@@ -324,3 +339,14 @@ fn get_bool_from_json_value(
324339
) -> Option<bool> {
325340
value.get(key).and_then(|it| it.as_bool())
326341
}
342+
343+
fn render_diff<'l>(
344+
left: &'l str,
345+
right: &'l str,
346+
) -> impl Iterator<Item = String> + 'l {
347+
diff::lines(left, right).into_iter().map(|it| match it {
348+
diff::Result::Left(l) => format!("-{l}"),
349+
diff::Result::Both(l, _) => format!(" {l}"),
350+
diff::Result::Right(r) => format!("+{r}"),
351+
})
352+
}

crates/deno_facade/module_loader/standalone.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ pub async fn create_module_loader_for_eszip(
621621
)
622622
.context("Failed to load npm vfs.")?;
623623

624-
let fs = DenoCompileFileSystem::new(vfs);
624+
let fs = DenoCompileFileSystem::new(vfs).use_real_fs(false);
625625
let fs_backed_vfs = fs.file_backed_vfs().clone();
626626

627627
(

0 commit comments

Comments
 (0)