diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5546ccc..d452add 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,8 +8,14 @@ on: jobs: check: runs-on: ubuntu-latest + strategy: + matrix: + node-version: [24] steps: - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} - uses: oven-sh/setup-bun@v2 with: bun-version: latest @@ -18,3 +24,13 @@ jobs: - run: bun test ./src - run: bunx prettier --check src - run: bun run build + - name: Import packed dist with Node + run: | + set -euo pipefail + tarball=$(npm pack) + tmpdir=$(mktemp -d) + trap 'rm -rf "$tmpdir" "$tarball"' EXIT + cd "$tmpdir" + npm init -y >/dev/null + npm install "$OLDPWD/$tarball" + node --input-type=module -e "import { embedTexts } from '@corbits/embedding'; if (typeof embedTexts !== 'function') process.exit(1)" diff --git a/README.md b/README.md index 4d0b089..f9d47ca 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Not published to npm yet. Until a registry publish, `npm install @corbits/embedd bun add github:corbitsdev/corbits-embedding ``` -Requires Node >= 20 or Bun >= 1.2. The default export is built `dist/`; native Node +Requires Node >= 24 or Bun >= 1.2. The default export is built `dist/`; native Node does not load this package's extensionless TypeScript source. ```ts diff --git a/package.json b/package.json index 75cc0e5..3e61cfd 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,6 @@ }, "engines": { "bun": ">=1.2.0", - "node": ">=20" + "node": ">=24" } }