Skip to content
Open
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
2 changes: 1 addition & 1 deletion .cargo/config → .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# These command aliases are not final, may change
[alias]
# Alias to build actual plugin binary for the specified target.
prepublish = "build --target wasm32-wasi"
prepublish = "build --target wasm32-wasip1"
52 changes: 39 additions & 13 deletions .github/workflows/cargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,51 @@ on:
push:
branches: [canary]
paths:
- 'src/**'
- 'tests/**'
- '.cargo/**'
- 'Cargo.*'
- '.github/workflows/**'
- "src/**"
- "tests/**"
- ".cargo/**"
- "Cargo.*"
- "package.json"
- "bun.lock"
- "tools/**"
- "tsconfig.json"
- ".github/workflows/**"
pull_request:
paths:
- 'src/**'
- 'tests/**'
- '.cargo/**'
- 'Cargo.*'
- '.github/workflows/**'
- "src/**"
- "tests/**"
- ".cargo/**"
- "Cargo.*"
- "package.json"
- "bun.lock"
- "tools/**"
- "tsconfig.json"
- ".github/workflows/**"

env:
RUST_LOG: debug
CARGO_INCREMENTAL: 0
CI: "1"

jobs:
compiler:
name: Next.js 16.4.2 compiler
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.4.4
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Install WASM target
run: rustup target add wasm32-wasip1
- name: Build WASM and test the Next.js compiler and runtime
run: bun run test:compiler

test:
strategy:
fail-fast: false
Expand All @@ -45,7 +71,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 16
node-version: 22

- name: Install Rust
uses: actions-rs/toolchain@v1
Expand All @@ -59,7 +85,7 @@ jobs:
run: |
echo 'C:\\npm\\prefix' >> $GITHUB_PATH
- name: Cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
~/.cargo/
Expand All @@ -68,4 +94,4 @@ jobs:
cargo-dev-${{ runner.os }}
- name: Run cargo test
run: |
cargo test --all --color always
cargo test --locked --all --color always
70 changes: 21 additions & 49 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,32 @@ name: Publish
on:
push:
tags:
- 'v*'
- "v*"

env:
RUST_LOG: debug
CARGO_INCREMENTAL: 0
permissions:
contents: read

jobs:
build:
name: Build
publish:
# Releases are published locally with npm publish.
if: ${{ false }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
submodules: true

- name: Setup node
uses: actions/setup-node@v2
node-version: 22
registry-url: https://registry.npmjs.org
- uses: oven-sh/setup-bun@v2
with:
node-version: 18
cache: yarn

- name: Install packages
shell: bash
run: yarn

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
override: true

- name: Install wasm target
shell: bash
run: |
rustup target add wasm32-wasi

- name: Build plugin
shell: bash
run: cargo prepublish --release
env:
MACOSX_DEPLOYMENT_TARGET: "10.13"

- name: List files
shell: bash
run: |
ls -al target/wasm32-wasi/release
- name: Configure npm
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish npm packages
run: |
npm publish --access public
bun-version: 1.4.4
- name: Check release tag
run: node -e 'if (process.env.GITHUB_REF_NAME !== "v" + require("./package.json").version) process.exit(1)'
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Install WASM target
run: rustup target add wasm32-wasip1
- name: Test, build, and publish
run: npm publish --access public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ target
/dist
/tools.*
*.wasm
.DS_Store
.DS_Store
.vscode
4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Changelog

## 0.8.6 - 2026-10-23

- Rebuild the WASM plugin against SWC 79 for Next.js 16.4.2 compatibility.
- Update Rust fixture dependencies and pin the Next.js compiler regression host
to 16.4.2. Narrow the Next.js peer range to `~16.4.2`.
- Add compiler and runtime regression tests for Pages Router serialization,
excluded props, initial props, redirects, and App Router `data-superjson`.
- Fix the client helper's relative ESM import so packaged JavaScript can be
imported directly in Node.js.
- Rebuild and test the WASM before local npm publication. Disable the GitHub
publishing job in favor of local releases.
Loading