Skip to content

Commit 46e9247

Browse files
Set Node 24 floor for corbits-embedding (#3)
engines.node and README require Node >= 24. CI still typechecks and tests with bun, then npm-packs dist and imports it under node so the packed ESM actually loads (not only setup-node).
1 parent 2e2752f commit 46e9247

3 files changed

Lines changed: 18 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,14 @@ on:
88
jobs:
99
check:
1010
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
node-version: [24]
1114
steps:
1215
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: ${{ matrix.node-version }}
1319
- uses: oven-sh/setup-bun@v2
1420
with:
1521
bun-version: latest
@@ -18,3 +24,13 @@ jobs:
1824
- run: bun test ./src
1925
- run: bunx prettier --check src
2026
- run: bun run build
27+
- name: Import packed dist with Node
28+
run: |
29+
set -euo pipefail
30+
tarball=$(npm pack)
31+
tmpdir=$(mktemp -d)
32+
trap 'rm -rf "$tmpdir" "$tarball"' EXIT
33+
cd "$tmpdir"
34+
npm init -y >/dev/null
35+
npm install "$OLDPWD/$tarball"
36+
node --input-type=module -e "import { embedTexts } from '@corbits/embedding'; if (typeof embedTexts !== 'function') process.exit(1)"

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Not published to npm yet. Until a registry publish, `npm install @corbits/embedd
3131
bun add github:corbitsdev/corbits-embedding
3232
```
3333

34-
Requires Node >= 20 or Bun >= 1.2. The default export is built `dist/`; native Node
34+
Requires Node >= 24 or Bun >= 1.2. The default export is built `dist/`; native Node
3535
does not load this package's extensionless TypeScript source.
3636

3737
```ts

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@
4949
},
5050
"engines": {
5151
"bun": ">=1.2.0",
52-
"node": ">=20"
52+
"node": ">=24"
5353
}
5454
}

0 commit comments

Comments
 (0)