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
13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ jobs:
- name: JSDoc completeness (hard fail)
run: pnpm run lint:jsdoc

# Type declarations: tsd assertions plus a strict/node16 consumer
# compile, then a regeneration diff proving the committed .d.ts files
# match the JSDoc and the hand-written declarations. No native build
# is involved — gen-types only typechecks lib/*.js.
# Type declarations: type-identity assertions plus a strict/node16
# consumer compile, then a regeneration diff proving the committed .d.ts
# files match the JSDoc and the hand-written declarations. No native
# build is involved — gen-types only typechecks lib/*.js.
types:
runs-on: ubuntu-22.04
timeout-minutes: 10
Expand All @@ -53,7 +53,7 @@ jobs:
scope: '@appthreat'
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Type tests (tsd + strict/node16 consumer)
- name: Type tests (type-identity + strict/node16 consumer)
run: pnpm run test:types
- name: Regenerated declarations must match the committed ones
run: |
Expand Down Expand Up @@ -315,7 +315,8 @@ jobs:

# The packaged-ASAR cases: slow (packages Electron twice from a real
# packed-tarball install), so ubuntu-only and not on every push —
# post-merge on release/v9 and on demand.
# post-merge on release/v9 and on demand. PRs touching test/electron/**
# get the same suite from electron-asar.yml instead.
electron-asar:
needs: build
# Tags included: publish depends on this job, so it has to actually
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/electron-asar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: electron-asar
# PR-side coverage for the packaged-ASAR tests. In ci.yml these cases
# are slow (packages Electron twice from a real packed-tarball install),
# so they only run post-merge on release/ branches, on tags and on
# demand — which meant a break in the test's own code (for example a
# wrong tarball-name derivation) surfaced at the release gate instead of
# on the PR that introduced it. This workflow runs the same suite on the
# PRs that can break it: the test's own sources, and package.json — the
# tarball name is derived from the package identity. It builds the
# prebuild locally instead of downloading the build job's artifact,
# because the build matrix does not run on these path-filtered events.
on:
workflow_dispatch:
pull_request:
paths:
- 'test/electron/**'
- 'package.json'
- '.github/workflows/electron-asar.yml'
env:
FORCE_COLOR: 1
concurrency:
group: electron-asar-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
asar:
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup pnpm
uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
scope: '@appthreat'
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: 3.12
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
# Mirrors the ci.yml build job's Linux flags and --tag-libc so the
# prebuild this packs is laid out and built the same way as the
# artifact the release-branch job consumes.
- name: Add Linux env vars
run: |
echo "CFLAGS=${CFLAGS:-} -include ../src/gcc-preinclude.h" >> $GITHUB_ENV
echo "CXXFLAGS=${CXXFLAGS:-} -include ../src/gcc-preinclude.h" >> $GITHUB_ENV
- name: Build the shipped prebuild
run: pnpm run prebuild --tag-libc
- name: Install xvfb
run: sudo apt-get update && sudo apt-get install -y xvfb
- name: Packaged-ASAR tests (unpacked + sealed-in-archive)
env:
ELECTRON_DISABLE_SANDBOX: '1'
run: xvfb-run -a pnpm run test:electron:asar
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ your workload is synchronous and fits `node:sqlite`, use `node:sqlite`**
— nothing needs installing and nothing needs compiling. This package
exists for the parts it does not cover.

Verified against `@appthreat/sqlite3` 9.0.0 on **Node v24.18.0 and
Verified against `@appthreat/sqlite3` 9.0.1 on **Node v24.18.0 and
v26.7.0**, which expose an identical `node:sqlite` surface and behave
identically on every point below — so this table holds across the whole
range this package supports. `node:sqlite` did grow quickly during 24.x
Expand Down
2 changes: 1 addition & 1 deletion docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependent allowlists it. This package declares `"install": "node-gyp-build"`,
so pnpm prints a notice like:

```
[ERR_PNPM_IGNORED_BUILDS] Ignored build scripts: @appthreat/sqlite3@9.0.0
[ERR_PNPM_IGNORED_BUILDS] Ignored build scripts: @appthreat/sqlite3@9.0.1
```

**You can ignore that notice.** Verified empirically (pnpm 11.23.0, macOS,
Expand Down
10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@appthreat/sqlite3",
"description": "Asynchronous, non-blocking SQLite3 bindings. Modern rewrite of TryGhost/node-sqlite3",
"version": "9.0.0",
"version": "9.0.1",
"homepage": "https://github.com/AppThreat/node-sqlite3",
"author": "Team AppThreat <cloud@appthreat.com>",
"binary": {
Expand Down Expand Up @@ -32,7 +32,6 @@
"electron": "43.4.1",
"prebuildify": "^6.0.1",
"semver": "^7.8.5",
"tsd": "^0.33.0",
"typescript": "~5.9.3"
},
"peerDependencies": {
Expand Down Expand Up @@ -68,7 +67,7 @@
"bench:compare": "node --expose-gc bench/index.js --compare --baseline bench/baseline.json",
"bench:update": "node --expose-gc bench/index.js --write-baseline",
"gen-types": "node tools/gen-types.js",
"test:types": "tsd && tsc --noEmit -p tsconfig.check.json",
"test:types": "tsc --noEmit -p tsconfig.check.json",
"test:matrix": "node tools/test-matrix.mjs"
},
"license": "BSD-3-Clause",
Expand All @@ -80,8 +79,5 @@
],
"type": "module",
"main": "./lib/sqlite3.js",
"types": "./lib/sqlite3.d.ts",
"tsd": {
"directory": "types"
}
"types": "./lib/sqlite3.d.ts"
}
Loading