git.iko.soy/rowtype-yoga/purescript-yoga-actions
on main help sign in
2 files changed+21−22
since splitsnapshots
unifiedsplit
.github/actions/setup/action.yml+14−16 README.md+7−6
.github/actions/setup/action.yml+14−16
@@ -1,5 +1,5 @@
11name: 'Setup PureScript Yoga Stack'
2−description: 'Complete setup for PureScript Yoga packages with Node 22, PureScript, Spago, and Bun'
2+description: 'Complete setup for PureScript Yoga packages with Bun, PureScript, and Spago'
33branding:
44 icon: 'package'
55 color: 'purple'
@@ -10,15 +10,11 @@ inputs:
1010 required: false
1111 default: '0.15.15'
1212 spago-version:
13− description: 'Spago version (semver, "latest", or "unstable")'
13+ description: 'Spago version (semver or "latest")'
1414 required: false
15− default: 'unstable'
16− node-version:
17− description: 'Node.js version (required for Spago 1.x)'
18− required: false
19− default: '22'
15+ default: 'latest'
2016 bun-version:
21− description: 'Bun version for fast npm installs'
17+ description: 'Bun version'
2218 required: false
2319 default: 'latest'
2420 install-deps:
@@ -29,22 +25,24 @@ inputs:
2925runs:
3026 using: 'composite'
3127 steps:
32− - name: Setup Node.js
28+ - name: Setup Node.js 22 (required for Spago's node:sqlite)
3329 uses: actions/setup-node@v4
3430 with:
35− node-version: ${{ inputs.node-version }}
36−
37− - name: Setup PureScript
38− uses: purescript-contrib/setup-purescript@main
39− with:
40− purescript: ${{ inputs.purescript-version }}
41− spago: ${{ inputs.spago-version }}
31+ node-version: '22'
4232
4333 - name: Setup Bun
4434 uses: oven-sh/setup-bun@v1
4535 with:
4636 bun-version: ${{ inputs.bun-version }}
4737
38+ - name: Install PureScript compiler
39+ shell: bash
40+ run: bun install --global purescript@${{ inputs.purescript-version }}
41+
42+ - name: Install Spago
43+ shell: bash
44+ run: bun install --global spago@${{ inputs.spago-version }}
45+
4846 - name: Install dependencies
4947 if: inputs.install-deps == 'true'
5048 shell: bash
README.md+7−6
@@ -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−- Node.js 22+ (required for Spago 1.x)
10+- Node.js 22+ (required for Spago's `node:sqlite` dependency)
11+- Bun (for fast package installation)
1112- PureScript compiler
1213- Spago package manager
13−- Bun (for fast npm package management)
1414
1515#### Usage
1616
@@ -35,8 +35,7 @@ Sets up everything needed to build and test PureScript Yoga packages:
3535| Input | Description | Default |
3636|-------|-------------|---------|
3737| `purescript-version` | PureScript compiler version | `0.15.15` |
38−| `spago-version` | Spago version (`latest`, `unstable`, or semver) | `unstable` |
39−| `node-version` | Node.js version (required for Spago 1.x) | `22` |
38+| `spago-version` | Spago version (`latest` or semver) | `latest` |
4039| `bun-version` | Bun version | `latest` |
4140| `install-deps` | Auto-run `bun install` | `true` |
4241
@@ -103,9 +102,11 @@ jobs:
103102 - run: spago test
104103```
105104
106−## Why Node.js 22?
105+## Why Node 22 + Bun?
107106
108−Spago 1.x requires Node.js 22+ because it uses the `node:sqlite` built-in module. Even though we use Bun for package management, Spago itself runs on the Node.js runtime.
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.
108+
109+**Bun** is used for incredibly fast npm package installation (`bun install` is much faster than `npm install`).
109110
110111## License
111112