Skip to content

Commit

Permalink
chore: setup llrt
Browse files Browse the repository at this point in the history
  • Loading branch information
ascorbic committed Mar 13, 2024
1 parent 69c5a01 commit c47f7d2
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/update-data.yml
Expand Up @@ -42,10 +42,15 @@ jobs:
latest: true
fileName: llrt-linux-x64.zip
out-file-path: downloads
extract: true
- name: Setup $PATH
# Manually unzip because this seems to corrupt the binary
extract: false

- name: Setup LLRT
run: |
echo "$GITHUB_WORKSPACE/downloads" >> $GITHUB_PATH
export $DOWNLOADS="$GITHUB_WORKSPACE/downloads"
unzip $DOWNLOADS/llrt-linux-x64.zip -d $DOWNLOADS
sudo chmod +x $DOWNLOADS/*
echo "$DOWNLOADS" >> $GITHUB_PATH
- run: pnpm install
- name: Get browser tests
uses: actions/checkout@v4
Expand Down
2 changes: 2 additions & 0 deletions apps/website/src/components/RuntimeCard.vue
Expand Up @@ -48,6 +48,8 @@ function getRuntimeInformation(name: string): RuntimeInformation {
return { name: 'Deno', github: 'https://github.com/denoland/deno', website: 'https://deno.com' };
case 'fastly':
return { name: 'fastly', github: 'https://github.com/fastly/js-compute-runtime', website: 'https://www.fastly.com/products/compute' };
case 'llrt':
return { name: 'LLRT', github: 'https://github.com/awslabs/llrt' };
case 'netlify':
return { name: 'netlify', website: 'https://docs.netlify.com/edge-functions/overview' };
case 'node':
Expand Down
19 changes: 9 additions & 10 deletions packages/runtime-compat-data/test/index.test.ts
@@ -1,4 +1,5 @@
/* eslint-disable yield-star-spacing */
import { readdir } from "node:fs/promises";
import { expect, it, describe } from "vitest";
import data from ".." assert { type: "json" };

Expand Down Expand Up @@ -28,19 +29,17 @@ const skipKeys = new Set([
]);

describe("runtime-compat-data", () => {
it("generates valid data", () => {
it("generates valid data", async () => {
const keys = await readdir(
new URL("../../../generator/runtimes", import.meta.url),
);

for (const [path, value] of walk(data)) {
const key = path.join(".");
if (path.at(-1) === "__compat") {
expect(Object.keys(value.support ?? {}), `${key}.support`).toEqual([
"bun",
"deno",
"edge-light",
"fastly",
"netlify",
"node",
"workerd",
]);
expect(Object.keys(value.support ?? {}), `${key}.support`).toEqual(
keys,
);
} else if (!skipKeys.has(key)) {
expect("__compat" in value, key).toBeTruthy();
}
Expand Down
1 change: 1 addition & 0 deletions scripts/version.sh
Expand Up @@ -5,6 +5,7 @@ echo "- bun: `bun -v`"
echo "- deno: `deno --version | head -n 1`"
echo "- edge-light: `pnpm run --filter edge-light-runtime version | tail -n 1`"
echo "- fastly: `fastly version | head -n 1`"
echo "- llrt: `llrt -v`"
echo "- netlify: `netlify -v`"
echo "- node: `node -v`"
echo "- workerd: `pnpm run --filter workerd-runtime version | tail -n 1`"
Expand Down

0 comments on commit c47f7d2

Please sign in to comment.