git.iko.soy/rowtype-yoga/purescript-yoga-actions
on main help sign in
Revert "Drop Node.js entirely! Use 'bunx spago' to run with Bun runtime"

This reverts commit 2f5528bbff4a4906e9e75d117e64d84b1f7fe27d.

commit4784fd1fb7cb9f510a3be7248972044a9b85910a authorMark <mark.eibes@gmail.com> dateWed 4 Feb 2026, 20:38 (8 months ago) parent2f5528b
2 files changed+25−14
unifiedsplit
.github/actions/setup/action.yml+9 README.md+16−14
.github/actions/setup/action.yml+9
@@ -25,6 +25,11 @@ inputs:
2525runs:
2626 using: 'composite'
2727 steps:
28+ - name: Setup Node.js 22 (required for Spago's node:sqlite)
29+ uses: actions/setup-node@v4
30+ with:
31+ node-version: '22'
32+
2833 - name: Setup Bun
2934 uses: oven-sh/setup-bun@v1
3035 with:
@@ -34,6 +39,10 @@ runs:
3439 shell: bash
3540 run: bun install --global purescript@${{ inputs.purescript-version }}
3641
42+ - name: Install Spago
43+ shell: bash
44+ run: bun install --global spago@${{ inputs.spago-version }}
45+
3746 - name: Install dependencies
3847 if: inputs.install-deps == 'true'
3948 shell: bash
README.md+16−14
@@ -7,10 +7,10 @@ Reusable GitHub Actions for PureScript Yoga packages.
77### `setup` - Complete PureScript Yoga Stack Setup
88
99Sets up everything needed to build and test PureScript Yoga packages:
10−- Bun (JavaScript runtime + fast package manager)
10+- Node.js 22+ (required for Spago's `node:sqlite` dependency)
11+- Bun (for fast package installation)
1112- PureScript compiler
12−
13−**Note**: Use `bunx spago` instead of `spago` in your workflows to run Spago with Bun's runtime.
13+- Spago package manager
1414
1515#### Usage
1616
@@ -21,9 +21,11 @@ Sets up everything needed to build and test PureScript Yoga packages:
2121#### With Custom Versions
2222
2323```yaml
24−- uses: rowtype-yoga/purescript-yoga-actions/.github/actions/setup@main
24+- uses: rowtype-yoga/purescript-yoga-actions/setup@main
2525 with:
2626 purescript-version: '0.15.15'
27+ spago-version: 'unstable'
28+ node-version: '22'
2729 bun-version: 'latest'
2830 install-deps: 'true'
2931```
@@ -33,6 +35,7 @@ Sets up everything needed to build and test PureScript Yoga packages:
3335| Input | Description | Default |
3436|-------|-------------|---------|
3537| `purescript-version` | PureScript compiler version | `0.15.15` |
38+| `spago-version` | Spago version (`latest` or semver) | `latest` |
3639| `bun-version` | Bun version | `latest` |
3740| `install-deps` | Auto-run `bun install` | `true` |
3841
@@ -66,9 +69,9 @@ jobs:
6669 runs-on: ubuntu-latest
6770 steps:
6871 - uses: actions/checkout@v4
69− - uses: rowtype-yoga/purescript-yoga-actions/.github/actions/setup@main
70− - run: bunx spago build
71− - run: bunx spago test
72+ - uses: rowtype-yoga/purescript-yoga-actions/setup@main
73+ - run: spago build
74+ - run: spago test
7275```
7376
7477### With Redis Service
@@ -95,16 +98,15 @@ jobs:
9598
9699 steps:
97100 - uses: actions/checkout@v4
98− - uses: rowtype-yoga/purescript-yoga-actions/.github/actions/setup@main
99− - run: bunx spago test
101+ - uses: rowtype-yoga/purescript-yoga-actions/setup@main
102+ - run: spago test
100103```
101104
102−## Why Bun?
105+## Why Node 22 + Bun?
106+
107+**Node.js 22** is required because Spago 1.x uses the `node:sqlite` built-in module (only available in Node 22+). When you run `spago`, it executes with the system Node.js.
103108
104−**Bun** is a fast all-in-one JavaScript runtime that:
105−- Can run Spago 1.x (including its `node:sqlite` dependency) via `bunx`
106−- Provides incredibly fast package installation
107−- No separate Node.js installation needed!
109+**Bun** is used for incredibly fast npm package installation (`bun install` is much faster than `npm install`).
108110
109111## License
110112