Modernize JavaScript build toolchain#1033
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR modernizes the JavaScript toolchain by switching bundling from Rollup+Babel to Rolldown (Oxc transforms) and switching linting from ESLint+neostandard to Oxlint, with corresponding script/workflow/task updates. It also regenerates the distributed JS artifacts to reflect the new bundler output and removes now-unused configuration/dependencies.
Changes:
- Replace Rollup+Babel with Rolldown v1 for builds and add
rolldown.config.mjs. - Replace ESLint+neostandard with Oxlint v1, add
.oxlintrc.json, and update CI/Rake tasks to runpnpm lint. - Remove Babel/Rollup/ESLint-related devDependencies/config and refresh generated
dist/+vendor/JS outputs.
Reviewed changes
Copilot reviewed 9 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| vendor/assets/javascripts/rails.validations.js | Regenerated vendored UMD bundle output from the new bundler. |
| rollup.config.mjs | Removed Rollup configuration as bundling migrates to Rolldown. |
| rolldown.config.mjs | Added Rolldown configuration and post-processing/copy steps for dist + vendor outputs. |
| Rakefile | Updates JS lint task to run the new pnpm lint script. |
| package.json | Updates build/lint scripts and removes obsolete Rollup/Babel/ESLint devDependencies. |
| eslint.config.mjs | Removed ESLint+neostandard flat config. |
| dist/client-side-validations.js | Regenerated distributed UMD bundle output from the new bundler. |
| dist/client-side-validations.esm.js | Regenerated distributed ESM bundle output from the new bundler. |
| CHANGELOG.md | Adds/rewords entries to document the toolchain breaking changes. |
| .oxlintrc.json | Adds Oxlint configuration (including no-unused-vars args handling). |
| .gitignore | Removes stale !.babelrc negation now that Babel config is removed. |
| .github/workflows/lint.yml | Renames/updates lint workflow/job to run pnpm lint. |
| .babelrc | Removed Babel configuration (Babel no longer used). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2963144 to
bea4106
Compare
Replace Rollup with Rolldown v1 for bundling (10-30x faster builds). The new config lives in rolldown.config.mjs and the build script is updated accordingly. Replace ESLint + neostandard with Oxlint v1 for linting (50-100x faster). The new config lives in .oxlintrc.json and is run via `pnpm lint`. Use `args: none` on no-unused-vars to skip unused function parameters, which serve as API documentation for callback signatures. Rename .github/workflows/eslint.yml to lint.yml accordingly. These choices are informed by ongoing upstream discussions about how best to align the neostandard and Rollup ecosystems with modern JavaScript tooling (neostandard/neostandard#350, rollup/plugins#2010). Drop Babel — transpilation is now handled by Rolldown's built-in Oxc transforms. The minimum browser targets are unchanged (Chrome 60+, Firefox 60+, iOS 12+, Safari 12+). Remove 9 unused npm devDependencies (`@babel/core`, `@babel/preset-env`, `@rollup/plugin-babel`, `@rollup/plugin-node-resolve`, `eslint`, `eslint-plugin-compat`, `neostandard`, `rollup`, `rollup-plugin-copy`). Clean up .gitignore (remove stale !.babelrc negation) and update Rakefile lint task to call the new `pnpm lint` script instead of `pnpm eslint`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace Rollup with Rolldown v1 for bundling (10-30x faster builds). The new config lives in rolldown.config.mjs and the build script is updated accordingly.
Replace ESLint + neostandard with Oxlint v1 for linting (50-100x faster). The new config lives in .oxlintrc.json and is run via
pnpm lint. Useargs: noneon no-unused-vars to skip unused function parameters, which serve as API documentation for callback signatures. Rename .github/workflows/eslint.yml to lint.yml accordingly.These choices are informed by ongoing upstream discussions about how best to align the neostandard and Rollup ecosystems with modern JavaScript tooling (neostandard/neostandard#350, rollup/plugins#2010).
Drop Babel — transpilation is now handled by Rolldown's built-in Oxc transforms. The minimum browser targets are unchanged (Chrome 60+, Firefox 60+, iOS 12+, Safari 12+).
Remove 9 unused npm devDependencies (
@babel/core,@babel/preset-env,@rollup/plugin-babel,@rollup/plugin-node-resolve,eslint,eslint-plugin-compat,neostandard,rollup,rollup-plugin-copy).Clean up .gitignore (remove stale !.babelrc negation) and update Rakefile lint task to call the new
pnpm lintscript instead ofpnpm eslint.