Skip to content

feat: publish explicit Vite+ build and format presets - #98

Merged
arch1995 merged 7 commits into
mainfrom
feat/vite-plus-build-presets
Oct 28, 2026
Merged

arch1995 merged 7 commits into
mainfrom
feat/vite-plus-build-presets

Conversation

@chaitanyapotti

@chaitanyapotti chaitanyapotti commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Replace the Rollup and Babel build CLI with Vite+ presets for libraries, React, Node, and formatting.
  • Publish TypeScript profiles from @toruslabs/config and cover them with consumer build tests.
  • CI builds the workspace, type-checks @toruslabs/torus-scripts, and runs the test suite.

Test plan

  • Confirm npm run build packs @toruslabs/torus-scripts.
  • Confirm npm run typecheck passes.
  • Confirm npm run test passes, including the consumer matrix.
  • Confirm Changesets lists major bumps for @toruslabs/config and @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.

Library, React, Vue, and Node packages need explicit build presets, and the old Rollup CLI no longer matches that model.
@chaitanyapotti
chaitanyapotti requested review from a team as code owners October 28, 2026 09:46
@socket-security

socket-security Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​typescript-eslint/​parser@​8.59.4 ⏵ 8.72.010010072 +198100
Updatedtypescript-eslint@​8.59.4 ⏵ 8.72.010010074 +198100
Addednanoid@​5.1.161001007993100
Updated@​types/​node@​26.6.5 ⏵ 24.13.61001008195100
Addedtypescript@​7.0.29910089100100

View full report

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ 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.

Comment thread packages/torus-scripts/package.json Resolved
@chaitanyapotti
chaitanyapotti added this pull request to stack #101 October 28, 2026 10:12
Base automatically changed from chore/changesets-replace-lerna to main October 28, 2026 11:00
…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.
Comment thread packages/torus-scripts/package.json Resolved

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

Comment thread packages/torus-scripts/README.md Outdated
## Build presets

## Installation
- `@toruslabs/torus-scripts/library`: `libraryPreset()` for ESM library builds.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: libraryPreset require entry params in option

sourcemap?: boolean;
};

export function libraryPreset(options: LibraryOptions) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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".
@arch1995
arch1995 merged commit f6d018c into main Oct 28, 2026
9 checks passed
@arch1995
arch1995 deleted the feat/vite-plus-build-presets branch October 28, 2026 16:04
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.

3 participants