Skip to content

Update Vite toolchain and fix workspace source resolution for local dev - #21

Merged
xinaesthete merged 6 commits into
mainfrom
codex/use-volta-for-pnpm-versions
Apr 13, 2026
Merged

Update Vite toolchain and fix workspace source resolution for local dev#21
xinaesthete merged 6 commits into
mainfrom
codex/use-volta-for-pnpm-versions

Conversation

@xinaesthete

@xinaesthete xinaesthete commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • pin the repo to Volta-managed Node and pnpm versions and update setup docs
  • upgrade the shared frontend toolchain to Vite 8, @vitejs/plugin-react 6, and Vitest 4
  • add workspace source aliases for local packages so the vis demo works without a prior build
  • extend TypeScript path mappings for transitive workspace imports such as @spatialdata/zarrextra
  • add a root clean script for resetting generated build output during local testing
  • dedupe react and react-dom in the vis demo config to avoid invalid hook calls in dev

Testing

  • pnpm install
  • pnpm --filter @spatialdata/vis exec vite build --config vite.config.demo.ts
  • pnpm --filter @spatialdata/vis test
  • pnpm --filter @spatialdata/react exec tsc --noEmit -p tsconfig.json
  • pnpm --filter @spatialdata/react build

Summary by CodeRabbit

  • Documentation

    • Updated setup and installation instructions to use Volta for pinned toolchain management.
  • Chores

    • Pinned Node.js and pnpm versions for consistent development environments.
    • Added cleanup script for build artifacts.
    • Updated build tool dependencies (Vite, Vitest).
    • Improved module resolution configuration across the project.

@coderabbitai

coderabbitai Bot commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@xinaesthete has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 17 minutes and 35 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 17 minutes and 35 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 751b1a3f-a7e3-4ae1-bbaa-aa1772421d6c

📥 Commits

Reviewing files that changed from the base of the PR and between f204321 and aab654e.

📒 Files selected for processing (6)
  • .github/workflows/docs.yml
  • .github/workflows/test.yml
  • .gitignore
  • README.md
  • package.json
  • packages/layers/vite.config.ts
📝 Walkthrough

Walkthrough

This pull request pins Node.js and pnpm versions via Volta in project configuration, adds TypeScript path aliases for the zarrextra package across multiple tsconfig files, introduces a workspace source aliasing helper function for Vite, and upgrades Vite and related dependencies to newer versions.

Changes

Cohort / File(s) Summary
Toolchain & Package Manager Configuration
README.md, package.json, pnpm-workspace.yaml
Updated installation documentation to use Volta for version pinning, added packageManager and volta metadata to package.json, and bumped Vite (^8.0.8), @vitejs/plugin-react (^6.0.1), and vitest (^4.1.4) versions. Added clean script to remove build artifacts.
TypeScript Path Aliases
packages/core/tsconfig.json, packages/react/tsconfig.json, packages/vis/tsconfig.json, packages/vis/demo/tsconfig.json
Added baseUrl and module path mappings for @spatialdata/zarrextra across multiple tsconfig files to resolve to zarrextra source files. Updated vis/demo tsconfig with comprehensive aliases for all workspace packages.
Vite Configuration & Helpers
vite.config.base.ts, packages/vis/vite.config.demo.ts
Introduced createWorkspaceSourceAliases() helper function that generates module path aliases for workspace packages. Updated demo vite config to use this helper, added explicit react and react-dom aliasing, and enabled dependency deduplication.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A rabbit bounds through version pins,
Where Volta's magic now begins!
Path aliases guide every call,
React deduped through bundled hall—
From zarrextra's dance to vite's embrace,
Our workspace finds its mapped-out place! 🗺️

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main objectives of the changeset, which are updating the Vite toolchain and fixing workspace source resolution for local development.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/use-volta-for-pnpm-versions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@package.json`:
- Around line 41-44: Update the declared Node engine floor from ">=20" to
">=20.19" in the package.json "engines" object (look for the "engines" key and
the "node" property) and update the README fallback note text that currently
says "Node.js >= 20" to explicitly state "Node.js >= 20.19 (or 22.12+)" so the
docs match Vite 8's requirement.
- Line 11: CI fails due to a pnpm version mismatch: package.json declares
packageManager: "pnpm@10.33.0" while both workflows (.github/workflows/test.yml
and .github/workflows/docs.yml) pass a conflicting version input to
pnpm/action-setup@v4 causing ERR_PNPM_BAD_PM_VERSION; fix by removing the
version input from both workflows so pnpm/action-setup uses the packageManager
field as the single source of truth (alternatively, make the workflow version
exactly "10.33.0" to match packageManager), and ensure references to
pnpm/action-setup@v4 and the version input are updated accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f43ab9c2-e1e1-49bd-9068-e78479d81dae

📥 Commits

Reviewing files that changed from the base of the PR and between 0703c12 and f204321.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (9)
  • README.md
  • package.json
  • packages/core/tsconfig.json
  • packages/react/tsconfig.json
  • packages/vis/demo/tsconfig.json
  • packages/vis/tsconfig.json
  • packages/vis/vite.config.demo.ts
  • pnpm-workspace.yaml
  • vite.config.base.ts

Comment thread package.json
Comment thread package.json
Comment on lines 41 to +44
"engines": {
"node": ">=20",
"pnpm": ">=10"
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat -n package.json | head -50

Repository: Taylor-CCB-Group/SpatialData.js

Length of output: 2266


🏁 Script executed:

find . -name "pnpm-workspace.yaml" -o -name ".pnpmfile.cjs" | head -5

Repository: Taylor-CCB-Group/SpatialData.js

Length of output: 96


🏁 Script executed:

cat -n pnpm-workspace.yaml

Repository: Taylor-CCB-Group/SpatialData.js

Length of output: 775


🏁 Script executed:

find . -iname "README*" -type f | head -5

Repository: Taylor-CCB-Group/SpatialData.js

Length of output: 190


🏁 Script executed:

cat README.md | grep -i "node" -C 3

Repository: Taylor-CCB-Group/SpatialData.js

Length of output: 682


🌐 Web query:

Vite 8 Node version requirements minimum support

💡 Result:

Vite 8 requires Node.js 20.19+ or 22.12+ as the minimum supported versions. These are the same requirements as Vite 7, ensuring support for require(esm) without flags for ESM-only distribution.

Citations:


Tighten the declared Node floor to match Vite 8 requirements.

The current engines.node: ">=20" is too broad. Vite 8 requires Node 20.19+ or 22.12+, so Node 20.0–20.18 installations will satisfy the engines check but fail during local dev/test. Update to >=20.19 and mirror this in the README's fallback note (currently states "Node.js >= 20").

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` around lines 41 - 44, Update the declared Node engine floor
from ">=20" to ">=20.19" in the package.json "engines" object (look for the
"engines" key and the "node" property) and update the README fallback note text
that currently says "Node.js >= 20" to explicitly state "Node.js >= 20.19 (or
22.12+)" so the docs match Vite 8's requirement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant