Skip to content

fix: pre-release QA fixes for init, remove and locale sharing - #206

Merged
Aukevanoost merged 5 commits into
mainfrom
fix/pre-release-qa
Nov 11, 2026
Merged

Aukevanoost merged 5 commits into
mainfrom
fix/pre-release-qa

Conversation

@Aukevanoost

@Aukevanoost Aukevanoost commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Fixes found while scaffolding new host + remote workspaces with the release candidate (ng add from the packed tarball, checked in headless Chromium). None are regressions from 22.2.4.

  • chore(deps): require orchestrator ^4.10.0. Aligns with core 4.10. The init schematic wrote ^4.8.0 with overwrite, which lowered a user's newer range; an existing lockfile could then keep an older orchestrator next to the adapter's own, giving two copies. (4.8 and 4.9 do accept core 4.10 as a peer, so this is not a peer conflict.) A spec now ties the schematic's range to the adapter's own dependency. Every @softarc/native-federation* range in the repo and the lockfile is now at 4.10.0 or higher.
  • fix(schematics): key the remote map by the raw project name. strings.camelize turned wc-remote into wcRemote, but the remote registers as wc-remote. Both the static host's main.ts and the dynamic host's federation.manifest.json failed with Remote 'wcRemote' is not initialized. Existing generated files are not rewritten.
  • fix(config): keep shared locales when ignoreUnusedDeps is disabled. removeNgLocales stripped every @angular/common/locales/* entry, including the ones listed via shareAngularLocales, the docs' fallback for exactly this setting. Behaviour change: a config that combines ignoreUnusedDeps: false with includeSecondaries: { resolveGlob: true } on @angular/common now shares every locale instead of none.
  • fix(schematics): remove drops es-module-shims. It read polyfills from the federation builder's options instead of the original ones on esbuild, so the shim stayed in angular.json. If the shim was the only entry, the polyfills option is removed rather than left empty.

Each new spec fails without its fix.

Orchestrator 4.10 is the first that accepts core 4.10 as a peer. The init
schematic now writes the same range instead of ^4.8.0, which overwrote a
user's newer range and could leave a lockfile on an orchestrator that
rejects the adapter's core.
init camelized sibling project names (wc-remote -> wcRemote), but the
remote's federation config registers under the raw name, so both the
static host's main.ts and the dynamic host's federation.manifest.json
pointed at a remote that is never initialized.
withNativeFederation stripped every @angular/common/locales/* entry when
ignoreUnusedDeps was off. Core 4.10 never expands locales on its own, so
the only entries left to strip were the ones listed via
shareAngularLocales, which the docs offer as the fallback for this case.
remove read the polyfills from the federation builder's options instead
of the original ones on the esbuild target, so es-module-shims stayed in
angular.json after esbuild was moved back to build.
- correct the orchestrator rationale: 4.8 and 4.9 accept core 4.10 as a
  peer; the risk of a lower range is a second orchestrator copy
- locale spec: core does expand locales with resolveGlob; merge the two
  ignoreUnusedDeps cases
- remove: drop the polyfills option when es-module-shims was its only
  entry, drop the unused main field, use browser in the spec fixture
@Aukevanoost
Aukevanoost merged commit d841fc5 into main Nov 11, 2026
1 check passed
Aukevanoost added a commit that referenced this pull request Nov 11, 2026
Backports 22.2.4..22.2.5 onto the Angular 21 layout.

Incoming:
- #203: main and polyfills script tags are matched by file name, so a
  base href like /maintenance/ no longer hits the dev server's client.
- #202/#204: shareAngularLocales accepts pool and build and uses the
  Angular skip list; locale entries are kept when ignoreUnusedDeps is off.
- #205: @softarc/native-federation ~4.10.0, orchestrator ^4.10.0; the init
  template passes the fromPackageJson builder without .get().
- #206: the generated remote map is keyed by the raw project name; the
  remove schematic restores the esbuild target without es-module-shims.

Angular 21 specific adaptations:
- Ported the #203 regexes to src/utils/update-index-html.ts and moved its
  spec there; dropped the shimMode spec case (this branch always emits
  module-shim for main).
- Moved the angular-locales spec into src/utils; angular-locales imports
  share from ../config/share-utils.js.
- Left out share-utils.spec.ts as before: it relies on exports
  (getDefaultPlatform, SERVER_DEPENDENCIES) this branch doesn't have.
- Kept the -v4 name, 21.2.17 version and ng21 pins; bumped @softarc/*
  to 4.10 by hand.
- pnpm-lock.yaml regenerated rather than merged.
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