feat: tsup build alignment and local setup fixes#4460
feat: tsup build alignment and local setup fixes#4460ScriptedAlchemy wants to merge 51 commits intomainfrom
Conversation
Co-authored-by: zackary.l.jackson <zackary.l.jackson@gmail.com>
Use tsdown with nx run-commands for migrated packages and align export and type outputs for publint. Remove legacy rollup configs and add shared migration scaffolding. Co-authored-by: Cursor <cursoragent@cursor.com>
Align package build metadata with tsdown output and type extension updates. Remove CJS fallback from ESM runtime alias resolution for consistent module format selection. Co-authored-by: Cursor <cursoragent@cursor.com>
Use .d.mts for import types so exports match emitted ESM declaration files. Co-authored-by: Cursor <cursoragent@cursor.com>
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
🦋 Changeset detectedLatest commit: ef7c273 The changes in this PR will be included in the next version bump. This PR includes changesets to release 43 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Bundle Size Report20 package(s) changed, 21 unchanged.
Total dist: 6.71 MB (-189733 B (-2.6%)) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: abd52781ca
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| '@module-federation/webpack-bundler-runtime': patch | ||
| '@module-federation/runtime-core': patch | ||
| '@module-federation/utilities': patch | ||
| '@module-federation/node': patch | ||
| '@module-federation/sdk': patch |
There was a problem hiding this comment.
Add missing changesets for modified publishable packages
This commit changes behavior/exports in additional publishable packages (for example @module-federation/runtime-tools, @module-federation/data-prefetch, @module-federation/enhanced, @module-federation/rspack, and @module-federation/inject-external-runtime-core-plugin), but they are not listed in any changeset, so release automation will skip versioning/publishing those updates and users will not receive the shipped fixes. This also violates the repository rule in AGENTS.md (“If a publishable package behavior changes, add a changeset”).
Useful? React with 👍 / 👎.
@module-federation/devtools
@module-federation/cli
create-module-federation
@module-federation/data-prefetch
@module-federation/dts-plugin
@module-federation/enhanced
@module-federation/error-codes
@module-federation/managers
@module-federation/manifest
@module-federation/metro
@module-federation/metro-plugin-rnc-cli
@module-federation/metro-plugin-rnef
@module-federation/modern-js-v3
@module-federation/retry-plugin
@module-federation/rsbuild-plugin
@module-federation/rspack
@module-federation/rspress-plugin
@module-federation/runtime
@module-federation/runtime-core
@module-federation/runtime-tools
@module-federation/sdk
@module-federation/third-party-dts-extractor
@module-federation/treeshake-frontend
@module-federation/treeshake-server
@module-federation/webpack-bundler-runtime
@module-federation/bridge-react
@module-federation/bridge-react-webpack-plugin
@module-federation/bridge-shared
@module-federation/bridge-vue3
@module-federation/inject-external-runtime-core-plugin
commit: |
Use tsdown define-based format branching in sdk node loader. Remove nextjs-mf rollup leftovers and emit both cjs and esm outputs. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace tsup-based build configs and Nx commands with tsdown for the remaining package set, and update native-federation-tests runtime usage/types to tsdown. Remove obsolete tsup configs and refresh the lockfile. Co-authored-by: Cursor <cursoragent@cursor.com>
Centralize non-webpack require access in sdk bundler helpers and switch
node/sdk runtime loaders to explicit IS_ESM_BUILD if/else branches so ESM
outputs avoid eval('require') while CJS keeps native require behavior.
Co-authored-by: Cursor <cursoragent@cursor.com>
Remove unused legacy rollup config files left after migration. Align package exports with emitted cjs/mjs and d.cts/d.mts outputs. Fail fast when data-prefetch runtime plugin files cannot be resolved. Co-authored-by: Cursor <cursoragent@cursor.com>
…nching
Fix dts-plugin publint failure by emitting .mjs for ESM output and
splitting exports into proper import/require conditions. Fix node
runtimePlugin and stratagies to use createRequire(import.meta.url) in
ESM branches instead of bare require('node:module').
Co-authored-by: Cursor <cursoragent@cursor.com>
Rolldown's dead-code elimination needs explicit if/else blocks rather than early returns to fully remove the unused branch from each build target output. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
The Jest test runner uses tsconfig with module:commonjs which rejects import.meta (TS1343). These lines are tree-shaken in CJS builds and only execute in ESM output where import.meta is valid. Co-authored-by: Cursor <cursoragent@cursor.com>
…est output Use explicit getNodeRequire branching for ESM and CJS compatibility. Align native federation test bundles to emit CJS `.js` for existing assertions. Co-authored-by: Cursor <cursoragent@cursor.com>
Restore third-party-dts-extractor to the tsup build flow used on main. Reinstate tsup as a workspace dev dependency for extractor build and tests. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
Validation