sqlrite 0.1.6__tar.gz → 0.1.8__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.
- {sqlrite-0.1.6 → sqlrite-0.1.8}/.github/workflows/release.yml +201 -15
- {sqlrite-0.1.6 → sqlrite-0.1.8}/Cargo.lock +5 -5
- {sqlrite-0.1.6 → sqlrite-0.1.8}/Cargo.toml +1 -1
- {sqlrite-0.1.6 → sqlrite-0.1.8}/PKG-INFO +1 -1
- {sqlrite-0.1.6 → sqlrite-0.1.8}/README.md +2 -2
- {sqlrite-0.1.6 → sqlrite-0.1.8}/desktop/package.json +1 -1
- {sqlrite-0.1.6 → sqlrite-0.1.8}/docs/embedding.md +3 -3
- {sqlrite-0.1.6 → sqlrite-0.1.8}/docs/release-plan.md +4 -3
- {sqlrite-0.1.6 → sqlrite-0.1.8}/docs/release-secrets.md +76 -45
- {sqlrite-0.1.6 → sqlrite-0.1.8}/docs/roadmap.md +13 -5
- {sqlrite-0.1.6 → sqlrite-0.1.8}/examples/README.md +2 -2
- {sqlrite-0.1.6 → sqlrite-0.1.8}/pyproject.toml +1 -1
- {sqlrite-0.1.6 → sqlrite-0.1.8}/sdk/python/Cargo.toml +1 -1
- {sqlrite-0.1.6 → sqlrite-0.1.8}/.github/workflows/ci.yml +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/.github/workflows/release-pr.yml +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/.github/workflows/rust.yml +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/.gitignore +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/CODE_OF_CONDUCT.md +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/LICENSE +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/MAINTAINERS +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/Makefile +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/desktop/index.html +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/desktop/package-lock.json +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/desktop/src/App.svelte +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/desktop/src/app.css +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/desktop/src/main.ts +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/desktop/src/vite-env.d.ts +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/desktop/svelte.config.js +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/desktop/tsconfig.json +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/desktop/vite.config.ts +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/docs/_index.md +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/docs/architecture.md +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/docs/design-decisions.md +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/docs/desktop.md +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/docs/file-format.md +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/docs/getting-started.md +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/docs/pager.md +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/docs/smoke-test.md +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/docs/sql-engine.md +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/docs/storage-model.md +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/docs/supported-sql.md +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/docs/usage.md +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/examples/c/Makefile +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/examples/c/hello.c +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/examples/go/go.mod +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/examples/go/hello.go +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/examples/nodejs/hello.mjs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/examples/python/hello.py +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/examples/rust/quickstart.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/examples/wasm/Makefile +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/examples/wasm/index.html +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/images/SQLRite - Desktop.png +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/images/SQLRite Data Structures.png +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/images/SQLRite Simple SQL Execution High Level Diagram.png +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/images/SQLRite Simple SQL INSERT Execution High Level Diagram (Insert Row).png +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/images/SQLRite Simple SQL INSERT Execution High Level Diagram.png +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/images/SQLRite_logo.png +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/images/architecture.png +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/rust-toolchain.toml +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/samples/AST.delete.example +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/samples/AST.insert.exemple +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/samples/AST.select.example +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/samples/AST.update.example +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/samples/CREATE TABLE sqlrite_schema.sql +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/samples/CREATE_TABLE with duplicate.sql +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/samples/CREATE_TABLE.sql +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/samples/INSERT.sql +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/scripts/bump-version.sh +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/sdk/go/README.md +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/sdk/go/conn.go +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/sdk/go/go.mod +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/sdk/go/rows.go +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/sdk/go/sqlrite.go +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/sdk/go/sqlrite_test.go +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/sdk/go/stmt.go +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/sdk/python/README.md +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/sdk/python/src/lib.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/sdk/python/tests/test_sqlrite.py +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/connection.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/error.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/lib.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/main.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/meta_command/mod.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/repl/mod.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/sql/db/database.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/sql/db/mod.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/sql/db/secondary_index.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/sql/db/table.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/sql/executor.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/sql/mod.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/sql/pager/cell.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/sql/pager/file.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/sql/pager/header.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/sql/pager/index_cell.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/sql/pager/interior_page.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/sql/pager/mod.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/sql/pager/overflow.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/sql/pager/page.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/sql/pager/pager.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/sql/pager/table_page.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/sql/pager/varint.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/sql/pager/wal.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/sql/parser/create.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/sql/parser/insert.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/sql/parser/mod.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/sql/parser/select.rs +0 -0
- {sqlrite-0.1.6 → sqlrite-0.1.8}/src/sql/tokenizer.rs +0 -0
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
# Phase 6e adds publish-desktop.
|
|
9
9
|
# Phase 6f adds build-python-wheels + publish-python.
|
|
10
10
|
# Phase 6g adds build-nodejs-binaries + publish-nodejs.
|
|
11
|
-
#
|
|
12
|
-
#
|
|
11
|
+
# Phase 6h adds publish-wasm.
|
|
12
|
+
# Phase 6i adds publish-go.
|
|
13
13
|
#
|
|
14
14
|
# Design doc: docs/release-plan.md.
|
|
15
15
|
# One-time registry / branch-protection setup: docs/release-secrets.md.
|
|
@@ -127,6 +127,7 @@ jobs:
|
|
|
127
127
|
"sqlrite-desktop-v$V"
|
|
128
128
|
"sqlrite-py-v$V"
|
|
129
129
|
"sqlrite-node-v$V"
|
|
130
|
+
"sqlrite-wasm-v$V"
|
|
130
131
|
"v$V"
|
|
131
132
|
)
|
|
132
133
|
for tag in "${TAGS[@]}"; do
|
|
@@ -821,32 +822,61 @@ jobs:
|
|
|
821
822
|
name: nodejs-dispatcher
|
|
822
823
|
path: sdk/nodejs
|
|
823
824
|
|
|
824
|
-
- name: List publish payload
|
|
825
|
+
- name: List publish payload + OIDC env diagnostics
|
|
825
826
|
working-directory: sdk/nodejs
|
|
826
827
|
run: |
|
|
827
828
|
ls -la
|
|
828
829
|
echo "---"
|
|
829
830
|
npm --version
|
|
830
831
|
echo "---"
|
|
832
|
+
# Confirm the OIDC env vars GitHub Actions auto-sets when
|
|
833
|
+
# `permissions: id-token: write` is granted. If either of
|
|
834
|
+
# these is empty, OIDC token exchange CAN'T happen and
|
|
835
|
+
# npm publish will fall back to "no auth available".
|
|
836
|
+
# Just print whether they're set, not their values
|
|
837
|
+
# (the URL has a trailing token-issuance path; treat as
|
|
838
|
+
# sensitive).
|
|
839
|
+
echo "ACTIONS_ID_TOKEN_REQUEST_URL is set: ${ACTIONS_ID_TOKEN_REQUEST_URL:+yes}${ACTIONS_ID_TOKEN_REQUEST_URL:-NO}"
|
|
840
|
+
echo "ACTIONS_ID_TOKEN_REQUEST_TOKEN is set: ${ACTIONS_ID_TOKEN_REQUEST_TOKEN:+yes}${ACTIONS_ID_TOKEN_REQUEST_TOKEN:-NO}"
|
|
841
|
+
echo "---"
|
|
831
842
|
# Dry-run the pack to see exactly what ends up in the
|
|
832
843
|
# published tarball. A missing .node file or a stray
|
|
833
844
|
# devDep pulled in by accident would be visible here.
|
|
834
845
|
npm pack --dry-run
|
|
835
846
|
|
|
836
|
-
# Single atomic publish via OIDC trusted publisher.
|
|
837
|
-
#
|
|
838
|
-
# provenance
|
|
839
|
-
#
|
|
840
|
-
#
|
|
841
|
-
#
|
|
847
|
+
# Single atomic publish via OIDC trusted publisher.
|
|
848
|
+
#
|
|
849
|
+
# The `--provenance` flag is what tells npm CLI to use the
|
|
850
|
+
# OIDC code path. Without it, npm only checks for `_authToken`
|
|
851
|
+
# config and gives up with ENEEDAUTH (this happened on the
|
|
852
|
+
# v0.1.6 canary attempt that ran without the flag — npm
|
|
853
|
+
# never even tried OIDC). With it, npm:
|
|
854
|
+
# 1. Reads ACTIONS_ID_TOKEN_REQUEST_URL +
|
|
855
|
+
# ACTIONS_ID_TOKEN_REQUEST_TOKEN from the GHA env
|
|
856
|
+
# 2. Mints an OIDC token bearing the workflow's identity
|
|
857
|
+
# claims (repo, environment, workflow filename, etc.)
|
|
858
|
+
# 3. Exchanges it at npm for a one-time publish token
|
|
859
|
+
# 4. Publishes the package + attaches a sigstore-signed
|
|
860
|
+
# provenance attestation linking the artifact to this
|
|
861
|
+
# exact workflow run
|
|
862
|
+
#
|
|
863
|
+
# The previous v0.1.5 failure with `--provenance` set was a
|
|
864
|
+
# different bug — `registry-url` on setup-node was generating
|
|
865
|
+
# an `.npmrc` that forced token-auth and bypassed OIDC. With
|
|
866
|
+
# registry-url removed (this file's previous fix) and
|
|
867
|
+
# `--provenance` restored, both bugs are addressed.
|
|
842
868
|
#
|
|
843
869
|
# `--access public` is REQUIRED because `@joaoh82/sqlrite`
|
|
844
|
-
# is a scoped package and scoped packages default to
|
|
845
|
-
#
|
|
846
|
-
#
|
|
870
|
+
# is a scoped package and scoped packages default to private;
|
|
871
|
+
# without the flag, npm rejects the upload for a free-tier
|
|
872
|
+
# account that can't host private packages.
|
|
873
|
+
#
|
|
874
|
+
# `--loglevel verbose` makes auth/transport errors
|
|
875
|
+
# diagnosable from the run log without re-running with
|
|
876
|
+
# debug-on. Cheap insurance against another silent failure.
|
|
847
877
|
- name: Publish to npm
|
|
848
878
|
working-directory: sdk/nodejs
|
|
849
|
-
run: npm publish --access public
|
|
879
|
+
run: npm publish --access public --provenance --loglevel verbose
|
|
850
880
|
|
|
851
881
|
- name: GitHub Release
|
|
852
882
|
uses: softprops/action-gh-release@v2
|
|
@@ -889,6 +919,161 @@ jobs:
|
|
|
889
919
|
See the umbrella release [v${{ needs.detect.outputs.version }}](../../releases/tag/v${{ needs.detect.outputs.version }}) for the full changelog.
|
|
890
920
|
generate_release_notes: true
|
|
891
921
|
|
|
922
|
+
# ---------------------------------------------------------------------------
|
|
923
|
+
# Step 3h: build the WASM package via wasm-pack and publish to
|
|
924
|
+
# npm as @joaoh82/sqlrite-wasm. (Phase 6h.)
|
|
925
|
+
#
|
|
926
|
+
# Single job — unlike the Python / Node SDKs there's no per-OS
|
|
927
|
+
# binary matrix, because WebAssembly is one universal artifact
|
|
928
|
+
# that runs on any wasm32-capable host (browsers, Deno, modern
|
|
929
|
+
# bundlers). One build, one upload.
|
|
930
|
+
#
|
|
931
|
+
# **Why scoped (`@joaoh82/sqlrite-wasm`) preemptively:** the
|
|
932
|
+
# unscoped `sqlrite-wasm` is currently free on npm but the
|
|
933
|
+
# similarity check that rejected `sqlrite` (vs `sqlite`) might
|
|
934
|
+
# also reject `sqlrite-wasm` (vs `sqlite-wasm` — distance 1).
|
|
935
|
+
# Going scoped from day one matches the Node SDK's
|
|
936
|
+
# `@joaoh82/sqlrite` decision and avoids the rename dance we
|
|
937
|
+
# did in PR #30. Free to revisit if the ecosystem demands an
|
|
938
|
+
# unscoped name.
|
|
939
|
+
#
|
|
940
|
+
# **Build target = `bundler`:** webpack/vite/rollup users get
|
|
941
|
+
# JS modules + .wasm without needing additional config. `web`
|
|
942
|
+
# / `nodejs` / `deno` targets can be added as siblings later
|
|
943
|
+
# if there's demand; one target per package is the simpler
|
|
944
|
+
# MVP shape.
|
|
945
|
+
#
|
|
946
|
+
# `--scope joaoh82` on `wasm-pack build` makes wasm-pack emit
|
|
947
|
+
# an auto-generated package.json with `name: "@joaoh82/sqlrite-wasm"`
|
|
948
|
+
# in the `pkg/` output directory — saves us from managing two
|
|
949
|
+
# package.json files (the auto-generated one and a hand-written
|
|
950
|
+
# override).
|
|
951
|
+
publish-wasm:
|
|
952
|
+
name: Publish WASM package to npm
|
|
953
|
+
needs: [detect, tag-all]
|
|
954
|
+
if: needs.detect.outputs.should_release == 'true'
|
|
955
|
+
runs-on: ubuntu-latest
|
|
956
|
+
environment: release
|
|
957
|
+
permissions:
|
|
958
|
+
# OIDC: required for npm trusted-publisher token exchange.
|
|
959
|
+
# Same flow proven in publish-nodejs after the v0.1.5–0.1.7
|
|
960
|
+
# debugging adventure.
|
|
961
|
+
id-token: write
|
|
962
|
+
contents: write
|
|
963
|
+
steps:
|
|
964
|
+
- uses: actions/checkout@v4
|
|
965
|
+
|
|
966
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
967
|
+
with:
|
|
968
|
+
targets: wasm32-unknown-unknown
|
|
969
|
+
|
|
970
|
+
- uses: Swatinem/rust-cache@v2
|
|
971
|
+
with:
|
|
972
|
+
shared-key: publish-wasm
|
|
973
|
+
workspaces: 'sdk/wasm -> target'
|
|
974
|
+
|
|
975
|
+
# Install wasm-pack — the canonical tool for building +
|
|
976
|
+
# packaging Rust crates as npm-publishable WASM modules.
|
|
977
|
+
# `cargo binstall` would be faster than `cargo install`
|
|
978
|
+
# (downloads a prebuilt binary) but binstall isn't
|
|
979
|
+
# preinstalled on `ubuntu-latest`; the curl|sh installer
|
|
980
|
+
# does the same thing in one step without bootstrapping
|
|
981
|
+
# binstall first.
|
|
982
|
+
- name: Install wasm-pack
|
|
983
|
+
run: |
|
|
984
|
+
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
|
985
|
+
|
|
986
|
+
# See publish-nodejs for the long-form rationale of this
|
|
987
|
+
# whole setup-node + npm-upgrade dance. Short version:
|
|
988
|
+
# NO `registry-url:` (would force token-auth via .npmrc),
|
|
989
|
+
# then explicitly upgrade npm to 11.5+ so trusted
|
|
990
|
+
# publishing is supported.
|
|
991
|
+
- uses: actions/setup-node@v4
|
|
992
|
+
with:
|
|
993
|
+
node-version: '20'
|
|
994
|
+
|
|
995
|
+
- name: Upgrade npm to latest (need 11.5+ for trusted publishing)
|
|
996
|
+
run: npm install -g npm@latest
|
|
997
|
+
|
|
998
|
+
# Build the WASM package. `--target bundler` produces
|
|
999
|
+
# ES modules + .wasm that webpack/vite/rollup can consume
|
|
1000
|
+
# directly. `--scope joaoh82` makes the auto-generated
|
|
1001
|
+
# package.json's name `@joaoh82/sqlrite-wasm`. `--release`
|
|
1002
|
+
# picks up the size-optimized profile from sdk/wasm/
|
|
1003
|
+
# Cargo.toml ([profile.release] opt-level = "z" + LTO).
|
|
1004
|
+
- name: Build WASM package
|
|
1005
|
+
working-directory: sdk/wasm
|
|
1006
|
+
run: |
|
|
1007
|
+
wasm-pack build --release --target bundler --scope joaoh82
|
|
1008
|
+
echo "--- generated pkg/ contents ---"
|
|
1009
|
+
ls -la pkg/
|
|
1010
|
+
echo "--- generated package.json ---"
|
|
1011
|
+
cat pkg/package.json
|
|
1012
|
+
echo "--- WASM binary size ---"
|
|
1013
|
+
ls -la pkg/*.wasm
|
|
1014
|
+
|
|
1015
|
+
# OIDC env diagnostics — same defensive logging that paid
|
|
1016
|
+
# off when publish-nodejs hit the trusted-publisher subject
|
|
1017
|
+
# mismatch in v0.1.7.
|
|
1018
|
+
- name: OIDC env diagnostics
|
|
1019
|
+
working-directory: sdk/wasm/pkg
|
|
1020
|
+
run: |
|
|
1021
|
+
npm --version
|
|
1022
|
+
echo "ACTIONS_ID_TOKEN_REQUEST_URL is set: ${ACTIONS_ID_TOKEN_REQUEST_URL:+yes}${ACTIONS_ID_TOKEN_REQUEST_URL:-NO}"
|
|
1023
|
+
echo "ACTIONS_ID_TOKEN_REQUEST_TOKEN is set: ${ACTIONS_ID_TOKEN_REQUEST_TOKEN:+yes}${ACTIONS_ID_TOKEN_REQUEST_TOKEN:-NO}"
|
|
1024
|
+
npm pack --dry-run
|
|
1025
|
+
|
|
1026
|
+
# Atomic OIDC publish. Same flag combo proven in
|
|
1027
|
+
# publish-nodejs: `--provenance` to trigger OIDC code path,
|
|
1028
|
+
# `--access public` because scoped packages default to
|
|
1029
|
+
# private, `--loglevel verbose` to keep error logs
|
|
1030
|
+
# diagnosable.
|
|
1031
|
+
- name: Publish to npm
|
|
1032
|
+
working-directory: sdk/wasm/pkg
|
|
1033
|
+
run: npm publish --access public --provenance --loglevel verbose
|
|
1034
|
+
|
|
1035
|
+
- name: GitHub Release
|
|
1036
|
+
uses: softprops/action-gh-release@v2
|
|
1037
|
+
with:
|
|
1038
|
+
tag_name: sqlrite-wasm-v${{ needs.detect.outputs.version }}
|
|
1039
|
+
name: WASM v${{ needs.detect.outputs.version }}
|
|
1040
|
+
body: |
|
|
1041
|
+
Published to npm: https://www.npmjs.com/package/@joaoh82/sqlrite-wasm/v/${{ needs.detect.outputs.version }}
|
|
1042
|
+
|
|
1043
|
+
```bash
|
|
1044
|
+
npm install @joaoh82/sqlrite-wasm@${{ needs.detect.outputs.version }}
|
|
1045
|
+
```
|
|
1046
|
+
|
|
1047
|
+
```javascript
|
|
1048
|
+
// Bundler target — works with webpack, vite, rollup, parcel
|
|
1049
|
+
import init, { Database } from '@joaoh82/sqlrite-wasm';
|
|
1050
|
+
|
|
1051
|
+
await init();
|
|
1052
|
+
const db = new Database();
|
|
1053
|
+
db.exec("CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)");
|
|
1054
|
+
db.exec("INSERT INTO users (name) VALUES ('alice')");
|
|
1055
|
+
const rows = db.query("SELECT id, name FROM users");
|
|
1056
|
+
// → [{ id: 1, name: 'alice' }]
|
|
1057
|
+
```
|
|
1058
|
+
|
|
1059
|
+
**What's in the package:**
|
|
1060
|
+
- `sqlrite_wasm_bg.wasm` — the WebAssembly engine binary
|
|
1061
|
+
- `sqlrite_wasm.js` — auto-generated JS glue (wasm-bindgen)
|
|
1062
|
+
- `sqlrite_wasm.d.ts` — TypeScript types
|
|
1063
|
+
- `package.json` — bundler-target metadata
|
|
1064
|
+
|
|
1065
|
+
**Build target:** `bundler` (webpack/vite/rollup-friendly).
|
|
1066
|
+
For `web` / `nodejs` / `deno` targets, build from source via `wasm-pack build sdk/wasm --target <target>`.
|
|
1067
|
+
|
|
1068
|
+
Verify package provenance:
|
|
1069
|
+
```bash
|
|
1070
|
+
npm audit signatures
|
|
1071
|
+
```
|
|
1072
|
+
|
|
1073
|
+
See the umbrella release [v${{ needs.detect.outputs.version }}](../../releases/tag/v${{ needs.detect.outputs.version }}) for the full changelog.
|
|
1074
|
+
files: sdk/wasm/pkg/*.wasm
|
|
1075
|
+
generate_release_notes: true
|
|
1076
|
+
|
|
892
1077
|
# ---------------------------------------------------------------------------
|
|
893
1078
|
# Step 4: create the umbrella GitHub Release. Runs after all
|
|
894
1079
|
# publish-* jobs succeed. Uses GitHub's native auto-generated
|
|
@@ -897,7 +1082,7 @@ jobs:
|
|
|
897
1082
|
# config if we add one later.
|
|
898
1083
|
finalize:
|
|
899
1084
|
name: Finalize umbrella release
|
|
900
|
-
needs: [detect, publish-crate, publish-ffi, publish-desktop, publish-python, publish-nodejs]
|
|
1085
|
+
needs: [detect, publish-crate, publish-ffi, publish-desktop, publish-python, publish-nodejs, publish-wasm]
|
|
901
1086
|
if: needs.detect.outputs.should_release == 'true'
|
|
902
1087
|
runs-on: ubuntu-latest
|
|
903
1088
|
steps:
|
|
@@ -920,8 +1105,9 @@ jobs:
|
|
|
920
1105
|
- 🖥️ [Desktop](../../releases/tag/sqlrite-desktop-v${{ needs.detect.outputs.version }}) — unsigned installers for Linux (AppImage + deb), macOS (dmg aarch64), Windows (msi)
|
|
921
1106
|
- 🐍 [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
|
|
922
1107
|
- 🟢 [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
|
|
1108
|
+
- 🌐 [WASM](../../releases/tag/sqlrite-wasm-v${{ needs.detect.outputs.version }}) → [npm](https://www.npmjs.com/package/@joaoh82/sqlrite-wasm/v/${{ needs.detect.outputs.version }}) — browser/bundler-target WebAssembly build via wasm-pack
|
|
923
1109
|
|
|
924
|
-
|
|
1110
|
+
_Go SDK lands as its publish job comes online (Phase 6i)._
|
|
925
1111
|
|
|
926
1112
|
---
|
|
927
1113
|
|
|
@@ -3736,7 +3736,7 @@ dependencies = [
|
|
|
3736
3736
|
|
|
3737
3737
|
[[package]]
|
|
3738
3738
|
name = "sqlrite-desktop"
|
|
3739
|
-
version = "0.1.
|
|
3739
|
+
version = "0.1.8"
|
|
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.
|
|
3751
|
+
version = "0.1.8"
|
|
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.
|
|
3766
|
+
version = "0.1.8"
|
|
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.
|
|
3774
|
+
version = "0.1.8"
|
|
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.
|
|
3784
|
+
version = "0.1.8"
|
|
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.
|
|
30
|
+
version = "0.1.8"
|
|
31
31
|
authors = ["Joao Henrique Machado Silva <joaoh82@gmail.com>"]
|
|
32
32
|
edition = "2024"
|
|
33
33
|
rust-version = "1.85"
|
|
@@ -224,12 +224,12 @@ 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 (`@joaoh82/sqlrite` +
|
|
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` + `@joaoh82/sqlrite-wasm` — both scoped because npm's similarity check rejects the unscoped names against `sqlite`/`sqlite3`/`sqlite-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.
|
|
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
|
|
231
231
|
- [ ] **6g — Node.js SDK publish**: `@napi-rs/cli` → `.node` binaries per platform → npm via OIDC
|
|
232
|
-
- [
|
|
232
|
+
- [x] **6h — WASM publish**: `wasm-pack build --target bundler --scope joaoh82` + `npm publish --provenance` (OIDC) → `@joaoh82/sqlrite-wasm` on npm. Single job, no matrix (WebAssembly is universal). `.wasm` also attached to the `sqlrite-wasm-v<V>` GitHub Release.
|
|
233
233
|
- [ ] **6i — Go SDK publish**: `sdk/go/vX.Y.Z` git tag + attach FFI tarballs to the Go GitHub Release for `go get` users who want prebuilt `libsqlrite_c`
|
|
234
234
|
|
|
235
235
|
**Phase 6.1 — Code signing** *(follow-up)*
|
|
@@ -189,7 +189,7 @@ Full API tour: [`sdk/go/README.md`](../sdk/go/README.md); runnable walkthrough:
|
|
|
189
189
|
`sdk/wasm/` — `wasm-bindgen` compiles the Rust engine directly to `wasm32-unknown-unknown`. The whole database runs in a browser tab:
|
|
190
190
|
|
|
191
191
|
```js
|
|
192
|
-
import init, { Database } from 'sqlrite-wasm';
|
|
192
|
+
import init, { Database } from '@joaoh82/sqlrite-wasm';
|
|
193
193
|
await init();
|
|
194
194
|
|
|
195
195
|
const db = new Database();
|
|
@@ -201,7 +201,7 @@ const rows = db.query("SELECT id, name FROM users");
|
|
|
201
201
|
|
|
202
202
|
**In-memory only** in the MVP — file-backed mode needs OS file locks and a `-wal` sidecar that don't exist in a tab's sandbox. OPFS-backed persistence is a natural follow-up.
|
|
203
203
|
|
|
204
|
-
Build locally via `wasm-pack build --target web --release` (or `bundler` / `nodejs`). Phase
|
|
204
|
+
Build locally via `wasm-pack build --target web --release` (or `bundler` / `nodejs`). Phase 6h publishes `@joaoh82/sqlrite-wasm` (bundler target) to npm via `wasm-pack build` + `npm publish` (OIDC trusted publisher) on every release.
|
|
205
205
|
|
|
206
206
|
The root engine crate is feature-gated (`cli` for rustyline/clap/env_logger; `file-locks` for fs2) so `default-features = false` strips out everything that wouldn't compile on `wasm32-unknown-unknown`.
|
|
207
207
|
|
|
@@ -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** — `@joaoh82/sqlrite` (Node) +
|
|
220
|
+
- **npm** — `@joaoh82/sqlrite` (Node) + `@joaoh82/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
|
|
|
@@ -75,7 +75,7 @@ GitHub Releases by product ("show me every Python release").
|
|
|
75
75
|
| Python SDK | `sqlrite-py-vX.Y.Z` | PyPI + GitHub Release |
|
|
76
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
|
-
| WASM | `sqlrite-wasm-vX.Y.Z` | npm (
|
|
78
|
+
| WASM | `sqlrite-wasm-vX.Y.Z` | npm (`@joaoh82/sqlrite-wasm`) + GitHub Release |
|
|
79
79
|
| Desktop app | `sqlrite-desktop-vX.Y.Z` | GitHub Release (unsigned installers) |
|
|
80
80
|
| **Meta** | `vX.Y.Z` | GitHub Release (links to the other seven; acts as the "this was release 0.2.0" anchor) |
|
|
81
81
|
|
|
@@ -290,8 +290,9 @@ from now.
|
|
|
290
290
|
TestPyPI (for dry-runs) if we decide we want that later.
|
|
291
291
|
3. **npm trusted publishing** — available via npm's newer "OIDC
|
|
292
292
|
trusted publishing" system. One-time config on npm's web UI
|
|
293
|
-
for the
|
|
294
|
-
needed
|
|
293
|
+
for the `@joaoh82/sqlrite` and `@joaoh82/sqlrite-wasm`
|
|
294
|
+
packages. No `NPM_TOKEN` needed (after a one-time placeholder
|
|
295
|
+
publish per `docs/release-secrets.md` §3a).
|
|
295
296
|
4. **GitHub Environments** — create one called `release` in repo
|
|
296
297
|
settings → Environments. Add `joaoh82` as a required reviewer
|
|
297
298
|
on the `release` environment. The publish jobs reference
|
|
@@ -106,54 +106,84 @@ release, status flips to "active".
|
|
|
106
106
|
## 3. npm trusted publishers (two packages)
|
|
107
107
|
|
|
108
108
|
**Why two:** we publish `@joaoh82/sqlrite` (Node.js bindings from
|
|
109
|
-
`sdk/nodejs/`) and
|
|
109
|
+
`sdk/nodejs/`) and `@joaoh82/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
|
-
**Why
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
distance 1
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
### 3a.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
113
|
+
**Why both are scoped:** npm's registry rejects unscoped names
|
|
114
|
+
that are too similar to existing popular packages — `sqlrite` is
|
|
115
|
+
levenshtein-distance 1 from `sqlite`/`sqlite3`, and
|
|
116
|
+
`sqlrite-wasm` would be distance 1 from `sqlite-wasm`. Scoping
|
|
117
|
+
under `@joaoh82` (the author's npm user scope) bypasses the
|
|
118
|
+
check entirely — same pattern as `@napi-rs/*`, `@swc/core`,
|
|
119
|
+
`@aws-sdk/*`. We learned this the hard way on the Node package
|
|
120
|
+
during the v0.1.5 canary; for the WASM package we went scoped
|
|
121
|
+
preemptively in Phase 6h.
|
|
122
|
+
|
|
123
|
+
### 3a. Publish a placeholder for each scoped package
|
|
124
|
+
|
|
125
|
+
**npm requires the package to exist before you can configure a
|
|
126
|
+
trusted publisher for it** (no PyPI-style "pending publisher"
|
|
127
|
+
flow as of late 2025). The bootstrap is a one-time manual
|
|
128
|
+
publish of an empty `0.0.0` placeholder using your local
|
|
129
|
+
credentials. Scoped packages under your own user scope are
|
|
130
|
+
auto-owned, so no separate name reservation is needed beyond
|
|
131
|
+
the publish itself.
|
|
132
|
+
|
|
133
|
+
For each of `@joaoh82/sqlrite` and `@joaoh82/sqlrite-wasm`:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
mkdir /tmp/scoped-placeholder && cd /tmp/scoped-placeholder
|
|
137
|
+
cat > package.json <<'JSON'
|
|
138
|
+
{
|
|
139
|
+
"name": "@joaoh82/sqlrite",
|
|
140
|
+
"version": "0.0.0",
|
|
141
|
+
"description": "Placeholder — real package ships from rust_sqlite CI",
|
|
142
|
+
"license": "MIT"
|
|
143
|
+
}
|
|
144
|
+
JSON
|
|
145
|
+
npm login # if not already
|
|
146
|
+
npm publish --access public
|
|
147
|
+
# Repeat for @joaoh82/sqlrite-wasm — change the name field.
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
The placeholder is harmless; the first CI release publishes a
|
|
151
|
+
real `0.X.Y` over the top.
|
|
152
|
+
|
|
153
|
+
### 3b. Trusted publisher for each package
|
|
154
|
+
|
|
155
|
+
For each placeholder you just published:
|
|
156
|
+
|
|
157
|
+
1. Go to the package's settings page:
|
|
158
|
+
- <https://www.npmjs.com/package/@joaoh82/sqlrite/access>
|
|
159
|
+
- <https://www.npmjs.com/package/@joaoh82/sqlrite-wasm/access>
|
|
160
|
+
2. Find the **Trusted Publisher** section (under Settings, not
|
|
161
|
+
the package list).
|
|
162
|
+
3. **Add publisher**:
|
|
138
163
|
- **Publisher**: GitHub Actions
|
|
139
164
|
- **Organization or user**: `joaoh82`
|
|
140
|
-
- **Repository**: `rust_sqlite`
|
|
141
|
-
|
|
142
|
-
- **
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
165
|
+
- **Repository**: `rust_sqlite` *(repo basename, not
|
|
166
|
+
`joaoh82/rust_sqlite` — npm prepends the owner field)*
|
|
167
|
+
- **Workflow filename**: `release.yml` *(basename, not
|
|
168
|
+
`.github/workflows/release.yml`)*
|
|
169
|
+
- **Environment**: `release` *(case-sensitive — must match the
|
|
170
|
+
`environment: release` block on the publish-* jobs in the
|
|
171
|
+
workflow)*
|
|
172
|
+
4. Save.
|
|
173
|
+
|
|
174
|
+
**Verify**: each package's settings page should show the
|
|
175
|
+
trusted publisher with status "active" after the first
|
|
176
|
+
successful CI publish.
|
|
177
|
+
|
|
178
|
+
**Why every field matters:** the OIDC subject claim our workflow
|
|
179
|
+
sends to npm is `repo:joaoh82/rust_sqlite:environment:release`.
|
|
180
|
+
npm builds the matcher from the form fields above; if any field
|
|
181
|
+
disagrees with the OIDC claim, npm responds 404 ("OIDC token
|
|
182
|
+
exchange error - package not found"), which is npm's misleading
|
|
183
|
+
way of saying "no trusted publisher record matches your token's
|
|
184
|
+
claims". Burned us once on v0.1.7 (typo'd repo name in the
|
|
185
|
+
form); kept the form field reference here so the next person
|
|
186
|
+
doesn't have to re-debug.
|
|
157
187
|
|
|
158
188
|
---
|
|
159
189
|
|
|
@@ -258,8 +288,9 @@ Run through this once everything above is done:
|
|
|
258
288
|
`release.yml` / `release` pending for the `sqlrite`
|
|
259
289
|
project.
|
|
260
290
|
- [ ] npm trusted-publisher page shows the same for both
|
|
261
|
-
|
|
262
|
-
|
|
291
|
+
`@joaoh82/sqlrite` and `@joaoh82/sqlrite-wasm` (assuming
|
|
292
|
+
the placeholders are published per §3a — if not, section
|
|
293
|
+
3a applies).
|
|
263
294
|
- [ ] Branch protection on `main` requires 14 status checks + 1
|
|
264
295
|
review.
|
|
265
296
|
- [ ] Open a dummy PR — the "Merge" button is greyed out until
|
|
@@ -294,7 +294,7 @@ The Rust library is already shippable — this sub-phase adds crate metadata, do
|
|
|
294
294
|
New `sdk/wasm/` crate (standalone, not in the Cargo workspace — wasm-only crates trip `cargo build --workspace` on native hosts). Compiles the Rust engine straight to `wasm32-unknown-unknown` via `wasm-bindgen`. Engine runs entirely in the browser tab.
|
|
295
295
|
|
|
296
296
|
```js
|
|
297
|
-
import init, { Database } from 'sqlrite-wasm';
|
|
297
|
+
import init, { Database } from '@joaoh82/sqlrite-wasm';
|
|
298
298
|
await init();
|
|
299
299
|
|
|
300
300
|
const db = new Database();
|
|
@@ -318,7 +318,7 @@ Landed:
|
|
|
318
318
|
- No prepared-statement object at the JS boundary; `db.query(sql)` is one-shot. The engine still does prepare/execute internally.
|
|
319
319
|
- Parameter binding deferred to 5a.2 (same as every other SDK).
|
|
320
320
|
|
|
321
|
-
Phase
|
|
321
|
+
Phase 6h publishes `@joaoh82/sqlrite-wasm` to npm via `wasm-pack build` + `npm publish` (OIDC trusted publisher) on every release.
|
|
322
322
|
|
|
323
323
|
## Phase 6 — Release engineering + CI/CD
|
|
324
324
|
|
|
@@ -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 `@joaoh82/sqlrite` (the Node binding
|
|
363
|
+
3. **npm trusted publishers** for both `@joaoh82/sqlrite` (the Node binding) and `@joaoh82/sqlrite-wasm` (the browser binding). Both scoped because npm rejected the unscoped `sqlrite` and the WASM stem also risks the same similarity check against `sqlite-wasm`. Scoped packages under your own user scope auto-own the name; npm-side trusted-publisher config still requires the package to exist first (publish a `0.0.0` placeholder via `npm login` + `npm publish --access public` in a temp dir, then add the trusted publisher on the package's settings page). See `docs/release-secrets.md` §3 for the full flow + the gotchas we hit.
|
|
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
|
|
|
@@ -429,9 +429,17 @@ Same build/publish split as publish-python — matrix cells upload `.node` artif
|
|
|
429
429
|
|
|
430
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`.
|
|
431
431
|
|
|
432
|
-
### Phase 6h — WASM publish
|
|
432
|
+
### ✅ Phase 6h — WASM publish
|
|
433
433
|
|
|
434
|
-
Adds `publish-wasm` job. `wasm-pack
|
|
434
|
+
Adds a single `publish-wasm` job to `release.yml` (no per-platform matrix — WebAssembly is one universal artifact). `wasm-pack build --target bundler --scope joaoh82 --release` produces `sdk/wasm/pkg/` containing the `.wasm` binary, JS glue, TypeScript types, and an auto-generated `package.json` with `name: "@joaoh82/sqlrite-wasm"`. `npm publish --access public --provenance` then uploads via the same OIDC trusted-publisher flow as `publish-nodejs`.
|
|
435
|
+
|
|
436
|
+
**Scoped (`@joaoh82/sqlrite-wasm`) preemptively** — the unscoped `sqlrite-wasm` is currently free on npm but the similarity check that rejected `sqlrite` (vs `sqlite`) might also reject `sqlrite-wasm` (vs `sqlite-wasm`, distance 1). Going scoped from day one matches the Node SDK and avoids the rename dance we did for it in PR #30.
|
|
437
|
+
|
|
438
|
+
**Build target = `bundler`** ships JS modules + `.wasm` that webpack/vite/rollup/parcel users can consume directly. `web` / `nodejs` / `deno` targets can be added as siblings later if there's demand; one target per package is the simpler MVP shape.
|
|
439
|
+
|
|
440
|
+
The `.wasm` binary is also attached to the `sqlrite-wasm-vX.Y.Z` GitHub Release for users who want a download link rather than going through npm.
|
|
441
|
+
|
|
442
|
+
`docs/release-secrets.md` §3 now covers both scoped npm packages with the bootstrap-then-add-trusted-publisher flow we settled on after the v0.1.5–v0.1.7 publish-nodejs debugging cycle.
|
|
435
443
|
|
|
436
444
|
### Phase 6i — Go SDK publish
|
|
437
445
|
|
|
@@ -11,7 +11,7 @@ Phase 5 lands these incrementally — each sub-phase fills in one language. The
|
|
|
11
11
|
| Python | ✅ Phase 5c | PyPI as `sqlrite` (Phase 6f) | [`python/`](python/) |
|
|
12
12
|
| Node.js | ✅ Phase 5d | npm as `@joaoh82/sqlrite` (Phase 6g) | [`nodejs/`](nodejs/) |
|
|
13
13
|
| Go | ✅ Phase 5e | Go modules (Phase 6i) | [`go/`](go/) |
|
|
14
|
-
| WASM | ✅ Phase 5g | npm as
|
|
14
|
+
| WASM | ✅ Phase 5g | npm as `@joaoh82/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
|
|
|
@@ -89,5 +89,5 @@ See [`wasm/index.html`](wasm/index.html) and [`sdk/wasm/README.md`](../sdk/wasm/
|
|
|
89
89
|
## Design notes
|
|
90
90
|
|
|
91
91
|
- **One shape across languages.** Every SDK exposes `Connection`, `prepare`, `execute`, and typed `Row` access. The language-specific file in each subdir shows the same CRUD + transaction walkthrough, so users picking up a new binding recognize the surface immediately.
|
|
92
|
-
- **No build step required for end users.** Phase 6 ships prebuilt wheels (Python), `.node` binaries (Node.js), `libsqlrite.{so,dylib,dll}` (for Go / C), and
|
|
92
|
+
- **No build step required for end users.** Phase 6 ships prebuilt wheels (Python), `.node` binaries (Node.js), `libsqlrite.{so,dylib,dll}` (for Go / C), and `@joaoh82/sqlrite-wasm` (browser) — no "install Rust first" tax.
|
|
93
93
|
- **Examples track the engine.** Each sub-phase's commit lands the example alongside the binding itself, so the sample always works against the current library shape.
|
|
@@ -4,7 +4,7 @@ build-backend = "maturin"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "sqlrite"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.8"
|
|
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" }
|
|
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
|
{sqlrite-0.1.6 → sqlrite-0.1.8}/images/SQLRite Simple SQL INSERT Execution High Level Diagram.png
RENAMED
|
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
|