Repository navigation
feat: publish explicit Vite+ build and format presets - #98
Conversation
Library, React, Vue, and Node packages need explicit build presets, and the old Rollup CLI no longer matches that model.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 66df5a5. Configure here.
…request base Keep the Node 24.22.0 floor, and replace the two Changesets status commands with one check against the pull request base.
The watcher waits can use the whole 30 second test budget, so the suite can fail in CI after a correct rebuild.
The export paths shared one barrel, and the Vue preset returned an empty object.
|
|
||
| Replace the Rollup build commands with explicit Vite+ presets for libraries, React, Node, and formatting. `@toruslabs/config` now exports TypeScript profiles only. These packages require Node.js >=24.22.0 and npm >=12. | ||
|
|
||
| Use independent package versions. `@toruslabs/torus-scripts` and `@toruslabs/config` have no consumer requirement for synchronized releases. |
There was a problem hiding this comment.
we might want to include these breaking changes in the note:
- strictNullChecks goes from false to true in packages/config/tsconfig.base.json:16. The old profile had strict: true with null checks explicitly off.
- DOM libs are gone. tsconfig.library.json and tsconfig.node.json are ES2024 only. Browser packages must add DOM themselves.
- The torus-scripts binary, Babel configs, and torus.config.js are removed. The changeset does not say that.
- Library builds now default to ESM. CJS requires format: ["esm", "cjs"]. The old defaults emitted both.
| ## Build presets | ||
|
|
||
| ## Installation | ||
| - `@toruslabs/torus-scripts/library`: `libraryPreset()` for ESM library builds. |
There was a problem hiding this comment.
nit: libraryPreset require entry params in option
| sourcemap?: boolean; | ||
| }; | ||
|
|
||
| export function libraryPreset(options: LibraryOptions) { |
There was a problem hiding this comment.
libraryPreset should give explicit return type so "node" and "automatic" stay literal, same for reactPreset, nodePreset
A clean publish listed dist in the exports and shipped no built files.
Consumers need the null-check, DOM, command removal, and ESM default in the release note.
jsx and platform widened to string, so consumers lost "automatic" and "node".

Summary
@toruslabs/configand cover them with consumer build tests.@toruslabs/torus-scripts, and runs the test suite.Test plan
npm run buildpacks@toruslabs/torus-scripts.npm run typecheckpasses.npm run testpasses, including the consumer matrix.@toruslabs/configand@toruslabs/torus-scripts.Made with Cursor
Note
High Risk
Major-version tooling swap removes the entire prior build CLI and changes TypeScript strictness and library defaults, so downstream repos must migrate configs and may hit new type errors or packaging differences.
Reviewed by Cursor Bugbot for commit 913bda7. Bugbot is set up for automated code reviews on this repo. Configure here.