Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
6 changes: 6 additions & 0 deletions .changeset/node-engines-22-13.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@open-slide/core": major
"@open-slide/cli": major
---

Require Node.js >=22.13.0 for published packages.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ body:
attributes:
label: Environment
description: Node version, package manager, OS, browser (if it's a runtime/UI bug).
placeholder: "Node 20.11.1, pnpm 10.17.0, macOS 14.5, Chrome 126"
placeholder: "Node 24.18.0, pnpm 11.13.1, macOS 14.5, Chrome 126"
validations:
required: true
- type: textarea
Expand Down
160 changes: 143 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches: [main]
pull_request:
branches: [main]

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
Expand All @@ -13,18 +12,44 @@ concurrency:
jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [22.13.x, 24]
Comment thread
coderabbitai[bot] marked this conversation as resolved.
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
persist-credentials: false

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
node-version: ${{ matrix.node-version }}

- name: Enable Corepack
run: |
npm install -g corepack@latest
corepack enable
corepack prepare --activate

- name: Get pnpm store directory
shell: bash
run: |
STORE_PATH="$(pnpm store path --silent)"
if [ -z "$STORE_PATH" ]; then
echo "pnpm store path was empty" >&2
exit 1
fi
echo "STORE_PATH=$STORE_PATH" >> "$GITHUB_ENV"

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand All @@ -37,18 +62,44 @@ jobs:

typecheck:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [22.13.x, 24]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
persist-credentials: false

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
node-version: ${{ matrix.node-version }}

- name: Enable Corepack
run: |
npm install -g corepack@latest
corepack enable
corepack prepare --activate

- name: Get pnpm store directory
shell: bash
run: |
STORE_PATH="$(pnpm store path --silent)"
if [ -z "$STORE_PATH" ]; then
echo "pnpm store path was empty" >&2
exit 1
fi
echo "STORE_PATH=$STORE_PATH" >> "$GITHUB_ENV"

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand All @@ -58,25 +109,98 @@ jobs:

test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [22.13.x, 24]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
persist-credentials: false

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
node-version: ${{ matrix.node-version }}

- name: Enable Corepack
run: |
npm install -g corepack@latest
corepack enable
corepack prepare --activate

- name: Get pnpm store directory
shell: bash
run: |
STORE_PATH="$(pnpm store path --silent)"
if [ -z "$STORE_PATH" ]; then
echo "pnpm store path was empty" >&2
exit 1
fi
echo "STORE_PATH=$STORE_PATH" >> "$GITHUB_ENV"

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run unit tests
run: pnpm test

build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [22.13.x, 24]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Enable Corepack
run: |
npm install -g corepack@latest
corepack enable
corepack prepare --activate

- name: Get pnpm store directory
shell: bash
run: |
STORE_PATH="$(pnpm store path --silent)"
if [ -z "$STORE_PATH" ]; then
echo "pnpm store path was empty" >&2
exit 1
fi
echo "STORE_PATH=$STORE_PATH" >> "$GITHUB_ENV"

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run build
run: pnpm build

e2e:
runs-on: ubuntu-latest
timeout-minutes: 20
Expand All @@ -87,14 +211,16 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
node-version: 24
cache: pnpm

- name: Install dependencies
Expand Down
30 changes: 25 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,35 @@ jobs:
with:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
node-version-file: ".nvmrc"
registry-url: "https://registry.npmjs.org"
cache: pnpm

- name: Enable Corepack
run: |
npm install -g corepack@latest
corepack enable
corepack prepare --activate
Comment thread
coderabbitai[bot] marked this conversation as resolved.

- name: Get pnpm store directory
shell: bash
run: |
STORE_PATH="$(pnpm store path --silent)"
if [ -z "$STORE_PATH" ]; then
echo "pnpm store path was empty" >&2
exit 1
fi
echo "STORE_PATH=$STORE_PATH" >> "$GITHUB_ENV"

- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Upgrade npm for OIDC trusted publishing
run: npm install -g npm@11
Expand Down
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
5 changes: 3 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ pnpm + Turbo monorepo.

## Prerequisites

- **Node.js 22+** (matches CI).
- **pnpm 10.17.0+** — `corepack enable` will pick up the version pinned in `package.json`.
- **Node.js 24** for local development and release (see `.nvmrc` / `.node-version`). Published packages support **Node.js `>=22.13.0`**; CI covers both 22.13+ and 24.
- **pnpm 11.13.1** via Corepack — `corepack enable` activates the version pinned in `package.json` (`packageManager`).
- A Unix-y shell. Windows works via WSL.

## Getting set up

```bash
git clone https://github.com/1weiho/open-slide.git
cd open-slide
corepack enable
pnpm install
```

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ This repo is a pnpm + Turbo monorepo.

## Development

Requires **Node.js 24** (see `.nvmrc`) and **pnpm** via Corepack. Published packages support Node.js `>=22.13.0`.

```bash
corepack enable
pnpm install
pnpm dev # runs the demo against the local @open-slide/core
pnpm build # builds all packages
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
"name": "open-slide-monorepo",
"private": true,
"version": "0.0.0",
"packageManager": "pnpm@10.17.0",
"packageManager": "pnpm@11.13.1",
"engines": {
"node": ">=22.13.0"
},
"scripts": {
"dev": "turbo run dev",
"dev:web": "turbo run dev --filter=web",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"prepack": "pnpm build"
},
"engines": {
"node": ">=18"
"node": ">=22.13.0"
},
"keywords": [
"slides",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"prepack": "pnpm build"
},
"engines": {
"node": ">=18"
"node": ">=22.13.0"
},
"keywords": [
"slides",
Expand Down
7 changes: 7 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@ packages:
- "apps/*"
- "packages/*"
- "packages/core/e2e/fixture"
allowBuilds:
core-js: true
esbuild: true
msw: true
protobufjs: true
rolldown: true
sharp: true