Skip to content

v4.10.0

Choose a tag to compare

@Aukevanoost Aukevanoost released this 10 Nov 08:22
· 130 commits to main since this release

Highlights

A smaller minor: it pins the public API, adds what a runtime needs to preload, and fixes a handful of crashes and edge cases. The changes in the remoteEntry.json are in preparation for the v5 release which will retire the default bundle all externals in one go build option.

Preloading

remoteEntry.json can now tell a runtime what to fetch ahead of time:

  • Each exposed module lists the chunks it reaches (exposes[].chunks). Chunks it imports statically are marked initial; chunks only reached through import() are listed without it.
  • A shared package can opt in with preload: true. The runtime then fetches it, with every chunk of the bundle it is built in, as soon as the import map is in place. The build warns when that can't work as intended (combined bundle, or denseChunking off).

A pinned public API

Every entry point's exports are now snapshotted in a spec, so any change to the surface is reviewed on purpose. ./internal is trimmed to what adapters actually use, and now exports toDiskCase. A few exports are deprecated; their tags name the replacement.

Config builders

  • fromPackageJson() and mappingsFromWorkspace() gain .only(patterns), the same selection as .filter().
  • share and PackageJsonExternalsBuilder.get() are deprecated. Pass the builder itself as shared: fromPackageJson().only([...]).override({...}).

Fixes

  • A relative workspaceRoot is resolved instead of crashing, and a remote without a tsconfig builds (with no shared mappings).
  • A sharedMappings pattern that matches no tsconfig paths key now warns instead of being dropped silently.
  • A sub-path share() key with a hand-written packageInfo (e.g. Angular locales) gets the installed version, so it no longer loads a second copy of its package.
  • On a first build, the cache only removes its own entries, never a folder core did not create.
  • The mapping import resolver follows symlinks, so a linked workspace package is no longer inlined next to its shared copy.

What's Changed

  • fix: Warn when a declared shared mapping selects no tsconfig paths key by @Aukevanoost in #230
  • chore(ci): Test the typescript floor by installing it by @Aukevanoost in #229
  • feat: Pin the public export surface for 4.10 by @Aukevanoost in #226
  • fix: Realpath directories in the mapping import resolver by @Aukevanoost in #227
  • fix: Purge only cache entries from a cache folder without a stamp by @Aukevanoost in #232
  • chore(deps): update pnpm to v11.28.10 by @renovate[bot] in #224
  • fix: Version and secondaries for a sub-path share() key with packageInfo by @Aukevanoost in #234
  • docs: Split AGENTS.md into architecture topic pages by @Aukevanoost in #235
  • feat: Add .only() to the config builders and accept build: 'combined' by @Aukevanoost in #238
  • chore: Deprecate share and PackageJsonExternalsBuilder.get() by @Aukevanoost in #236
  • fix: Resolve a relative workspaceRoot and build without a tsconfig by @Aukevanoost in #237
  • chore(deps): update pnpm/action-setup digest to 73e4699 by @renovate[bot] in #240
  • chore(deps): update dependency vite to ^8.3.5 by @renovate[bot] in #241
  • refactor: Drop the build: 'combined' spelling before it ships by @Aukevanoost in #243
  • feat: Publish chunk lists and a preload flag for runtime preloading by @Aukevanoost in #242

Full Changelog: v4.9.0...v4.10.0