Skip to content

refactor: upgrade to the latest rollup#7508

Merged
jasonsaayman merged 1 commit intov1.xfrom
refactor/rollup-tool-chain
Mar 15, 2026
Merged

refactor: upgrade to the latest rollup#7508
jasonsaayman merged 1 commit intov1.xfrom
refactor/rollup-tool-chain

Conversation

@jasonsaayman
Copy link
Copy Markdown
Member

@jasonsaayman jasonsaayman commented Mar 15, 2026

Summary by cubic

Upgrade the build toolchain to Rollup 4 and modern plugins, replacing the deprecated terser plugin and updating the config for ESM. Requires Node 18+ and trims legacy dependencies.

Description

A clear and concise description of the PR.

Use this section for review hints, explanations or discussion points.

  • Summary of changes
    • Bump rollup to ^4.59.0 and update @rollup/plugin-commonjs, @rollup/plugin-json, @rollup/plugin-node-resolve.
    • Replace rollup-plugin-terser with @rollup/plugin-terser; update import and add maxWorkers: 1.
    • ESM config fix: use createRequire(import.meta.url) to read package.json.
    • Remove preferConst from ESM/CJS outputs (option removed in newer Rollup).
    • Lockfile updates: add Rollup platform binaries, drop deprecated subdeps; update smoke test lockfiles.
  • Reasoning
    • Keep the bundling stack current and supported (Rollup 4 is ESM-first; old terser plugin is deprecated).
    • Ensure compatibility and stable builds with modern plugin APIs.
  • Additional context
    • Rollup 4 requires Node 18+. CI and local dev must run Node ≥18.
    • No public API or output format changes expected; this is a build tooling upgrade.

Docs

  • Update build prerequisites to Node 18+.
  • Note the switch to @rollup/plugin-terser in contributor/build docs.

Testing

  • No new tests added. Smoke test lockfiles updated only.
  • Validation to run:
    • npm run build succeeds on Node 18+.
    • ESM and CJS smoke tests pass (tests/smoke/esm, tests/smoke/cjs).
    • Verify generated files in dist/ (ESM/CJS and minified bundles) and check bundle size is within expected range.

Written for commit 117eede. Summary will update on new commits.

@jasonsaayman jasonsaayman self-assigned this Mar 15, 2026
@jasonsaayman jasonsaayman added priority::medium A medium priority commit::refactor The PR is related to refactoring labels Mar 15, 2026
@jasonsaayman jasonsaayman changed the title chore: upgrade to the latest rollup refactor: upgrade to the latest rollup Mar 15, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@jasonsaayman jasonsaayman merged commit 3f1b6b8 into v1.x Mar 15, 2026
13 checks passed
@jasonsaayman jasonsaayman deleted the refactor/rollup-tool-chain branch March 15, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commit::refactor The PR is related to refactoring priority::medium A medium priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant