Skip to content

Simplify dts bundles and clean up globby wrapper#1012

Merged
ecraig12345 merged 1 commit intomicrosoft:masterfrom
ecraig12345:dts-bundle-fix
Feb 10, 2026
Merged

Simplify dts bundles and clean up globby wrapper#1012
ecraig12345 merged 1 commit intomicrosoft:masterfrom
ecraig12345:dts-bundle-fix

Conversation

@ecraig12345
Copy link
Member

@ecraig12345 ecraig12345 commented Feb 7, 2026

dts bundle fixes:

  • Add a shared helper for the dts bundles of lage and @lage-run/globby
    • lage's separate file for backfill types is no longer needed since dts-bundle-generator now has better name collision handling (at least for that circumstance)
  • Patch dts-bundle-generator to support regex inlinedLibraries and .d.mts files

lage bundle fixes:

  • Consolidate the different steps into a single scripts/bundle.mjs
  • Invoke esbuild only once, with each relevant file as an entry point
  • Remove the retain-dynamic-import-plugin.js which was unused

globby wrapper fixes:

  • The wrapper was referencing globby@14, which is incompatible with Node 14. Switch to version 13 for now.
  • Fix the package.json exports: the order was wrong, and some of the entries were invalid (the package only ships cjs, so the correct condition for a package with implicit type: "commonjs" is default; source and types must come before that)
  • Fix the types: inline types of dependencies, and patch the fast-glob types to work around issues with dts-bundle-generator and namespace exports (especially ones that are renamed and/or have overlapping names with other types)

Other build fixes:

  • The transpile step should ONLY check the src dir. Everything else is irrelevant.
  • Specify emitDeclarationOnly in the base tsconfig, rather than as an override in the types task

@ecraig12345 ecraig12345 force-pushed the dts-bundle-fix branch 2 times, most recently from d6f5658 to 1294f35 Compare February 7, 2026 08:15
@ecraig12345 ecraig12345 merged commit d5e55c4 into microsoft:master Feb 10, 2026
18 of 19 checks passed
@ecraig12345 ecraig12345 deleted the dts-bundle-fix branch February 10, 2026 05:58
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.

1 participant