diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d92a842..aa46c6d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -176,7 +176,7 @@ jobs: # Inspect the artifact we just shipped. This is the check that was missing # when v1.2.0 went out ad-hoc signed, hardened-runtime, and unable to load - # better_sqlite3.node. + # its native module. - name: Verify macOS artifact (signature, entitlements, native modules) if: matrix.os == 'macos-latest' run: | @@ -220,7 +220,7 @@ jobs: echo "::warning title=Unsigned macOS build::No identity was available, so the bundle carries no entitlements. This build is not notarized and cannot be launched on Apple Silicon until the user clears the quarantine flag; README.md documents the command." else echo "::error::shipped app is missing com.apple.security.cs.disable-library-validation." - echo "::error::It will crash on launch when the main process loads better_sqlite3.node." + echo "::error::It will crash on launch when the main process loads better-sqlite3's native module." exit 1 fi @@ -236,8 +236,11 @@ jobs: echo done - if ! echo "$NATIVES" | grep -q 'better_sqlite3.node'; then - echo "::error::better_sqlite3.node was not unpacked; the database will fail to open" + # better-sqlite3 >= 13 is N-API and ships its binary as + # `prebuilds/-.node`, not the old + # `build/Release/better_sqlite3.node`, and nothing rebuilds it. + if ! echo "$NATIVES" | grep -qE 'better-sqlite3/prebuilds/.+\.node'; then + echo "::error::a better-sqlite3 prebuild was not unpacked; the database will fail to open" exit 1 fi diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 70c1f6a..03f1843 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -10,7 +10,7 @@ name: Verify # it, so it is the step that actually catches those. It runs on all three # platforms because the native addons are arch-specific: # -# better_sqlite3.node, vec0.so/.dylib/.dll, skia.*.node +# better-sqlite3 (prebuilds/-.node), vec0.so/.dylib/.dll, skia.*.node # # `lint` is deliberately not part of this gate: it reports no errors but still # carries a large pre-existing `@typescript-eslint/no-explicit-any` baseline, diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a87f6b9..367398a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,10 +28,11 @@ Requirements: `electron-builder` is built around npm's `node_modules` layout and silently drops transitive dependencies under pnpm. See the `//dependencies` comment in `package.json` for the full story. -- A working native build toolchain. `npm install` runs - `electron-builder install-app-deps` as a `postinstall` step, which compiles - the native addons (`better-sqlite3`, `sqlite-vec`), so the first install - takes a while. +- **No native build toolchain.** Every native dependency is N-API and ships + prebuilt binaries, most of them inside the npm package itself + (`better-sqlite3` >= 13 carries `prebuilds/` for every supported + platform/arch), so `npm install` compiles nothing and `npmRebuild` is off. + See the `npmRebuild` note in `electron-builder.yml`. ```bash git clone https://github.com/MrSibe/KnowNote.git diff --git a/build/entitlements.mac.plist b/build/entitlements.mac.plist index 96f428d..3cf8e87 100644 --- a/build/entitlements.mac.plist +++ b/build/entitlements.mac.plist @@ -10,7 +10,8 @@