Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
7a2a030
checkout the bedrock branch
Oct 22, 2024
f5f744e
update package.json for new package
Oct 22, 2024
7c1906c
Merge pull request #1 from tantaman/mlaw/bedrock-checkout
tantaman Oct 22, 2024
0b511da
include type defs
Oct 22, 2024
5b41adc
bump version
Oct 22, 2024
2279c68
pull bedrock branch
Oct 22, 2024
d957623
enable ICU extensions
Oct 22, 2024
7f2e3be
revert icu
Oct 22, 2024
1268bb9
remove electron as a build artifact
Oct 22, 2024
0c46da6
build the sqlite shell as well
Oct 22, 2024
01f5ddf
Merge pull request #2 from tantaman/build-cli
tantaman Oct 25, 2024
96bd00b
add `bin` entry to `package.json` to point to `cli`
Oct 28, 2024
68a6eea
change package name and version
Oct 29, 2024
a23c78d
include `shell` in the release artifacts
Oct 29, 2024
2339c2d
remove `test_extension` from build
Oct 30, 2024
e6b1192
fix bin linking
Oct 30, 2024
ada8225
script to run on win or sh
Oct 30, 2024
79ab1cb
feat: Allow flags and args to be passed through to sqlite3.
aboodman Nov 2, 2024
47bfa37
Merge pull request #2 from rocicorp/aa/flags
aboodman Nov 16, 2024
63c0aeb
chore: bump version to 1.0.4.
aboodman Nov 16, 2024
0878305
Merge pull request #3 from rocicorp/aa/bump
aboodman Nov 16, 2024
820fee6
Create CODE_OF_CONDUCT.md
arv Dec 9, 2024
4368bbe
build for node 24
tantaman May 26, 2025
b29c821
chore: Blind attempt to enable readline support.
aboodman Jun 20, 2025
5f21d69
Update README.md
aboodman Jun 20, 2025
50c7a85
Try to enable readline again.
aboodman Jun 20, 2025
c7dd30e
bump to 1.0.7
aboodman Jun 21, 2025
4319b9e
override node-abi version
maxstevens-nl Jun 30, 2025
6f580d9
override node abi version
maxstevens-nl Jun 30, 2025
416f4e1
Merge pull request #5 from maxstevens-nl/override-node-abi-version
tantaman Jun 30, 2025
650aebb
update to windows-2022
tantaman Jul 8, 2025
3eb132a
forgot to bump package.json version
tantaman Jul 9, 2025
d832eb0
Bump the github-actions group across 1 directory with 3 updates
dependabot[bot] Sep 8, 2025
8cf8851
enable scanstatus at build time
tantaman Oct 2, 2025
5ab4fdf
expose scanstat
tantaman Oct 2, 2025
f4f342a
add tests
tantaman Oct 2, 2025
366bf76
types
tantaman Oct 2, 2025
2845da5
better typgin
tantaman Oct 4, 2025
3326b60
Merge pull request #9 from rocicorp/scanstatus
tantaman Oct 4, 2025
9fc01bd
Merge pull request #8 from rocicorp/dependabot/github_actions/github-…
tantaman Oct 6, 2025
73e07fe
put scanstatus flag in the correct spot, update sqlite version
tantaman Oct 6, 2025
4f76c22
update to sqlite 3.50
tantaman Oct 6, 2025
61ed195
Merge pull request #10 from rocicorp/scanstatus2
tantaman Oct 6, 2025
ba19411
add bun support
tantaman Oct 9, 2025
099fb76
latest stable bun
tantaman Oct 9, 2025
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
152 changes: 102 additions & 50 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,41 @@ name: build
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
release:
types:
- released
workflow_dispatch: {}

env:
# See https://github.com/nodejs/release#release-schedule
# Node.js v16 EOL = 2023-09-11. v21 EOL = 2024-06-01.
NODE_BUILD_CMD: npx --no-install prebuild -r node -t 18.0.0 -t 20.0.0 -t 22.0.0 -t 23.0.0 --include-regex 'better_sqlite3.node$'
# Merge with NODE_BUILD_CMD when Node.js v18 is EOL
NO_V18_NODE_BUILD_CMD: npx --no-install prebuild -r node -t 20.0.0 -t 22.0.0 -t 23.0.0 --include-regex 'better_sqlite3.node$'
# See https://www.electronjs.org/docs/latest/tutorial/electron-timelines#version-support-policy
# Electron v25 EOL = 2023-12-05. v26 EOL = 2024-02-20. v27 EOL = 2024-04-16. v28 EOL = 2024-06-11. v29 EOL = 2024-08-20.
ELECTRON_BUILD_CMD: npx --no-install prebuild -r electron -t 26.0.0 -t 27.0.0 -t 28.0.0 -t 29.0.0 -t 30.0.0 -t 31.0.0 -t 32.0.0 -t 33.0.0 --include-regex 'better_sqlite3.node$'
# Node.js v20 EOL = 2026-04-30. v22 EOL = 2027-04-30. v23 EOL = 2025-06-01. v24 EOL = 2028-04-30.
NODE_BUILD_CMD: npx --no-install prebuild -r node -t 20.0.0 -t 22.0.0 -t 23.0.0 -t 24.0.0 --include-regex '_sqlite3'
# Bun versions - see https://github.com/oven-sh/bun/releases
BUN_BUILD_CMD: npx --no-install prebuild -r bun -t 1.1.0 --include-regex '_sqlite3'

jobs:
test:
strategy:
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
- macos-13
- macos-14
- windows-2019
- windows-2022
node:
- 18
- 20
- 22
- 23
- 24
name: Testing Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node }}
- if: ${{ startsWith(matrix.os, 'windows') }}
Expand All @@ -52,32 +49,57 @@ jobs:
- if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo apt update
sudo apt install gcc-10 g++-10 -y
sudo apt install -y gcc-10 g++-10 libreadline-dev libncurses5-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10
- run: npm install --ignore-scripts
- run: npm run build-debug
- run: npm test
- name: Test SpatiaLite extension
if: ${{ startsWith(matrix.os, 'ubuntu') }}

test-bun:
strategy:
matrix:
os:
- ubuntu-22.04
- macos-13
- macos-14
bun:
- 1.2.23
name: Testing Bun ${{ matrix.bun }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ matrix.bun }}
- if: ${{ startsWith(matrix.os, 'macos') }}
run: brew install python-setuptools
- if: ${{ !startsWith(matrix.os, 'macos') }}
run: python3 -m pip install setuptools
- if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo apt update
sudo apt install libsqlite3-mod-spatialite -y
node -e "require('./lib/index.js')(':memory:').loadExtension('mod_spatialite').exec('SELECT InitSpatialMetaData();')"
sudo apt install -y gcc-10 g++-10 libreadline-dev libncurses5-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10
- run: bun install --ignore-scripts
- run: bun run build-debug
- run: bun test

publish:
if: ${{ github.event_name == 'release' }}
name: Publishing to NPM
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs:
- prebuild
- prebuild-alpine
- prebuild-alpine-arm
- prebuild-linux-x64
- prebuild-linux-arm
- prebuild-bun
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 18
node-version: 20
registry-url: https://registry.npmjs.org
- run: npm publish
env:
Expand All @@ -89,50 +111,48 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- macos-13
- macos-14
- windows-2019
- windows-2022
name: Prebuild on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 18
node-version: 20
- if: ${{ startsWith(matrix.os, 'windows') }}
run: pip.exe install setuptools
- if: ${{ startsWith(matrix.os, 'macos') }}
run: brew install python-setuptools
- if: ${{ !startsWith(matrix.os, 'windows') && !startsWith(matrix.os, 'macos') }}
run: python3 -m pip install setuptools
- if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo apt update
sudo apt install gcc-10 g++-10 -y
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10
- run: npm install --ignore-scripts
- run: ${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}
- run: ${{ env.ELECTRON_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}
- if: matrix.os == 'windows-2019'
- if: matrix.os == 'windows-2022'
run: |
${{ env.NODE_BUILD_CMD }} --arch ia32 -u ${{ secrets.GITHUB_TOKEN }}
${{ env.NO_V18_NODE_BUILD_CMD }} --arch arm64 -u ${{ secrets.GITHUB_TOKEN }}
${{ env.ELECTRON_BUILD_CMD }} --arch ia32 -u ${{ secrets.GITHUB_TOKEN }}
${{ env.ELECTRON_BUILD_CMD }} --arch arm64 -u ${{ secrets.GITHUB_TOKEN }}
${{ env.NODE_BUILD_CMD }} --arch arm64 -u ${{ secrets.GITHUB_TOKEN }}

prebuild-linux-x64:
if: ${{ github.event_name == 'release' }}
name: Prebuild on Linux x64
runs-on: ubuntu-latest
container: node:20-bullseye
needs: test
steps:
- uses: actions/checkout@v5
- run: npm install --ignore-scripts
- run: ${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}

prebuild-alpine:
if: ${{ github.event_name == 'release' }}
strategy:
fail-fast: false
name: Prebuild on alpine
runs-on: ubuntu-latest
container: node:18-alpine
container: node:20-alpine
needs: test
steps:
- uses: actions/checkout@v4
- run: apk add build-base git python3 py3-setuptools --update-cache
- uses: actions/checkout@v5
- run: apk add build-base git python3 py3-setuptools libstdc++ readline-dev ncurses-dev --update-cache
- run: npm install --ignore-scripts
- run: ${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -148,11 +168,11 @@ jobs:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: docker/setup-qemu-action@v3
- run: |
docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch }} node:18-alpine -c "\
apk add build-base git python3 py3-setuptools --update-cache && \
docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch }} node:20-alpine -c "\
apk add build-base git python3 py3-setuptools libstdc++ readline-dev ncurses-dev --update-cache && \
cd /tmp/project && \
npm install --ignore-scripts && \
${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}"
Expand All @@ -169,10 +189,42 @@ jobs:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: docker/setup-qemu-action@v3
- run: |
docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch }} node:18-bullseye -c "\
docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch }} node:20-bullseye -c "\
cd /tmp/project && \
npm install --ignore-scripts && \
${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}"

prebuild-bun:
if: ${{ github.event_name == 'release' }}
strategy:
fail-fast: false
matrix:
os:
- macos-13
- macos-14
- ubuntu-22.04
name: Prebuild Bun on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: test-bun
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 20
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.2.23
- if: ${{ startsWith(matrix.os, 'macos') }}
run: brew install python-setuptools
- if: ${{ !startsWith(matrix.os, 'macos') }}
run: python3 -m pip install setuptools
- if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo apt update
sudo apt install -y gcc-10 g++-10 libreadline-dev libncurses5-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10
- run: npm install --ignore-scripts
- run: ${{ env.BUN_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
name: Bump to a new version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
token: ${{ secrets.PAT }}
fetch-depth: 0
- uses: actions/setup-node@v4
- uses: actions/setup-node@v5
with:
node-version: 18
- name: Configure user
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/update-sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
ENV_YEAR: ${{ github.event.inputs.year }}
ENV_VERSION: ${{ github.event.inputs.version }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
token: ${{ secrets.PAT }}
fetch-depth: 0
- uses: actions/setup-node@v4
- uses: actions/setup-node@v5
with:
node-version: 18
- name: Create new update branch
Expand All @@ -35,7 +35,7 @@ jobs:
- name: Download, compile and package SQLite
run: npm run download
- name: Push update branch
uses: stefanzweifel/git-auto-commit-action@v5
uses: stefanzweifel/git-auto-commit-action@v6
with:
commit_message: Update SQLite to version ${{ env.ENV_TRUE_VERSION }}
branch: sqlite-update-${{ env.ENV_VERSION }}
Expand Down
Loading
Loading