Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,9 @@ jobs:
with:
node-version: ${{ matrix.node }}
- run: npm install --prefer-offline --no-audit --no-fund
# The build tool (tsdown) requires Node >= 22.18. The published library and
# its tests still run on Node 20: that leg tests the committed dist rather
# than rebuilding. Node 22/24 rebuild from source before testing.
- run: npm run build
if: matrix.node != '20'
- run: npm run test
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
22
10 changes: 6 additions & 4 deletions DEVELOPERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

## <a name="setup"></a> Setup

Building and releasing require **Node >= 22.18** (the bundler, [tsdown](https://tsdown.dev), needs it); `nvm use` picks up the pinned `.nvmrc`. The published library runs on far older Node, and the CI test matrix still includes Node 20.

```shell
npm install
```
Expand All @@ -19,8 +21,7 @@ npm install
| `npm test` | Run the test suite (vitest) |
| `npm run typecheck` | Type-check the source without emitting |
| `npm run lint` | Lint source and tests (eslint) |
| `npm run dev` | Watch mode for ESM dev build |
| `npm run dev:cjs` | Watch mode for CJS dev build |
| `npm run dev` | Watch mode (rebuilds all dist targets via tsdown) |
| `npm run bench` | Build, then run the core search + index regression benchmarks |
| `npm run bench:search` | Search benchmark (object/string fuzzy, scaling, remove) |
| `npm run bench:index` | Index creation benchmark across dataset sizes |
Expand All @@ -30,7 +31,7 @@ npm install

## <a name="structure"></a> Project Structure

Source is TypeScript. Types are emitted from source via `rollup-plugin-dts`.
Source is TypeScript. The build, including `.d.ts` emit, runs through [tsdown](https://tsdown.dev) (rolldown engine); see `tsdown.config.ts`.

```
src/
Expand All @@ -42,7 +43,8 @@ src/
entry.ts — Entry point with static methods and type exports
test/ — Tests and fixtures
bench/ — Benchmarks (search, index creation, extended, tokens, workers)
scripts/ — Rollup build configs
tsdown.config.ts — Build config (all dist targets + types)
scripts/ — Release + docs helpers (bump-docs, deploy-docs, release)
dist/ — Built output (CJS, ESM, .d.ts)
```

Expand Down
Loading
Loading