Repository navigation
build: move the build and test targets to @angular/build - #3807
Open
armando-navarro wants to merge 3 commits into
Open
armando-navarro wants to merge 3 commits into
armando-navarro wants to merge 3 commits into
Conversation
Angular CLI 22 deprecated the builders in @angular-devkit/build-angular as part of ending its webpack support, and npm run build printed that warning on every run. The two targets now use the @angular/build builders of the same names, which take the same options. The spec bundle moves from webpack to esbuild. Chrome and Firefox execute the same 160 specs with the same 48 skips, and the node specs and lint are unchanged. The karma.conf.js framework and plugin entries for the old package go with it. @angular/platform-browser-dynamic stays in the root dependencies: @angular/platform-server/testing imports it without declaring it, and tools/jasmine.ts runs the node specs on that platform. The regenerated lockfile loses the webpack tree, 367 entries, and with it istanbul-lib-instrument, an optional peer of @angular/build that only code coverage needs. Coverage was already unreachable here: the coverage reporter is not installed on either builder.
npm 11.21 prunes the nested @types/node entries that satisfy the optional peer of @angular/build, @angular/cli and inquirer, and npm 10.9.9, the npm bundled with the Node 22 that CI runs, then refuses the lockfile: "Missing: @types/[email protected] from lock file". Regenerated with npm 10.9.9. npm 11 accepts the result. Against main the lockfile now drops 364 entries, adds none, and changes no versions. The libc metadata fields npm 11 writes are gone, which npm 10 ignores either way.
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.
Checklist
@angular-devkit/build-angularbuilders #3806yarn install,yarn testrun successfully? yes, with npm:npm ci, then the build, lint and spec runs under Verification.Description
Angular CLI 22 deprecated the builders in
@angular-devkit/build-angularas part of ending its webpack support, andnpm run buildprinted that warning on every run. Thebuildandtesttargets now use the@angular/buildbuilders of the same names, which take the same options. The reasoning is in #3806.Changes
angular.json:@angular/build:ng-packagrforbuild,@angular/build:karmafortest. Options unchanged.karma.conf.js: the@angular-devkit/build-angularframework and plugin entries are gone.client.args, whichsrc/test-config.tsreads for the emulator ports, is passed through as before.package.json:@angular/buildreplaces@angular-devkit/build-angularin the devDependencies.package-lock.json: regenerated. 364 entries gone (webpack,@ngtools/webpack,babel-loader,copy-webpack-pluginand their dependencies), none added, no version changes. Regenerated with npm 10.9.9, the npm bundled with the Node 22 that CI runs: npm 11 prunes three nested@types/nodeentries that npm 10 requires.Behavior to know
dist/test-out/. Runningnpm run build(which starts withrimraf dist) whilenpm run test:watchis open removes it until the next rebuild.coverageIstanbulReporterblock and its reporter plugin inkarma.conf.jsstay as they are.karma-coverageis not installed), so nothing that worked stops working.istanbul-lib-instrument, an optional peer of@angular/buildthat goes with the webpack tree, plus eitherkarma-coverageor acoverage-istanbulentry inreportersfor the istanbul reporter that is already installed.Verification
test:node(385 specs) pass. The build prints no deprecation warning.firebase-tools emulators:exec: 112 of 160 executed, 48 skipped bypending(). The spec lists matched by name on both builders.angular-fire-22.0.0.tgzbuilt from the same commit with the old builder and with this one has the same SHA-1,13a703e2d9bd0fb9ffb842ae68238b0e18cd302f, so the published package is unchanged.Fixes #3806