build: fix CI after @angular/build 22.2.0 and jest-preset-angular 17.0.1 - #604
Merged
Merged
Conversation
@angular/build 22.2.0 validates flatModuleOutFile in test builds, which fails with NG4001 because tsconfig.spec.json inherits the option while including all .ts files. ng-packagr sets these options itself when building the library, so they are not needed here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jest-preset-angular 17.0.1 changed the esbuild target for .mjs dependencies from es2016 to es2022, so async/await in Angular packages is no longer downleveled. zone.js cannot track native async/await, which breaks the zone-based router example test. Targeting ES2015 makes jest-preset-angular downlevel them again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
CI currently fails on any fresh run, including main, because there is no lockfile and two dependencies released minor/patch versions after main's last green run (Sep 16). This is why #603 fails on code it doesn't touch.
1.
@angular/build22.2.0 → NG4001 intest:testing-libraryprojects/testing-library/tsconfig.spec.jsoninheritsflatModuleId/flatModuleOutFilefromprojects/testing-library/tsconfig.jsonwhile including**/*.ts. 22.2.0 now validates this in the test build (22.1.8 and 22.1.9 pass). ng-packagr sets these options itself when building the library, so they're removed.npm run buildstill emits the samefesm2022bundles and.d.tsfiles for all entry points.2.
jest-preset-angular17.0.1 →09-router.spec.tsfails intest:jest-app17.0.1 (fb544ac) changed the esbuild target for
.mjsdependencies fromes2016toes2022. As a result, async/await in the Angular packages is no longer downleveled, and zone.js can't track native async/await. The zone-based router example then asserts before the navigation's change detection has run. jest-preset-angular still useses2015when the tsconfig target isES2015, so the jest example app'stsconfig.spec.jsonnow targetsES2015(the@angular-builders/jestdefault transform uses this tsconfig for.tsand.mjsfiles).Testing
Ran the full CI step sequence locally on a fresh install that resolved
@angular/build@22.2.0andjest-preset-angular@17.0.1:npm run buildnpm run test:testing-librarynpm run test:example-appnpm run test:jest-app: 53 passed, 3 skippednpm run test:karma-app -- --watch=false --no-progress: 5/5npm run lintOnce this is merged, #603 needs its branch updated to pick up the fix.
🤖 Generated with Claude Code