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
38 changes: 19 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
if: steps.rewriter-cache.outputs.cache-hit != 'true'
uses: jetli/[email protected]
with:
version: "0.2.100"
version: "0.2.105"

- name: Setup Binaryen
if: steps.rewriter-cache.outputs.cache-hit != 'true'
Expand All @@ -108,10 +108,14 @@ jobs:
if: steps.rewriter-cache.outputs.cache-hit != 'true'
run: "cargo install --git https://github.com/r58playz/wasm-snip"

- name: Build Scramjet (failing)
run: pnpm build
continue-on-error: true
working-directory: packages/scramjet/packages/core

- name: Pack Scramjet
run: |
cd packages/scramjet/packages/core
pnpm pack
run: pnpm pack
working-directory: packages/scramjet/packages/core

- name: Upload Artifact (pnpm pack)
uses: actions/upload-artifact@v4
Expand All @@ -124,9 +128,7 @@ jobs:
with:
name: scramjet
path: |
packages/scramjet/packages/core/dist/*.js
packages/scramjet/packages/core/dist/*.js.map
packages/scramjet/packages/core/dist/*.wasm
packages/scramjet/packages/core/dist/*
frontend:
name: Build Frontend
runs-on: ubuntu-latest
Expand Down Expand Up @@ -157,9 +159,7 @@ jobs:
path: packages/scramjet/packages/core/dist

- name: Build Dreamland
run: |
cd external/dreamlandjs
pnpm build
run: pnpm build:dreamland

# - name: Get Chii submodule commit hash
# id: chii-hash
Expand Down Expand Up @@ -192,10 +192,7 @@ jobs:

- name: Build Frontend
run: |
pnpm i
SKIP_CORE=1 pnpm build || :
# TODO you should not have to run this twice
SKIP_CORE=1 pnpm build || :
SKIP_CORE=1 pnpm build
VITE_ISOLATION_ORIGIN="https://puter.zone" pnpm build:chrome
tests:
name: Run Scramjet Tests
Expand Down Expand Up @@ -225,7 +222,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: scramjet
path: dist
path: packages/scramjet/packages/core/dist

- name: Cache Playwright browsers
id: pw-browsers-cache
Expand All @@ -239,9 +236,11 @@ jobs:
- name: Install Playwright Chromium
if: steps.pw-browsers-cache.outputs.cache-hit != 'true'
run: npx playwright install --with-deps chromium
working-directory: packages/scramjet/packages/core

- name: Run Playwright tests
run: pnpm test:integration
working-directory: packages/scramjet/packages/core

rewritertests:
name: "Run Rewriter Tests"
Expand All @@ -259,9 +258,9 @@ jobs:
id: rewriter-cache
with:
path: |
rewriter/wasm/out
dist/scramjet.wasm.wasm
key: rewriter-release-${{ hashFiles('rewriter/**/Cargo.toml', 'rewriter/**/src/**/*.rs', 'rewriter/**/src/**/*.toml', 'rewriter/**/src/**/*.json', 'rewriter/**/src/**/*.md', 'rewriter/**/*.sh') }}
packages/scramjet/packages/core/rewriter/wasm/out
packages/scramjet/packages/core/dist/scramjet.wasm.wasm
key: rewriter-release-${{ hashFiles('packages/scramjet/packages/core/rewriter/**/Cargo.toml', 'packages/scramjet/packages/core/rewriter/**/*.rs', 'packages/scramjet/packages/core/rewriter/**/src/**/*.toml', 'packages/scramjet/packages/core/rewriter/**/src/**/*.json', 'packages/scramjet/packages/core/rewriter/**/src/**/*.md', 'packages/scramjet/packages/core/rewriter/**/*.sh') }}
restore-keys: |
rewriter-release-

Expand All @@ -272,4 +271,5 @@ jobs:
cache-all-crates: true

- name: Run Tests
run: cd rewriter/native && cargo test
run: cargo test
working-directory: packages/scramjet/packages/core/rewriter/native
2 changes: 1 addition & 1 deletion packages/chrome/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"build": "vite build",
"preview": "vite preview"
},
"devDependencies": {
Expand Down
4 changes: 3 additions & 1 deletion packages/scramjet/codespace-basic-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euxo pipefail
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env" # to import rustup in current shell
pnpm i
cargo install wasm-bindgen-cli --version 0.2.100
cargo install wasm-bindgen-cli --version 0.2.105
VER=$(curl --silent -qI https://github.com/WebAssembly/binaryen/releases/latest | awk -F '/' '/^location/ {print substr($NF, 1, length($NF)-1)}'); \
curl -LO https://github.com/WebAssembly/binaryen/releases/download/$VER/binaryen-${VER}-x86_64-linux.tar.gz
tar xvf binaryen-${VER}-x86_64-linux.tar.gz
Expand All @@ -13,5 +13,7 @@ mv binaryen-${VER}/bin/* ~/.local/bin
mv binaryen-${VER}/lib/* ~/.local/lib
rm -rf binaryen-${VER}
cargo install --git https://github.com/r58playz/wasm-snip
cd packages/core/
pnpm rewriter:build
pnpm build
cd ../../
2 changes: 1 addition & 1 deletion packages/scramjet/packages/controller/src/sw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type Frame = {
fetchHandler: ScramjetFetchHandler;
};

const frames: Record<string, Frame>;
let frames: Record<string, Frame>;

function shouldRoute(fetch: FetchEvent): boolean {
const url = new URL(fetch.request.url);
Expand Down
18 changes: 1 addition & 17 deletions packages/scramjet/packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@
"test": "npm run test:package && npm run test:integration",
"test:package": "ava tests/ci/packageValidation.js",
"test:integration": "npx playwright test",
"preinstall": "npx only-allow pnpm",
"docs": "typedoc",
"docs:dev": "typedoc --options typedoc.dev-facing.json",
"docs:serve": "npx serve _docs; typedoc --watch"
"preinstall": "npx only-allow pnpm"
},
"exports": {
".": {
Expand Down Expand Up @@ -59,23 +56,16 @@
"verbose": true
},
"devDependencies": {
"@8hobbies/typedoc-plugin-404": "^3.2.1",
"@8hobbies/typedoc-plugin-plausible": "^2.2.0",
"@catppuccin/vscode": "^3.18.0",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.35.0",
"@estruyf/github-actions-reporter": "^1.10.0",
"@fastify/static": "^8.2.0",
"@giancosta86/typedoc-readonly": "^1.0.1",
"@mercuryworkshop/bare-as-module3": "^2.2.5",
"@mercuryworkshop/epoxy-transport": "^2.1.28",
"@mercuryworkshop/libcurl-transport": "^1.5.0",
"@mercuryworkshop/wisp-js": "^0.4.0",
"@nebula-services/bare-server-node": "^2.0.4",
"@playwright/test": "^1.55.0",
"@reside-ic/typedoc-plugin-copy-doc": "^1.1.2",
"@shipgirl/typedoc-plugin-versions": "^0.3.2",
"@stephansama/catppuccin-typedoc": "^1.0.1",
"@types/eslint": "^9.6.1",
"@types/estree": "^1.0.8",
"@types/node": "^24.3.1",
Expand All @@ -99,12 +89,6 @@
"ts-checker-rspack-plugin": "^1.1.5",
"tsc-alias": "^1.8.16",
"tslib": "^2.8.1",
"typedoc": "^0.28.12",
"typedoc-material-theme": "^1.4.0",
"typedoc-plugin-frontmatter": "^1.3.0",
"typedoc-plugin-include-example": "^3.0.2",
"typedoc-plugin-markdown": "^4.8.1",
"typedoc-plugin-mdn-links": "^5.0.9",
"typescript": "^5.9.2"
},
"dependencies": {
Expand Down
Loading
Loading