Skip to content

build: modernise build scripts with node --run and ESM pre-release#823

Merged
lcottercertinia merged 2 commits into
certinia:mainfrom
lukecotter:chore-build-modernisation
Jun 19, 2026
Merged

build: modernise build scripts with node --run and ESM pre-release#823
lcottercertinia merged 2 commits into
certinia:mainfrom
lukecotter:chore-build-modernisation

Conversation

@lukecotter

Copy link
Copy Markdown
Collaborator

📝 PR Overview

Modernises the build tooling: uses Node's built-in node --run instead of pnpm run for the build scripts, converts the pre-release version bumper to ESM, and removes leftover debug logging from the bundler configs. Both pnpm build (rollup) and pnpm build:fast (rolldown) verified green.

🛠️ Changes made

  • Swap pnpm runnode --run in build and build:fast (4 invocations) for a lighter, dependency-free script runner.
  • Rewrite scripts/pre-release.js as ESM scripts/pre-release.mjs: requireimport, and resolve/write lana/package.json via import.meta.url.
  • Remove the debug console.log('Package mode') lines from rollup.config.mjs and rolldown.config.ts.

🧩 Type of change (check all applicable)

  • 🐛 Bug fix - something not working as expected
  • ✨ New feature – adds new functionality
  • ♻️ Refactor - internal changes with no user impact
  • ⚡ Performance Improvement
  • 📝 Documentation - README or documentation site changes
  • 🔧 Chore - dev tooling, CI, config
  • 💥 Breaking change

📷 Screenshots / gifs / video [optional]

N/A — tooling/config only.

✅ Tests added?

  • 👍 yes
  • 🙅 no, not needed
  • 🙋 no, I need help

📚 Docs updated?

  • 🔖 README.md
  • 🔖 CHANGELOG.md
  • 📖 help site
  • 🧪 Marked any pre-release-only features (README 🧪 badge — see RELEASING.md)
  • 🙅 not needed

Anything else we need to know? [optional]

Deliberately left intact: rolldown's preserveAntlrATN() plugin and the eventemitter3 resolve alias. The former is an active workaround for an oxc-codegen surrogate bug that corrupts ANTLR ATN data (per its docstring) — removing it would break SOQL/Apex parsing in the fast build.

Faster Rust-based printer; output matches existing style so no repo-wide reformat.

- replace prettier-plugin-organize-imports with @prettier/plugin-oxc in .prettierrc and devDependencies
- drops format-time import sorting and unused-import removal — unused imports now surface as
  @typescript-eslint/no-unused-vars errors instead of being auto-stripped
- swap `pnpm run` for `node --run` in build/build:fast (4 invocations) for a lighter script runner
- rewrite scripts/pre-release.js as ESM (.mjs): require→import, import.meta.url-based package.json paths
- drop the debug `console.log('Package mode')` from rollup and rolldown configs
@lcottercertinia lcottercertinia merged commit c515048 into certinia:main Jun 19, 2026
7 checks passed
@lukecotter lukecotter deleted the chore-build-modernisation branch June 19, 2026 21:55
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.

2 participants