Skip to content

fix(deps): upgrade vitest 2→4, resolve all npm audit findings#63

Open
flyingrobots wants to merge 10 commits intomainfrom
fixups
Open

fix(deps): upgrade vitest 2→4, resolve all npm audit findings#63
flyingrobots wants to merge 10 commits intomainfrom
fixups

Conversation

@flyingrobots
Copy link
Member

@flyingrobots flyingrobots commented Mar 4, 2026

Summary

  • Upgrade vitest 2.1.9 → 4.0.18, resolving the remaining 5 moderate-severity npm audit advisories (esbuild, vite, @vitest/mocker, vite-node, vitest)
  • Migrate deprecated test(name, fn, { timeout }) signatures to Vitest 4's test(name, { timeout }, fn) form across 7 test files
  • Fix vi.fn().mockImplementation(() => ...) constructor mocks to use function expressions per Vitest 4 requirements

Combined with v13.0.1 (which fixed the 4 high-severity findings), the repo now has 0 npm audit vulnerabilities.

Test plan

  • Full unit suite passes locally (252 files, 4619 tests)
  • ESLint clean
  • tsc --noEmit clean
  • IRONCLAD policy gates pass
  • npm audit returns 0 vulnerabilities
  • CI passes on this PR

Summary by CodeRabbit

  • New Features

    • Improved native addon loading with a robust fallback and added prebuilt support for Bun runtime.
  • Tests

    • Upgraded Vitest to v4, standardized timeouts across suites, and normalized mocks/config for compatibility.
    • Excluded the native addon from test server deps to stabilize test execution.
  • Chores

    • Bumped development dependency versions.
  • Documentation

    • Added an Unreleased changelog entry documenting the Vitest upgrade and related fixes.

Vitest 4 removed the deprecated test(name, fn, { options }) signature.
Migrate all per-test timeouts to the new test(name, { timeout }, fn)
form, or lift uniform timeouts to the describe level.

Also fix vi.fn().mockImplementation(() => ...) constructor mocks to
use function expressions per Vitest 4 requirements (SyncController,
HealthCheckService mocks).

Resolves all 5 remaining moderate-severity npm audit advisories
(esbuild, vite, @vitest/mocker, vite-node, vitest).
@coderabbitai
Copy link

coderabbitai bot commented Mar 4, 2026

Warning

Rate limit exceeded

@flyingrobots has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 13 minutes and 50 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 08e7d2ca-bcc4-4256-af96-94275d901142

📥 Commits

Reviewing files that changed from the base of the PR and between 3c525b7 and 4b425ba.

📒 Files selected for processing (5)
  • CHANGELOG.md
  • docker-compose.test.yml
  • docker/Dockerfile.bun
  • src/domain/utils/roaring.js
  • vitest.config.js
📝 Walkthrough

Walkthrough

Bumps Vitest to v4; centralizes or adjusts test timeouts (suite-level or per-test) across many unit tests; converts several mock factories from arrow to function declarations; adds Vitest externals for roaring; adds a Bun Docker multi-stage build and a fallback CommonJS require path for loading the roaring native addon; updates CHANGELOG.

Changes

Cohort / File(s) Summary
Dependency
package.json
Bump devDependency Vitest from ^2.1.8 to ^4.0.18.
Vitest config externals
vitest.config.js
Add SSR/server externals to exclude roaring from Vite/Vitest transforms (ssr.external: ['roaring'], server.deps.external: [/roaring/]).
Native addon loading fallback
src/domain/utils/roaring.js
Attempt dynamic import('roaring') inside try/catch, then fall back to CommonJS require via createRequire if import fails; preserve existing unwrapping logic.
Bun Docker multi-stage build
docker/Dockerfile.bun
Add a two-stage build that compiles roaring in Node.js stage and copies prebuilt native binaries into the Bun runtime stage to ensure native module availability.
CHANGELOG
CHANGELOG.md
Add [Unreleased] section documenting Vitest upgrade, test migration details, Bun/native build notes, and audit resolution.
Suite-level timeout moves
test/unit/domain/.../WarpGraph.cascadeDelete.test.js, .../WarpGraph.deleteGuardEnforce.test.js, .../WarpGraph.patchMany.test.js, .../WarpGraph.syncMaterialize.test.js, test/unit/domain/services/BisectService.test.js
Move timeout options from individual test blocks to top-level describe calls (suite-level timeouts); remove per-test timeout wrappers.
Per-test timeout additions
test/unit/domain/WarpGraph.noCoordination.test.js, test/unit/domain/services/IndexRebuildService.deep.test.js
Add explicit { timeout: ... } to specific it(...) tests (e.g., 20000–30000 ms) and remove prior wrapper syntax.
Mock factory refactor
test/unit/cli/doctor.test.js, test/unit/domain/services/SyncController.test.js
Change mock factory implementations from arrow-return style to function declarations returning equivalent objects (no behavioral change).
Other tests
test/unit/... (multiple files)
Apply Vitest 4-compatible signatures and timeout adjustments across multiple unit tests (migration of test timeout parameter placement and occasional mock tweaks).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hopped through configs, nudged timeouts in line,
Built a tiny stage so roaring could shine.
Mocks took on names, vitest grew a bit bolder,
CHANGELOG got inked — the burrow's a smoulder.
Nibble, bounce, commit — the rabbit's done, over and yonder.

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description includes a comprehensive Summary section covering the main changes, provides a detailed Test plan with most items checked, but is missing the ADR checks section required by the template. Add the ADR checks section from the template with all four checkbox items (even if marked as not applicable) to comply with repository standards.
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and clearly summarizes the main change: upgrading Vitest from version 2 to 4 and resolving npm audit findings, which aligns with the substantial changes across test files, configuration, and dependencies.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fixups

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Mar 4, 2026

Release Preflight

  • package version: 13.0.1
  • prerelease: false
  • npm dist-tag on release: latest
  • npm pack dry-run: passed
  • jsr publish dry-run: passed

If you tag this commit as v13.0.1, release workflow will publish.

1 similar comment
@github-actions
Copy link

github-actions bot commented Mar 4, 2026

Release Preflight

  • package version: 13.0.1
  • prerelease: false
  • npm dist-tag on release: latest
  • npm pack dry-run: passed
  • jsr publish dry-run: passed

If you tag this commit as v13.0.1, release workflow will publish.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@package.json`:
- Line 125: package.json's dev dependency upgrade to "vitest": "^4.0.18"
requires locking its toolchain dependency vite-node in the lockfile; add or
update the package-lock entry for vite-node to a compatible version (matching
the vitest/vite toolchain, e.g., the version used by vitest 4.x) and run npm
install/npm audit-fix to regenerate package-lock.json so vite-node appears with
a resolved version; ensure the dependency is present and resolved alongside
vitest, vite, `@vitest/mocker`, and esbuild to complete the upgrade.

ℹ️ Review info
Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fee3feeb-2ff9-4fce-a73d-bd9e7498dc94

📥 Commits

Reviewing files that changed from the base of the PR and between f33569a and 7fa2b32.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (10)
  • package.json
  • test/unit/cli/doctor.test.js
  • test/unit/domain/WarpGraph.cascadeDelete.test.js
  • test/unit/domain/WarpGraph.deleteGuardEnforce.test.js
  • test/unit/domain/WarpGraph.noCoordination.test.js
  • test/unit/domain/WarpGraph.patchMany.test.js
  • test/unit/domain/WarpGraph.syncMaterialize.test.js
  • test/unit/domain/services/BisectService.test.js
  • test/unit/domain/services/IndexRebuildService.deep.test.js
  • test/unit/domain/services/SyncController.test.js

"typescript": "^5.9.3",
"typescript-eslint": "^8.54.0",
"vitest": "^2.1.8"
"vitest": "^4.0.18"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

fd '^package-lock\.json$' -a

python - <<'PY'
import json, os

lock_path = "package-lock.json"
if not os.path.exists(lock_path):
    print("RESULT: package-lock.json not found in this PR branch")
    raise SystemExit(0)

with open(lock_path, "r", encoding="utf-8") as f:
    lock = json.load(f)

pkgs = lock.get("packages", {})
root = pkgs.get("", {})
print("root.devDependencies.vitest =", root.get("devDependencies", {}).get("vitest"))

for dep in ["vitest", "vite", "vite-node", "@vitest/mocker", "esbuild"]:
    key = f"node_modules/{dep}"
    print(f"{dep} locked version =", pkgs.get(key, {}).get("version"))
PY

Repository: git-stunts/git-warp

Length of output: 299


Lockfile is missing resolved version for vite-node.

The package-lock.json has been updated with most Vitest toolchain dependencies (vitest → 4.0.18, vite → 7.3.1, @vitest/mocker → 4.0.18, esbuild → 0.27.3), but vite-node is not present in the resolved lockfile. Ensure vite-node is also locked to a compatible version to complete the Vitest upgrade.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` at line 125, package.json's dev dependency upgrade to "vitest":
"^4.0.18" requires locking its toolchain dependency vite-node in the lockfile;
add or update the package-lock entry for vite-node to a compatible version
(matching the vitest/vite toolchain, e.g., the version used by vitest 4.x) and
run npm install/npm audit-fix to regenerate package-lock.json so vite-node
appears with a resolved version; ensure the dependency is present and resolved
alongside vitest, vite, `@vitest/mocker`, and esbuild to complete the upgrade.

Vite 7 (pulled in by vitest 4) attempts to transform all imports
through its pipeline, which breaks native C++ addons like roaring.
Add server.deps.external to skip transformation of the roaring
package, restoring Bun integration test compatibility.
@github-actions
Copy link

github-actions bot commented Mar 4, 2026

Release Preflight

  • package version: 13.0.1
  • prerelease: false
  • npm dist-tag on release: latest
  • npm pack dry-run: passed
  • jsr publish dry-run: passed

If you tag this commit as v13.0.1, release workflow will publish.

The external config was placed at the top-level server key instead of
under test.server.deps.external where Vitest 4 reads it.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@vitest.config.js`:
- Around line 4-9: The deps.external setting for the native addon 'roaring' is
placed under server.deps (Vite dev server) but needs to be applied to Vitest;
move the external: ['roaring'] entry from server.deps to test.server.deps so
Vitest's runner sees it (i.e., remove it from server.deps and add it under the
test object as test.server.deps.external). Ensure you keep the same array value
and configuration structure so Vitest will not transform the native C++ addon.

ℹ️ Review info
Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c2e48fc4-707a-46b5-a504-a04ff235e746

📥 Commits

Reviewing files that changed from the base of the PR and between 63dd929 and cbd1b01.

📒 Files selected for processing (1)
  • vitest.config.js

@github-actions
Copy link

github-actions bot commented Mar 4, 2026

Release Preflight

  • package version: 13.0.1
  • prerelease: false
  • npm dist-tag on release: latest
  • npm pack dry-run: passed
  • jsr publish dry-run: passed

If you tag this commit as v13.0.1, release workflow will publish.

Vitest 4 (Vite 7) intercepts dynamic import('roaring') through its
SSR transform pipeline, preventing the native .node binary from
loading under Bun. Add both ssr.external and test.server.deps.external
(regex pattern) to ensure the roaring package bypasses Vite's
transform and resolution phases entirely.
@github-actions
Copy link

github-actions bot commented Mar 4, 2026

Release Preflight

  • package version: 13.0.1
  • prerelease: false
  • npm dist-tag on release: latest
  • npm pack dry-run: passed
  • jsr publish dry-run: passed

If you tag this commit as v13.0.1, release workflow will publish.

… Bun/Vite

Vite 7's module runner intercepts dynamic import() calls and fails to
transform native C++ addons (.node binaries). initRoaring() now catches
the import failure and falls back to createRequire() which loads native
modules directly, bypassing the module runner.
@github-actions
Copy link

github-actions bot commented Mar 4, 2026

Release Preflight

  • package version: 13.0.1
  • prerelease: false
  • npm dist-tag on release: latest
  • npm pack dry-run: passed
  • jsr publish dry-run: passed

If you tag this commit as v13.0.1, release workflow will publish.

bun install blocks lifecycle scripts by default, so roaring's node-pre-gyp
install never runs, leaving the .node binary missing. Bun also reports a
fictional Node ABI (v137) that has no prebuilt binaries available.

Fix: install nodejs, python3, and ca-certificates in the Bun Dockerfile,
then run node-pre-gyp under real Node.js after bun install. This downloads
the correct prebuilt binary (or compiles from source as fallback). Bun
loads the binary via roaring's MODULE_NOT_FOUND fallback path
(build/Release/roaring.node).

The root cause was Docker layer cache invalidation from the Vitest 4
upgrade — previous CI runs reused a cached layer that happened to have
the binary from an earlier build.
@github-actions
Copy link

github-actions bot commented Mar 4, 2026

Release Preflight

  • package version: 13.0.1
  • prerelease: false
  • npm dist-tag on release: latest
  • npm pack dry-run: passed
  • jsr publish dry-run: passed

If you tag this commit as v13.0.1, release workflow will publish.

The single-stage approach installed nodejs in the Bun container, which
caused Vitest 4 to use node instead of bun for running tests, breaking
globalThis.crypto (and all 64 integration tests).

Switch to a multi-stage build:
- Stage 1 (node:18-slim): npm install + node-pre-gyp to download or
  compile the roaring native binary with the correct Node ABI
- Stage 2 (oven/bun:1.2-slim): bun install + COPY the compiled binary
  from stage 1, keeping the runtime image Node-free
@github-actions
Copy link

github-actions bot commented Mar 4, 2026

Release Preflight

  • package version: 13.0.1
  • prerelease: false
  • npm dist-tag on release: latest
  • npm pack dry-run: passed
  • jsr publish dry-run: passed

If you tag this commit as v13.0.1, release workflow will publish.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
src/domain/utils/roaring.js (1)

117-124: Preserve both load failures for actionable diagnostics.

At Line 117, the original import('roaring') error is dropped. If Line 123 also fails, you lose the first root cause and debugging gets harder.

Proposed fix
-    } catch {
+    } catch (importErr) {
       // Dynamic import() can fail when a module runner (e.g. Vite 7)
       // intercepts the call and cannot transform native C++ addons.
       // Fall back to CJS require() which loads .node binaries directly.
-      const { createRequire } = await import('node:module');
-      const req = createRequire(import.meta.url);
-      roaringModule = /** `@type` {RoaringModule} */ (req('roaring'));
+      try {
+        const { createRequire } = await import('node:module');
+        const req = createRequire(import.meta.url);
+        roaringModule = /** `@type` {RoaringModule} */ (req('roaring'));
+      } catch (requireErr) {
+        throw new AggregateError(
+          [importErr, requireErr],
+          'Failed to load roaring via both import() and require()'
+        );
+      }
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/domain/utils/roaring.js` around lines 117 - 124, The dynamic import
fallback currently swallows the original import('roaring') failure; change the
catch to capture the first error (e.g., errImport) then attempt the CJS require
fallback (using createRequire/import.meta.url and req('roaring')), and if the
require also fails, throw or log a new Error that includes both the original
import error and the require error (or attach them as properties) so both
failure causes are preserved; target the try/catch around the import('roaring')
and the fallback require where roaringModule is assigned.
docker/Dockerfile.bun (1)

15-15: Use lockfile-strict install in the builder stage.

At Line 15, switching to npm ci --ignore-scripts will make roaring native build inputs deterministic across CI runs.

Proposed fix
-RUN npm install --ignore-scripts
+RUN npm ci --ignore-scripts
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docker/Dockerfile.bun` at line 15, Replace the non-deterministic install in
the builder stage: find the Dockerfile instruction "RUN npm install
--ignore-scripts" and change it to use the lockfile-strict command "npm ci
--ignore-scripts" so native build inputs are deterministic across CI runs;
ensure the builder stage still has package-lock.json present in the image
context so npm ci can run successfully.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CHANGELOG.md`:
- Line 12: Update the release note sentence that currently states the Bun
Dockerfile installs `nodejs`, `python3`, and `ca-certificates` so it accurately
describes the multi-stage Docker build and the use of a separate Node builder
image; e.g., change the wording around the sentence mentioning those packages to
note that native binary build/dependencies are provided in a Node builder stage
(or separate builder image) which supplies `node`, `python3`, and certs for
node-pre-gyp rather than being installed in the final Bun runtime image.

---

Nitpick comments:
In `@docker/Dockerfile.bun`:
- Line 15: Replace the non-deterministic install in the builder stage: find the
Dockerfile instruction "RUN npm install --ignore-scripts" and change it to use
the lockfile-strict command "npm ci --ignore-scripts" so native build inputs are
deterministic across CI runs; ensure the builder stage still has
package-lock.json present in the image context so npm ci can run successfully.

In `@src/domain/utils/roaring.js`:
- Around line 117-124: The dynamic import fallback currently swallows the
original import('roaring') failure; change the catch to capture the first error
(e.g., errImport) then attempt the CJS require fallback (using
createRequire/import.meta.url and req('roaring')), and if the require also
fails, throw or log a new Error that includes both the original import error and
the require error (or attach them as properties) so both failure causes are
preserved; target the try/catch around the import('roaring') and the fallback
require where roaringModule is assigned.

ℹ️ Review info
Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 40bb41c0-4645-4199-8a78-91011f98aa7b

📥 Commits

Reviewing files that changed from the base of the PR and between cbd1b01 and 3c525b7.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • docker/Dockerfile.bun
  • src/domain/utils/roaring.js
  • vitest.config.js

CHANGELOG.md Outdated

### Fixed

- **Roaring native module loading under Bun** — `initRoaring()` now catches dynamic `import('roaring')` failures and falls back to `createRequire()` for direct `.node` binary loading. Bun Dockerfile updated to install `nodejs`, `python3`, and `ca-certificates` so that `node-pre-gyp` can download or compile the roaring native binary (Bun reports a fictional Node ABI v137 with no prebuilt available). Fixes `test-bun` CI failures caused by missing native binary after Vitest 4 upgrade invalidated Docker layer cache.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Update release note wording to match the current Docker implementation.

Line 12 says the Bun Dockerfile installs nodejs, python3, and ca-certificates, but the current approach is a multi-stage build with a separate Node builder image. The note should reflect that to avoid operator confusion.

Proposed fix
-- **Roaring native module loading under Bun** — `initRoaring()` now catches dynamic `import('roaring')` failures and falls back to `createRequire()` for direct `.node` binary loading. Bun Dockerfile updated to install `nodejs`, `python3`, and `ca-certificates` so that `node-pre-gyp` can download or compile the roaring native binary (Bun reports a fictional Node ABI v137 with no prebuilt available). Fixes `test-bun` CI failures caused by missing native binary after Vitest 4 upgrade invalidated Docker layer cache.
+- **Roaring native module loading under Bun** — `initRoaring()` now catches dynamic `import('roaring')` failures and falls back to `createRequire()` for direct `.node` binary loading. Bun Dockerfile now uses a Node.js builder stage to run `node-pre-gyp` and then copies roaring native artifacts into the Bun runtime image (Bun reports a fictional Node ABI v137 with no prebuilt available). Fixes `test-bun` CI failures caused by missing native binary after Vitest 4 upgrade invalidated Docker layer cache.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- **Roaring native module loading under Bun**`initRoaring()` now catches dynamic `import('roaring')` failures and falls back to `createRequire()` for direct `.node` binary loading. Bun Dockerfile updated to install `nodejs`, `python3`, and `ca-certificates` so that `node-pre-gyp` can download or compile the roaring native binary (Bun reports a fictional Node ABI v137 with no prebuilt available). Fixes `test-bun` CI failures caused by missing native binary after Vitest 4 upgrade invalidated Docker layer cache.
- **Roaring native module loading under Bun**`initRoaring()` now catches dynamic `import('roaring')` failures and falls back to `createRequire()` for direct `.node` binary loading. Bun Dockerfile now uses a Node.js builder stage to run `node-pre-gyp` and then copies roaring native artifacts into the Bun runtime image (Bun reports a fictional Node ABI v137 with no prebuilt available). Fixes `test-bun` CI failures caused by missing native binary after Vitest 4 upgrade invalidated Docker layer cache.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CHANGELOG.md` at line 12, Update the release note sentence that currently
states the Bun Dockerfile installs `nodejs`, `python3`, and `ca-certificates` so
it accurately describes the multi-stage Docker build and the use of a separate
Node builder image; e.g., change the wording around the sentence mentioning
those packages to note that native binary build/dependencies are provided in a
Node builder stage (or separate builder image) which supplies `node`, `python3`,
and certs for node-pre-gyp rather than being installed in the final Bun runtime
image.

…ity)

The roaring npm package uses V8 C++ API (#include <node.h>), not
Node-API/NAPI. Bun uses JavaScriptCore, not V8, so the native .node
binary can never load — 'napi_register_module_v1' symbol not found.

Bitmap index tests (materializedView, checkpointIndex.notStale) are
excluded from the Bun test suite. This is not a regression — these
tests only passed historically due to Docker layer cache luck. The
bitmap index system already handles this gracefully via _buildView()'s
catch block, degrading to linear scan when roaring is unavailable.

Reverts the multi-stage Docker build (unnecessary since the binary
can't work regardless of how it's compiled). Simplifies Dockerfile
back to git + bun install.
@github-actions
Copy link

github-actions bot commented Mar 4, 2026

Release Preflight

  • package version: 13.0.1
  • prerelease: false
  • npm dist-tag on release: latest
  • npm pack dry-run: passed
  • jsr publish dry-run: passed

If you tag this commit as v13.0.1, release workflow will publish.

When both import('roaring') and createRequire('roaring') fail, throw
an AggregateError containing both root causes instead of silently
dropping the original import error. Also update vitest.config.js
comment to be accurate (roaring uses V8 C++ API, not NAPI).
@github-actions
Copy link

github-actions bot commented Mar 4, 2026

Release Preflight

  • package version: 13.0.1
  • prerelease: false
  • npm dist-tag on release: latest
  • npm pack dry-run: passed
  • jsr publish dry-run: passed

If you tag this commit as v13.0.1, release workflow will publish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant