Repository navigation
Add BIGINT_SUM aggregate function with I256 support for handling negative values #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2a0e60c
9028861
5a86836
89545e3
e06bb2f
46a1afd
c3df1a9
7333bb6
337ce23
63b684e
49029c5
a129366
81e3023
6ac51fe
78ecac3
5d1b31e
38225a0
209ed8b
09a1be8
46e6903
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,119 @@ | ||||||||||||||||||||||||||
| name: NPM Packages Release | ||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||
| branches: | ||||||||||||||||||||||||||
| - main | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||
| release: | ||||||||||||||||||||||||||
| if: ${{ github.ref == 'refs/heads/main' && !startsWith(github.event.head_commit.message, 'NPM Package Release') }} | ||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||
| id-token: write | ||||||||||||||||||||||||||
| contents: write | ||||||||||||||||||||||||||
| outputs: | ||||||||||||||||||||||||||
| version: ${{ env.NEW_VERSION }} | ||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||
|
findolor marked this conversation as resolved.
|
||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||
| ssh-key: ${{ secrets.PUBLISH_PRIVATE_KEY }} | ||||||||||||||||||||||||||
| submodules: recursive | ||||||||||||||||||||||||||
| fetch-depth: 0 | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - uses: DeterminateSystems/nix-installer-action@main | ||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||
| determinate: true | ||||||||||||||||||||||||||
| - uses: DeterminateSystems/flakehub-cache-action@main | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Install NodeJS v22 | ||||||||||||||||||||||||||
| uses: actions/setup-node@v4 | ||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||
| node-version: 22 | ||||||||||||||||||||||||||
| cache: "npm" | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - run: nix develop -c build-submodules | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Fix trailing whitespace and ensure newline at EOF YAMLlint reports trailing spaces on Line 35 and missing final newline. Trim the trailing spaces and end the file with a newline. -
+Also ensure there is a newline at the very end of the file. Also applies to: 119-119 🧰 Tools🪛 YAMLlint (1.37.1)[error] 35-35: trailing spaces (trailing-spaces) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
| - run: nix develop -c local-bundle | ||||||||||||||||||||||||||
|
findolor marked this conversation as resolved.
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Test full integration | ||||||||||||||||||||||||||
| run: nix develop -c test-full-integration | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Git Config | ||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||
| git config --global user.email "${{ secrets.CI_GIT_EMAIL }}" | ||||||||||||||||||||||||||
| git config --global user.name "${{ secrets.CI_GIT_USER }}" | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # get hash of latest published pkgs from npm and concat them | ||||||||||||||||||||||||||
| - name: Get Old Hash | ||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||
| OLD_HASH=$(npm view @rainlanguage/sqlite-web@latest dist.shasum 2>/dev/null || echo "none") | ||||||||||||||||||||||||||
| echo "OLD_HASH=$OLD_HASH" >> $GITHUB_ENV | ||||||||||||||||||||||||||
| echo "old hash: $OLD_HASH" | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
Comment on lines
+47
to
+52
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Optional: compare sha512 integrity instead of sha1 shasum npm exposes dist.integrity (sha512). Using that provides a stronger integrity check and avoids reliance on local shasum formatting. - OLD_HASH="$(npm view @rainlanguage/sqlite-web@latest dist.shasum 2>/dev/null || echo "none")"
+ OLD_HASH="$(npm view @rainlanguage/sqlite-web@latest dist.integrity 2>/dev/null || echo "none")"You’ll also need to compute a matching sha512 integrity string for NEW_HASH (e.g., using openssl base64 encoding of the sha512 digest in SRI format) if you adopt this.
🧰 Tools🪛 actionlint (1.7.7)48-48: shellcheck reported issue in this script: SC2086:info:2:30: Double quote to prevent globbing and word splitting (shellcheck) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
| # Build the package and calc hash | ||||||||||||||||||||||||||
| - name: Build and Get New Hash | ||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||
| nix develop -c local-bundle | ||||||||||||||||||||||||||
| NEW_HASH=$(cd pkg && npm pack --silent | xargs shasum | cut -c1-40) | ||||||||||||||||||||||||||
| echo "NEW_HASH=$NEW_HASH" >> $GITHUB_ENV | ||||||||||||||||||||||||||
| echo "new hash: $NEW_HASH" | ||||||||||||||||||||||||||
| rm -f pkg/*.tgz | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
Comment on lines
+56
to
+61
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quote $GITHUB_ENV; keep single pack artifact; add pipefail Prevents word-splitting and early exit on failures within the pipe. - run: |
- nix develop -c local-bundle
- NEW_HASH=$(cd pkg && npm pack --silent | xargs shasum | cut -c1-40)
- echo "NEW_HASH=$NEW_HASH" >> $GITHUB_ENV
- echo "new hash: $NEW_HASH"
- rm -f pkg/*.tgz
+ run: |
+ set -Eeuo pipefail
+ nix develop -c local-bundle
+ NEW_HASH="$(cd pkg && npm pack --silent | xargs shasum | cut -c1-40)"
+ echo "NEW_HASH=$NEW_HASH" >> "$GITHUB_ENV"
+ echo "new hash: $NEW_HASH"
+ rm -f pkg/*.tgz📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
| # from here on, we'll skip if OLD_HASH and NEW_HASH are the same (ie no publish) | ||||||||||||||||||||||||||
| # this means we need to skip every step by using an if statement. | ||||||||||||||||||||||||||
| # set npm version in pkg directory | ||||||||||||||||||||||||||
| - name: Set Version | ||||||||||||||||||||||||||
| if: ${{ env.OLD_HASH != env.NEW_HASH }} | ||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||
| NEW_VERSION=$(npm version prerelease --preid alpha --no-git-tag-version) | ||||||||||||||||||||||||||
| echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
Comment on lines
+65
to
+70
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Run npm version in pkg/; current command mutates the wrong package.json The comment says “set npm version in pkg directory” but the command runs at repo root. If the root has a package.json, it will be version-bumped incorrectly; if not, the command fails. Execute in pkg and keep writing to the job env. - - name: Set Version
+ - name: Set Version
if: ${{ env.OLD_HASH != env.NEW_HASH }}
- run: |
- NEW_VERSION=$(npm version prerelease --preid alpha --no-git-tag-version)
- echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
+ working-directory: pkg
+ run: |
+ set -Eeuo pipefail
+ NEW_VERSION="$(npm version prerelease --preid alpha --no-git-tag-version)"
+ echo "NEW_VERSION=$NEW_VERSION" >> "$GITHUB_ENV"📝 Committable suggestion
Suggested change
🧰 Tools🪛 actionlint (1.7.7)67-67: shellcheck reported issue in this script: SC2086:info:2:36: Double quote to prevent globbing and word splitting (shellcheck) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
| # Commit changes and tag | ||||||||||||||||||||||||||
| - name: Commit And Tag | ||||||||||||||||||||||||||
| if: ${{ env.OLD_HASH != env.NEW_HASH }} | ||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||
| git add "pkg/package.json" | ||||||||||||||||||||||||||
| git commit -m "NPM Package Release v${{ env.NEW_VERSION }}" | ||||||||||||||||||||||||||
| git tag npm-v${{ env.NEW_VERSION }} | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Push the commit to remote | ||||||||||||||||||||||||||
| - name: Push Changes To Remote | ||||||||||||||||||||||||||
| if: ${{ env.OLD_HASH != env.NEW_HASH }} | ||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||
| git push origin | ||||||||||||||||||||||||||
| git push -u origin npm-v${{ env.NEW_VERSION }} | ||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Create sqlite-web npm package tarball | ||||||||||||||||||||||||||
| - name: Create sqlite-web NPM Package Tarball | ||||||||||||||||||||||||||
| if: ${{ env.OLD_HASH != env.NEW_HASH }} | ||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||
| cd pkg | ||||||||||||||||||||||||||
| echo "NPM_PACKAGE=$(npm pack --silent)" >> $GITHUB_ENV | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Rename sqlite-web NPM Package Tarball | ||||||||||||||||||||||||||
| if: ${{ env.OLD_HASH != env.NEW_HASH }} | ||||||||||||||||||||||||||
| run: mv pkg/${{ env.NPM_PACKAGE }} sqlite_web_npm_package_${{ env.NEW_VERSION }}.tgz | ||||||||||||||||||||||||||
|
Comment on lines
+92
to
+97
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quote $GITHUB_ENV and harden shell Prevents word-splitting when exporting NPM_PACKAGE; fail early on errors. - run: |
- cd pkg
- echo "NPM_PACKAGE=$(npm pack --silent)" >> $GITHUB_ENV
+ run: |
+ set -Eeuo pipefail
+ cd pkg
+ echo "NPM_PACKAGE=$(npm pack --silent)" >> "$GITHUB_ENV"📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # publish sqlite-web pkg to npm | ||||||||||||||||||||||||||
| - name: Publish sqlite-web pkg To NPM | ||||||||||||||||||||||||||
| if: ${{ env.OLD_HASH != env.NEW_HASH }} | ||||||||||||||||||||||||||
| uses: JS-DevTools/npm-publish@v3 | ||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||
| token: ${{ secrets.NPM_TOKEN }} | ||||||||||||||||||||||||||
| access: public | ||||||||||||||||||||||||||
| package: sqlite_web_npm_package_${{ env.NEW_VERSION }}.tgz | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Create gitHub release with tarballs | ||||||||||||||||||||||||||
| - name: Create GitHub Release with sqlite-web pkg | ||||||||||||||||||||||||||
| if: ${{ env.OLD_HASH != env.NEW_HASH }} | ||||||||||||||||||||||||||
| id: gh_release | ||||||||||||||||||||||||||
| uses: softprops/action-gh-release@v2 | ||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||
| tag_name: npm-v${{ env.NEW_VERSION }} | ||||||||||||||||||||||||||
| name: NPM Package Release v${{ env.NEW_VERSION }} | ||||||||||||||||||||||||||
| files: | | ||||||||||||||||||||||||||
| sqlite_web_npm_package_${{ env.NEW_VERSION }}.tgz | ||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,53 @@ | ||||||||||||||||||
| name: Test SDK UI Logic | ||||||||||||||||||
| on: [push] | ||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Run on pull_request as well. Add PR trigger to ensure UI tests run for proposed changes. Apply this diff: -on: [push]
+on:
+ push:
+ pull_request:📝 Committable suggestion
Suggested change
🧰 Tools🪛 YAMLlint (1.37.1)[warning] 2-2: truthy value should be one of [false, true] (truthy) 🤖 Prompt for AI Agents |
||||||||||||||||||
|
|
||||||||||||||||||
| concurrency: | ||||||||||||||||||
| group: ${{ github.ref }}-ui | ||||||||||||||||||
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||||||||||||||||||
|
Comment on lines
+5
to
+6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Align concurrency key and behavior with WASM workflow. Use a workflow-scoped group and unconditional cancellation to avoid overlapping runs on branches. Apply this diff: concurrency:
- group: ${{ github.ref }}-ui
- cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
+ group: ${{ github.workflow }}-${{ github.ref }}-ui
+ cancel-in-progress: true📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||
|
|
||||||||||||||||||
| jobs: | ||||||||||||||||||
| test: | ||||||||||||||||||
| permissions: | ||||||||||||||||||
| id-token: write | ||||||||||||||||||
| contents: read | ||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||
| env: | ||||||||||||||||||
| COMMIT_SHA: ${{ github.sha }} | ||||||||||||||||||
| steps: | ||||||||||||||||||
| - uses: actions/checkout@v2 | ||||||||||||||||||
| with: | ||||||||||||||||||
| submodules: recursive | ||||||||||||||||||
| fetch-depth: 0 | ||||||||||||||||||
|
Comment on lines
+17
to
+20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Upgrade checkout action to v4. Same rationale as the WASM workflow. Apply this diff: - - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0📝 Committable suggestion
Suggested change
🧰 Tools🪛 actionlint (1.7.7)17-17: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue (action) 🤖 Prompt for AI Agents |
||||||||||||||||||
|
|
||||||||||||||||||
| - uses: nixbuild/nix-quick-install-action@v30 | ||||||||||||||||||
| with: | ||||||||||||||||||
| nix_conf: | | ||||||||||||||||||
| keep-env-derivations = true | ||||||||||||||||||
| keep-outputs = true | ||||||||||||||||||
| - name: Restore and save Nix store | ||||||||||||||||||
| uses: nix-community/cache-nix-action@v6 | ||||||||||||||||||
| with: | ||||||||||||||||||
| # restore and save a cache using this key | ||||||||||||||||||
| primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} | ||||||||||||||||||
| # if there's no cache hit, restore a cache by this prefix | ||||||||||||||||||
| restore-prefixes-first-match: nix-${{ runner.os }}- | ||||||||||||||||||
| # collect garbage until the Nix store size (in bytes) is at most this number | ||||||||||||||||||
| # before trying to save a new cache | ||||||||||||||||||
| # 1G = 1073741824 | ||||||||||||||||||
| gc-max-store-size-linux: 1G | ||||||||||||||||||
|
|
||||||||||||||||||
| - run: nix develop -c build-submodules | ||||||||||||||||||
|
|
||||||||||||||||||
| - run: nix develop -c local-bundle | ||||||||||||||||||
|
|
||||||||||||||||||
| - name: Install Playwright browsers with dependencies | ||||||||||||||||||
| run: | | ||||||||||||||||||
| cd svelte-test | ||||||||||||||||||
| npx playwright install --with-deps | ||||||||||||||||||
|
|
||||||||||||||||||
| - run: nix develop -c test-ui | ||||||||||||||||||
|
|
||||||||||||||||||
| - name: Frontend linting and formatting | ||||||||||||||||||
| run: | | ||||||||||||||||||
| cd svelte-test | ||||||||||||||||||
| npm run lint-format-check | ||||||||||||||||||
|
Comment on lines
+51
to
+53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Add trailing newline. Keep YAML tidy and tools happy. Apply this diff: - name: Frontend linting and formatting
run: |
cd svelte-test
npm run lint-format-check
+
🧰 Tools🪛 YAMLlint (1.37.1)[error] 53-53: no new line character at the end of file (new-line-at-end-of-file) 🤖 Prompt for AI Agents |
||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,45 @@ | ||||||||||||||||||
| name: Test WASM | ||||||||||||||||||
| on: [push] | ||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Run on pull_request too to validate PRs. Limiting to push misses PR validation from forks/branches. Apply this diff: -on: [push]
+on:
+ push:
+ pull_request:📝 Committable suggestion
Suggested change
🧰 Tools🪛 YAMLlint (1.37.1)[warning] 2-2: truthy value should be one of [false, true] (truthy) 🤖 Prompt for AI Agents |
||||||||||||||||||
|
|
||||||||||||||||||
| concurrency: | ||||||||||||||||||
| group: ${{ github.ref }}-wasm | ||||||||||||||||||
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||||||||||||||||||
|
|
||||||||||||||||||
| jobs: | ||||||||||||||||||
| test: | ||||||||||||||||||
| permissions: | ||||||||||||||||||
| id-token: write | ||||||||||||||||||
| contents: read | ||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||
| env: | ||||||||||||||||||
| COMMIT_SHA: ${{ github.sha }} | ||||||||||||||||||
| steps: | ||||||||||||||||||
| - uses: actions/checkout@v2 | ||||||||||||||||||
| with: | ||||||||||||||||||
| submodules: recursive | ||||||||||||||||||
| fetch-depth: 0 | ||||||||||||||||||
|
Comment on lines
+17
to
+20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Upgrade checkout action to v4. actions/checkout@v2 is deprecated and flagged by actionlint. Use v4. Apply this diff: - - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0📝 Committable suggestion
Suggested change
🧰 Tools🪛 actionlint (1.7.7)17-17: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue (action) 🤖 Prompt for AI Agents |
||||||||||||||||||
|
|
||||||||||||||||||
| - uses: nixbuild/nix-quick-install-action@v30 | ||||||||||||||||||
| with: | ||||||||||||||||||
| nix_conf: | | ||||||||||||||||||
| keep-env-derivations = true | ||||||||||||||||||
| keep-outputs = true | ||||||||||||||||||
| - name: Restore and save Nix store | ||||||||||||||||||
| uses: nix-community/cache-nix-action@v6 | ||||||||||||||||||
| with: | ||||||||||||||||||
| # restore and save a cache using this key | ||||||||||||||||||
| primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} | ||||||||||||||||||
| # if there's no cache hit, restore a cache by this prefix | ||||||||||||||||||
| restore-prefixes-first-match: nix-${{ runner.os }}- | ||||||||||||||||||
| # collect garbage until the Nix store size (in bytes) is at most this number | ||||||||||||||||||
| # before trying to save a new cache | ||||||||||||||||||
| # 1G = 1073741824 | ||||||||||||||||||
| gc-max-store-size-linux: 1G | ||||||||||||||||||
|
|
||||||||||||||||||
| - run: nix develop -c build-submodules | ||||||||||||||||||
|
|
||||||||||||||||||
| - run: nix develop -c local-bundle | ||||||||||||||||||
|
|
||||||||||||||||||
| - run: nix develop -c rainix-rs-static | ||||||||||||||||||
|
|
||||||||||||||||||
| - run: nix develop -c test-wasm | ||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Add trailing newline. Missing newline at EOF trips YAML linters and some tooling. Apply this diff: - - run: nix develop -c test-wasm
+ - run: nix develop -c test-wasm
+📝 Committable suggestion
Suggested change
🧰 Tools🪛 YAMLlint (1.37.1)[error] 45-45: no new line character at the end of file (new-line-at-end-of-file) 🤖 Prompt for AI Agents |
||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -1,5 +1,8 @@ | ||||||||
| /target | ||||||||
| /pkg | ||||||||
| # Generated files from bundle.sh | ||||||||
| packages/sqlite-worker/src/embedded_worker.js | ||||||||
| pkg/sqlite_worker_bg.wasm.b64 | ||||||||
| packages/sqlite-web/src/embedded_worker.js | ||||||||
| pkg/sqlite_web_bg.wasm.b64 | ||||||||
|
|
||||||||
|
Comment on lines
+4
to
+6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Redundant ignore under /pkg; simplify. packages/sqlite-web/src/embedded_worker.js
-pkg/sqlite_web_bg.wasm.b64📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||
| # macOS | ||||||||
| .DS_Store | ||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,8 +5,8 @@ | |
| "rust-analyzer.cargo.target": "wasm32-unknown-unknown", | ||
| "rust-analyzer.linkedProjects": [ | ||
| "./Cargo.toml", | ||
| "./packages/sqlite-worker-core/Cargo.toml", | ||
| "./packages/sqlite-worker/Cargo.toml", | ||
| "./packages/sqlite-web-core/Cargo.toml", | ||
| "./packages/sqlite-web/Cargo.toml", | ||
| "./lib/rain.math.float/Cargo.toml" | ||
| ], | ||
|
Comment on lines
5
to
11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainVerify RA target + linked projects resolve for wasm builds. With rust-analyzer.cargo.target set to wasm32-unknown-unknown, any non-wasm-friendly dependency in the workspace could degrade IDE diagnostics for those crates. Please verify RA indexing succeeds for all three linked projects. Run this script to confirm crate discovery and that each linked Cargo.toml builds metadata for the wasm target: 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "Linked projects in .vscode/settings.json:"
jq -r '.["rust-analyzer.linkedProjects"][]' .vscode/settings.json
echo -e "\nEnsure the listed Cargo.toml files exist:"
jq -r '.["rust-analyzer.linkedProjects"][]' .vscode/settings.json | while read -r p; do
if [[ -f "$p" ]]; then echo "OK - $p"; else echo "MISS- $p"; fi
done
echo -e "\nCargo metadata (wasm32) per linked project:"
jq -r '.["rust-analyzer.linkedProjects"][]' .vscode/settings.json | while read -r p; do
echo -e "\n>>> $p"
(cd "$(dirname "$p")" && cargo metadata --format-version=1 --no-deps --filter-platform wasm32-unknown-unknown >/dev/null && echo "metadata: OK") || echo "metadata: FAIL"
doneLength of output: 3306 Fix the missing linked project path in .vscode/settings.json The linkedProjects array includes • In "./lib/rain.math.float/Cargo.toml"• After fixing the path(s), ensure you have a default Rust toolchain configured (e.g. cargo metadata --no-deps --filter-platform wasm32-unknown-unknownand confirm it succeeds. 🤖 Prompt for AI Agents |
||
| "[rust]": { | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -6,19 +6,19 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co | |||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| ### Main Build Process | ||||||||||||||||||||||||||||||||||||||||||||||
| - `./bundle.sh` - Complete build pipeline that: | ||||||||||||||||||||||||||||||||||||||||||||||
| 1. Builds `sqlite-worker-core` with `wasm-pack build --target web` | ||||||||||||||||||||||||||||||||||||||||||||||
| 1. Builds `sqlite-web-core` with `wasm-pack build --target web` | ||||||||||||||||||||||||||||||||||||||||||||||
| 2. Embeds WASM into JavaScript worker template | ||||||||||||||||||||||||||||||||||||||||||||||
| 3. Builds `sqlite-worker` package with embedded core | ||||||||||||||||||||||||||||||||||||||||||||||
| 3. Builds `sqlite-web` package with embedded core | ||||||||||||||||||||||||||||||||||||||||||||||
| 4. Packages with `npm pack` and updates Svelte test integration | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
7
to
13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Fix list/heading spacing to satisfy markdownlint (MD022/MD032) and minor grammar. Several headings/lists need surrounding blank lines; also tighten phrasing in the main pipeline steps for clarity. Apply minimal formatting fixes: -### Main Build Process
-- `./bundle.sh` - Complete build pipeline that:
- 1. Builds `sqlite-web-core` with `wasm-pack build --target web`
- 2. Embeds WASM into JavaScript worker template
- 3. Builds `sqlite-web` package with embedded core
- 4. Packages with `npm pack` and updates Svelte test integration
+### Main Build Process
+
+- `./bundle.sh` — complete build pipeline:
+ 1. Build `sqlite-web-core` with `wasm-pack build --target web`
+ 2. Embed the WASM into the JavaScript worker template
+ 3. Build the `sqlite-web` package with the embedded core
+ 4. Package with `npm pack` and update the Svelte test integration📝 Committable suggestion
Suggested change
🧰 Tools🪛 LanguageTool[grammar] ~7-~7: Use correct spacing (QB_NEW_EN_OTHER_ERROR_IDS_5) [grammar] ~8-~8: There might be a mistake here. (QB_NEW_EN) [grammar] ~9-~9: Use correct spacing (QB_NEW_EN_OTHER_ERROR_IDS_5) [grammar] ~10-~10: There might be a mistake here. (QB_NEW_EN) [grammar] ~11-~11: There might be a mistake here. (QB_NEW_EN) [grammar] ~12-~12: Use correct spacing (QB_NEW_EN_OTHER_ERROR_IDS_5) 🪛 markdownlint-cli2 (0.17.2)7-7: Headings should be surrounded by blank lines (MD022, blanks-around-headings) 8-8: Lists should be surrounded by blank lines (MD032, blanks-around-lists) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||
| ### Individual Package Builds | ||||||||||||||||||||||||||||||||||||||||||||||
| - `cd packages/sqlite-worker-core && wasm-pack build --target web --out-dir ../../pkg` | ||||||||||||||||||||||||||||||||||||||||||||||
| - `cd packages/sqlite-worker && wasm-pack build --target web --out-dir ../../pkg` | ||||||||||||||||||||||||||||||||||||||||||||||
| - `cd packages/sqlite-web-core && wasm-pack build --target web --out-dir ../../pkg` | ||||||||||||||||||||||||||||||||||||||||||||||
| - `cd packages/sqlite-web && wasm-pack build --target web --out-dir ../../pkg` | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| ### Testing | ||||||||||||||||||||||||||||||||||||||||||||||
| - `./test.sh` - Run all Rust WASM tests (both packages) | ||||||||||||||||||||||||||||||||||||||||||||||
| - `cd packages/sqlite-worker-core && wasm-pack test --headless --chrome` - Test core package only | ||||||||||||||||||||||||||||||||||||||||||||||
| - `cd packages/sqlite-worker && wasm-pack test --headless --chrome` - Test worker package only | ||||||||||||||||||||||||||||||||||||||||||||||
| - `cd packages/sqlite-web-core && wasm-pack test --headless --chrome` - Test core package only | ||||||||||||||||||||||||||||||||||||||||||||||
| - `cd packages/sqlite-web && wasm-pack test --headless --chrome` - Test worker package only | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
14
to
22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Add blank lines around headings and lists in “Individual Package Builds” and “Testing”. This removes MD022/MD032 warnings and improves readability. -### Individual Package Builds
-- `cd packages/sqlite-web-core && wasm-pack build --target web --out-dir ../../pkg`
-- `cd packages/sqlite-web && wasm-pack build --target web --out-dir ../../pkg`
+### Individual Package Builds
+
+- `cd packages/sqlite-web-core && wasm-pack build --target web --out-dir ../../pkg`
+- `cd packages/sqlite-web && wasm-pack build --target web --out-dir ../../pkg`
-### Testing
-- `./test.sh` - Run all Rust WASM tests (both packages)
-- `cd packages/sqlite-web-core && wasm-pack test --headless --chrome` - Test core package only
-- `cd packages/sqlite-web && wasm-pack test --headless --chrome` - Test worker package only
+### Testing
+
+- `./test.sh` — run all Rust WASM tests (both packages)
+- `cd packages/sqlite-web-core && wasm-pack test --headless --chrome` — test core package only
+- `cd packages/sqlite-web && wasm-pack test --headless --chrome` — test worker package only📝 Committable suggestion
Suggested change
🧰 Tools🪛 LanguageTool[grammar] ~14-~14: Use correct spacing (QB_NEW_EN_OTHER_ERROR_IDS_5) [grammar] ~18-~18: Use correct spacing (QB_NEW_EN_OTHER_ERROR_IDS_5) [grammar] ~19-~19: Use hyphens correctly (QB_NEW_EN_OTHER_ERROR_IDS_29) [grammar] ~20-~20: Use hyphens correctly (QB_NEW_EN_OTHER_ERROR_IDS_29) [grammar] ~21-~21: There might be a mistake here. (QB_NEW_EN_OTHER) 🪛 markdownlint-cli2 (0.17.2)14-14: Headings should be surrounded by blank lines (MD022, blanks-around-headings) 15-15: Lists should be surrounded by blank lines (MD032, blanks-around-lists) 18-18: Headings should be surrounded by blank lines (MD022, blanks-around-headings) 19-19: Lists should be surrounded by blank lines (MD032, blanks-around-lists) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||
| ### Svelte Test App | ||||||||||||||||||||||||||||||||||||||||||||||
| - `cd svelte-test && bun dev` - Start development server | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -31,7 +31,7 @@ This is a **Rust WebAssembly SQLite Worker** project with a workspace architectu | |||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| ### Core Components | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| #### 1. `packages/sqlite-worker-core/` | ||||||||||||||||||||||||||||||||||||||||||||||
| #### 1. `packages/sqlite-web-core/` | ||||||||||||||||||||||||||||||||||||||||||||||
| - **Purpose**: Core SQLite functionality and worker implementation | ||||||||||||||||||||||||||||||||||||||||||||||
| - **Key modules**: | ||||||||||||||||||||||||||||||||||||||||||||||
| - `worker.rs` - Main worker entry point called by `worker_main()` | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -42,7 +42,7 @@ This is a **Rust WebAssembly SQLite Worker** project with a workspace architectu | |||||||||||||||||||||||||||||||||||||||||||||
| - **Dependencies**: sqlite-wasm-rs, alloy (Ethereum tooling), rain-math-float | ||||||||||||||||||||||||||||||||||||||||||||||
| - **Output**: WASM module with JS glue code | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| #### 2. `packages/sqlite-worker/` | ||||||||||||||||||||||||||||||||||||||||||||||
| #### 2. `packages/sqlite-web/` | ||||||||||||||||||||||||||||||||||||||||||||||
| - **Purpose**: Public API that creates self-contained workers with embedded core | ||||||||||||||||||||||||||||||||||||||||||||||
| - **Key files**: | ||||||||||||||||||||||||||||||||||||||||||||||
| - `lib.rs` - `SQLiteWasmDatabase` struct with async query interface | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -59,13 +59,13 @@ This is a **Rust WebAssembly SQLite Worker** project with a workspace architectu | |||||||||||||||||||||||||||||||||||||||||||||
| #### 4. `svelte-test/` | ||||||||||||||||||||||||||||||||||||||||||||||
| - **Purpose**: Integration test and example usage | ||||||||||||||||||||||||||||||||||||||||||||||
| - **Technology**: SvelteKit + TypeScript + Vite | ||||||||||||||||||||||||||||||||||||||||||||||
| - **Pattern**: Imports `sqlite-worker` package from local tarball | ||||||||||||||||||||||||||||||||||||||||||||||
| - **Pattern**: Imports `sqlite-web` package from local tarball | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| ### Build Process Flow | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| 1. **Core Build**: `sqlite-worker-core` compiled to WASM + JS glue | ||||||||||||||||||||||||||||||||||||||||||||||
| 1. **Core Build**: `sqlite-web-core` compiled to WASM + JS glue | ||||||||||||||||||||||||||||||||||||||||||||||
| 2. **Embedding**: WASM converted to base64 and embedded into JavaScript template | ||||||||||||||||||||||||||||||||||||||||||||||
| 3. **Wrapper Build**: `sqlite-worker` compiled with embedded worker generator | ||||||||||||||||||||||||||||||||||||||||||||||
| 3. **Wrapper Build**: `sqlite-web` compiled with embedded worker generator | ||||||||||||||||||||||||||||||||||||||||||||||
| 4. **Packaging**: NPM package created and integrated into Svelte test | ||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+62
to
69
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Normalize spacing in “Build Process Flow” and add blank lines around the numbered list. -### Build Process Flow
-
-1. **Core Build**: `sqlite-web-core` compiled to WASM + JS glue
-2. **Embedding**: WASM converted to base64 and embedded into JavaScript template
-3. **Wrapper Build**: `sqlite-web` compiled with embedded worker generator
-4. **Packaging**: NPM package created and integrated into Svelte test
+### Build Process Flow
+
+1. **Core Build**: `sqlite-web-core` compiled to WASM + JS glue
+2. **Embedding**: WASM converted to base64 and embedded into a JavaScript template
+3. **Wrapper Build**: `sqlite-web` compiled with the embedded worker generator
+4. **Packaging**: NPM package created and integrated into the Svelte test app📝 Committable suggestion
Suggested change
🧰 Tools🪛 LanguageTool[grammar] ~62-~62: Use correct spacing (QB_NEW_EN_OTHER_ERROR_IDS_5) [grammar] ~64-~64: Use correct spacing (QB_NEW_EN_OTHER_ERROR_IDS_5) [grammar] ~66-~66: There might be a mistake here. (QB_NEW_EN) [grammar] ~67-~67: There might be a mistake here. (QB_NEW_EN) [grammar] ~68-~68: There might be a mistake here. (QB_NEW_EN) [grammar] ~69-~69: Use correct spacing (QB_NEW_EN_OTHER_ERROR_IDS_5) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| ### Key Design Patterns | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.