diff --git a/.github/workflows/dev-infra.yml b/.github/workflows/dev-infra.yml index 48e6cba7bef2..71aca25eb2d3 100644 --- a/.github/workflows/dev-infra.yml +++ b/.github/workflows/dev-infra.yml @@ -16,6 +16,7 @@ jobs: - uses: angular/dev-infra/github-actions/pull-request-labeling@e006a332028a4c3cb24e9d92437fac7ae99e2ed5 with: angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }} + labels: '{"requires: TGP": ["packages/core/primitives/**/{*,.*}"]}' post_approval_changes: runs-on: ubuntu-latest steps: diff --git a/.pullapprove.yml b/.pullapprove.yml index 9cd37692e09a..1f84917e316b 100644 --- a/.pullapprove.yml +++ b/.pullapprove.yml @@ -106,7 +106,6 @@ groups: - thePunderWoman - kirjs - JoostK - - mmalerba - ~amishne - ~leonsenft - ~mattrbeck @@ -153,7 +152,6 @@ groups: - kirjs - thePunderWoman - ~pkozlowski-opensource - - mmalerba - JeanMeche - ~amishne - ~leonsenft @@ -209,7 +207,6 @@ groups: - kirjs - thePunderWoman - ~pkozlowski-opensource - - mmalerba - ~amishne - ~leonsenft - ~mattrbeck @@ -263,7 +260,6 @@ groups: - ~pkozlowski-opensource - ~mgechev - MarkTechson - - mmalerba - ~hawkgs - ~amishne - ~leonsenft @@ -376,7 +372,6 @@ groups: - thePunderWoman - ~pkozlowski-opensource - kirjs - - mmalerba - crisbeto - devversion - JeanMeche @@ -412,7 +407,6 @@ groups: - kirjs - thePunderWoman - ~pkozlowski-opensource - - mmalerba - ~amishne - ~leonsenft - ~mattrbeck @@ -481,10 +475,6 @@ groups: - thePunderWoman # Jessica Janiuk - AndrewKushnir # Andrew Kushnir - atscott # Andrew Scott - labels: - pending: 'requires: TGP' - approved: 'requires: TGP' - rejected: 'requires: TGP' # External team required reviews primitives-shared: @@ -502,10 +492,6 @@ groups: - tbondwilkinson # Tom Wilkinson - rahatarmanahmed # Rahat Ahmed - ENAML # Ethan Cline - labels: - pending: 'requires: TGP' - approved: 'requires: TGP' - rejected: 'requires: TGP' #################################################################################### # Override managed result groups diff --git a/MODULE.bazel b/MODULE.bazel index 327dec92c52a..8976953f05dc 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -71,8 +71,8 @@ use_repo(node, "nodejs_windows_amd64") pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm") pnpm.pnpm( name = "pnpm", - pnpm_version = "10.30.0", - pnpm_version_integrity = "sha512-K1dT3gFdSA7riPW1th4AUfBbQwGAioLsi4QMnSrfd0jrNSyD9cFZPKcD/xAXKVvD/dMRmruWhu/Ja5/LGCAJNw==", + pnpm_version = "10.30.1", + pnpm_version_integrity = "sha512-NZDlUNU4TKo5vVx8c59yJwI0svYFnhMBj5dcMTseuf78wJcUBIdl1Nnv6WE4LDEuYkVywEIHYr3F1ZQM35vnOg==", ) use_repo(pnpm, "pnpm") diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index bd2f451fbcd2..1244e327fb23 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -417,7 +417,7 @@ "@@aspect_rules_js+//npm:extensions.bzl%pnpm": { "general": { "bzlTransitiveDigest": "HC+l+mTivq1p/KbcVQ+iV5QwYR+oKESJh827FY68SH8=", - "usagesDigest": "i/ja+7Le/9VdqJB4MTzD11aQl7qURG7BbkP/sBkILdc=", + "usagesDigest": "PpJ4FqoV3QW67OW92+3MJMwspuSoWC6aDXT9WFaBpPs=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, "envVariables": {}, @@ -426,11 +426,11 @@ "repoRuleId": "@@aspect_rules_js+//npm/private:npm_import.bzl%npm_import_rule", "attributes": { "package": "pnpm", - "version": "10.30.0", + "version": "10.30.1", "root_package": "", "link_workspace": "", "link_packages": {}, - "integrity": "sha512-K1dT3gFdSA7riPW1th4AUfBbQwGAioLsi4QMnSrfd0jrNSyD9cFZPKcD/xAXKVvD/dMRmruWhu/Ja5/LGCAJNw==", + "integrity": "sha512-NZDlUNU4TKo5vVx8c59yJwI0svYFnhMBj5dcMTseuf78wJcUBIdl1Nnv6WE4LDEuYkVywEIHYr3F1ZQM35vnOg==", "url": "", "commit": "", "patch_args": [ @@ -453,7 +453,7 @@ "repoRuleId": "@@aspect_rules_js+//npm/private:npm_import.bzl%npm_import_links", "attributes": { "package": "pnpm", - "version": "10.30.0", + "version": "10.30.1", "dev": false, "root_package": "", "link_packages": {}, diff --git a/adev/package.json b/adev/package.json index 401d10b390e3..2c918724e447 100644 --- a/adev/package.json +++ b/adev/package.json @@ -6,9 +6,9 @@ "@algolia/requester-node-http": "5.48.0", "@angular/animations": "workspace:*", "@angular/aria": "21.2.0-rc.0", - "@angular/build": "21.2.0-rc.0", + "@angular/build": "21.2.0-rc.1", "@angular/cdk": "21.2.0-rc.0", - "@angular/cli": "21.2.0-rc.0", + "@angular/cli": "21.2.0-rc.1", "@angular/common": "workspace:*", "@angular/compiler": "workspace:*", "@angular/compiler-cli": "workspace:*", @@ -19,7 +19,7 @@ "@angular/platform-browser": "workspace:*", "@angular/platform-server": "workspace:*", "@angular/router": "workspace:*", - "@angular/ssr": "21.2.0-rc.0", + "@angular/ssr": "21.2.0-rc.1", "@codemirror/autocomplete": "6.20.0", "@codemirror/commands": "6.10.1", "@codemirror/lang-angular": "0.1.4", diff --git a/adev/scripts/routes/BUILD.bazel b/adev/scripts/routes/BUILD.bazel index 387d65897cc3..573d7aeca2a7 100644 --- a/adev/scripts/routes/BUILD.bazel +++ b/adev/scripts/routes/BUILD.bazel @@ -29,6 +29,7 @@ ts_project( deps = [ "//adev:node_modules/@angular/docs", "//adev:node_modules/@types/node", + "//adev/shared-docs/pipeline/shared:heading", "//adev/src/app/routing/navigation-entries", "//adev/src/content/reference/errors:route-nav-items", "//adev/src/content/reference/extended-diagnostics:route-nav-items", diff --git a/adev/scripts/routes/generate-routes.mts b/adev/scripts/routes/generate-routes.mts index 3cb1b64d64d9..f6cd639f9710 100644 --- a/adev/scripts/routes/generate-routes.mts +++ b/adev/scripts/routes/generate-routes.mts @@ -7,6 +7,7 @@ */ import {ALL_ITEMS} from '../../src/app/routing/navigation-entries/index.js'; +import {getIdFromHeading} from '../../shared-docs/pipeline/shared/heading.mjs'; import {NavigationItem} from '@angular/docs'; import {writeFileSync, readFileSync} from 'fs'; import {join, resolve} from 'path'; @@ -72,11 +73,3 @@ function main() { } main(); - -// TODO: refactor so this function is shared with the generation pipeline (adev/shared-docs/pipeline/shared/marked/transformations/heading.mts) -function getIdFromHeading(heading: string): string { - return heading - .toLowerCase() - .replace(/\s|\//g, '-') // replace spaces and slashes with dashes - .replace(/[^\p{L}\d\-]/gu, ''); // only keep letters, digits & dashes -} diff --git a/adev/shared-docs/pipeline/shared/BUILD.bazel b/adev/shared-docs/pipeline/shared/BUILD.bazel index 5c6015a1e857..3b09685c954a 100644 --- a/adev/shared-docs/pipeline/shared/BUILD.bazel +++ b/adev/shared-docs/pipeline/shared/BUILD.bazel @@ -10,6 +10,15 @@ ts_project( ], ) +ts_project( + name = "heading", + srcs = ["heading.mts"], + visibility = [ + "//adev/scripts/routes:__subpackages__", + "//adev/shared-docs/pipeline:__subpackages__", + ], +) + ts_project( name = "shiki", srcs = ["shiki.mts"], @@ -36,3 +45,17 @@ zoneless_jasmine_test( name = "linking_test", data = [":linking_test_lib"], ) + +ts_project( + name = "heading_test_lib", + testonly = True, + srcs = ["test/heading.spec.mts"], + deps = [ + ":heading", + ], +) + +zoneless_jasmine_test( + name = "heading_test", + data = [":heading_test_lib"], +) diff --git a/adev/shared-docs/pipeline/shared/heading.mts b/adev/shared-docs/pipeline/shared/heading.mts new file mode 100644 index 000000000000..9f051bca1130 --- /dev/null +++ b/adev/shared-docs/pipeline/shared/heading.mts @@ -0,0 +1,29 @@ +/*! + * @license + * Copyright Google LLC All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.dev/license + */ + +/** + * Extracts the ID from a heading text. + * Supports custom ID syntax: `## My Heading {#custom-id}` + */ +export function getIdFromHeading(heading: string): string { + // extract the extended markdown heading id + // ex: ## MyHeading {# myId} + // This is recommended in case we end up having duplicate Ids but we still want the same heading text. + // We don't want to make Id generation stateful/too complex to handle duplicates automatically. + const customIdRegex = /{#\s*([\w-]+)\s*}/g; + const customId = customIdRegex.exec(heading)?.[1]; + + if (customId) { + return customId; + } + + return heading + .toLowerCase() + .replace(/\s|\//g, '-') // replace spaces and slashes with dashes + .replace(/[^\p{L}\d\-]/gu, ''); // only keep letters, digits & dashes +} diff --git a/adev/shared-docs/pipeline/shared/linking.mts b/adev/shared-docs/pipeline/shared/linking.mts index 3c01b92983c8..86906e1573d1 100644 --- a/adev/shared-docs/pipeline/shared/linking.mts +++ b/adev/shared-docs/pipeline/shared/linking.mts @@ -30,6 +30,8 @@ const LINK_EXEMPT = new Set([ 'Event', 'form', 'type', + 'Host', + 'filter', ]); export function shouldLinkSymbol(symbol: string): boolean { diff --git a/adev/shared-docs/pipeline/shared/marked/BUILD.bazel b/adev/shared-docs/pipeline/shared/marked/BUILD.bazel index b0993bbd2d5b..bc4b9c2361a7 100644 --- a/adev/shared-docs/pipeline/shared/marked/BUILD.bazel +++ b/adev/shared-docs/pipeline/shared/marked/BUILD.bazel @@ -18,6 +18,7 @@ ts_project( "//adev:node_modules/mermaid", "//adev:node_modules/playwright-core", "//adev:node_modules/shiki", + "//adev/shared-docs/pipeline/shared:heading", "//adev/shared-docs/pipeline/shared:linking", "//adev/shared-docs/pipeline/shared:shiki", "//adev/shared-docs/pipeline/shared/regions", diff --git a/adev/shared-docs/pipeline/shared/marked/extensions/docs-code/docs-code-block.mts b/adev/shared-docs/pipeline/shared/marked/extensions/docs-code/docs-code-block.mts index 75678a67deeb..cccf135afde9 100644 --- a/adev/shared-docs/pipeline/shared/marked/extensions/docs-code/docs-code-block.mts +++ b/adev/shared-docs/pipeline/shared/marked/extensions/docs-code/docs-code-block.mts @@ -41,6 +41,7 @@ export const docsCodeBlockExtension = { const headerRule = /header\s*:\s*(['"`])([^'"`]+)\1/; // The 2nd capture matters here const highlightRule = /highlight\s*:\s*(.*)([^,])/; const hideCopyRule = /hideCopy/; + const hideDollarRule = /hideDollar/; const preferRule = /\b(prefer|avoid)\b/; const linenumsRule = /linenums/; @@ -52,6 +53,7 @@ export const docsCodeBlockExtension = { header: headerRule.exec(metadataStr)?.[2], highlight: highlightRule.exec(metadataStr)?.[1], hideCopy: hideCopyRule.test(metadataStr), + hideDollar: hideDollarRule.test(metadataStr), style: preferRule.exec(metadataStr)?.[1] as 'prefer' | 'avoid' | undefined, linenums: linenumsRule.test(metadataStr), }; diff --git a/adev/shared-docs/pipeline/shared/marked/extensions/docs-code/docs-code.mts b/adev/shared-docs/pipeline/shared/marked/extensions/docs-code/docs-code.mts index 2bb5797f07d0..d0981a9cdee6 100644 --- a/adev/shared-docs/pipeline/shared/marked/extensions/docs-code/docs-code.mts +++ b/adev/shared-docs/pipeline/shared/marked/extensions/docs-code/docs-code.mts @@ -32,6 +32,7 @@ const visibleLinesRule = /visibleLines="([^"]*)"/; const regionRule = /region="([^"]*)"/; const previewRule = /preview/; const hideCodeRule = /hideCode/; +const hideDollarRule = /hideDollar/; const preferRule = /\b(prefer|avoid)\b/; export const docsCodeExtension = { @@ -52,8 +53,9 @@ export const docsCodeExtension = { const language = languageRule.exec(attr); const visibleLines = visibleLinesRule.exec(attr); const region = regionRule.exec(attr); - const preview = previewRule.exec(attr) ? true : false; - const hideCode = hideCodeRule.exec(attr) ? true : false; + const preview = previewRule.test(attr); + const hideCode = hideCodeRule.test(attr); + const hideDollar = hideDollarRule.test(attr); const classes = classRule.exec(attr); const style = preferRule.exec(attr); @@ -78,6 +80,7 @@ export const docsCodeExtension = { region: region?.[1], preview: preview, hideCode, + hideDollar, style: style?.[1] as 'prefer' | 'avoid' | undefined, classes: classes?.[1]?.split(' '), }; diff --git a/adev/shared-docs/pipeline/shared/marked/extensions/docs-code/format/index.mts b/adev/shared-docs/pipeline/shared/marked/extensions/docs-code/format/index.mts index d077de171fd2..21957368737c 100644 --- a/adev/shared-docs/pipeline/shared/marked/extensions/docs-code/format/index.mts +++ b/adev/shared-docs/pipeline/shared/marked/extensions/docs-code/format/index.mts @@ -39,6 +39,8 @@ export interface CodeToken extends Tokens.Generic { highlight?: string; /** Whether to hide the copy button */ hideCopy?: boolean; + /** Whether to hide the dollar sign in the shell code */ + hideDollar?: boolean; // additional classes for the element classes?: string[]; @@ -132,6 +134,10 @@ function applyContainerAttributesAndClasses(el: Element, token: CodeToken) { if (token.hideCopy) { el.setAttribute('hideCopy', 'true'); } + if (token.hideDollar) { + el.setAttribute('hideDollar', 'true'); + } + const language = token.language; if (language === 'mermaid') { diff --git a/adev/shared-docs/pipeline/shared/marked/test/docs-code-block/docs-code-block.md b/adev/shared-docs/pipeline/shared/marked/test/docs-code-block/docs-code-block.md index 507ed4546ea4..4091ceb4b797 100644 --- a/adev/shared-docs/pipeline/shared/marked/test/docs-code-block/docs-code-block.md +++ b/adev/shared-docs/pipeline/shared/marked/test/docs-code-block/docs-code-block.md @@ -11,3 +11,7 @@ this is a code block ``` code block without language ``` + +```shell {hideDollar} +echo "hello" +``` diff --git a/adev/shared-docs/pipeline/shared/marked/test/docs-code-block/docs-code-block.spec.mts b/adev/shared-docs/pipeline/shared/marked/test/docs-code-block/docs-code-block.spec.mts index c544411c8963..6bc9e27ddf5f 100644 --- a/adev/shared-docs/pipeline/shared/marked/test/docs-code-block/docs-code-block.spec.mts +++ b/adev/shared-docs/pipeline/shared/marked/test/docs-code-block/docs-code-block.spec.mts @@ -27,10 +27,10 @@ describe('markdown to html', () => { expect(codeBlock?.textContent?.trim()).toBe('this is a code block'); }); - it('should parse all 3 code blocks', () => { + it('should parse all 4 code blocks', () => { const codeBlocks = markdownDocument.querySelectorAll('.docs-code'); - expect(codeBlocks.length).toBe(3); + expect(codeBlocks.length).toBe(4); }); it('should deindent code blocks correctly', () => { @@ -42,4 +42,9 @@ describe('markdown to html', () => { const codeBlock = markdownDocument.querySelectorAll('.docs-code')[2]; expect(codeBlock).toBeDefined(); }); + + it('should parse the hideDollar attribute', () => { + const codeBlock = markdownDocument.querySelectorAll('.docs-code')[3]; + expect(codeBlock.getAttribute('hideDollar')).toBe('true'); + }); }); diff --git a/adev/shared-docs/pipeline/shared/marked/test/docs-code/docs-code.md b/adev/shared-docs/pipeline/shared/marked/test/docs-code/docs-code.md index fa52fce3c58c..0be343a07f63 100644 --- a/adev/shared-docs/pipeline/shared/marked/test/docs-code/docs-code.md +++ b/adev/shared-docs/pipeline/shared/marked/test/docs-code/docs-code.md @@ -12,3 +12,5 @@ const form = { state: [''] }; + + diff --git a/adev/shared-docs/pipeline/shared/marked/test/docs-code/docs-code.spec.mts b/adev/shared-docs/pipeline/shared/marked/test/docs-code/docs-code.spec.mts index f008639a8d7d..38dd735f6c4f 100644 --- a/adev/shared-docs/pipeline/shared/marked/test/docs-code/docs-code.spec.mts +++ b/adev/shared-docs/pipeline/shared/marked/test/docs-code/docs-code.spec.mts @@ -52,4 +52,9 @@ describe('markdown to html', () => { const codeBlock = markdownDocument.querySelectorAll('code')[4]; expect(codeBlock?.innerHTML).not.toContain('state'); }); + + it('should parse the hideDollar attribute', () => { + const codeBlock = markdownDocument.querySelectorAll('.docs-code')[5]; + expect(codeBlock.getAttribute('hideDollar')).toBe('true'); + }); }); diff --git a/adev/shared-docs/pipeline/shared/marked/transformations/heading.mts b/adev/shared-docs/pipeline/shared/marked/transformations/heading.mts index 1b00e9bd62d2..4acb6ebefc91 100644 --- a/adev/shared-docs/pipeline/shared/marked/transformations/heading.mts +++ b/adev/shared-docs/pipeline/shared/marked/transformations/heading.mts @@ -8,6 +8,7 @@ import {Tokens} from 'marked'; import {AdevDocsRenderer} from '../renderer.mjs'; +import {getIdFromHeading} from '../../heading.mjs'; export function headingRender( this: AdevDocsRenderer, @@ -25,14 +26,7 @@ export function headingRender( `; } - // extract the extended markdown heading id - // ex: ## MyHeading {# myId} - // This is recommended in case we end up having duplicate Ids but we still want the same heading text. - // We don't want to make Id generation stateful/too complex to handle duplicates automatically. - const customIdRegex = /{#\s*([\w-]+)\s*}/g; - const customId = customIdRegex.exec(headingText)?.[1]; - - const link = customId ?? getIdFromHeading(headingText); + const link = getIdFromHeading(headingText); // Replace code backticks and remove custom ID syntax from the displayed label let label = parsedText.replace(/`(.*?)`/g, '$1'); @@ -67,10 +61,3 @@ export function getPageTitle(text: string, filePath?: string): string { } `; } - -function getIdFromHeading(heading: string): string { - return heading - .toLowerCase() - .replace(/\s|\//g, '-') // replace spaces and slashes with dashes - .replace(/[^\p{L}\d\-]/gu, ''); // only keep letters, digits & dashes -} diff --git a/adev/shared-docs/pipeline/shared/test/heading.spec.mts b/adev/shared-docs/pipeline/shared/test/heading.spec.mts new file mode 100644 index 000000000000..15c952c67eaf --- /dev/null +++ b/adev/shared-docs/pipeline/shared/test/heading.spec.mts @@ -0,0 +1,31 @@ +/*! + * @license + * Copyright Google LLC All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.dev/license + */ + +import {getIdFromHeading} from '../heading.mjs'; + +describe('getIdFromHeading', () => { + it('should generate id from simple text', () => { + expect(getIdFromHeading('My Heading')).toBe('my-heading'); + }); + + it('should generate id from text with special characters', () => { + expect(getIdFromHeading('Step 2 - Add component')).toBe('step-2---add-component'); + }); + + it('should extract custom id when present', () => { + expect(getIdFromHeading('My Heading {#custom-id}')).toBe('custom-id'); + }); + + it('should extract custom id ignoring surrounding spaces', () => { + expect(getIdFromHeading('My Heading {# custom-id }')).toBe('custom-id'); + }); + + it('should prioritize custom id over text content', () => { + expect(getIdFromHeading('Duplicate Heading {#unique-id}')).toBe('unique-id'); + }); +}); diff --git a/adev/shared-docs/styles/docs/_code.scss b/adev/shared-docs/styles/docs/_code.scss index 8639ecd89c7a..8714ea283cef 100644 --- a/adev/shared-docs/styles/docs/_code.scss +++ b/adev/shared-docs/styles/docs/_code.scss @@ -204,15 +204,24 @@ $code-font-size: 0.875rem; white-space: nowrap; } - .shiki .line { - &::before { - content: '$'; - padding-inline-end: 0.5rem; + &:not([hideDollar]) { + .shiki { + .line { + &::before { + content: '$'; + padding-inline-end: 0.5rem; + } + } } - display: block; + } - &.hidden { - display: none; + .shiki { + .line { + display: block; + + &.hidden { + display: none; + } } } } diff --git a/adev/src/app/routing/navigation-entries/index.ts b/adev/src/app/routing/navigation-entries/index.ts index 0117ceb6eaae..5aa059c410af 100644 --- a/adev/src/app/routing/navigation-entries/index.ts +++ b/adev/src/app/routing/navigation-entries/index.ts @@ -341,6 +341,12 @@ export const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [ path: 'guide/di/di-in-action', contentPath: 'guide/di/di-in-action', }, + { + label: 'Debugging and troubleshooting DI', + path: 'guide/di/debugging-and-troubleshooting-di', + contentPath: 'guide/di/debugging-and-troubleshooting-di', + status: 'new', + }, ], }, { @@ -357,6 +363,11 @@ export const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [ path: 'guide/routing/define-routes', contentPath: 'guide/routing/define-routes', }, + { + label: 'Route Loading Strategies', + path: 'guide/routing/loading-strategies', + contentPath: 'guide/routing/loading-strategies', + }, { label: 'Show routes with Outlets', path: 'guide/routing/show-routes-with-outlets', @@ -1080,6 +1091,12 @@ export const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [ }, // Loading Performance + { + label: 'Lazy-loaded routes', + path: 'best-practices/performance/lazy-loaded-routes', + contentPath: 'guide/routing/loading-strategies', + category: 'Loading Performance', + }, { label: 'Deferred loading with @defer', path: 'best-practices/performance/defer', diff --git a/adev/src/content/best-practices/performance/overview.md b/adev/src/content/best-practices/performance/overview.md index 3ff3ac8044d9..0280057f3ff2 100644 --- a/adev/src/content/best-practices/performance/overview.md +++ b/adev/src/content/best-practices/performance/overview.md @@ -6,12 +6,12 @@ Angular includes many optimizations out of the box, but as applications grow, yo Loading performance determines how quickly your application becomes visible and interactive. Slow loading directly impacts [Core Web Vitals](https://web.dev/vitals/) like Largest Contentful Paint (LCP) and Time to First Byte (TTFB). -| Technique | What it does | When to use it | -| :------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :-------------------------------------------------------------------------------------------- | -| [Lazy-loaded routes](guide/routing/define-routes#lazily-loaded-components-and-routes) | Defers loading route components until navigation, reducing the initial bundle size | Applications with multiple routes where not all are needed on initial load | -| [Deferred loading with `@defer`](best-practices/performance/defer) | Splits components into separate bundles that load on demand | Components not visible on initial render, heavy third-party libraries, below-the-fold content | -| [Image optimization](best-practices/performance/image-optimization) | Prioritizes LCP images, lazy loads others, generates responsive `srcset` attributes | Any application that displays images | -| [Server-side rendering](best-practices/performance/ssr) | Renders pages on the server for faster first paint and better SEO, with [hydration](guide/hydration) to restore interactivity and [incremental hydration](guide/incremental-hydration) to defer hydrating sections until needed | Content-heavy applications, pages that need search engine indexing | +| Technique | What it does | When to use it | +| :------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :-------------------------------------------------------------------------------------------- | +| [Lazy-loaded routes](best-practices/performance/lazy-loaded-routes#lazily-loaded-components-and-routes) | Defers loading route components until navigation, reducing the initial bundle size | Applications with multiple routes where not all are needed on initial load | +| [Deferred loading with `@defer`](best-practices/performance/defer) | Splits components into separate bundles that load on demand | Components not visible on initial render, heavy third-party libraries, below-the-fold content | +| [Image optimization](best-practices/performance/image-optimization) | Prioritizes LCP images, lazy loads others, generates responsive `srcset` attributes | Any application that displays images | +| [Server-side rendering](best-practices/performance/ssr) | Renders pages on the server for faster first paint and better SEO, with [hydration](guide/hydration) to restore interactivity and [incremental hydration](guide/incremental-hydration) to defer hydrating sections until needed | Content-heavy applications, pages that need search engine indexing | ## Runtime performance diff --git a/adev/src/content/guide/di/debugging-and-troubleshooting-di.md b/adev/src/content/guide/di/debugging-and-troubleshooting-di.md new file mode 100644 index 000000000000..e5f9ae964414 --- /dev/null +++ b/adev/src/content/guide/di/debugging-and-troubleshooting-di.md @@ -0,0 +1,1018 @@ +# Debugging and troubleshooting dependency injection + +Dependency injection (DI) issues typically stem from configuration mistakes, scope problems, or incorrect usage patterns. This guide helps you identify and resolve common DI problems that developers encounter. + +## Common pitfalls and solutions + +### Services not available where expected + +One of the most common DI issues occurs when you try to inject a service but Angular cannot find it in the current injector or any parent injector. This usually happens when the service is provided in the wrong scope or not provided at all. + +#### Provider scope mismatch + +When you provide a service in a component's `providers` array, Angular creates an instance in that component's injector. This instance is only available to that component and its children. Parent components and sibling components cannot access it because they use different injectors. + +```angular-ts {header: 'child-view.ts'} +import {Component} from '@angular/core'; +import {DataStore} from './data-store'; + +@Component({ + selector: 'app-child', + template: '

Child

', + providers: [DataStore], // Only available in this component and its children +}) +export class ChildView {} +``` + +```angular-ts {header: 'parent-view.ts'} +import {Component, inject} from '@angular/core'; +import {DataStore} from './data-store'; + +@Component({ + selector: 'app-parent', + template: '', +}) +export class ParentView { + private dataService = inject(DataStore); // ERROR: Not available to parent +} +``` + +Angular only searches up the hierarchy, never down. Parent components cannot access services provided in child components. + +**Solution:** Provide the service at a higher level (application or parent component). + +```ts {prefer} +import {Injectable} from '@angular/core'; + +@Injectable({providedIn: 'root'}) +export class DataStore { + // Available everywhere +} +``` + +TIP: Use `providedIn: 'root'` by default for services that don't need component-specific state. This makes services available everywhere and enables tree-shaking. + +#### Services and lazy-loaded routes + +When you provide a service in a lazy-loaded route's `providers` array, Angular creates a child injector for that route. This injector and its services only become available after the route loads. Components in the eagerly-loaded parts of your application cannot access these services because they use different injectors that exist before the lazy-loaded injector is created. + +```ts {header: 'feature.routes.ts'} +import {Routes} from '@angular/router'; +import {FeatureClient} from './feature-client'; + +export const featureRoutes: Routes = [ + { + path: 'feature', + providers: [FeatureClient], + loadComponent: () => import('./feature-view'), + }, +]; +``` + +```angular-ts {header: 'eager-view.ts'} +import {Component, inject} from '@angular/core'; +import {FeatureClient} from './feature-client'; + +@Component({ + selector: 'app-eager', + template: '

Eager Component

', +}) +export class EagerView { + private featureService = inject(FeatureClient); // ERROR: Not available yet +} +``` + +Lazy-loaded routes create child injectors that are only available after the route loads. + +NOTE: By default, route injectors and their services persist even after navigating away from the route. They are not destroyed until the application is closed. For automatic cleanup of unused route injectors, see [customizing route behavior](guide/routing/customizing-route-behavior#experimental-automatic-cleanup-of-unused-route-injectors). + +**Solution:** Use `providedIn: 'root'` for services that need to be shared across lazy boundaries. + +```ts {prefer, header: 'Provide at root for shared services'} +import {Injectable} from '@angular/core'; + +@Injectable({providedIn: 'root'}) +export class FeatureClient { + // Available everywhere, including before lazy load +} +``` + +If the service should be lazy-loaded but still available to eager components, inject it only where needed and use optional injection to handle availability. + +### Multiple instances instead of singletons + +You expect one shared instance (singleton) but get separate instances in different components. + +#### Providing in component instead of root + +When you add a service to a component's `providers` array, Angular creates a new instance of that service for each instance of the component. Each component gets its own separate service instance, which means changes in one component don't affect the service instance in other components. This is often unexpected when you want shared state across your application. + +```angular-ts {avoid, header: 'Component-level provider creates multiple instances'} +import {Component, inject} from '@angular/core'; +import {UserClient} from './user-client'; + +@Component({ + selector: 'app-profile', + template: '

Profile

', + providers: [UserClient], // Creates new instance per component! +}) +export class UserProfile { + private userService = inject(UserClient); +} + +@Component({ + selector: 'app-settings', + template: '

Settings

', + providers: [UserClient], // Different instance! +}) +export class UserSettings { + private userService = inject(UserClient); +} +``` + +Each component gets its own `UserClient` instance. Changes in one component don't affect the other. + +**Solution:** Use `providedIn: 'root'` for singletons. + +```ts {prefer, header: 'Root-level singleton'} +import {Injectable} from '@angular/core'; + +@Injectable({providedIn: 'root'}) +export class UserClient { + // Single instance shared across all components +} +``` + +#### When multiple instances are intentional + +Sometimes you want separate instances per component for component-specific state. + +```angular-ts {header: 'Intentional: Component-scoped state'} +import {Injectable, signal} from '@angular/core'; + +@Injectable() // No providedIn - must be provided explicitly +export class FormStateStore { + private formData = signal({}); + + setData(data: any) { + this.formData.set(data); + } + + getData() { + return this.formData(); + } +} + +@Component({ + selector: 'app-user-form', + template: '
...
', + providers: [FormStateStore], // Each form gets its own state +}) +export class UserForm { + private formState = inject(FormStateStore); +} +``` + +This pattern is useful for: + +- Form state management (each form has isolated state) +- Component-specific caching +- Temporary data that shouldn't be shared + +### Incorrect inject() usage + +The `inject()` function only works in specific contexts during class construction and factory execution. + +#### Using inject() in lifecycle hooks + +When you call the `inject()` function inside lifecycle hooks like `ngOnInit()`, `ngAfterViewInit()`, or `ngOnDestroy()`, Angular throws an error because these methods run outside the injection context. The injection context is only available during the synchronous execution of class construction, which happens before lifecycle hooks are called. + +```angular-ts {avoid, header: 'inject() in ngOnInit'} +import {Component, inject} from '@angular/core'; +import {UserClient} from './user-client'; + +@Component({ + selector: 'app-profile', + template: '

User: {{userName}}

', +}) +export class UserProfile { + userName = ''; + + ngOnInit() { + const userService = inject(UserClient); // ERROR: Not an injection context + this.userName = userService.getUser().name; + } +} +``` + +**Solution:** Capture dependencies and derive values in field initializers. + +```angular-ts {prefer, header: 'Derive values in field initializers'} +import {Component, inject} from '@angular/core'; +import {UserClient} from './user-client'; + +@Component({ + selector: 'app-profile', + template: '

User: {{userName}}

', +}) +export class UserProfile { + private userService = inject(UserClient); + userName = this.userService.getUser().name; +} +``` + +#### Using the Injector for deferred injection + +When you need to retrieve services outside an injection context, use the captured `Injector` directly with `injector.get()`: + +```angular-ts +import {Component, inject, Injector} from '@angular/core'; +import {UserClient} from './user-client'; + +@Component({ + selector: 'app-profile', + template: '', +}) +export class UserProfile { + private injector = inject(Injector); + + delayedLoad() { + setTimeout(() => { + const userService = this.injector.get(UserClient); + console.log(userService.getUser()); + }, 1000); + } +} +``` + +#### Using runInInjectionContext for callbacks + +Use `runInInjectionContext()` when you need to enable **other code** to call `inject()`. This is useful when accepting callbacks that might use dependency injection: + +```angular-ts +import {Component, inject, Injector, input} from '@angular/core'; + +@Component({ + selector: 'app-data-loader', + template: '', +}) +export class DataLoader { + private injector = inject(Injector); + onLoad = input<() => void>(); + + load() { + const callback = this.onLoad(); + if (callback) { + // Enable the callback to use inject() + this.injector.runInInjectionContext(callback); + } + } +} +``` + +The `runInInjectionContext()` method creates a temporary injection context, allowing code inside the callback to call `inject()`. + +IMPORTANT: Always capture dependencies at the class level when possible. Use `injector.get()` for simple deferred retrieval, and `runInInjectionContext()` only when external code needs to call `inject()`. + +TIP: Use `assertInInjectionContext()` to verify your code is running in a valid injection context. This is useful when creating reusable functions that call `inject()`. See [Asserting the context](guide/di/dependency-injection-context#asserts-the-context) for details. + +### providers vs viewProviders confusion + +The difference between `providers` and `viewProviders` affects content projection scenarios. + +#### Understanding the difference + +**providers:** Available to the component's template AND any content projected into the component (ng-content). + +**viewProviders:** Only available to the component's template, NOT to projected content. + +```angular-ts {header: 'parent-view.ts'} +import {Component, inject} from '@angular/core'; +import {ThemeStore} from './theme-store'; + +@Component({ + selector: 'app-parent', + template: ` +
+

Theme: {{ themeService.theme() }}

+ +
+ `, + providers: [ThemeStore], // Available to content children +}) +export class ParentView { + protected themeService = inject(ThemeStore); +} + +@Component({ + selector: 'app-parent-view', + template: ` +
+

Theme: {{ themeService.theme() }}

+ +
+ `, + viewProviders: [ThemeStore], // NOT available to content children +}) +export class ParentViewOnly { + protected themeService = inject(ThemeStore); +} +``` + +```angular-ts {header: 'child-view.ts'} +import {Component, inject} from '@angular/core'; +import {ThemeStore} from './theme-store'; + +@Component({ + selector: 'app-child', + template: '

Child theme: {{theme()}}

', +}) +export class ChildView { + private themeService = inject(ThemeStore, {optional: true}); + theme = () => this.themeService?.theme() ?? 'none'; +} +``` + +```angular-ts {header: 'app.ts'} +@Component({ + selector: 'app-root', + template: ` + + + + + + + + + + `, +}) +export class App {} +``` + +**When projected into `app-parent`:** The child component can inject `ThemeStore` because `providers` makes it available to projected content. + +**When projected into `app-parent-view`:** The child component cannot inject `ThemeStore` because `viewProviders` restricts it to the parent's template only. + +#### Choosing between providers and viewProviders + +Use `providers` when: + +- The service should be available to projected content +- You want content children to access the service +- You're providing general-purpose services + +Use `viewProviders` when: + +- The service should only be available to your component's template +- You want to hide implementation details from projected content +- You're providing internal services that shouldn't leak out + +**Default recommendation:** Use `providers` unless you have a specific reason to restrict access with `viewProviders`. + +### InjectionToken issues + +When using `InjectionToken` for non-class dependencies, developers often encounter problems related to token identity, type safety, and provider configuration. These issues usually stem from how JavaScript handles object identity and how TypeScript infers types. + +#### Token identity confusion + +When you create a new `InjectionToken` instance, JavaScript creates a unique object in memory. Even if you create another `InjectionToken` with the exact same description string, it's a completely different object. Angular uses the token object's identity (not its description) to match providers with injection points, so tokens with the same description but different object identities cannot access each other's values. + +```ts {header: 'config.token.ts'} +import {InjectionToken} from '@angular/core'; + +export interface AppConfig { + apiUrl: string; +} + +export const APP_CONFIG = new InjectionToken('app config'); +``` + +```ts {header: 'app.config.ts'} +import {APP_CONFIG} from './config.token'; + +export const appConfig: AppConfig = { + apiUrl: 'https://api.example.com', +}; + +bootstrapApplication(App, { + providers: [{provide: APP_CONFIG, useValue: appConfig}], +}); +``` + +```angular-ts {avoid, header: 'feature-view.ts'} +// Creating new token with same description +import {InjectionToken, inject} from '@angular/core'; +import {AppConfig} from './config.token'; + +const APP_CONFIG = new InjectionToken('app config'); + +@Component({ + selector: 'app-feature', + template: '

Feature

', +}) +export class FeatureView { + private config = inject(APP_CONFIG); // ERROR: Different token instance! +} +``` + +Even though both tokens have the description `'app config'`, they are different objects. Angular compares tokens by reference, not by description. + +**Solution:** Import the same token instance. + +```angular-ts {prefer, header: 'feature-view.ts'} +import {inject} from '@angular/core'; +import {APP_CONFIG, AppConfig} from './config.token'; + +@Component({ + selector: 'app-feature', + template: '

API: {{config.apiUrl}}

', +}) +export class FeatureView { + protected config = inject(APP_CONFIG); // Works: Same token instance +} +``` + +TIP: Always export tokens from a shared file and import them everywhere they're needed. Never create multiple `InjectionToken` instances with the same description. + +#### Trying to inject interfaces + +When you define a TypeScript interface, it only exists during compilation for type checking. TypeScript erases all interface definitions when it compiles to JavaScript, so at runtime there's no object for Angular to use as an injection token. If you try to inject an interface type, Angular has nothing to match against the provider configuration. + +```angular-ts {avoid, header: 'Can't inject interface'} +interface UserConfig { + name: string; + email: string; +} + +@Component({ + selector: 'app-profile', + template: '

Profile

', +}) +export class UserProfile { + // ERROR: Interfaces don't exist at runtime + constructor(private config: UserConfig) {} +} +``` + +**Solution:** Use `InjectionToken` for interface types. + +```angular-ts {prefer, header: 'Use InjectionToken for interfaces'} +import {InjectionToken, inject} from '@angular/core'; + +interface UserConfig { + name: string; + email: string; +} + +export const USER_CONFIG = new InjectionToken('user configuration'); + +// Provide the configuration +bootstrapApplication(App, { + providers: [ + { + provide: USER_CONFIG, + useValue: {name: 'Alice', email: 'alice@example.com'}, + }, + ], +}); + +// Inject using the token +@Component({ + selector: 'app-profile', + template: '

User: {{config.name}}

', +}) +export class UserProfile { + protected config = inject(USER_CONFIG); +} +``` + +The `InjectionToken` exists at runtime and can be used for injection, while the `UserConfig` interface provides type safety during development. + +### Circular dependencies + +Circular dependencies occur when services inject each other, creating a cycle that Angular cannot resolve. For detailed explanations and code examples, see [NG0200: Circular dependency](errors/NG0200). + +**Resolution strategies** (in order of preference): + +1. **Restructure** - Extract shared logic to a third service, breaking the cycle +2. **Use events** - Replace direct dependencies with event-based communication (such as `Subject`) +3. **Lazy injection** - Use `Injector.get()` to defer one dependency (last resort) + +NOTE: Do not use `forwardRef()` for service circular dependencies—it only solves circular imports in standalone component configurations. + +## Debugging dependency resolution + +### Understanding the resolution process + +Angular resolves dependencies by walking up the injector hierarchy. When a `NullInjectorError` occurs, understanding this search order helps you identify where to add the missing provider. + +Angular searches in this order: + +1. **Element injector** - The current component or directive +2. **Parent element injectors** - Up the DOM tree through parent components +3. **Environment injector** - The route or application injector +4. **NullInjector** - Throws `NullInjectorError` if not found + +When you see a `NullInjectorError`, the service isn't provided at any level the component can access. Check that: + +- The service has `@Injectable({providedIn: 'root'})`, or +- The service is in a `providers` array the component can reach + +You can modify this search behavior with resolution modifiers like `self`, `skipSelf`, `host`, and `optional`. For complete coverage of resolution rules and modifiers, see the [Hierarchical injectors guide](guide/di/hierarchical-dependency-injection). + +### Using Angular DevTools + +Angular DevTools includes an injector tree inspector that visualizes the entire injector hierarchy and shows which providers are available at each level. For installation and general usage, see the [Angular DevTools injector documentation](tools/devtools/injectors). + +When debugging DI issues, use DevTools to answer these questions: + +- **Is the service provided?** Select the component that fails to inject and check if the service appears in the Injector section. +- **At what level?** Walk up the component tree to find where the service is actually provided (component, route, or application level). +- **Multiple instances?** If a singleton service appears in multiple component injectors, it's likely provided in component `providers` arrays instead of using `providedIn: 'root'`. + +If a service never appears in any injector, verify it has the `@Injectable()` decorator with `providedIn: 'root'` or is listed in a `providers` array. + +### Logging and tracing injection + +When DevTools isn't enough, use logging to trace injection behavior. + +#### Logging service creation + +Add console logs to service constructors to see when services are created. + +```ts +import {Injectable} from '@angular/core'; + +@Injectable({providedIn: 'root'}) +export class UserClient { + constructor() { + console.log('UserClient created'); + console.trace(); // Shows call stack + } + + getUser() { + return {name: 'Alice'}; + } +} +``` + +When the service is created, you'll see the log message and a stack trace showing where the injection occurred. + +**What to look for:** + +- How many times is the constructor called? (should be once for singletons) +- Where in the code is it being injected? (check the stack trace) +- Is it created at the expected time? (application startup vs lazy) + +#### Checking service availability + +Use optional injection with logging to determine if a service is available. + +```angular-ts +import {Component, inject} from '@angular/core'; +import {UserClient} from './user-client'; + +@Component({ + selector: 'app-debug', + template: '

Debug Component

', +}) +export class DebugView { + private userService = inject(UserClient, {optional: true}); + + constructor() { + if (this.userService) { + console.log('UserClient available:', this.userService); + } else { + console.warn('UserClient NOT available'); + console.trace(); // Shows where we tried to inject + } + } +} +``` + +This pattern helps you verify if a service is available without crashing the application. + +#### Logging resolution modifiers + +Test different resolution strategies with logging. + +```angular-ts +import {Component, inject} from '@angular/core'; +import {UserClient} from './user-client'; + +@Component({ + selector: 'app-debug', + template: '

Debug Component

', + providers: [UserClient], +}) +export class DebugView { + // Try to get local instance + private localService = inject(UserClient, {self: true, optional: true}); + + // Try to get parent instance + private parentService = inject(UserClient, { + skipSelf: true, + optional: true, + }); + + constructor() { + console.log('Local instance:', this.localService); + console.log('Parent instance:', this.parentService); + console.log('Same instance?', this.localService === this.parentService); + } +} +``` + +This shows you which instances are available at different injector levels. + +### Debugging workflow + +When DI fails, follow this systematic approach: + +**Step 1: Read the error message** + +- Identify the error code (NG0200, NG0203, etc.) +- Read the dependency path +- Note which token failed + +**Step 2: Check the basics** + +- Does the service have `@Injectable()`? +- Is `providedIn` set correctly? +- Are imports correct? +- Is the file included in compilation? + +**Step 3: Verify injection context** + +- Is `inject()` called in a valid context? +- Check for async issues (await, setTimeout, promises) +- Verify timing (not after destroy) + +**Step 4: Use debugging tools** + +- Open Angular DevTools +- Check injector hierarchy +- Add console logs to constructors +- Use optional injection to test availability + +**Step 5: Simplify and isolate** + +- Remove dependencies one by one +- Test in a minimal component +- Check each injector level separately +- Create a reproduction case + +## DI error reference + +This section provides detailed information about specific Angular DI error codes you may encounter. Use this as a reference when you see these errors in your console. + +### NullInjectorError: No provider for [Service] + +**Error code:** None (displayed as `NullInjectorError`) + +This error occurs when Angular cannot find a provider for a token in the injector hierarchy. The error message includes a dependency path showing where the injection was attempted. + +``` +NullInjectorError: No provider for UserClient! + Dependency path: App -> AuthClient -> UserClient +``` + +The dependency path shows that `App` injected `AuthClient`, which tried to inject `UserClient`, but no provider was found. + +#### Missing @Injectable decorator + +The most common cause is forgetting the `@Injectable()` decorator on a service class. + +```ts {avoid, header: 'Missing decorator'} +export class UserClient { + getUser() { + return {name: 'Alice'}; + } +} +``` + +Angular requires the `@Injectable()` decorator to generate the metadata needed for dependency injection. + +```ts {prefer, header: 'Include @Injectable'} +import {Injectable} from '@angular/core'; + +@Injectable({ + providedIn: 'root', +}) +export class UserClient { + getUser() { + return {name: 'Alice'}; + } +} +``` + +NOTE: Classes with zero-argument constructors can work without `@Injectable()`, but this is not recommended. Always include the decorator for consistency and to avoid issues when adding dependencies later. + +#### Missing providedIn configuration + +A service may have `@Injectable()` but not specify where it should be provided. + +```ts {avoid, header: 'No providedIn specified'} +import {Injectable} from '@angular/core'; + +@Injectable() +export class UserClient { + getUser() { + return {name: 'Alice'}; + } +} +``` + +Specify `providedIn: 'root'` to make the service available throughout your application. + +```ts {prefer, header: 'Specify providedIn'} +import {Injectable} from '@angular/core'; + +@Injectable({ + providedIn: 'root', +}) +export class UserClient { + getUser() { + return {name: 'Alice'}; + } +} +``` + +The `providedIn: 'root'` configuration makes the service available application-wide and enables tree-shaking (the service is removed from the bundle if never injected). + +#### Standalone component missing imports + +In Angular v20+ with standalone components, you must explicitly import or provide dependencies in each component. + +```angular-ts {avoid, header: 'Missing service import'} +import {Component, inject} from '@angular/core'; +import {UserClient} from './user-client'; + +@Component({ + selector: 'app-profile', + template: '

User: {{user().name}}

', +}) +export class UserProfile { + private userService = inject(UserClient); // ERROR: No provider + user = this.userService.getUser(); +} +``` + +Ensure the service uses `providedIn: 'root'` or add it to the component's `providers` array. + +```angular-ts {prefer, header: 'Service uses providedIn: root'} +import {Component, inject} from '@angular/core'; +import {UserClient} from './user-client'; + +@Component({ + selector: 'app-profile', + template: '

User: {{user().name}}

', +}) +export class UserProfile { + private userService = inject(UserClient); // Works: providedIn: 'root' + user = this.userService.getUser(); +} +``` + +#### Debugging with the dependency path + +The dependency path in the error message shows the chain of injections that led to the failure. + +``` +NullInjectorError: No provider for LoggerStore! + Dependency path: App -> DataStore -> ApiClient -> LoggerStore +``` + +This path tells you: + +1. `App` injected `DataStore` +2. `DataStore` injected `ApiClient` +3. `ApiClient` tried to inject `LoggerStore` +4. No provider for `LoggerStore` was found + +Start your investigation at the end of the chain (`LoggerStore`) and verify it has proper configuration. + +#### Checking provider availability with optional injection + +Use optional injection to check if a provider exists without throwing an error. + +```angular-ts +import {Component, inject} from '@angular/core'; +import {UserClient} from './user-client'; + +@Component({ + selector: 'app-debug', + template: '

Service available: {{serviceAvailable}}

', +}) +export class DebugView { + private userService = inject(UserClient, {optional: true}); + serviceAvailable = this.userService !== null; +} +``` + +Optional injection returns `null` if no provider is found, allowing you to handle the absence gracefully. + +### NG0203: inject() must be called from an injection context + +**Error code:** NG0203 + +This error occurs when you call `inject()` outside of a valid injection context. Angular requires `inject()` to be called synchronously during class construction or factory execution. + +``` +NG0203: inject() must be called from an injection context such as a +constructor, a factory function, a field initializer, or a function +used with `runInInjectionContext`. +``` + +#### Valid injection contexts + +Angular allows `inject()` in these locations: + +1. **Class field initializers** + + ```angular-ts + import {Component, inject} from '@angular/core'; + import {UserClient} from './user-client'; + + @Component({ + selector: 'app-profile', + template: '

User: {{user().name}}

', + }) + export class UserProfile { + private userService = inject(UserClient); // Valid + user = this.userService.getUser(); + } + ``` + +2. **Class constructor** + + ```angular-ts + import {Component, inject} from '@angular/core'; + import {UserClient} from './user-client'; + + @Component({ + selector: 'app-profile', + template: '

User: {{user().name}}

', + }) + export class UserProfile { + private userService: UserClient; + + constructor() { + this.userService = inject(UserClient); // Valid + } + + user = this.userService.getUser(); + } + ``` + +3. **Provider factory functions** + + ```ts + import {inject, InjectionToken} from '@angular/core'; + import {UserClient} from './user-client'; + + export const GREETING = new InjectionToken('greeting', { + factory() { + const userService = inject(UserClient); // Valid + const user = userService.getUser(); + return `Hello, ${user.name}`; + }, + }); + ``` + +4. **Inside runInInjectionContext()** + + ```angular-ts + import {Component, inject, Injector} from '@angular/core'; + import {UserClient} from './user-client'; + + @Component({ + selector: 'app-profile', + template: '', + }) + export class UserProfile { + private injector = inject(Injector); + + loadUser() { + this.injector.runInInjectionContext(() => { + const userService = inject(UserClient); // Valid + console.log(userService.getUser()); + }); + } + } + ``` + +Other injection contexts that `inject()` also works in include: + +- [provideAppInitializer](api/core/provideAppInitializer) +- [provideEnvironmentInitializer](api/core/provideEnvironmentInitializer) +- Functional [route guards](guide/routing/route-guards) +- Functional [data resolvers](guide/routing/data-resolvers) + +#### When this error occurs + +This error occurs when: + +- Calling `inject()` in lifecycle hooks (`ngOnInit`, `ngAfterViewInit`, etc.) +- Calling `inject()` after `await` in async functions +- Calling `inject()` in callbacks (`setTimeout`, `Promise.then()`, etc.) +- Calling `inject()` outside of class construction phase + +See the "Incorrect inject() usage" section for detailed examples and solutions. + +#### Solutions and workarounds + +**Solution 1:** Capture dependencies in field initializers (most common) + +```ts +private userService = inject(UserClient) // Capture at class level +``` + +**Solution 2:** Use `runInInjectionContext()` for callbacks + +```ts +private injector = inject(Injector) + +someCallback() { + this.injector.runInInjectionContext(() => { + const service = inject(MyClient) + }) +} +``` + +**Solution 3:** Pass dependencies as parameters instead of injecting them + +```ts +// Instead of injecting inside a callback +setTimeout(() => { + const service = inject(MyClient) // ERROR +}, 1000) + +// Capture first, then use +private service = inject(MyClient) + +setTimeout(() => { + this.service.doSomething() // Use captured reference +}, 1000) +``` + +### NG0200: Circular dependency detected + +**Error code:** NG0200 + +This error occurs when two or more services depend on each other, creating a circular dependency that Angular cannot resolve. + +``` +NG0200: Circular dependency in DI detected for AuthClient + Dependency path: AuthClient -> UserClient -> AuthClient +``` + +The dependency path shows the cycle: `AuthClient` depends on `UserClient`, which depends back on `AuthClient`. + +#### Understanding the error + +Angular creates service instances by calling their constructors and injecting dependencies. When services depend on each other circularly, Angular cannot determine which to create first. + +#### Common causes + +- Direct circular dependency (Service A → Service B → Service A) +- Indirect circular dependency (Service A → Service B → Service C → Service A) +- Import cycles in module files that also have service dependencies + +#### Resolution strategies + +See the "Circular dependencies" section for detailed examples and solutions: + +1. **Restructure** - Extract shared logic to a third service (recommended) +2. **Use events** - Replace direct dependencies with event-based communication +3. **Lazy injection** - Use `Injector.get()` to defer one dependency (last resort) + +Do NOT use `forwardRef()` for service circular dependencies. It only solves circular imports in component configurations. + +### Other DI error codes + +For detailed explanations and solutions for these errors, see the [Angular error reference](errors): + +| Error Code | Description | +| ----------------------- | ------------------------------------------------------------------------------------------ | +| [NG0204](errors/NG0204) | Can't resolve all parameters - missing `@Injectable()` decorator | +| [NG0205](errors/NG0205) | Injector already destroyed - accessing services after component destruction | +| [NG0207](errors/NG0207) | EnvironmentProviders in wrong context - using `provideHttpClient()` in component providers | + +## Next steps + +When you encounter DI errors, remember to: + +1. Read the error message and dependency path carefully +2. Verify basic configuration (decorators, `providedIn`, imports) +3. Check injection context and timing +4. Use DevTools and logging to investigate +5. Simplify and isolate the problem + +For a deeper understanding of specific topics on dependency injection, check out: + +- [Understanding dependency injection](guide/di) - Core DI concepts and patterns +- [Hierarchical dependency injection](guide/di/hierarchical-dependency-injection) - How the injector hierarchy works +- [Testing with dependency injection](guide/testing) - Using TestBed and mocking dependencies diff --git a/adev/src/content/guide/image-optimization.md b/adev/src/content/guide/image-optimization.md index d5b6c958d2c6..2d5d14be77bc 100644 --- a/adev/src/content/guide/image-optimization.md +++ b/adev/src/content/guide/image-optimization.md @@ -346,20 +346,20 @@ You can learn more about the base URL structure in the docs of a corresponding C ### Custom Loaders -To use a **custom loader**, provide your loader function as a value for the `IMAGE_LOADER` DI token. In the example below, the custom loader function returns a URL starting with `https://example.com` that includes `src` and `width` as URL parameters. +To use a **custom loader**, provide your loader function as a value for the `IMAGE_LOADER` DI token. In the example below, the custom loader function returns a URL starting with `https://example.com` that includes `src`, `width`, and `height` as URL parameters. ```ts providers: [ { provide: IMAGE_LOADER, useValue: (config: ImageLoaderConfig) => { - return `https://example.com/images?src=${config.src}&width=${config.width}`; + return `https://example.com/images?src=${config.src}&width=${config.width}&height=${config.height}`; }, }, ], ``` -A loader function for the `NgOptimizedImage` directive takes an object with the `ImageLoaderConfig` type (from `@angular/common`) as its argument and returns the absolute URL of the image asset. The `ImageLoaderConfig` object contains the `src` property, and optional `width` and `loaderParams` properties. +A loader function for the `NgOptimizedImage` directive takes an object with the `ImageLoaderConfig` type (from `@angular/common`) as its argument and returns the absolute URL of the image asset. The `ImageLoaderConfig` object contains the `src` property, and optional `width`, `height`, and `loaderParams` properties. NOTE: even though the `width` property may not always be present, a custom loader must use it to support requesting images at various widths in order for `ngSrcset` to work properly. @@ -405,7 +405,7 @@ NOTE: The `transform` property is not supported by the Netlify loader, as Netlif ### Example custom loader -The following shows an example of a custom loader function. This example function concatenates `src` and `width`, and uses `loaderParams` to control a custom CDN feature for rounded corners: +The following shows an example of a custom loader function. This example function concatenates `src`, `width`, and `height`, and uses `loaderParams` to control a custom CDN feature for rounded corners: ```ts const myCustomLoader = (config: ImageLoaderConfig) => { @@ -414,6 +414,9 @@ const myCustomLoader = (config: ImageLoaderConfig) => { if (config.width) { queryParams.push(`w=${config.width}`); } + if (config.height) { + queryParams.push(`h=${config.height}`); + } if (config.loaderParams?.roundedCorners) { queryParams.push('mask=corners&corner-radius=5'); } diff --git a/adev/src/content/guide/routing/define-routes.md b/adev/src/content/guide/routing/define-routes.md index 1e55a6459e8d..3854b43e15e4 100644 --- a/adev/src/content/guide/routing/define-routes.md +++ b/adev/src/content/guide/routing/define-routes.md @@ -166,99 +166,6 @@ If a user visits `/users/new`, Angular router would go through the following ste 1. Never reaches `users` 1. Never reaches `**` -## Route Loading Strategies - -Understanding how and when routes and components load in Angular routing is crucial for building responsive web applications. Angular offers two primary strategies to control loading behavior: - -1. **Eagerly loaded**: Routes and components that are loaded immediately -2. **Lazily loaded**: Routes and components loaded only when needed - -Each approach offers distinct advantages for different scenarios. - -### Eagerly loaded components - -When you define a route with the `component` property, the referenced component is eagerly loaded as part of the same JavaScript bundle as the route configuration. - -```ts -import {Routes} from '@angular/router'; -import {HomePage} from './components/home/home-page'; -import {LoginPage} from './components/auth/login-page'; - -export const routes: Routes = [ - // HomePage and LoginPage are both directly referenced in this config, - // so their code is eagerly included in the same JavaScript bundle as this file. - { - path: '', - component: HomePage, - }, - { - path: 'login', - component: LoginPage, - }, -]; -``` - -Eagerly loading route components like this means that the browser has to download and parse all of the JavaScript for these components as part of your initial page load, but the components are available to Angular immediately. - -While including more JavaScript in your initial page load leads to slower initial load times, this can lead to more seamless transitions as the user navigates through an application. - -### Lazily loaded components and routes - -You can use the `loadComponent` property to lazily load the JavaScript for a component at the point at which that route would become active. The `loadChildren` property lazily loads child routes during route matching. - -```ts -import {Routes} from '@angular/router'; - -export const routes: Routes = [ - { - path: 'login', - loadComponent: () => import('./components/auth/login-page'), - }, - { - path: 'admin', - loadComponent: () => import('./admin/admin.component'), - loadChildren: () => import('./admin/admin.routes'), - }, -]; -``` - -The `loadComponent` and `loadChildren` properties accept a loader function that returns a Promise that resolves to an Angular component or a set of routes respectively. In most cases, this function uses the standard [JavaScript dynamic import API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import). You can, however, use any arbitrary async loader function. - -If the lazily loaded file uses a `default` export, you can return the `import()` promise directly without an additional `.then` call to select the exported class. - -Lazily loading routes can significantly improve the load speed of your Angular application by removing large portions of JavaScript from the initial bundle. These portions of your code compile into separate JavaScript "chunks" that the router requests only when the user visits the corresponding route. - -### Injection context lazy loading - -The Router executes `loadComponent` and `loadChildren` within the **injection context of the current route**, allowing you to call [`inject`](/api/core/inject)inside these loader functions to access providers declared on that route, inherited from parent routes through hierarchical dependency injection, or available globally. This enables context-aware lazy loading. - -```ts -import {Routes} from '@angular/router'; -import {inject} from '@angular/core'; -import {FeatureFlags} from './feature-flags'; - -export const routes: Routes = [ - { - path: 'dashboard', - // Runs inside the route's injection context - loadComponent: () => { - const flags = inject(FeatureFlags); - return flags.isPremium - ? import('./dashboard/premium-dashboard') - : import('./dashboard/basic-dashboard'); - }, - }, -]; -``` - -### Should I use an eager or a lazy route? - -There are many factors to consider when deciding on whether a route should be eager or lazy. - -In general, eager loading is recommended for primary landing page(s) while other pages would be lazy-loaded. - -NOTE: While lazy routes have the upfront performance benefit of reducing the amount of initial data requested by the user, it adds future data requests that could be undesirable. This is particularly true when dealing with nested lazy loading at multiple levels, which can significantly impact performance. - ## Redirects You can define a route that redirects to another route instead of rendering a component: @@ -462,4 +369,7 @@ After adding child routes to the configuration and adding a `` to ## Next steps -Learn how to [display the contents of your routes with Outlets](/guide/routing/show-routes-with-outlets). + + + + diff --git a/adev/src/content/guide/routing/loading-strategies.md b/adev/src/content/guide/routing/loading-strategies.md new file mode 100644 index 000000000000..dfdd13c73481 --- /dev/null +++ b/adev/src/content/guide/routing/loading-strategies.md @@ -0,0 +1,96 @@ +# Route Loading Strategies + +Understanding how and when routes and components load in Angular routing is crucial for building responsive web applications. Angular offers two primary strategies to control loading behavior: + +1. **Eagerly loaded**: Routes and components that are loaded immediately +2. **Lazily loaded**: Routes and components loaded only when needed + +Each approach offers distinct advantages for different scenarios. + +## Eagerly loaded components + +When you define a route with the [`component`](api/router/Route#component) property, the referenced component is eagerly loaded as part of the same JavaScript bundle as the route configuration. + +```ts +import {Routes} from '@angular/router'; +import {HomePage} from './components/home/home-page'; +import {LoginPage} from './components/auth/login-page'; + +export const routes: Routes = [ + // HomePage and LoginPage are both directly referenced in this config, + // so their code is eagerly included in the same JavaScript bundle as this file. + { + path: '', + component: HomePage, + }, + { + path: 'login', + component: LoginPage, + }, +]; +``` + +Eagerly loading route components like this means that the browser has to download and parse all of the JavaScript for these components as part of your initial page load, but the components are available to Angular immediately. + +While including more JavaScript in your initial page load leads to slower initial load times, this can lead to more seamless transitions as the user navigates through an application. + +## Lazily loaded components and routes + +You can use the [`loadComponent`](api/router/Route#loadComponent) property to lazily load the JavaScript for a component at the point at which that route would become active. The [`loadChildren`](api/router/Route#loadChildren) property lazily loads child routes during route matching. + +```ts +import {Routes} from '@angular/router'; + +export const routes: Routes = [ + { + path: 'login', + loadComponent: () => import('./components/auth/login-page'), + }, + { + path: 'admin', + loadComponent: () => import('./admin/admin.component'), + loadChildren: () => import('./admin/admin.routes'), + }, +]; +``` + +The [`loadComponent`](/api/router/Route#loadComponent) and [`loadChildren`](/api/router/Route#loadChildren) properties accept a loader function that returns a Promise that resolves to an Angular component or a set of routes respectively. In most cases, this function uses the standard [JavaScript dynamic import API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import). You can, however, use any arbitrary async loader function. + +If the lazily loaded file uses a `default` export, you can return the `import()` promise directly without an additional `.then` call to select the exported class. + +Lazily loading routes can significantly improve the load speed of your Angular application by removing large portions of JavaScript from the initial bundle. These portions of your code compile into separate JavaScript "chunks" that the router requests only when the user visits the corresponding route. + +## Injection context lazy loading + +The Router executes [`loadComponent`](/api/router/Route#loadComponent) and [`loadChildren`](/api/router/Route#loadChildren) within the **injection context of the current route**, allowing you to call [`inject`](/api/core/inject)inside these loader functions to access providers declared on that route, inherited from parent routes through hierarchical dependency injection, or available globally. This enables context-aware lazy loading. + +```ts +import {Routes} from '@angular/router'; +import {inject} from '@angular/core'; +import {FeatureFlags} from './feature-flags'; + +export const routes: Routes = [ + { + path: 'dashboard', + // Runs inside the route's injection context + loadComponent: () => { + const flags = inject(FeatureFlags); + return flags.isPremium + ? import('./dashboard/premium-dashboard') + : import('./dashboard/basic-dashboard'); + }, + }, +]; +``` + +## Should I use an eager or a lazy route? + +There are many factors to consider when deciding on whether a route should be eager or lazy. + +In general, eager loading is recommended for primary landing page(s) while other pages would be lazy-loaded. + +NOTE: While lazy routes have the upfront performance benefit of reducing the amount of initial data requested by the user, it adds future data requests that could be undesirable. This is particularly true when dealing with nested lazy loading at multiple levels, which can significantly impact performance. + +## Next steps + +Learn how to [display the contents of your routes with Outlets](/guide/routing/show-routes-with-outlets). diff --git a/adev/src/content/guide/routing/route-transition-animations.md b/adev/src/content/guide/routing/route-transition-animations.md index 4f7cafacc2f0..7b776f0acf99 100644 --- a/adev/src/content/guide/routing/route-transition-animations.md +++ b/adev/src/content/guide/routing/route-transition-animations.md @@ -27,7 +27,7 @@ For more details about the browser API, see the [Chrome Explainer](https://devel Angular Router integrates view transitions into the navigation lifecycle to create seamless route changes. During navigation, the Router: -1. **Completes navigation preparation** - Route matching, [lazy loading](/guide/routing/define-routes#lazily-loaded-components-and-routes), [guards](/guide/routing/route-guards), and [resolvers](/guide/routing/data-resolvers) execute +1. **Completes navigation preparation** - Route matching, [lazy loading](guide/routing/loading-strategies#lazily-loaded-components-and-routes), [guards](/guide/routing/route-guards), and [resolvers](/guide/routing/data-resolvers) execute 2. **Initiates the view transition** - Router calls `startViewTransition` when routes are ready for activation 3. **Updates the DOM** - Router activates new routes and deactivates old ones within the transition callback 4. **Finalizes the transition** - The transition Promise resolves when Angular completes rendering diff --git a/adev/src/content/guide/security.md b/adev/src/content/guide/security.md index 699631a40f20..e6db9a1577f8 100644 --- a/adev/src/content/guide/security.md +++ b/adev/src/content/guide/security.md @@ -363,6 +363,71 @@ Angular's `HttpClient` library recognizes this convention and automatically stri For more information, see the XSSI section of this [Google web security blog post](https://security.googleblog.com/2011/05/website-security-for-webmasters.html). +## Preventing Server-Side Request Forgery (SSRF) + +Angular includes strict validation for `Host`, `X-Forwarded-Host`, `X-Forwarded-Proto`, and `X-Forwarded-Port` headers in the request handling pipeline to prevent header-based [Server-Side Request Forgery (SSRF)](https://developer.mozilla.org/en-US/docs/Web/Security/Attacks/SSRF). + +The validation rules are: + +- `Host` and `X-Forwarded-Host` headers are validated against a strict allowlist. +- `Host` and `X-Forwarded-Host` headers cannot contain path separators. +- `X-Forwarded-Port` header must be numeric. +- `X-Forwarded-Proto` header must be `http` or `https`. +- `X-Forwarded-Prefix` header must not start with multiple `/` or `\` or contain `.`, `..` path segments. + +Invalid or disallowed headers now trigger an error log. Requests with unrecognized hostnames will result in a Client-Side Rendered (CSR) page if `allowedHosts` is defined; if not, a `400 Bad Request` is issued. Note that in a future major release, all unrecognized hostnames will default to a `400 Bad Request` regardless of `allowedHosts` settings. + +NOTE: Most cloud providers and CDN providers perform automatic validation of these headers before a request ever reaches the application origin. This inherent filtering significantly reduces the practical attack surface. + +### Configuring allowed hosts + +To allow specific hostnames, you need to add them to the allowlist. This is critical for ensuring your application works correctly and securely when deployed. The patterns support wildcards for flexible hostname matching. + +You can configure the `allowedHosts` option in your `angular.json`: + +```json {hideCopy} +{ + // ... + "projects": { + "your-project-name": { + // ... + "architect": { + "build": { + "builder": "@angular/build:application", + "options": { + "security": { + "allowedHosts": [ + "example.com", + "*.example.com" // allows all subdomains of example.com + ] + } + // ... other options + } + } + } + } + } +} +``` + +You can also configure `allowedHosts` when initializing the application engine: + +```typescript +const appEngine = new AngularAppEngine({ + allowedHosts: ['example.com', '*.trusted-example.com'], +}); + +const nodeAppEngine = new AngularNodeAppEngine({ + allowedHosts: ['example.com', '*.trusted-example.com'], +}); +``` + +For the Node.js variant `AngularNodeAppEngine`, you can also provide `NG_ALLOWED_HOSTS` (comma-separated list) environment variable for authorizing hosts. + +```bash {hideDollar} +export NG_ALLOWED_HOSTS="example.com,*.trusted-example.com" +``` + ## Auditing Angular applications Angular applications must follow the same security principles as regular web applications, and must be audited as such. diff --git a/adev/src/content/guide/ssr.md b/adev/src/content/guide/ssr.md index 24ca1c780dcb..eca4beb225b1 100644 --- a/adev/src/content/guide/ssr.md +++ b/adev/src/content/guide/ssr.md @@ -387,12 +387,17 @@ export class MyComponent { } ``` -IMPORTANT: The above tokens will be `null` in the following scenarios: + + -- During the build processes. -- When the application is rendered in the browser (CSR). -- When performing static site generation (SSG). -- During route extraction in development (at the time of the request). +IMPORTANT: The above tokens will be `null` in the following scenarios:
    +
  • During the build processes.
  • +
  • When the application is rendered in the browser (CSR).
  • +
  • When performing static site generation (SSG).
  • +
  • During route extraction in development (at the time of the request).
  • +
+ + ## Generate a fully static application @@ -521,7 +526,7 @@ bootstrapApplication(App, { }); ``` -#### `filter` +#### Filtering You can also selectively disable caching for certain requests using the [`filter`](api/common/http/HttpTransferCacheOptions) option in `withHttpTransferCacheOptions`. For example, you can disable caching for a specific API endpoint: @@ -545,7 +550,7 @@ bootstrapApplication(App, { Use this option to exclude endpoints with user‑specific or dynamic data (for example `/api/profile`). -#### Individually +#### Per-request To disable caching for an individual request, you can specify the [`transferCache`](api/common/http/HttpRequest#transferCache) option in an `HttpRequest`. @@ -611,3 +616,7 @@ export const reqHandler = createRequestHandler(async (req: Request) => { // ... }); ``` + +## Security + +For detailed information on preventing Server-Side Request Forgery (SSRF) and configuring allowed hosts, see the [Server-side security](best-practices/security#preventing-server-side-request-forgery-ssrf) guide. diff --git a/adev/src/content/guide/testing/debugging.md b/adev/src/content/guide/testing/debugging.md index 49012648e752..c40d0d463e80 100644 --- a/adev/src/content/guide/testing/debugging.md +++ b/adev/src/content/guide/testing/debugging.md @@ -15,6 +15,6 @@ Debugging in the default Node.js environment is often the quickest way to diagno ## Debugging in a browser -Debugging with Vitest and [browser mode](/guide/testing/migrating-to-vitest#5-configure-browser-mode-optional) is not supported today. +The same way you start a debugging session with in Node, you can use `ng test` with the `--debug` flag with Vitest and [browser mode](/guide/testing/migrating-to-vitest#5-configure-browser-mode-optional). - + + +
+ + + + +
+ + + + + + + +
+ `, +}) +export class LcpCheckDuplicate {} diff --git a/packages/core/test/bundling/image-directive/e2e/oversized-image/oversized-image.e2e-spec.ts b/packages/core/test/bundling/image-directive/e2e/oversized-image/oversized-image.e2e-spec.ts index 4f396b04aeba..bf4fce9c2dee 100644 --- a/packages/core/test/bundling/image-directive/e2e/oversized-image/oversized-image.e2e-spec.ts +++ b/packages/core/test/bundling/image-directive/e2e/oversized-image/oversized-image.e2e-spec.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import {browser, by, element, ExpectedConditions} from 'protractor'; +import {browser} from 'protractor'; import {logging} from 'selenium-webdriver'; import {collectBrowserLogs} from '../browser-logs-util'; diff --git a/packages/core/test/bundling/image-directive/index.ts b/packages/core/test/bundling/image-directive/index.ts index 639db0294d2e..98b79b8c8cdb 100644 --- a/packages/core/test/bundling/image-directive/index.ts +++ b/packages/core/test/bundling/image-directive/index.ts @@ -27,6 +27,7 @@ import { } from './e2e/oversized-image/oversized-image'; import {PreconnectCheckComponent} from './e2e/preconnect-check/preconnect-check'; import {PlaygroundComponent} from './playground'; +import {LcpCheckDuplicate} from './e2e/lcp-check-duplicate/lcp-check-duplicate'; @Component({ selector: 'app-root', @@ -42,6 +43,7 @@ const ROUTES = [ // Paths below are used for e2e testing: {path: 'e2e/basic', component: BasicComponent}, {path: 'e2e/lcp-check', component: LcpCheckComponent}, + {path: 'e2e/lcp-check-duplicate', component: LcpCheckDuplicate}, {path: 'e2e/image-perf-warnings-lazy', component: ImagePerfWarningsLazyComponent}, {path: 'e2e/image-perf-warnings-oversized', component: ImagePerfWarningsOversizedComponent}, {path: 'e2e/svg-no-perf-oversized-warnings', component: SvgNoOversizedPerfWarningsComponent}, diff --git a/packages/core/test/bundling/package.json b/packages/core/test/bundling/package.json index 7dd0302da7fa..f82fda38b543 100644 --- a/packages/core/test/bundling/package.json +++ b/packages/core/test/bundling/package.json @@ -1,7 +1,7 @@ { "dependencies": { "@angular/animations": "workspace:*", - "@angular/build": "21.2.0-rc.0", + "@angular/build": "21.2.0-rc.1", "@angular/common": "workspace:*", "@angular/compiler-cli": "workspace:*", "@angular/compiler": "workspace:*", diff --git a/packages/core/test/bundling/standalone_bootstrap/bundle.golden_symbols.json b/packages/core/test/bundling/standalone_bootstrap/bundle.golden_symbols.json index db9a26025e96..ec848cf8a5c3 100644 --- a/packages/core/test/bundling/standalone_bootstrap/bundle.golden_symbols.json +++ b/packages/core/test/bundling/standalone_bootstrap/bundle.golden_symbols.json @@ -612,7 +612,6 @@ "shouldBeIgnoredByZone", "shouldSearchParent", "storeLViewOnDestroy", - "stringify", "stringifyCSSSelector", "stringifyCSSSelectorList", "syncViewWithBlueprint", diff --git a/packages/core/test/di/r3_injector_spec.ts b/packages/core/test/di/r3_injector_spec.ts index c1aba322548b..e02830580e72 100644 --- a/packages/core/test/di/r3_injector_spec.ts +++ b/packages/core/test/di/r3_injector_spec.ts @@ -15,10 +15,10 @@ import { ɵɵdefineInjector, ɵɵinject, } from '../../src/core'; -import {ERROR_DETAILS_PAGE_BASE_URL} from '../../src/error_details_base_url'; import {createInjector} from '../../src/di/create_injector'; import {InternalInjectFlags} from '../../src/di/interface/injector'; import {R3Injector} from '../../src/di/r3_injector'; +import {ERROR_DETAILS_PAGE_BASE_URL} from '../../src/error_details_base_url'; describe('InjectorDef-based createInjector()', () => { class CircularA { @@ -461,14 +461,14 @@ describe('InjectorDef-based createInjector()', () => { it('does not allow injection after destroy', () => { (injector as R3Injector).destroy(); expect(() => injector.get(DeepService)).toThrowError( - 'NG0205: Injector has already been destroyed.', + /NG0205: Injector has already been destroyed./, ); }); it('does not allow double destroy', () => { (injector as R3Injector).destroy(); expect(() => (injector as R3Injector).destroy()).toThrowError( - 'NG0205: Injector has already been destroyed.', + /NG0205: Injector has already been destroyed./, ); }); @@ -506,7 +506,7 @@ describe('InjectorDef-based createInjector()', () => { static ɵinj = ɵɵdefineInjector({providers: [MissingArgumentType]}); } expect(() => createInjector(ErrorModule).get(MissingArgumentType)).toThrowError( - "NG0204: Can't resolve all parameters for MissingArgumentType: (?).", + /NG0204: Can't resolve all parameters for MissingArgumentType: \(\?\)./, ); }); }); diff --git a/packages/core/test/linker/ng_module_integration_spec.ts b/packages/core/test/linker/ng_module_integration_spec.ts index 5680166765bc..3557f027ac98 100644 --- a/packages/core/test/linker/ng_module_integration_spec.ts +++ b/packages/core/test/linker/ng_module_integration_spec.ts @@ -33,13 +33,13 @@ import {NgModuleType} from '../../src/render3'; import {getNgModuleDef} from '../../src/render3/def_getters'; import {ComponentFixture, inject, TestBed} from '../../testing'; +import {ERROR_DETAILS_PAGE_BASE_URL} from '../../src/error_details_base_url'; import {InternalNgModuleRef, NgModuleFactory} from '../../src/linker/ng_module_factory'; import { clearModulesForTest, setAllowDuplicateNgModuleIdsForTest, } from '../../src/linker/ng_module_registration'; import {stringify} from '../../src/util/stringify'; -import {ERROR_DETAILS_PAGE_BASE_URL} from '../../src/error_details_base_url'; class Engine {} @@ -542,7 +542,7 @@ describe('NgModule', () => { it('should throw when no type and not @Inject (class case)', () => { expect(() => createInjector([NoAnnotations])).toThrowError( - "NG0204: Can't resolve all parameters for NoAnnotations: (?).", + /NG0204: Can't resolve all parameters for NoAnnotations: \(\?\)./, ); }); diff --git a/packages/forms/signals/compat/src/signal_form_control/signal_form_control.ts b/packages/forms/signals/compat/src/signal_form_control/signal_form_control.ts index 620e88e54af9..db21abf8bc4d 100644 --- a/packages/forms/signals/compat/src/signal_form_control/signal_form_control.ts +++ b/packages/forms/signals/compat/src/signal_form_control/signal_form_control.ts @@ -108,7 +108,7 @@ export class SignalFormControl extends AbstractControl { this.fieldTree = wrapFieldTreeForSyncUpdates(rawTree, () => this.parent?.updateValueAndValidity({sourceControl: this} as any), ); - this.fieldState = this.fieldTree() as FieldState; + this.fieldState = this.fieldTree(); this.defineCompatProperties(); diff --git a/packages/forms/signals/src/api/rules/validation/util.ts b/packages/forms/signals/src/api/rules/validation/util.ts index b8ac570225cd..0befeed29f80 100644 --- a/packages/forms/signals/src/api/rules/validation/util.ts +++ b/packages/forms/signals/src/api/rules/validation/util.ts @@ -58,3 +58,17 @@ export function isEmpty(value: unknown): boolean { } return value === '' || value === false || value == null; } + +/** + * Normalizes validation errors (which can be a single error, an array of errors, or undefined) + * into a list of errors. + */ +export function normalizeErrors(error: OneOrMany | undefined): readonly T[] { + if (error === undefined) { + return []; + } + if (Array.isArray(error)) { + return error as readonly T[]; + } + return [error as T]; +} diff --git a/packages/forms/signals/src/api/transformed_value.ts b/packages/forms/signals/src/api/transformed_value.ts index 247f8c062697..ab4d67192c95 100644 --- a/packages/forms/signals/src/api/transformed_value.ts +++ b/packages/forms/signals/src/api/transformed_value.ts @@ -16,6 +16,7 @@ import { import {FORM_FIELD_PARSE_ERRORS} from '../directive/parse_errors'; import {createParser} from '../util/parser'; import type {ValidationError} from './rules'; +import type {OneOrMany} from './types'; /** * Result of parsing a raw value into a model value. @@ -28,7 +29,7 @@ export interface ParseResult { /** * Errors encountered during parsing, if any. */ - readonly errors?: readonly ValidationError.WithoutFieldTree[]; + readonly error?: OneOrMany; } /** @@ -42,7 +43,7 @@ export interface TransformedValueOptions { * * Should return an object containing the parsed result, which may contain: * - `value`: The parsed model value. If `undefined`, the model will not be updated. - * - `errors`: Any parse errors encountered. If `undefined`, no errors are reported. + * - `error`: Any parse errors encountered. If `undefined`, no errors are reported. */ parse: (rawValue: TRaw) => ParseResult; @@ -93,7 +94,7 @@ export interface TransformedValueSignal extends WritableSignal { * if (val === '') return {value: null}; * const num = Number(val); * if (Number.isNaN(num)) { - * return {errors: [{kind: 'parse', message: `${val} is not numeric`}]}; + * return {error: {kind: 'parse', message: `${val} is not numeric`}}; * } * return {value: num}; * }, diff --git a/packages/forms/signals/src/directive/native.ts b/packages/forms/signals/src/directive/native.ts index a82841a60532..1359c83dfb4e 100644 --- a/packages/forms/signals/src/directive/native.ts +++ b/packages/forms/signals/src/directive/native.ts @@ -70,7 +70,7 @@ export function getNativeControlValue( if (element.validity.badInput) { return { - errors: [new NativeInputParseError() as WithoutFieldTree], + error: new NativeInputParseError() as WithoutFieldTree, }; } diff --git a/packages/forms/signals/src/util/parser.ts b/packages/forms/signals/src/util/parser.ts index b32fc5945028..7eb21364cfb2 100644 --- a/packages/forms/signals/src/util/parser.ts +++ b/packages/forms/signals/src/util/parser.ts @@ -8,6 +8,7 @@ import {type Signal, linkedSignal} from '@angular/core'; import type {ValidationError} from '../api/rules'; +import {normalizeErrors} from '../api/rules/validation/util'; import type {ParseResult} from '../api/transformed_value'; /** @@ -44,10 +45,13 @@ export function createParser( const setRawValue = (rawValue: TRaw) => { const result = parse(rawValue); - errors.set(result.errors ?? []); + errors.set(normalizeErrors(result.error)); if (result.value !== undefined) { setValue(result.value); } + // `errors` is a linked signal sourced from the model value; write parse errors after + // model updates so `{value, errors}` results do not get reset by the recomputation. + errors.set(normalizeErrors(result.error)); }; return {errors: errors.asReadonly(), setRawValue}; diff --git a/packages/forms/signals/test/node/field_proxy.spec.ts b/packages/forms/signals/test/node/field_proxy.spec.ts index 9f13d12799f6..356efe7bd916 100644 --- a/packages/forms/signals/test/node/field_proxy.spec.ts +++ b/packages/forms/signals/test/node/field_proxy.spec.ts @@ -6,20 +6,9 @@ * found in the LICENSE file at https://angular.dev/license */ -import { - Component, - Input, - Injector, - input, - signal, - ApplicationRef, - effect, - untracked, - computed, -} from '@angular/core'; +import {Injector, signal, ApplicationRef, effect, untracked} from '@angular/core'; import {TestBed} from '@angular/core/testing'; -import {form, FieldTree} from '../../public_api'; -import {ChangeDetectionStrategy} from '@angular/compiler'; +import {form} from '../../public_api'; describe('FieldTree proxy', () => { it('should not forward methods through the proxy', () => { diff --git a/packages/forms/signals/test/node/parse_errors.spec.ts b/packages/forms/signals/test/node/parse_errors.spec.ts index 6b650fe98f4b..aa7c36941e4c 100644 --- a/packages/forms/signals/test/node/parse_errors.spec.ts +++ b/packages/forms/signals/test/node/parse_errors.spec.ts @@ -11,6 +11,7 @@ import {TestBed} from '@angular/core/testing'; import { form, FormField, + maxError, transformedValue, validate, type FormValueControl, @@ -304,6 +305,25 @@ describe('parse errors', () => { expect(errors1).toEqual([]); expect(input1.value).toBe('42'); }); + + it('should preserve parse errors when transformedValue parse returns both value and errors', async () => { + @Component({ + imports: [TestNumberInput, FormField], + template: ``, + }) + class TestCmp { + state = signal(5); + f = form(this.state); + } + + const fix = await act(() => TestBed.createComponent(TestCmp)); + const comp = fix.componentInstance; + const input: HTMLInputElement = fix.nativeElement.querySelector('input')!; + + input.value = '11'; + await act(() => input.dispatchEvent(new Event('input'))); + expect(comp.f().errors()).toEqual([jasmine.objectContaining({kind: 'max'})]); + }); }); @Component({ @@ -318,13 +338,17 @@ describe('parse errors', () => { class TestNumberInput implements FormValueControl { readonly value = model.required(); readonly errors = input([]); + readonly parseMax = input(undefined); protected readonly rawValue = transformedValue(this.value, { parse: (rawValue) => { if (rawValue === '') return {value: null}; const value = Number(rawValue); if (Number.isNaN(value)) { - return {errors: [{kind: 'parse', message: `${rawValue} is not numeric`}]}; + return {error: {kind: 'parse', message: `${rawValue} is not numeric`}}; + } + if (this.parseMax() != null && value > this.parseMax()!) { + return {value, error: [maxError(this.parseMax()!)]}; } return {value}; }, diff --git a/packages/language-service/test/grp3/quick_info_spec.ts b/packages/language-service/test/grp3/quick_info_spec.ts index bebe8439cb6a..5a78a4934a74 100644 --- a/packages/language-service/test/grp3/quick_info_spec.ts +++ b/packages/language-service/test/grp3/quick_info_spec.ts @@ -225,14 +225,6 @@ describe('quick info', () => { }); }); - it('should work for data-let- syntax', () => { - expectQuickInfo({ - templateOverride: `{{hero}}`, - expectedSpanText: 'hero', - expectedDisplayString: '(variable) hero: Hero', - }); - }); - it('should get tags', () => { const templateOverride = '
'; const text = templateOverride.replace('¦', ''); @@ -264,11 +256,6 @@ describe('quick info', () => { expectedSpanText: 'tcName', expectedDisplayString: '(property) TestComponent.name: string', }); - expectQuickInfo({ - templateOverride: ``, - expectedSpanText: 'tcName', - expectedDisplayString: '(property) TestComponent.name: string', - }); }); it('should work for structural directive inputs ngForTrackBy', () => { @@ -322,11 +309,6 @@ describe('quick info', () => { expectedSpanText: 'test', expectedDisplayString: '(event) TestComponent.testEvent: EventEmitter', }); - expectQuickInfo({ - templateOverride: ``, - expectedSpanText: 'test', - expectedDisplayString: '(event) TestComponent.testEvent: EventEmitter', - }); }); it('should work for $event from EventEmitter', () => { @@ -375,11 +357,6 @@ describe('quick info', () => { expectedSpanText: 'chart', expectedDisplayString: '(reference) chart: HTMLDivElement', }); - expectQuickInfo({ - templateOverride: `
`, - expectedSpanText: 'chart', - expectedDisplayString: '(reference) chart: HTMLDivElement', - }); }); it('should work for click output from native element', () => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5bb49be2cbb9..1447c93e2aa0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,14 +18,14 @@ importers: .: dependencies: '@angular-devkit/build-angular': - specifier: 21.2.0-rc.0 - version: 21.2.0-rc.0(a1b01c00260e1368ec8dff33b5030c98) + specifier: 21.2.0-rc.1 + version: 21.2.0-rc.1(ea88d360f68ded917958bf70fd2b6dad) '@angular-devkit/core': - specifier: 21.2.0-rc.0 - version: 21.2.0-rc.0(chokidar@5.0.0) + specifier: 21.2.0-rc.1 + version: 21.2.0-rc.1(chokidar@5.0.0) '@angular-devkit/schematics': - specifier: 21.2.0-rc.0 - version: 21.2.0-rc.0(chokidar@5.0.0) + specifier: 21.2.0-rc.1 + version: 21.2.0-rc.1(chokidar@5.0.0) '@angular/animations': specifier: workspace:* version: link:packages/animations @@ -33,14 +33,14 @@ importers: specifier: 'workspace: *' version: link:packages/benchpress '@angular/build': - specifier: 21.2.0-rc.0 - version: 21.2.0-rc.0(d58eab1642a2d533b7d3a0499c748672) + specifier: 21.2.0-rc.1 + version: 21.2.0-rc.1(a12689b79fb7a7a5ed808a49ec725854) '@angular/cdk': specifier: 21.2.0-rc.0 version: 21.2.0-rc.0(@angular/common@packages+common)(@angular/core@packages+core)(@angular/platform-browser@packages+platform-browser)(rxjs@7.8.2) '@angular/cli': - specifier: 21.2.0-rc.0 - version: 21.2.0-rc.0(@types/node@20.19.31)(chokidar@5.0.0) + specifier: 21.2.0-rc.1 + version: 21.2.0-rc.1(@types/node@20.19.31)(chokidar@5.0.0) '@angular/common': specifier: workspace:* version: link:packages/common @@ -84,8 +84,8 @@ importers: specifier: workspace:* version: link:packages/service-worker '@angular/ssr': - specifier: 21.2.0-rc.0 - version: 21.2.0-rc.0(@angular/common@packages+common)(@angular/core@packages+core)(@angular/platform-server@packages+platform-server)(@angular/router@packages+router) + specifier: 21.2.0-rc.1 + version: 21.2.0-rc.1(@angular/common@packages+common)(@angular/core@packages+core)(@angular/platform-server@packages+platform-server)(@angular/router@packages+router) '@angular/upgrade': specifier: 'workspace: *' version: link:packages/upgrade @@ -114,8 +114,8 @@ importers: specifier: ^16.0.0 version: 16.0.3(rollup@4.57.1) '@schematics/angular': - specifier: 21.2.0-rc.0 - version: 21.2.0-rc.0(chokidar@5.0.0) + specifier: 21.2.0-rc.1 + version: 21.2.0-rc.1(chokidar@5.0.0) '@standard-schema/spec': specifier: ^1.0.0 version: 1.1.0 @@ -478,14 +478,14 @@ importers: specifier: 21.2.0-rc.0 version: 21.2.0-rc.0(@angular/cdk@21.2.0-rc.0(@angular/common@packages+common)(@angular/core@packages+core)(@angular/platform-browser@packages+platform-browser)(rxjs@7.8.2))(@angular/core@packages+core) '@angular/build': - specifier: 21.2.0-rc.0 - version: 21.2.0-rc.0(5b4de4328d11dbe9345fa1de115fb0ce) + specifier: 21.2.0-rc.1 + version: 21.2.0-rc.1(c30b52169b3b2ee1cc161f9c79b2b533) '@angular/cdk': specifier: 21.2.0-rc.0 version: 21.2.0-rc.0(@angular/common@packages+common)(@angular/core@packages+core)(@angular/platform-browser@packages+platform-browser)(rxjs@7.8.2) '@angular/cli': - specifier: 21.2.0-rc.0 - version: 21.2.0-rc.0(@types/node@24.10.11)(chokidar@5.0.0) + specifier: 21.2.0-rc.1 + version: 21.2.0-rc.1(@types/node@24.10.11)(chokidar@5.0.0) '@angular/common': specifier: workspace:* version: link:../packages/common @@ -517,8 +517,8 @@ importers: specifier: workspace:* version: link:../packages/router '@angular/ssr': - specifier: 21.2.0-rc.0 - version: 21.2.0-rc.0(@angular/common@packages+common)(@angular/core@packages+core)(@angular/platform-server@packages+platform-server)(@angular/router@packages+router) + specifier: 21.2.0-rc.1 + version: 21.2.0-rc.1(@angular/common@packages+common)(@angular/core@packages+core)(@angular/platform-server@packages+platform-server)(@angular/router@packages+router) '@codemirror/autocomplete': specifier: 6.20.0 version: 6.20.0 @@ -836,8 +836,8 @@ importers: specifier: workspace:* version: link:../packages/router '@angular/ssr': - specifier: 21.2.0-rc.0 - version: 21.2.0-rc.0(@angular/common@packages+common)(@angular/core@packages+core)(@angular/platform-server@packages+platform-server)(@angular/router@packages+router) + specifier: 21.2.0-rc.1 + version: 21.2.0-rc.1(@angular/common@packages+common)(@angular/core@packages+core)(@angular/platform-server@packages+platform-server)(@angular/router@packages+router) rxjs: specifier: ~7.8.0 version: 7.8.2 @@ -846,11 +846,11 @@ importers: version: 2.8.1 devDependencies: '@angular/build': - specifier: 21.2.0-rc.0 - version: 21.2.0-rc.0(5b4de4328d11dbe9345fa1de115fb0ce) + specifier: 21.2.0-rc.1 + version: 21.2.0-rc.1(c30b52169b3b2ee1cc161f9c79b2b533) '@angular/cli': - specifier: 21.2.0-rc.0 - version: 21.2.0-rc.0(@types/node@24.10.11)(chokidar@5.0.0) + specifier: 21.2.0-rc.1 + version: 21.2.0-rc.1(@types/node@24.10.11)(chokidar@5.0.0) '@angular/compiler-cli': specifier: workspace:* version: link:../packages/compiler-cli @@ -918,8 +918,8 @@ importers: specifier: workspace:* version: link:../packages/benchpress '@angular/build': - specifier: 21.2.0-rc.0 - version: 21.2.0-rc.0(5b4de4328d11dbe9345fa1de115fb0ce) + specifier: 21.2.0-rc.1 + version: 21.2.0-rc.1(c30b52169b3b2ee1cc161f9c79b2b533) '@angular/common': specifier: workspace:* version: link:../packages/common @@ -1089,8 +1089,8 @@ importers: specifier: workspace:* version: link:../../../animations '@angular/build': - specifier: 21.2.0-rc.0 - version: 21.2.0-rc.0(5b4de4328d11dbe9345fa1de115fb0ce) + specifier: 21.2.0-rc.1 + version: 21.2.0-rc.1(c30b52169b3b2ee1cc161f9c79b2b533) '@angular/common': specifier: workspace:* version: link:../../../common @@ -1626,13 +1626,13 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} - '@angular-devkit/architect@0.2102.0-rc.0': - resolution: {integrity: sha512-WutplD9wHcm6B1IraZULr5BU4jcLXDu17GzAU3oWnX4FkVly7jUcsfovHWNpndw0JDb1hK7wW74Xp7wP8PRJtw==} + '@angular-devkit/architect@0.2102.0-rc.1': + resolution: {integrity: sha512-Bm1OsEP/MuHzDLcDnVxsV3fae5cgPwvpa7/KExdChR7wybOYBlzK81RLB2/+SPh9v8aa09L5zIFLXXpCW+8Wig==} engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} hasBin: true - '@angular-devkit/build-angular@21.2.0-rc.0': - resolution: {integrity: sha512-DSUj0Ch3/bSY+cOLrljYXsux7ZCogVZgMN0XFRgvcQo4mqBzpHutljtE6tkqBwiFF0inHkM5XBaXbGDSkX/JKg==} + '@angular-devkit/build-angular@21.2.0-rc.1': + resolution: {integrity: sha512-mnYlUt5JxsN1sWRUpsLHcORd0BeEftVRsivvjMC0bE+4SjEzc0nPW0stZSv6r7rdEVR4a6R9/4SkKuBOHxcbJg==} engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} peerDependencies: '@angular/compiler-cli': ^21.0.0 || ^21.2.0-next.0 @@ -1641,7 +1641,7 @@ packages: '@angular/platform-browser': ^21.0.0 || ^21.2.0-next.0 '@angular/platform-server': ^21.0.0 || ^21.2.0-next.0 '@angular/service-worker': ^21.0.0 || ^21.2.0-next.0 - '@angular/ssr': ^21.2.0-rc.0 + '@angular/ssr': ^21.2.0-rc.1 '@web/test-runner': ^0.20.0 browser-sync: ^3.0.2 jest: ^30.2.0 @@ -1681,15 +1681,15 @@ packages: tailwindcss: optional: true - '@angular-devkit/build-webpack@0.2102.0-rc.0': - resolution: {integrity: sha512-fRRyAOZwyMdWPwvZyLMUt4F+lbMMSS5JufAOAn2ylKm48emjSzZu6dl+E7uDFpQupKB5iIriLcycIjwkRGOtcA==} + '@angular-devkit/build-webpack@0.2102.0-rc.1': + resolution: {integrity: sha512-oiGuLWm+5e4W0w4KiVP7+DT+o3CJ23hprtsFCBcoMWzkMRy54Dm9n8amousw5ZA8ODMqseCp3f9n6HXOnfHFxA==} engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} peerDependencies: webpack: ^5.30.0 webpack-dev-server: ^5.0.2 - '@angular-devkit/core@21.2.0-rc.0': - resolution: {integrity: sha512-HnSUf2pkjSDdJMdkcb/eMgwI9TQG/TqZlqtTGjreraD0tr5WI2FWsdOQu2JGys8VgJK1Y+XYpvfL7EF1eSHeWw==} + '@angular-devkit/core@21.2.0-rc.1': + resolution: {integrity: sha512-PEcDmqGfSmre6uAXyck4fPPoGh6CSMr+oZlr18mSVz/e8oDZ3PogiGto1IXnXA+Qk/sQi0L2tFkM8noPTmm0GQ==} engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} peerDependencies: chokidar: ^5.0.0 @@ -1697,8 +1697,8 @@ packages: chokidar: optional: true - '@angular-devkit/schematics@21.2.0-rc.0': - resolution: {integrity: sha512-G8idL0k1thHcy6cHnSLbBNKG1MSsTpqoEe4aaQIOtoAe8KEhIZ3jQfeFYWCHPFOPhnrExZc0l32UeDdEzQ4akw==} + '@angular-devkit/schematics@21.2.0-rc.1': + resolution: {integrity: sha512-5IFTWuXdJRhLBK2fCHkccocbQF4aUaIwsJojrlED29xArHJkQV6Dhk9qIGNxkjSZFDDabcBUS2HWQwyY+2Xr6g==} engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} '@angular/aria@21.2.0-rc.0': @@ -1707,8 +1707,8 @@ packages: '@angular/cdk': 21.2.0-rc.0 '@angular/core': ^21.0.0-0 || ^21.1.0-0 || ^21.2.0-0 || ^21.3.0-0 || ^22.0.0-0 - '@angular/build@21.2.0-rc.0': - resolution: {integrity: sha512-8EORjR9+2KtU9Jc0PFjK8J5hrK1QJdkI9aTZZI7bTZ9Fie2Ymll5p3bEGL5mO5DZaDxGY+iA9vyfl10SsLKBpA==} + '@angular/build@21.2.0-rc.1': + resolution: {integrity: sha512-5fDNw9Li3ZuXIcHUgqudG6dHc79KaAwB+wt6HEtWMjgtjaVKdFnJF9SK3Rd/R1vi2w9jpyH+3Sg5N5WLd7inOQ==} engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} peerDependencies: '@angular/compiler': ^21.0.0 || ^21.2.0-next.0 @@ -1718,7 +1718,7 @@ packages: '@angular/platform-browser': ^21.0.0 || ^21.2.0-next.0 '@angular/platform-server': ^21.0.0 || ^21.2.0-next.0 '@angular/service-worker': ^21.0.0 || ^21.2.0-next.0 - '@angular/ssr': ^21.2.0-rc.0 + '@angular/ssr': ^21.2.0-rc.1 karma: ^6.4.0 less: ^4.2.0 ng-packagr: ^21.0.0 || ^21.2.0-next.0 @@ -1761,8 +1761,8 @@ packages: '@angular/platform-browser': ^21.0.0-0 || ^21.1.0-0 || ^21.2.0-0 || ^21.3.0-0 || ^22.0.0-0 rxjs: ^6.5.3 || ^7.4.0 - '@angular/cli@21.2.0-rc.0': - resolution: {integrity: sha512-Manaq4uJ+NBAfvtnsHPED88MiUYeD4a8Uy2aBREqypDU2iZOBzi3MdYtVso4TQkA68JtEb5WyazfB4tVZwl/Yw==} + '@angular/cli@21.2.0-rc.1': + resolution: {integrity: sha512-6q60Yo04Q6janpBGujGMJ9rbB8wJfI6o2GUrujgqaKFWl2IGRgIfBbJ97fTRDQSfQGvzLufuuAq3in7cz01w7A==} engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} hasBin: true @@ -1794,8 +1794,8 @@ packages: version: 0.0.0-e006a332028a4c3cb24e9d92437fac7ae99e2ed5 hasBin: true - '@angular/ssr@21.2.0-rc.0': - resolution: {integrity: sha512-t2Y+xzXnZwKyT3aC6nhoTNY+gfGlbL9ROdkcsaMcZWGxqW/2qcF5pBj0Wk84Yb1kict+pwPxI1CtugvCgx1YfQ==} + '@angular/ssr@21.2.0-rc.1': + resolution: {integrity: sha512-F7mZuXkTXUMVuwt40kEw0PN2+X1oKSlmJeQg9vT2QyWMMlNgQGQO5jserXShG9ORyJQlmUZVziEDKn0pN/aXmw==} peerDependencies: '@angular/common': ^21.0.0 || ^21.2.0-next.0 '@angular/core': ^21.0.0 || ^21.2.0-next.0 @@ -4118,8 +4118,8 @@ packages: peerDependencies: '@angular/compiler-cli': '*' - '@ngtools/webpack@21.2.0-rc.0': - resolution: {integrity: sha512-TsZvVcvRZl5xPtRyDpfKfGDyQ0SY5GT8BnJ9xffSV2moJhXTZujSkYHpq8dZTX2tyl9LymsDFrYncQ0f5ViHfQ==} + '@ngtools/webpack@21.2.0-rc.1': + resolution: {integrity: sha512-cBFffMapz1GlUE1IkgWbnsZ0IsI0vD9RNIuvrUlNB8NuLMh3MVY/jDtttaXZWC0zGf16qjz7rstsaOW7UbHL4Q==} engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} peerDependencies: '@angular/compiler-cli': ^21.0.0 || ^21.2.0-next.0 @@ -4961,8 +4961,8 @@ packages: '@rushstack/ts-command-line@5.1.7': resolution: {integrity: sha512-Ugwl6flarZcL2nqH5IXFYk3UR3mBVDsVFlCQW/Oaqidvdb/5Ota6b/Z3JXWIdqV3rOR2/JrYoAHanWF5rgenXA==} - '@schematics/angular@21.2.0-rc.0': - resolution: {integrity: sha512-IcQJVAkaEbFe1n7Ar/ktJRzpaxvJVo7pyjq00CK2QWdfwWzPm4KbLh6Dr6JhKomXSE6+OEKEcMmHE0ffr7ZQ1Q==} + '@schematics/angular@21.2.0-rc.1': + resolution: {integrity: sha512-K6Mkv8PwmbCZLdzivpIxAHNaEzBG8LaDrcGLtJo5GxAPXEBPRjmaGIMhsWrhA1SIZP/EulcB9SskkB+oNJpZvQ==} engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0, npm: ^6.11.0 || ^7.5.6 || >=8.0.0, yarn: '>= 1.13.0'} '@secretlint/config-creator@10.2.2': @@ -13497,20 +13497,20 @@ snapshots: '@jridgewell/gen-mapping': 0.3.13 '@jridgewell/trace-mapping': 0.3.31 - '@angular-devkit/architect@0.2102.0-rc.0(chokidar@5.0.0)': + '@angular-devkit/architect@0.2102.0-rc.1(chokidar@5.0.0)': dependencies: - '@angular-devkit/core': 21.2.0-rc.0(chokidar@5.0.0) + '@angular-devkit/core': 21.2.0-rc.1(chokidar@5.0.0) rxjs: 7.8.2 transitivePeerDependencies: - chokidar - '@angular-devkit/build-angular@21.2.0-rc.0(a1b01c00260e1368ec8dff33b5030c98)': + '@angular-devkit/build-angular@21.2.0-rc.1(ea88d360f68ded917958bf70fd2b6dad)': dependencies: '@ampproject/remapping': 2.3.0 - '@angular-devkit/architect': 0.2102.0-rc.0(chokidar@5.0.0) - '@angular-devkit/build-webpack': 0.2102.0-rc.0(chokidar@5.0.0)(webpack-dev-server@5.2.3(bufferutil@4.1.0)(tslib@2.8.1)(utf-8-validate@6.0.6)(webpack@5.105.2(esbuild@0.27.3)))(webpack@5.105.2(esbuild@0.27.3)) - '@angular-devkit/core': 21.2.0-rc.0(chokidar@5.0.0) - '@angular/build': 21.2.0-rc.0(10a4630587567062e8506fb4541da297) + '@angular-devkit/architect': 0.2102.0-rc.1(chokidar@5.0.0) + '@angular-devkit/build-webpack': 0.2102.0-rc.1(chokidar@5.0.0)(webpack-dev-server@5.2.3(bufferutil@4.1.0)(tslib@2.8.1)(utf-8-validate@6.0.6)(webpack@5.105.2(esbuild@0.27.3)))(webpack@5.105.2(esbuild@0.27.3)) + '@angular-devkit/core': 21.2.0-rc.1(chokidar@5.0.0) + '@angular/build': 21.2.0-rc.1(fc8ee6f57910011df997b5d298742fa0) '@angular/compiler-cli': link:packages/compiler-cli '@babel/core': 7.29.0 '@babel/generator': 7.29.1 @@ -13522,7 +13522,7 @@ snapshots: '@babel/preset-env': 7.29.0(@babel/core@7.29.0) '@babel/runtime': 7.28.6 '@discoveryjs/json-ext': 0.6.3 - '@ngtools/webpack': 21.2.0-rc.0(@angular/compiler-cli@packages+compiler-cli)(typescript@6.0.0-beta)(webpack@5.105.2(esbuild@0.27.3)) + '@ngtools/webpack': 21.2.0-rc.1(@angular/compiler-cli@packages+compiler-cli)(typescript@6.0.0-beta)(webpack@5.105.2(esbuild@0.27.3)) ansi-colors: 4.1.3 autoprefixer: 10.4.24(postcss@8.5.6) babel-loader: 10.0.0(@babel/core@7.29.0)(webpack@5.105.2(esbuild@0.27.3)) @@ -13568,7 +13568,7 @@ snapshots: '@angular/platform-browser': link:packages/platform-browser '@angular/platform-server': link:packages/platform-server '@angular/service-worker': link:packages/service-worker - '@angular/ssr': 21.2.0-rc.0(@angular/common@packages+common)(@angular/core@packages+core)(@angular/platform-server@packages+platform-server)(@angular/router@packages+router) + '@angular/ssr': 21.2.0-rc.1(@angular/common@packages+common)(@angular/core@packages+core)(@angular/platform-server@packages+platform-server)(@angular/router@packages+router) esbuild: 0.27.3 jest: 30.2.0(@types/node@20.19.31)(ts-node@10.9.2(@types/node@20.19.31)(typescript@6.0.0-beta)) jest-environment-jsdom: 30.2.0(bufferutil@4.1.0)(utf-8-validate@6.0.6) @@ -13599,16 +13599,16 @@ snapshots: - webpack-cli - yaml - '@angular-devkit/build-webpack@0.2102.0-rc.0(chokidar@5.0.0)(webpack-dev-server@5.2.3(bufferutil@4.1.0)(tslib@2.8.1)(utf-8-validate@6.0.6)(webpack@5.105.2(esbuild@0.27.3)))(webpack@5.105.2(esbuild@0.27.3))': + '@angular-devkit/build-webpack@0.2102.0-rc.1(chokidar@5.0.0)(webpack-dev-server@5.2.3(bufferutil@4.1.0)(tslib@2.8.1)(utf-8-validate@6.0.6)(webpack@5.105.2(esbuild@0.27.3)))(webpack@5.105.2(esbuild@0.27.3))': dependencies: - '@angular-devkit/architect': 0.2102.0-rc.0(chokidar@5.0.0) + '@angular-devkit/architect': 0.2102.0-rc.1(chokidar@5.0.0) rxjs: 7.8.2 webpack: 5.105.2(esbuild@0.27.3) webpack-dev-server: 5.2.3(bufferutil@4.1.0)(tslib@2.8.1)(utf-8-validate@6.0.6)(webpack@5.105.2(esbuild@0.27.3)) transitivePeerDependencies: - chokidar - '@angular-devkit/core@21.2.0-rc.0(chokidar@5.0.0)': + '@angular-devkit/core@21.2.0-rc.1(chokidar@5.0.0)': dependencies: ajv: 8.18.0 ajv-formats: 3.0.1 @@ -13619,9 +13619,9 @@ snapshots: optionalDependencies: chokidar: 5.0.0 - '@angular-devkit/schematics@21.2.0-rc.0(chokidar@5.0.0)': + '@angular-devkit/schematics@21.2.0-rc.1(chokidar@5.0.0)': dependencies: - '@angular-devkit/core': 21.2.0-rc.0(chokidar@5.0.0) + '@angular-devkit/core': 21.2.0-rc.1(chokidar@5.0.0) jsonc-parser: 3.3.1 magic-string: 0.30.21 ora: 9.3.0 @@ -13635,17 +13635,17 @@ snapshots: '@angular/core': link:packages/core tslib: 2.8.1 - '@angular/build@21.2.0-rc.0(10a4630587567062e8506fb4541da297)': + '@angular/build@21.2.0-rc.1(a12689b79fb7a7a5ed808a49ec725854)': dependencies: '@ampproject/remapping': 2.3.0 - '@angular-devkit/architect': 0.2102.0-rc.0(chokidar@5.0.0) + '@angular-devkit/architect': 0.2102.0-rc.1(chokidar@5.0.0) '@angular/compiler': link:packages/compiler '@angular/compiler-cli': link:packages/compiler-cli '@babel/core': 7.29.0 '@babel/helper-annotate-as-pure': 7.27.3 '@babel/helper-split-export-declaration': 7.24.7 '@inquirer/confirm': 5.1.21(@types/node@20.19.31) - '@vitejs/plugin-basic-ssl': 2.1.4(vite@7.3.1(@types/node@20.19.31)(jiti@2.6.1)(less@4.4.2)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2)) + '@vitejs/plugin-basic-ssl': 2.1.4(vite@7.3.1(@types/node@20.19.31)(jiti@2.6.1)(less@4.5.1)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2)) beasties: 0.4.1 browserslist: 4.28.1 esbuild: 0.27.3 @@ -13666,7 +13666,7 @@ snapshots: tslib: 2.8.1 typescript: 6.0.0-beta undici: 7.22.0 - vite: 7.3.1(@types/node@20.19.31)(jiti@2.6.1)(less@4.4.2)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2) + vite: 7.3.1(@types/node@20.19.31)(jiti@2.6.1)(less@4.5.1)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2) watchpack: 2.5.1 optionalDependencies: '@angular/core': link:packages/core @@ -13674,9 +13674,9 @@ snapshots: '@angular/platform-browser': link:packages/platform-browser '@angular/platform-server': link:packages/platform-server '@angular/service-worker': link:packages/service-worker - '@angular/ssr': 21.2.0-rc.0(@angular/common@packages+common)(@angular/core@packages+core)(@angular/platform-server@packages+platform-server)(@angular/router@packages+router) + '@angular/ssr': 21.2.0-rc.1(@angular/common@packages+common)(@angular/core@packages+core)(@angular/platform-server@packages+platform-server)(@angular/router@packages+router) karma: 6.4.4(bufferutil@4.1.0)(utf-8-validate@6.0.6) - less: 4.4.2 + less: 4.5.1 lmdb: 3.5.1 ng-packagr: 21.2.0-next.0(@angular/compiler-cli@packages+compiler-cli)(tailwindcss@3.4.19(tsx@4.21.0)(yaml@2.8.2))(tslib@2.8.1)(typescript@6.0.0-beta) postcss: 8.5.6 @@ -13695,10 +13695,10 @@ snapshots: - tsx - yaml - '@angular/build@21.2.0-rc.0(5b4de4328d11dbe9345fa1de115fb0ce)': + '@angular/build@21.2.0-rc.1(c30b52169b3b2ee1cc161f9c79b2b533)': dependencies: '@ampproject/remapping': 2.3.0 - '@angular-devkit/architect': 0.2102.0-rc.0(chokidar@5.0.0) + '@angular-devkit/architect': 0.2102.0-rc.1(chokidar@5.0.0) '@angular/compiler': link:packages/compiler '@angular/compiler-cli': link:packages/compiler-cli '@babel/core': 7.29.0 @@ -13734,7 +13734,7 @@ snapshots: '@angular/platform-browser': link:packages/platform-browser '@angular/platform-server': link:packages/platform-server '@angular/service-worker': link:packages/service-worker - '@angular/ssr': 21.2.0-rc.0(@angular/common@packages+common)(@angular/core@packages+core)(@angular/platform-server@packages+platform-server)(@angular/router@packages+router) + '@angular/ssr': 21.2.0-rc.1(@angular/common@packages+common)(@angular/core@packages+core)(@angular/platform-server@packages+platform-server)(@angular/router@packages+router) karma: 6.4.4(bufferutil@4.1.0)(utf-8-validate@6.0.6) less: 4.5.1 lmdb: 3.5.1 @@ -13755,17 +13755,17 @@ snapshots: - tsx - yaml - '@angular/build@21.2.0-rc.0(d58eab1642a2d533b7d3a0499c748672)': + '@angular/build@21.2.0-rc.1(fc8ee6f57910011df997b5d298742fa0)': dependencies: '@ampproject/remapping': 2.3.0 - '@angular-devkit/architect': 0.2102.0-rc.0(chokidar@5.0.0) + '@angular-devkit/architect': 0.2102.0-rc.1(chokidar@5.0.0) '@angular/compiler': link:packages/compiler '@angular/compiler-cli': link:packages/compiler-cli '@babel/core': 7.29.0 '@babel/helper-annotate-as-pure': 7.27.3 '@babel/helper-split-export-declaration': 7.24.7 '@inquirer/confirm': 5.1.21(@types/node@20.19.31) - '@vitejs/plugin-basic-ssl': 2.1.4(vite@7.3.1(@types/node@20.19.31)(jiti@2.6.1)(less@4.5.1)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2)) + '@vitejs/plugin-basic-ssl': 2.1.4(vite@7.3.1(@types/node@20.19.31)(jiti@2.6.1)(less@4.4.2)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2)) beasties: 0.4.1 browserslist: 4.28.1 esbuild: 0.27.3 @@ -13786,7 +13786,7 @@ snapshots: tslib: 2.8.1 typescript: 6.0.0-beta undici: 7.22.0 - vite: 7.3.1(@types/node@20.19.31)(jiti@2.6.1)(less@4.5.1)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2) + vite: 7.3.1(@types/node@20.19.31)(jiti@2.6.1)(less@4.4.2)(sass@1.97.3)(terser@5.46.0)(tsx@4.21.0)(yaml@2.8.2) watchpack: 2.5.1 optionalDependencies: '@angular/core': link:packages/core @@ -13794,9 +13794,9 @@ snapshots: '@angular/platform-browser': link:packages/platform-browser '@angular/platform-server': link:packages/platform-server '@angular/service-worker': link:packages/service-worker - '@angular/ssr': 21.2.0-rc.0(@angular/common@packages+common)(@angular/core@packages+core)(@angular/platform-server@packages+platform-server)(@angular/router@packages+router) + '@angular/ssr': 21.2.0-rc.1(@angular/common@packages+common)(@angular/core@packages+core)(@angular/platform-server@packages+platform-server)(@angular/router@packages+router) karma: 6.4.4(bufferutil@4.1.0)(utf-8-validate@6.0.6) - less: 4.5.1 + less: 4.4.2 lmdb: 3.5.1 ng-packagr: 21.2.0-next.0(@angular/compiler-cli@packages+compiler-cli)(tailwindcss@3.4.19(tsx@4.21.0)(yaml@2.8.2))(tslib@2.8.1)(typescript@6.0.0-beta) postcss: 8.5.6 @@ -13824,15 +13824,15 @@ snapshots: rxjs: 7.8.2 tslib: 2.8.1 - '@angular/cli@21.2.0-rc.0(@types/node@20.19.31)(chokidar@5.0.0)': + '@angular/cli@21.2.0-rc.1(@types/node@20.19.31)(chokidar@5.0.0)': dependencies: - '@angular-devkit/architect': 0.2102.0-rc.0(chokidar@5.0.0) - '@angular-devkit/core': 21.2.0-rc.0(chokidar@5.0.0) - '@angular-devkit/schematics': 21.2.0-rc.0(chokidar@5.0.0) + '@angular-devkit/architect': 0.2102.0-rc.1(chokidar@5.0.0) + '@angular-devkit/core': 21.2.0-rc.1(chokidar@5.0.0) + '@angular-devkit/schematics': 21.2.0-rc.1(chokidar@5.0.0) '@inquirer/prompts': 7.10.1(@types/node@20.19.31) '@listr2/prompt-adapter-inquirer': 3.0.5(@inquirer/prompts@7.10.1(@types/node@20.19.31))(@types/node@20.19.31)(listr2@9.0.5) '@modelcontextprotocol/sdk': 1.26.0 - '@schematics/angular': 21.2.0-rc.0(chokidar@5.0.0) + '@schematics/angular': 21.2.0-rc.1(chokidar@5.0.0) '@yarnpkg/lockfile': 1.1.0 algoliasearch: 5.48.1 ini: 6.0.0 @@ -13850,15 +13850,15 @@ snapshots: - chokidar - supports-color - '@angular/cli@21.2.0-rc.0(@types/node@24.10.11)(chokidar@5.0.0)': + '@angular/cli@21.2.0-rc.1(@types/node@24.10.11)(chokidar@5.0.0)': dependencies: - '@angular-devkit/architect': 0.2102.0-rc.0(chokidar@5.0.0) - '@angular-devkit/core': 21.2.0-rc.0(chokidar@5.0.0) - '@angular-devkit/schematics': 21.2.0-rc.0(chokidar@5.0.0) + '@angular-devkit/architect': 0.2102.0-rc.1(chokidar@5.0.0) + '@angular-devkit/core': 21.2.0-rc.1(chokidar@5.0.0) + '@angular-devkit/schematics': 21.2.0-rc.1(chokidar@5.0.0) '@inquirer/prompts': 7.10.1(@types/node@24.10.11) '@listr2/prompt-adapter-inquirer': 3.0.5(@inquirer/prompts@7.10.1(@types/node@24.10.11))(@types/node@24.10.11)(listr2@9.0.5) '@modelcontextprotocol/sdk': 1.26.0 - '@schematics/angular': 21.2.0-rc.0(chokidar@5.0.0) + '@schematics/angular': 21.2.0-rc.1(chokidar@5.0.0) '@yarnpkg/lockfile': 1.1.0 algoliasearch: 5.48.1 ini: 6.0.0 @@ -13957,7 +13957,7 @@ snapshots: - '@modelcontextprotocol/sdk' - '@react-native-async-storage/async-storage' - '@angular/ssr@21.2.0-rc.0(@angular/common@packages+common)(@angular/core@packages+core)(@angular/platform-server@packages+platform-server)(@angular/router@packages+router)': + '@angular/ssr@21.2.0-rc.1(@angular/common@packages+common)(@angular/core@packages+core)(@angular/platform-server@packages+platform-server)(@angular/router@packages+router)': dependencies: '@angular/common': link:packages/common '@angular/core': link:packages/core @@ -16817,7 +16817,7 @@ snapshots: '@modelcontextprotocol/sdk@1.25.3(hono@4.11.9)(zod@3.25.76)': dependencies: '@hono/node-server': 1.19.9(hono@4.11.9) - ajv: 8.17.1 + ajv: 8.18.0 ajv-formats: 3.0.1 content-type: 1.0.5 cors: 2.8.6 @@ -16839,7 +16839,7 @@ snapshots: '@modelcontextprotocol/sdk@1.26.0': dependencies: '@hono/node-server': 1.19.9(hono@4.11.9) - ajv: 8.17.1 + ajv: 8.18.0 ajv-formats: 3.0.1 content-type: 1.0.5 cors: 2.8.6 @@ -16982,7 +16982,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@ngtools/webpack@21.2.0-rc.0(@angular/compiler-cli@packages+compiler-cli)(typescript@6.0.0-beta)(webpack@5.105.2(esbuild@0.27.3))': + '@ngtools/webpack@21.2.0-rc.1(@angular/compiler-cli@packages+compiler-cli)(typescript@6.0.0-beta)(webpack@5.105.2(esbuild@0.27.3))': dependencies: '@angular/compiler-cli': link:packages/compiler-cli typescript: 6.0.0-beta @@ -17738,10 +17738,10 @@ snapshots: transitivePeerDependencies: - '@types/node' - '@schematics/angular@21.2.0-rc.0(chokidar@5.0.0)': + '@schematics/angular@21.2.0-rc.1(chokidar@5.0.0)': dependencies: - '@angular-devkit/core': 21.2.0-rc.0(chokidar@5.0.0) - '@angular-devkit/schematics': 21.2.0-rc.0(chokidar@5.0.0) + '@angular-devkit/core': 21.2.0-rc.1(chokidar@5.0.0) + '@angular-devkit/schematics': 21.2.0-rc.1(chokidar@5.0.0) jsonc-parser: 3.3.1 transitivePeerDependencies: - chokidar @@ -17755,7 +17755,7 @@ snapshots: '@secretlint/profiler': 10.2.2 '@secretlint/resolver': 10.2.2 '@secretlint/types': 10.2.2 - ajv: 8.17.1 + ajv: 8.18.0 debug: 4.4.3(supports-color@10.2.2) rc-config-loader: 4.1.3 transitivePeerDependencies: @@ -18853,17 +18853,17 @@ snapshots: optionalDependencies: ajv: 8.13.0 - ajv-formats@2.1.1(ajv@8.17.1): + ajv-formats@2.1.1(ajv@8.18.0): optionalDependencies: - ajv: 8.17.1 + ajv: 8.18.0 ajv-formats@3.0.1: dependencies: ajv: 8.18.0 - ajv-keywords@5.1.0(ajv@8.17.1): + ajv-keywords@5.1.0(ajv@8.18.0): dependencies: - ajv: 8.17.1 + ajv: 8.18.0 fast-deep-equal: 3.1.3 ajv@6.12.6: @@ -19678,7 +19678,7 @@ snapshots: parse5: 7.3.0 parse5-htmlparser2-tree-adapter: 7.1.0 parse5-parser-stream: 7.1.2 - undici: 7.20.0 + undici: 7.22.0 whatwg-mimetype: 4.0.0 chevrotain-allstar@0.3.1(chevrotain@11.0.3): @@ -21147,8 +21147,8 @@ snapshots: exegesis@4.3.0: dependencies: '@apidevtools/json-schema-ref-parser': 9.1.2 - ajv: 8.17.1 - ajv-formats: 2.1.1(ajv@8.17.1) + ajv: 8.18.0 + ajv-formats: 2.1.1(ajv@8.18.0) body-parser: 1.20.4 content-type: 1.0.5 deep-freeze: 0.0.1 @@ -25833,9 +25833,9 @@ snapshots: schema-utils@4.3.3: dependencies: '@types/json-schema': 7.0.15 - ajv: 8.17.1 - ajv-formats: 2.1.1(ajv@8.17.1) - ajv-keywords: 5.1.0(ajv@8.17.1) + ajv: 8.18.0 + ajv-formats: 2.1.1(ajv@8.18.0) + ajv-keywords: 5.1.0(ajv@8.18.0) secretlint@10.2.2: dependencies: @@ -26557,7 +26557,7 @@ snapshots: table@6.9.0: dependencies: - ajv: 8.17.1 + ajv: 8.18.0 lodash.truncate: 4.4.2 slice-ansi: 4.0.0 string-width: 4.2.3