sqlrite 0.1.4__tar.gz → 0.1.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. {sqlrite-0.1.4 → sqlrite-0.1.5}/.github/workflows/release.yml +239 -7
  2. {sqlrite-0.1.4 → sqlrite-0.1.5}/Cargo.lock +5 -5
  3. {sqlrite-0.1.4 → sqlrite-0.1.5}/Cargo.toml +1 -1
  4. {sqlrite-0.1.4 → sqlrite-0.1.5}/PKG-INFO +1 -1
  5. {sqlrite-0.1.4 → sqlrite-0.1.5}/README.md +1 -1
  6. {sqlrite-0.1.4 → sqlrite-0.1.5}/desktop/package.json +1 -1
  7. {sqlrite-0.1.4 → sqlrite-0.1.5}/docs/embedding.md +1 -1
  8. {sqlrite-0.1.4 → sqlrite-0.1.5}/docs/release-plan.md +1 -1
  9. {sqlrite-0.1.4 → sqlrite-0.1.5}/docs/release-secrets.md +28 -25
  10. {sqlrite-0.1.4 → sqlrite-0.1.5}/docs/roadmap.md +9 -3
  11. {sqlrite-0.1.4 → sqlrite-0.1.5}/examples/README.md +5 -5
  12. {sqlrite-0.1.4 → sqlrite-0.1.5}/pyproject.toml +1 -1
  13. {sqlrite-0.1.4 → sqlrite-0.1.5}/sdk/python/Cargo.toml +1 -1
  14. {sqlrite-0.1.4 → sqlrite-0.1.5}/.github/workflows/ci.yml +0 -0
  15. {sqlrite-0.1.4 → sqlrite-0.1.5}/.github/workflows/release-pr.yml +0 -0
  16. {sqlrite-0.1.4 → sqlrite-0.1.5}/.github/workflows/rust.yml +0 -0
  17. {sqlrite-0.1.4 → sqlrite-0.1.5}/.gitignore +0 -0
  18. {sqlrite-0.1.4 → sqlrite-0.1.5}/CODE_OF_CONDUCT.md +0 -0
  19. {sqlrite-0.1.4 → sqlrite-0.1.5}/LICENSE +0 -0
  20. {sqlrite-0.1.4 → sqlrite-0.1.5}/MAINTAINERS +0 -0
  21. {sqlrite-0.1.4 → sqlrite-0.1.5}/Makefile +0 -0
  22. {sqlrite-0.1.4 → sqlrite-0.1.5}/desktop/index.html +0 -0
  23. {sqlrite-0.1.4 → sqlrite-0.1.5}/desktop/package-lock.json +0 -0
  24. {sqlrite-0.1.4 → sqlrite-0.1.5}/desktop/src/App.svelte +0 -0
  25. {sqlrite-0.1.4 → sqlrite-0.1.5}/desktop/src/app.css +0 -0
  26. {sqlrite-0.1.4 → sqlrite-0.1.5}/desktop/src/main.ts +0 -0
  27. {sqlrite-0.1.4 → sqlrite-0.1.5}/desktop/src/vite-env.d.ts +0 -0
  28. {sqlrite-0.1.4 → sqlrite-0.1.5}/desktop/svelte.config.js +0 -0
  29. {sqlrite-0.1.4 → sqlrite-0.1.5}/desktop/tsconfig.json +0 -0
  30. {sqlrite-0.1.4 → sqlrite-0.1.5}/desktop/vite.config.ts +0 -0
  31. {sqlrite-0.1.4 → sqlrite-0.1.5}/docs/_index.md +0 -0
  32. {sqlrite-0.1.4 → sqlrite-0.1.5}/docs/architecture.md +0 -0
  33. {sqlrite-0.1.4 → sqlrite-0.1.5}/docs/design-decisions.md +0 -0
  34. {sqlrite-0.1.4 → sqlrite-0.1.5}/docs/desktop.md +0 -0
  35. {sqlrite-0.1.4 → sqlrite-0.1.5}/docs/file-format.md +0 -0
  36. {sqlrite-0.1.4 → sqlrite-0.1.5}/docs/getting-started.md +0 -0
  37. {sqlrite-0.1.4 → sqlrite-0.1.5}/docs/pager.md +0 -0
  38. {sqlrite-0.1.4 → sqlrite-0.1.5}/docs/smoke-test.md +0 -0
  39. {sqlrite-0.1.4 → sqlrite-0.1.5}/docs/sql-engine.md +0 -0
  40. {sqlrite-0.1.4 → sqlrite-0.1.5}/docs/storage-model.md +0 -0
  41. {sqlrite-0.1.4 → sqlrite-0.1.5}/docs/supported-sql.md +0 -0
  42. {sqlrite-0.1.4 → sqlrite-0.1.5}/docs/usage.md +0 -0
  43. {sqlrite-0.1.4 → sqlrite-0.1.5}/examples/c/Makefile +0 -0
  44. {sqlrite-0.1.4 → sqlrite-0.1.5}/examples/c/hello.c +0 -0
  45. {sqlrite-0.1.4 → sqlrite-0.1.5}/examples/go/go.mod +0 -0
  46. {sqlrite-0.1.4 → sqlrite-0.1.5}/examples/go/hello.go +0 -0
  47. {sqlrite-0.1.4 → sqlrite-0.1.5}/examples/nodejs/hello.mjs +0 -0
  48. {sqlrite-0.1.4 → sqlrite-0.1.5}/examples/python/hello.py +0 -0
  49. {sqlrite-0.1.4 → sqlrite-0.1.5}/examples/rust/quickstart.rs +0 -0
  50. {sqlrite-0.1.4 → sqlrite-0.1.5}/examples/wasm/Makefile +0 -0
  51. {sqlrite-0.1.4 → sqlrite-0.1.5}/examples/wasm/index.html +0 -0
  52. {sqlrite-0.1.4 → sqlrite-0.1.5}/images/SQLRite - Desktop.png +0 -0
  53. {sqlrite-0.1.4 → sqlrite-0.1.5}/images/SQLRite Data Structures.png +0 -0
  54. {sqlrite-0.1.4 → sqlrite-0.1.5}/images/SQLRite Simple SQL Execution High Level Diagram.png +0 -0
  55. {sqlrite-0.1.4 → sqlrite-0.1.5}/images/SQLRite Simple SQL INSERT Execution High Level Diagram (Insert Row).png +0 -0
  56. {sqlrite-0.1.4 → sqlrite-0.1.5}/images/SQLRite Simple SQL INSERT Execution High Level Diagram.png +0 -0
  57. {sqlrite-0.1.4 → sqlrite-0.1.5}/images/SQLRite_logo.png +0 -0
  58. {sqlrite-0.1.4 → sqlrite-0.1.5}/images/architecture.png +0 -0
  59. {sqlrite-0.1.4 → sqlrite-0.1.5}/rust-toolchain.toml +0 -0
  60. {sqlrite-0.1.4 → sqlrite-0.1.5}/samples/AST.delete.example +0 -0
  61. {sqlrite-0.1.4 → sqlrite-0.1.5}/samples/AST.insert.exemple +0 -0
  62. {sqlrite-0.1.4 → sqlrite-0.1.5}/samples/AST.select.example +0 -0
  63. {sqlrite-0.1.4 → sqlrite-0.1.5}/samples/AST.update.example +0 -0
  64. {sqlrite-0.1.4 → sqlrite-0.1.5}/samples/CREATE TABLE sqlrite_schema.sql +0 -0
  65. {sqlrite-0.1.4 → sqlrite-0.1.5}/samples/CREATE_TABLE with duplicate.sql +0 -0
  66. {sqlrite-0.1.4 → sqlrite-0.1.5}/samples/CREATE_TABLE.sql +0 -0
  67. {sqlrite-0.1.4 → sqlrite-0.1.5}/samples/INSERT.sql +0 -0
  68. {sqlrite-0.1.4 → sqlrite-0.1.5}/scripts/bump-version.sh +0 -0
  69. {sqlrite-0.1.4 → sqlrite-0.1.5}/sdk/go/README.md +0 -0
  70. {sqlrite-0.1.4 → sqlrite-0.1.5}/sdk/go/conn.go +0 -0
  71. {sqlrite-0.1.4 → sqlrite-0.1.5}/sdk/go/go.mod +0 -0
  72. {sqlrite-0.1.4 → sqlrite-0.1.5}/sdk/go/rows.go +0 -0
  73. {sqlrite-0.1.4 → sqlrite-0.1.5}/sdk/go/sqlrite.go +0 -0
  74. {sqlrite-0.1.4 → sqlrite-0.1.5}/sdk/go/sqlrite_test.go +0 -0
  75. {sqlrite-0.1.4 → sqlrite-0.1.5}/sdk/go/stmt.go +0 -0
  76. {sqlrite-0.1.4 → sqlrite-0.1.5}/sdk/python/README.md +0 -0
  77. {sqlrite-0.1.4 → sqlrite-0.1.5}/sdk/python/src/lib.rs +0 -0
  78. {sqlrite-0.1.4 → sqlrite-0.1.5}/sdk/python/tests/test_sqlrite.py +0 -0
  79. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/connection.rs +0 -0
  80. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/error.rs +0 -0
  81. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/lib.rs +0 -0
  82. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/main.rs +0 -0
  83. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/meta_command/mod.rs +0 -0
  84. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/repl/mod.rs +0 -0
  85. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/sql/db/database.rs +0 -0
  86. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/sql/db/mod.rs +0 -0
  87. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/sql/db/secondary_index.rs +0 -0
  88. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/sql/db/table.rs +0 -0
  89. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/sql/executor.rs +0 -0
  90. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/sql/mod.rs +0 -0
  91. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/sql/pager/cell.rs +0 -0
  92. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/sql/pager/file.rs +0 -0
  93. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/sql/pager/header.rs +0 -0
  94. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/sql/pager/index_cell.rs +0 -0
  95. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/sql/pager/interior_page.rs +0 -0
  96. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/sql/pager/mod.rs +0 -0
  97. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/sql/pager/overflow.rs +0 -0
  98. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/sql/pager/page.rs +0 -0
  99. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/sql/pager/pager.rs +0 -0
  100. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/sql/pager/table_page.rs +0 -0
  101. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/sql/pager/varint.rs +0 -0
  102. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/sql/pager/wal.rs +0 -0
  103. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/sql/parser/create.rs +0 -0
  104. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/sql/parser/insert.rs +0 -0
  105. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/sql/parser/mod.rs +0 -0
  106. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/sql/parser/select.rs +0 -0
  107. {sqlrite-0.1.4 → sqlrite-0.1.5}/src/sql/tokenizer.rs +0 -0
@@ -7,8 +7,9 @@
7
7
  # Phase 6d: tag-all + publish-crate + publish-ffi + finalize.
8
8
  # Phase 6e adds publish-desktop.
9
9
  # Phase 6f adds build-python-wheels + publish-python.
10
- # Phases 6g–6i add publish-nodejs / publish-wasm / publish-go as
11
- # separate jobs to this same file.
10
+ # Phase 6g adds build-nodejs-binaries + publish-nodejs.
11
+ # Phases 6h–6i add publish-wasm / publish-go as separate jobs
12
+ # to this same file.
12
13
  #
13
14
  # Design doc: docs/release-plan.md.
14
15
  # One-time registry / branch-protection setup: docs/release-secrets.md.
@@ -86,15 +87,16 @@ jobs:
86
87
  # BEFORE any publish step so a bad version number (e.g., tag
87
88
  # already exists for some reason) aborts the whole release cleanly.
88
89
  #
89
- # As of Phase 6f, we tag:
90
+ # As of Phase 6g, we tag:
90
91
  # - sqlrite-v<V> (Rust engine)
91
92
  # - sqlrite-ffi-v<V> (C FFI prebuilt binaries)
92
93
  # - sqlrite-desktop-v<V> (Tauri desktop installers)
93
94
  # - sqlrite-py-v<V> (Python wheels on PyPI)
95
+ # - sqlrite-node-v<V> (Node.js N-API bindings on npm)
94
96
  # - v<V> (umbrella)
95
97
  #
96
- # Later phases add sqlrite-node-v<V>, sqlrite-wasm-v<V>,
97
- # sdk/go/v<V> as their publish jobs come online.
98
+ # Later phases add sqlrite-wasm-v<V>, sdk/go/v<V> as their
99
+ # publish jobs come online.
98
100
  #
99
101
  # Idempotent on re-run: if a tag already exists (partial-failure
100
102
  # scenario where publish-crate succeeded but publish-ffi failed,
@@ -124,6 +126,7 @@ jobs:
124
126
  "sqlrite-ffi-v$V"
125
127
  "sqlrite-desktop-v$V"
126
128
  "sqlrite-py-v$V"
129
+ "sqlrite-node-v$V"
127
130
  "v$V"
128
131
  )
129
132
  for tag in "${TAGS[@]}"; do
@@ -633,6 +636,234 @@ jobs:
633
636
  files: dist/*
634
637
  generate_release_notes: true
635
638
 
639
+ # ---------------------------------------------------------------------------
640
+ # Step 3g: build Node.js N-API binaries for every supported
641
+ # platform. (Phase 6g — build half; publish half lives in the
642
+ # next job.)
643
+ #
644
+ # Architecture: the "bundled binaries" approach, not napi-rs's
645
+ # newer optional-deps-per-platform pattern. The main `sqlrite`
646
+ # npm package ships every platform's `.node` binary inside one
647
+ # tarball; napi-rs's generated `index.js` dispatcher picks the
648
+ # right one at require time based on process.platform / arch.
649
+ # Simpler for MVP than maintaining N+1 npm packages; the cost
650
+ # is a ~15 MiB tarball instead of a ~4 MiB per-platform download,
651
+ # which is fine for a database driver people install once.
652
+ #
653
+ # Same build/publish split as publish-python for the same
654
+ # reason: npm expects one `npm publish` invocation per package
655
+ # version. If every matrix cell published independently, a
656
+ # partial-failure would put some-but-not-all binaries on npm
657
+ # with no clean rollback.
658
+ #
659
+ # Matrix mirrors publish-ffi / publish-desktop / publish-python.
660
+ # Naming convention for the `.node` file is napi-rs's own: the
661
+ # platform triple is baked into the filename, e.g.,
662
+ # `sqlrite.linux-x64-gnu.node` vs `sqlrite.darwin-arm64.node`.
663
+ # The `files` glob in sdk/nodejs/package.json matches on
664
+ # `sqlrite.*.node`, so whichever binaries land in the directory
665
+ # at publish time get included in the tarball.
666
+ build-nodejs-binaries:
667
+ name: Build Node.js binary (${{ matrix.platform }})
668
+ needs: [detect, tag-all]
669
+ if: needs.detect.outputs.should_release == 'true'
670
+ runs-on: ${{ matrix.os }}
671
+ strategy:
672
+ fail-fast: false
673
+ matrix:
674
+ include:
675
+ - os: ubuntu-latest
676
+ platform: linux-x86_64
677
+ napi_triple: linux-x64-gnu
678
+ - os: ubuntu-24.04-arm
679
+ platform: linux-aarch64
680
+ napi_triple: linux-arm64-gnu
681
+ - os: macos-latest
682
+ platform: macos-aarch64
683
+ napi_triple: darwin-arm64
684
+ - os: windows-latest
685
+ platform: windows-x86_64
686
+ napi_triple: win32-x64-msvc
687
+ steps:
688
+ - uses: actions/checkout@v4
689
+
690
+ - uses: actions/setup-node@v4
691
+ with:
692
+ node-version: '20'
693
+ cache: 'npm'
694
+ cache-dependency-path: sdk/nodejs/package-lock.json
695
+
696
+ - uses: dtolnay/rust-toolchain@stable
697
+
698
+ - uses: Swatinem/rust-cache@v2
699
+ with:
700
+ shared-key: build-nodejs-${{ matrix.platform }}
701
+
702
+ - name: Install npm deps
703
+ working-directory: sdk/nodejs
704
+ run: npm ci
705
+
706
+ # `napi build --platform --release` produces:
707
+ # - sqlrite.<napi_triple>.node (the actual binary)
708
+ # - index.js (platform-dispatch loader)
709
+ # - index.d.ts (TypeScript types)
710
+ # We upload all three but only index.js/d.ts from the
711
+ # Linux x86_64 cell (they're identical across platforms
712
+ # since napi generates platform-agnostic dispatch code).
713
+ - name: Build native binary
714
+ working-directory: sdk/nodejs
715
+ run: npm run build
716
+
717
+ - name: Verify binary exists
718
+ working-directory: sdk/nodejs
719
+ shell: bash
720
+ run: |
721
+ ls -la sqlrite.*.node
722
+ # Fail early if napi produced an unexpected filename —
723
+ # otherwise the publish step would silently ship an
724
+ # incomplete tarball.
725
+ test -f "sqlrite.${{ matrix.napi_triple }}.node"
726
+
727
+ - name: Upload .node binary
728
+ uses: actions/upload-artifact@v4
729
+ with:
730
+ name: nodejs-binary-${{ matrix.platform }}
731
+ path: sdk/nodejs/sqlrite.${{ matrix.napi_triple }}.node
732
+ if-no-files-found: error
733
+ retention-days: 1
734
+
735
+ # Only Linux x86_64 uploads the shared dispatcher files.
736
+ # These are identical regardless of build platform (they're
737
+ # just require-the-right-.node glue), so we only need one
738
+ # copy in the final npm tarball.
739
+ - name: Upload JS dispatcher (linux-x86_64 only)
740
+ if: matrix.platform == 'linux-x86_64'
741
+ uses: actions/upload-artifact@v4
742
+ with:
743
+ name: nodejs-dispatcher
744
+ path: |
745
+ sdk/nodejs/index.js
746
+ sdk/nodejs/index.d.ts
747
+ if-no-files-found: error
748
+ retention-days: 1
749
+
750
+ # ---------------------------------------------------------------------------
751
+ # Step 3h: aggregate every platform's `.node` binary + the JS
752
+ # dispatcher into sdk/nodejs/, publish to npm via OIDC trusted
753
+ # publishing, and cut the per-product `sqlrite-node-v<V>`
754
+ # GitHub Release.
755
+ #
756
+ # OIDC trusted publishing: similar to the PyPI setup in
757
+ # publish-python. `permissions: id-token: write` lets npm mint
758
+ # a short-lived OIDC token, which `npm publish --provenance`
759
+ # exchanges for a one-time upload token. No NPM_TOKEN secret.
760
+ # One-time trusted-publisher config on npmjs.com — see
761
+ # docs/release-secrets.md.
762
+ #
763
+ # `--provenance` also attaches a signed attestation linking
764
+ # the package to this exact GitHub Actions workflow run (via
765
+ # sigstore, same mechanism as PyPI's PEP 740). Users who care
766
+ # about supply-chain can verify it with `npm audit signatures`.
767
+ publish-nodejs:
768
+ name: Publish Node.js package to npm
769
+ needs: [detect, tag-all, build-nodejs-binaries]
770
+ if: needs.detect.outputs.should_release == 'true'
771
+ runs-on: ubuntu-latest
772
+ environment: release
773
+ permissions:
774
+ # OIDC for npm trusted publisher + provenance signing.
775
+ id-token: write
776
+ # For softprops/action-gh-release step at the end.
777
+ contents: write
778
+ steps:
779
+ - uses: actions/checkout@v4
780
+
781
+ - uses: actions/setup-node@v4
782
+ with:
783
+ node-version: '20'
784
+ registry-url: 'https://registry.npmjs.org'
785
+
786
+ # Pull every platform's `.node` binary plus the JS
787
+ # dispatcher into sdk/nodejs/, overlaying them on top of
788
+ # the checked-out package.json / package-lock.json / etc.
789
+ - name: Download .node binaries
790
+ uses: actions/download-artifact@v4
791
+ with:
792
+ pattern: nodejs-binary-*
793
+ path: sdk/nodejs
794
+ merge-multiple: true
795
+
796
+ - name: Download JS dispatcher
797
+ uses: actions/download-artifact@v4
798
+ with:
799
+ name: nodejs-dispatcher
800
+ path: sdk/nodejs
801
+
802
+ - name: List publish payload
803
+ working-directory: sdk/nodejs
804
+ run: |
805
+ ls -la
806
+ echo "---"
807
+ # Dry-run the pack to see exactly what ends up in the
808
+ # published tarball. A missing .node file or a stray
809
+ # devDep pulled in by accident would be visible here.
810
+ npm pack --dry-run
811
+
812
+ # Single atomic publish. `--provenance` signs the package
813
+ # with a sigstore-backed attestation linking it to this
814
+ # workflow run. `--access public` is REQUIRED because
815
+ # `@joaoh82/sqlrite` is a scoped package and scoped
816
+ # packages default to private; without the flag, npm
817
+ # would reject the upload for a free-tier account that
818
+ # can't host private packages.
819
+ - name: Publish to npm
820
+ working-directory: sdk/nodejs
821
+ run: npm publish --provenance --access public
822
+ env:
823
+ # OIDC trusted publisher — no static token.
824
+ NPM_CONFIG_PROVENANCE: "true"
825
+
826
+ - name: GitHub Release
827
+ uses: softprops/action-gh-release@v2
828
+ with:
829
+ tag_name: sqlrite-node-v${{ needs.detect.outputs.version }}
830
+ name: Node.js v${{ needs.detect.outputs.version }}
831
+ body: |
832
+ Published to npm: https://www.npmjs.com/package/@joaoh82/sqlrite/v/${{ needs.detect.outputs.version }}
833
+
834
+ ```bash
835
+ npm install @joaoh82/sqlrite@${{ needs.detect.outputs.version }}
836
+ ```
837
+
838
+ ```javascript
839
+ const { Database } = require('@joaoh82/sqlrite');
840
+
841
+ const db = new Database(':memory:');
842
+ db.exec('CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)');
843
+ const stmt = db.prepare('INSERT INTO users (name) VALUES (?)');
844
+ stmt.run('alice');
845
+
846
+ for (const row of db.prepare('SELECT * FROM users').iterate()) {
847
+ console.log(row);
848
+ }
849
+ ```
850
+
851
+ **Binaries bundled in this release:**
852
+ - Linux x86_64 (`sqlrite.linux-x64-gnu.node`)
853
+ - Linux aarch64 (`sqlrite.linux-arm64-gnu.node`)
854
+ - macOS aarch64 (`sqlrite.darwin-arm64.node`)
855
+ - Windows x86_64 (`sqlrite.win32-x64-msvc.node`)
856
+
857
+ The package's `index.js` dispatcher auto-selects the right binary at require time — no platform-specific install step.
858
+
859
+ Verify package provenance:
860
+ ```bash
861
+ npm audit signatures
862
+ ```
863
+
864
+ See the umbrella release [v${{ needs.detect.outputs.version }}](../../releases/tag/v${{ needs.detect.outputs.version }}) for the full changelog.
865
+ generate_release_notes: true
866
+
636
867
  # ---------------------------------------------------------------------------
637
868
  # Step 4: create the umbrella GitHub Release. Runs after all
638
869
  # publish-* jobs succeed. Uses GitHub's native auto-generated
@@ -641,7 +872,7 @@ jobs:
641
872
  # config if we add one later.
642
873
  finalize:
643
874
  name: Finalize umbrella release
644
- needs: [detect, publish-crate, publish-ffi, publish-desktop, publish-python]
875
+ needs: [detect, publish-crate, publish-ffi, publish-desktop, publish-python, publish-nodejs]
645
876
  if: needs.detect.outputs.should_release == 'true'
646
877
  runs-on: ubuntu-latest
647
878
  steps:
@@ -663,8 +894,9 @@ jobs:
663
894
  - 🔧 [C FFI](../../releases/tag/sqlrite-ffi-v${{ needs.detect.outputs.version }}) — prebuilt `libsqlrite_c` for Linux x86_64/aarch64, macOS aarch64, Windows x86_64
664
895
  - 🖥️ [Desktop](../../releases/tag/sqlrite-desktop-v${{ needs.detect.outputs.version }}) — unsigned installers for Linux (AppImage + deb), macOS (dmg aarch64), Windows (msi)
665
896
  - 🐍 [Python](../../releases/tag/sqlrite-py-v${{ needs.detect.outputs.version }}) → [PyPI](https://pypi.org/project/sqlrite/${{ needs.detect.outputs.version }}/) — abi3-py38 wheels for Linux x86_64/aarch64, macOS aarch64, Windows x86_64 + sdist
897
+ - 🟢 [Node.js](../../releases/tag/sqlrite-node-v${{ needs.detect.outputs.version }}) → [npm](https://www.npmjs.com/package/@joaoh82/sqlrite/v/${{ needs.detect.outputs.version }}) — N-API bindings with prebuilt `.node` binaries for Linux x86_64/aarch64, macOS aarch64, Windows x86_64
666
898
 
667
- _Node.js / WASM / Go SDKs land as their publish jobs come online (Phases 6g–6i)._
899
+ _WASM / Go SDKs land as their publish jobs come online (Phases 6h–6i)._
668
900
 
669
901
  ---
670
902
 
@@ -3736,7 +3736,7 @@ dependencies = [
3736
3736
 
3737
3737
  [[package]]
3738
3738
  name = "sqlrite-desktop"
3739
- version = "0.1.4"
3739
+ version = "0.1.5"
3740
3740
  dependencies = [
3741
3741
  "serde",
3742
3742
  "serde_json",
@@ -3748,7 +3748,7 @@ dependencies = [
3748
3748
 
3749
3749
  [[package]]
3750
3750
  name = "sqlrite-engine"
3751
- version = "0.1.4"
3751
+ version = "0.1.5"
3752
3752
  dependencies = [
3753
3753
  "clap",
3754
3754
  "env_logger",
@@ -3763,7 +3763,7 @@ dependencies = [
3763
3763
 
3764
3764
  [[package]]
3765
3765
  name = "sqlrite-ffi"
3766
- version = "0.1.4"
3766
+ version = "0.1.5"
3767
3767
  dependencies = [
3768
3768
  "cbindgen",
3769
3769
  "sqlrite-engine",
@@ -3771,7 +3771,7 @@ dependencies = [
3771
3771
 
3772
3772
  [[package]]
3773
3773
  name = "sqlrite-nodejs"
3774
- version = "0.1.4"
3774
+ version = "0.1.5"
3775
3775
  dependencies = [
3776
3776
  "napi",
3777
3777
  "napi-build",
@@ -3781,7 +3781,7 @@ dependencies = [
3781
3781
 
3782
3782
  [[package]]
3783
3783
  name = "sqlrite-python"
3784
- version = "0.1.4"
3784
+ version = "0.1.5"
3785
3785
  dependencies = [
3786
3786
  "pyo3",
3787
3787
  "sqlrite-engine",
@@ -27,7 +27,7 @@ resolver = "3"
27
27
  # `package =` key so the import name stays `sqlrite` internally:
28
28
  # sqlrite = { package = "sqlrite-engine", path = "…" }
29
29
  name = "sqlrite-engine"
30
- version = "0.1.4"
30
+ version = "0.1.5"
31
31
  authors = ["Joao Henrique Machado Silva <joaoh82@gmail.com>"]
32
32
  edition = "2024"
33
33
  rust-version = "1.85"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sqlrite
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -224,7 +224,7 @@ Lockstep versioning — one dispatch bumps every product to the same `vX.Y.Z`. T
224
224
 
225
225
  - [x] **6a — Bump script**: `scripts/bump-version.sh` rewrites the version string in ten manifests (7 TOML, 3 JSON) in a single pass; semver-validated, idempotent, cross-platform (BSD + GNU sed). Runnable locally for rehearsing a release: `./scripts/bump-version.sh 0.2.0 && cargo build && git diff`.
226
226
  - [x] **6b — CI**: `.github/workflows/ci.yml` runs on every PR + push to main. Seven parallel jobs: `rust-build-and-test` (Linux/macOS/Windows × cargo build + test), `rust-lint` (fmt + clippy + doc), `python-sdk` (Linux/macOS/Windows × maturin develop + pytest in a venv), `nodejs-sdk` (Linux/macOS/Windows × napi build + node --test), `go-sdk` (Linux/macOS × cargo build sqlrite-ffi + go test), `wasm-build` (wasm-pack + size report), `desktop-build` (npm ci + Tauri Rust compile). Cargo / npm / pip caching for fast PR turnaround.
227
- - [x] **6c — Trusted publisher setup + branch protection runbook**: [`docs/release-secrets.md`](docs/release-secrets.md) captures the one-time web-UI setup — crates.io token in the `release` environment, OIDC trusted publishers on PyPI (`sqlrite`) and npm (`sqlrite` + `sqlrite-wasm`), GitHub `release` environment with required reviewer, branch protection on `main` requiring 14 CI jobs + 1 review. No code changes — executable as-is, ready to run through in the GitHub + registry UIs.
227
+ - [x] **6c — Trusted publisher setup + branch protection runbook**: [`docs/release-secrets.md`](docs/release-secrets.md) captures the one-time web-UI setup — crates.io token in the `release` environment, OIDC trusted publishers on PyPI (`sqlrite`) and npm (`@joaoh82/sqlrite` + `sqlrite-wasm` — Node binding is scoped because npm's similarity check rejects the unscoped name against `sqlite`/`sqlite3`), GitHub `release` environment with required reviewer, branch protection on `main` requiring 14 CI jobs + 1 review. No code changes — executable as-is, ready to run through in the GitHub + registry UIs.
228
228
  - [x] **6d — Release PR + skeleton publish**: two workflows under `.github/workflows/`. `release-pr.yml` (manual dispatch with version input → bump-version.sh → PR), `release.yml` (fires on `release: v<semver>` merge commit → `tag-all` + `publish-crate` + `publish-ffi` matrix [linux x86_64/aarch64, macOS aarch64, windows x86_64] + umbrella release). Idempotent tag creation so "Re-run failed jobs" works after partial failures. `cargo publish` gated by the `release` environment's required-reviewer rule. First canary: `v0.1.1`.
229
229
  - [ ] **6e — Desktop publish**: add `publish-desktop` to `release.yml` — Tauri build matrix → unsigned `.AppImage` / `.deb` / `.dmg` / `.msi` → GitHub Release
230
230
  - [ ] **6f — Python SDK publish**: `maturin-action` → abi3 wheels for manylinux x86_64/aarch64 + macOS universal + Windows x86_64 → PyPI via OIDC
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sqlrite-desktop-frontend",
3
3
  "private": true,
4
- "version": "0.1.4",
4
+ "version": "0.1.5",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -217,7 +217,7 @@ Phase 6 lands GitHub Actions CI + release automation:
217
217
 
218
218
  - **crates.io** — `sqlrite-engine` crate (published under a different name from the `sqlrite` lib target because the short name was already taken; users `cargo add sqlrite-engine` but still write `use sqlrite::…`)
219
219
  - **PyPI** — `sqlrite` wheels (manylinux x86_64/aarch64, macOS universal, Windows x86_64)
220
- - **npm** — `sqlrite` (Node) + `sqlrite-wasm` (browser) packages
220
+ - **npm** — `@joaoh82/sqlrite` (Node) + `sqlrite-wasm` (browser) packages
221
221
  - **Go modules** — `sdk/go/v*` git tags
222
222
  - **GitHub Releases** — Tauri desktop builds + C FFI prebuilt libraries
223
223
 
@@ -73,7 +73,7 @@ GitHub Releases by product ("show me every Python release").
73
73
  | Rust engine | `sqlrite-vX.Y.Z` | crates.io + GitHub Release |
74
74
  | C FFI shim | `sqlrite-ffi-vX.Y.Z` | GitHub Release (per-platform tarballs) |
75
75
  | Python SDK | `sqlrite-py-vX.Y.Z` | PyPI + GitHub Release |
76
- | Node.js SDK | `sqlrite-node-vX.Y.Z` | npm + GitHub Release |
76
+ | Node.js SDK | `sqlrite-node-vX.Y.Z` | npm (`@joaoh82/sqlrite`) + GitHub Release |
77
77
  | Go SDK | `sdk/go/vX.Y.Z` | Git tag (no registry) + GitHub Release assets |
78
78
  | WASM | `sqlrite-wasm-vX.Y.Z` | npm (`sqlrite-wasm`) + GitHub Release |
79
79
  | Desktop app | `sqlrite-desktop-vX.Y.Z` | GitHub Release (unsigned installers) |
@@ -105,27 +105,36 @@ release, status flips to "active".
105
105
 
106
106
  ## 3. npm trusted publishers (two packages)
107
107
 
108
- **Why two:** we publish `sqlrite` (Node.js bindings from
108
+ **Why two:** we publish `@joaoh82/sqlrite` (Node.js bindings from
109
109
  `sdk/nodejs/`) and `sqlrite-wasm` (browser bindings from
110
110
  `sdk/wasm/`) as separate npm packages. Each needs its own
111
111
  trusted-publisher record.
112
112
 
113
- ### 3a. Reserve `sqlrite` on npm
113
+ **Why the scoped name on the Node.js package:** npm's registry
114
+ rejects the unscoped `sqlrite` name because of a similarity check
115
+ against the existing `sqlite` / `sqlite3` packages (levenshtein
116
+ distance 1). Scoping under `@joaoh82` (the author's npm user
117
+ scope) bypasses the check cleanly — same pattern as `@napi-rs/*`,
118
+ `@swc/core`, etc. Discovered during the v0.1.5 canary attempt;
119
+ rename PR landed before the retry. Applies to the Node.js
120
+ package only; `sqlrite-wasm` may or may not hit the same check
121
+ when 6h lands (if it does, rename to `@joaoh82/sqlrite-wasm`).
114
122
 
115
- 1. Log in at <https://www.npmjs.com/>.
116
- 2. Search for `sqlrite` — confirm it's not taken. (If it is,
117
- we'll rename — update `sdk/nodejs/package.json`'s `name` +
118
- `napi.name` to something like `@joaoh82/sqlrite` and file an
119
- issue.)
123
+ ### 3a. Reserve `@joaoh82/sqlrite` on npm
120
124
 
121
- ### 3b. Trusted publisher for `sqlrite`
125
+ 1. Log in at <https://www.npmjs.com/> as `joaoh82`.
126
+ 2. Scoped packages under your user scope are auto-owned — no
127
+ manual name reservation step required. First-time publish
128
+ against the trusted publisher will create the package.
129
+
130
+ ### 3b. Trusted publisher for `@joaoh82/sqlrite`
122
131
 
123
132
  npm's trusted publishing flow:
124
133
 
125
- 1. From the package page (after first manual publish, or via
126
- <https://www.npmjs.com/package/sqlrite> once pre-registered),
127
- click **Settings** → **Trusted Publishers**.
134
+ 1. Go to <https://www.npmjs.com/settings/~/packages> (or your
135
+ profile Packages) → **Trusted Publishers** tab.
128
136
  2. **Add a new publisher**:
137
+ - **Package name**: `@joaoh82/sqlrite`
129
138
  - **Publisher**: GitHub Actions
130
139
  - **Organization or user**: `joaoh82`
131
140
  - **Repository**: `rust_sqlite`
@@ -133,20 +142,14 @@ npm's trusted publishing flow:
133
142
  - **Environment**: `release`
134
143
  3. Save.
135
144
 
136
- **npm's chicken-and-egg:** npm doesn't offer a "pending
137
- publisher" mode like PyPI. A package must exist before you can
138
- add a trusted publisher for it. First-time publish workaround:
139
-
140
- - Use a classic npm access token (generate one scoped to publish
141
- for `sqlrite` only) for the very first publish only.
142
- - Store it temporarily as `NPM_TOKEN` in the `release`
143
- environment's secrets.
144
- - After the first publish succeeds, add the trusted publisher
145
- via the UI, then delete `NPM_TOKEN` from the secrets.
146
- - On the next release, OIDC takes over automatically.
147
-
148
- Document the temporary token in a pinned issue so it gets
149
- rotated out once OIDC is live.
145
+ **npm's chicken-and-egg, resolved for scoped packages:** For
146
+ unscoped names (like the abandoned `sqlrite` attempt), npm
147
+ requires the package to already exist before you can add a
148
+ trusted publisher — first publish needs a temporary `NPM_TOKEN`.
149
+ For scoped packages under your own user scope, npm auto-owns
150
+ the scope, and the trusted-publisher registration works against
151
+ the future package before it exists. First CI publish creates
152
+ it cleanly with OIDC. **No temporary token needed.**
150
153
 
151
154
  ### 3c. Repeat for `sqlrite-wasm`
152
155
 
@@ -360,7 +360,7 @@ One-time non-code setup — the state lives in registry web UIs + GitHub setting
360
360
 
361
361
  1. **crates.io API token** → `CRATES_IO_TOKEN` in the `release` environment's secrets (crates.io doesn't support OIDC yet, so this is the only long-lived token in the pipeline).
362
362
  2. **PyPI trusted publisher** pointed at `release.yml` / environment `release` — short-lived OIDC tokens, no secret to leak.
363
- 3. **npm trusted publishers** for both `sqlrite` (the Node binding) and `sqlrite-wasm` (the browser binding). npm doesn't have a pending-publisher mode like PyPI, so the runbook captures the first-release bootstrap: temporary `NPM_TOKEN`, then swap to OIDC.
363
+ 3. **npm trusted publishers** for both `@joaoh82/sqlrite` (the Node binding — scoped because npm rejected the unscoped `sqlrite` name as too similar to `sqlite`/`sqlite3`) and `sqlrite-wasm` (the browser binding). Scoped packages under your own user scope auto-own the name, so the trusted-publisher flow works without a bootstrap `NPM_TOKEN`. See `docs/release-secrets.md` §3 for the full flow.
364
364
  4. **GitHub `release` environment** — required reviewer (maintainer), `main`-only deployments, scoped secrets. Acts as a second human-in-the-loop gate after the Release PR merge but before any registry write.
365
365
  5. **Branch protection on `main`** — require 14 CI status checks green + 1 review + conversation resolution. Admin bypass left available for emergencies.
366
366
 
@@ -419,9 +419,15 @@ Wheel matrix mirrors publish-ffi + publish-desktop: Linux x86_64 (manylinux2014
419
419
 
420
420
  Authentication via PyPI trusted publishing (OIDC) — zero long-lived tokens. `permissions: id-token: write` on the publish job plus the `release` GitHub environment (one-time trusted-publisher config on PyPI's web UI, documented in `docs/release-secrets.md`).
421
421
 
422
- ### Phase 6g — Node.js SDK publish
422
+ ### Phase 6g — Node.js SDK publish
423
423
 
424
- Adds `publish-nodejs` job. `@napi-rs/cli` builds `.node` binaries per platform; npm publish via OIDC.
424
+ Adds two jobs to `release.yml` `build-nodejs-binaries` (matrix of 4 platforms) + `publish-nodejs` (aggregator + npm upload + GitHub Release).
425
+
426
+ **Bundled-binaries architecture**: the main `sqlrite` npm package ships every platform's `.node` binary inside one tarball (~15 MiB), not the per-platform optional-dep packages `@napi-rs/*` projects use. Simpler for an MVP (one npm publish, one package to manage); the tradeoff is a bigger install, acceptable for a database driver people install once. The `index.js` dispatcher napi generates picks the right binary at require time via `process.platform` + `process.arch`.
427
+
428
+ Same build/publish split as publish-python — matrix cells upload `.node` artifacts, a single aggregator job downloads everything into `sdk/nodejs/`, runs `npm publish --provenance` once. `--provenance` attaches a sigstore-signed attestation linking the published package to this exact workflow run (npm's equivalent of PyPI's PEP 740).
429
+
430
+ Authentication via npm OIDC trusted publishing — zero long-lived `NPM_TOKEN`. One-time trusted-publisher registration on npmjs.com, documented in `docs/release-secrets.md`.
425
431
 
426
432
  ### Phase 6h — WASM publish
427
433
 
@@ -6,12 +6,12 @@ Phase 5 lands these incrementally — each sub-phase fills in one language. The
6
6
 
7
7
  | Language | Status | SDK published | Directory |
8
8
  |----------|--------|---------------|-----------|
9
- | Rust | ✅ Phase 5a | crates.io (Phase 6c) | [`rust/`](rust/) |
9
+ | Rust | ✅ Phase 5a | crates.io as `sqlrite-engine` (Phase 6d) | [`rust/`](rust/) |
10
10
  | C (FFI) | ✅ Phase 5b | GitHub Releases (Phase 6d) | [`c/`](c/) |
11
- | Python | ✅ Phase 5c | PyPI (Phase 6e) | [`python/`](python/) |
12
- | Node.js | ✅ Phase 5d | npm (Phase 6e) | [`nodejs/`](nodejs/) |
13
- | Go | ✅ Phase 5e | Go modules (Phase 6e)| [`go/`](go/) |
14
- | WASM | ✅ Phase 5g | npm as `sqlrite-wasm` (Phase 6e) | [`wasm/`](wasm/) |
11
+ | Python | ✅ Phase 5c | PyPI as `sqlrite` (Phase 6f) | [`python/`](python/) |
12
+ | Node.js | ✅ Phase 5d | npm as `@joaoh82/sqlrite` (Phase 6g) | [`nodejs/`](nodejs/) |
13
+ | Go | ✅ Phase 5e | Go modules (Phase 6i) | [`go/`](go/) |
14
+ | WASM | ✅ Phase 5g | npm as `sqlrite-wasm` (Phase 6h) | [`wasm/`](wasm/) |
15
15
 
16
16
  See [docs/roadmap.md](../docs/roadmap.md) for what each sub-phase delivers.
17
17
 
@@ -4,7 +4,7 @@ build-backend = "maturin"
4
4
 
5
5
  [project]
6
6
  name = "sqlrite"
7
- version = "0.1.4"
7
+ version = "0.1.5"
8
8
  description = "Python bindings for SQLRite — a small, embeddable SQLite clone written in Rust."
9
9
  authors = [{ name = "Joao Henrique Machado Silva", email = "joaoh82@gmail.com" }]
10
10
  license = { text = "MIT" }
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "sqlrite-python"
3
- version = "0.1.4"
3
+ version = "0.1.5"
4
4
  authors = ["Joao Henrique Machado Silva <joaoh82@gmail.com>"]
5
5
  edition = "2024"
6
6
  rust-version = "1.85"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes