Skip to content

Request: Update better-sqlite3 to support Node.js 24 #229

@IanMayo

Description

@IanMayo

Problem

Soul-cli currently depends on better-sqlite3: ^8.1.0, which does not support Node.js 24. This prevents applications using soul-cli from upgrading to Node.js 24, which is now the current release.

Current situation:

  • soul-cli versions 0.7.8 and 0.8.2 both require better-sqlite3: ^8.1.0
  • better-sqlite3 v8.x supports Node.js 14.x through 20.x
  • Node.js 24 requires better-sqlite3 v12.0.0 or later

Error when trying to run on Node.js 24:
Applications crash or fail to start because better-sqlite3 v8.x native modules cannot load on Node.js 24.

Solution

Update the dependency in soul-cli's package.json:

{
  "dependencies": {
    "better-sqlite3": "^12.4.1"
  }
}

better-sqlite3 Version Compatibility

  • v8.x: Supports Node.js 14.x - 20.x
  • v12.0.0: Added Node.js 24 support (but had missing prebuild binaries)
  • v12.1.0+: Full Node.js 24 support with complete prebuild binaries
  • v12.4.1 (current): Supports Node.js 20.x, 22.x, 23.x, and 24.x

Breaking Changes Assessment

The better-sqlite3 API is stable between v8.x and v12.x. The main breaking change in v12.0.0 was:

  • Dropped Node.js 18 support
  • Added Node.js 24 support

No API changes that should affect soul-cli's usage. The upgrade should be straightforward.

Benefits

  1. Node.js 24 support: Enables applications to use the latest Node.js version
  2. Future-proofing: Node.js 20 reaches EOL in April 2026
  3. Performance: Access to Node.js 24 performance improvements
  4. Security: Latest Node.js security updates
  5. Ecosystem alignment: Keeps soul-cli compatible with modern Node.js versions

Testing Checklist

Before merging, the following should be tested:

  • Database connection and initialization
  • CRUD operations (CREATE, READ, UPDATE, DELETE)
  • Transaction support
  • Custom SQL queries
  • Authentication/authorization functionality
  • WebSocket/realtime features
  • All existing soul-cli features continue to work
  • Test on Node.js 20, 22, and 24

Workaround for Users

Until this is merged, users can work around this by using yarn resolutions:

{
  "resolutions": {
    "better-sqlite3": "^12.4.1"
  }
}

However, this is not officially supported and requires extensive testing.

Additional Context

  • Node.js 24 was released in October 2024
  • better-sqlite3 v12.1.0 with full Node.js 24 support was released in November 2024
  • This affects all soul-cli users wanting to adopt Node.js 24

Proposed PR

I'm willing to submit a pull request for this change if you're open to it. The change should be minimal - just updating the dependency version and running tests to confirm compatibility.


References:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions