chore(deps): replace rollup with rolldown#12109
Open
devin-ai-integration[bot] wants to merge 9 commits intomainfrom
Open
chore(deps): replace rollup with rolldown#12109devin-ai-integration[bot] wants to merge 9 commits intomainfrom
devin-ai-integration[bot] wants to merge 9 commits intomainfrom
Conversation
- Replace tsup@8.5.0 with tsdown@0.20.1 in all packages
- Update @rolldown/binding-darwin-arm64 from 1.0.0-rc.2 to 1.0.0-rc.3
- Update build scripts to use tsdown API (import { build } from 'tsdown')
- Replace esbuildOptions with inputOptions for rolldown compatibility
- Remove esbuild-plugin-polyfill-node dependency (replaced with platform: browser + define)
- Rename tsupOverrides/tsupOptions to tsdownOverrides/tsdownOptions throughout
Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
🌱 Seed Test SelectorSelect languages to run seed tests for:
How to use: Click the ⋯ menu above → "Edit" → check the boxes you want → click "Update comment". Tests will run automatically and snapshots will be committed to this PR. |
Swimburger
requested changes
Feb 5, 2026
packages/configs/build-utils.mjs
Outdated
Comment on lines
90
to
92
| define: { | ||
| "process.env.NODE_ENV": JSON.stringify("production") | ||
| }, |
Member
There was a problem hiding this comment.
This is not guaruanteed to be for a production env
Contributor
Author
There was a problem hiding this comment.
Good catch - removed the hardcoded process.env.NODE_ENV define. The nodePolyfills() plugin handles process polyfilling now.
…nals Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com>
Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com>
Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com>
…ternal to cli-v2 Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com>
Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com>
Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com>
…://github.com/fern-api/fern into devin/1770315917-replace-rollup-with-rolldown
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.
Description
Refs: Requested by @Swimburger
Link to Devin run
Replaces
tsup(which uses esbuild + rollup) withtsdown@0.20.3(which usesrolldown@1.0.0-rc.3) across the monorepo. Replacesesbuild-plugin-polyfill-nodewith@rolldown/plugin-node-polyfills@1.0.3.Changes Made
Bundler migration
tsup@^8.5.0withtsdown@0.20.3in 6 package.json files (root, generator-cli, configs, cli, cli-v2, seed)@rolldown/binding-darwin-arm64from1.0.0-rc.2to1.0.0-rc.3, add@rolldown/binding-linux-x64-gnu@1.0.0-rc.3import { build } from "tsdown"instead ofimport tsup from "tsup"/tsup.build()tsupOverrides→tsdownOverrides,tsupOptions→tsdownOptions,PRODUCTION_TSUP_OVERRIDES→PRODUCTION_TSDOWN_OVERRIDESacross all build callersesbuildOptions(conditions) withinputOptions.resolve.conditionNamesin seed/build.mjsesbuild-plugin-polyfill-nodewith@rolldown/plugin-node-polyfillsin configs/build-utils.mjs (buildDynamicSnippets)keytartoFULL_EXTERNALSandMINIMAL_EXTERNALSin both cli and cli-v2 (native.nodebinaries cannot be bundled by rolldown)inlineOnly: falseto all tsdown build configs (required to suppress tsdown 0.20.3 dependency bundling warning)outputOptions: { codeSplitting: false }to single-entry CJS builds (cli, cli-v2, seed, configs) to prevent circular chunk dependencies at runtimemetafile: truefrom production build overrides (not supported by tsdown)/^tsup/to/^tsdown/bin/clito require../dist/cli.cjs(tsdown outputs.cjsnot.js)package.jsonmain/types todist/api.cjs/dist/api.d.ctsBuild fixes
"sideEffects": falseto rust/dynamic-snippets/package.jsonTest updates
"edition is required"→"edition must be a string"fern checknow reports"edition must be a string"instead of"edition is required"for an invalidfern.yml. This is a behavioral change caused by rolldown bundling the validation library differently. Reviewer should verify this is acceptable.keytarexternalization: Added to both cli and cli-v2 externals to prevent bundling native.nodefiles. Verify runtime behavior.codeSplitting: false: Only applied to single-entry builds. generator-cli has multiple entries and cannot use this option — verify no circular dependency issues at runtime.@rolldown/plugin-node-polyfills(packages/configs/build-utils.mjs): Replacesesbuild-plugin-polyfill-nodefor browser builds. Verify dynamic snippets work correctly.inputOptions.resolve.conditionNames(packages/seed/build.mjs): Verify rolldown respects this the same way esbuild respectsconditions.Testing
pnpm installcompletes successfullypnpm run check(biome lint) passespnpm run fern:buildcompletes successfullynode packages/cli/cli/dist/prod/cli.cjs --versionworks