diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index d236d2c..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,35 +0,0 @@ -# See https://github.com/actions/starter-workflows/blob/main/pages/static.yml -name: Deploy static content to Pages - -on: [push, workflow_dispatch] - -permissions: - contents: read - pages: write - id-token: write - -concurrency: - group: "pages" - cancel-in-progress: false - -jobs: - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - if: github.repository == 'SerenityOS/libjs-website' - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Build site - run: ./build.sh - - name: Setup Pages - uses: actions/configure-pages@v3 - - name: Upload artifact - uses: actions/upload-pages-artifact@v2 - with: - path: "." - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v2 diff --git a/.gitignore b/.gitignore index f333a6f..e69de29 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +0,0 @@ -repl/libjs.js -repl/libjs.wasm -test262/data -wasm/data diff --git a/build.sh b/build.sh deleted file mode 100755 index c52b0b0..0000000 --- a/build.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -set -eo pipefail - -REPOSITORY="${TEST262_DATA_REPOSITORY:-SerenityOS/libjs-data}" - -mkdir -p test262/data wasm/data - -echo Downloading test results... -curl -sSLf "https://github.com/${REPOSITORY}/raw/master/test262/per-file-master.json" -o test262/data/per-file-master.json -curl -sSLf "https://github.com/${REPOSITORY}/raw/master/test262/results.json" -o test262/data/results.json -curl -sSLf "https://github.com/${REPOSITORY}/raw/master/wasm/per-file-master.json" -o wasm/data/per-file-master.json -curl -sSLf "https://github.com/${REPOSITORY}/raw/master/wasm/results.json" -o wasm/data/results.json - -echo Downloading Wasm bundle... -curl -sSLf "https://github.com/${REPOSITORY}/raw/libjs-wasm/libjs.js" -o repl/libjs.js -curl -sSLf "https://github.com/${REPOSITORY}/raw/libjs-wasm/libjs.wasm" -o repl/libjs.wasm diff --git a/repl/index.html b/repl/index.html index 75e42e0..2c6dcdf 100644 --- a/repl/index.html +++ b/repl/index.html @@ -71,8 +71,27 @@

LibJS REPL

- - - + + diff --git a/test262/fetch.js b/test262/fetch.js index e19c012..a3b76eb 100644 --- a/test262/fetch.js +++ b/test262/fetch.js @@ -1,9 +1,13 @@ -const fetchData = (url) => { - const headers = new Headers(); - headers.append("pragma", "no-cache"); - headers.append("cache-control", "no-cache"); - return fetch(new Request(url), { +const LIBJS_DATA_URL = + "https://raw.githubusercontent.com/SerenityOS/libjs-data"; + +const fetchData = (path, branch) => { + if (typeof branch === "undefined") { + branch = "master"; + } + + return fetch(`${LIBJS_DATA_URL}/${branch}/${path}`, { method: "GET", - headers, + cache: "no-cache", }); }; diff --git a/test262/main.js b/test262/main.js index 852c089..74de41d 100644 --- a/test262/main.js +++ b/test262/main.js @@ -407,7 +407,7 @@ test262@${test262Version}, test262-parser-tests@${test262ParserTestsVersion}`; } document.addEventListener("DOMContentLoaded", () => { - fetchData("data/results.json") + fetchData("test262/results.json") .then((response) => response.json()) .then((data) => { data.sort((a, b) => diff --git a/test262/per-file/index.html b/test262/per-file/index.html index f954ec7..2dd3263 100644 --- a/test262/per-file/index.html +++ b/test262/per-file/index.html @@ -62,7 +62,7 @@

Per-file results