refactor(core): Error logs links point to the archived version of the docs (#63512)

In order to point the right context, links in error messages will target the archived version of the online doc site (v*.angular.io).

See #44650

PR Close #63512
This commit is contained in:
Matthieu Riegler 2025-08-31 22:08:33 +02:00 committed by Jessica Janiuk
parent e4594ef2d8
commit 10827a41ea
3 changed files with 13 additions and 2 deletions

View file

@ -9,5 +9,6 @@ ts_project(
]),
deps = [
"//:node_modules/typescript",
"//packages/compiler",
],
)

View file

@ -6,6 +6,8 @@
* found in the LICENSE file at https://angular.dev/license
*/
import {VERSION} from '@angular/compiler';
/**
* Base URL for the error details page.
*
@ -13,4 +15,7 @@
* - packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.ts
* - packages/core/src/error_details_base_url.ts
*/
export const ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.dev/errors';
export const ERROR_DETAILS_PAGE_BASE_URL: string = (() => {
const versionSubDomain = VERSION.major !== '0' ? `v${VERSION.major}.` : '';
return `https://${versionSubDomain}angular.dev/errors`;
})();

View file

@ -6,6 +6,8 @@
* found in the LICENSE file at https://angular.dev/license
*/
import {VERSION} from './version';
/**
* Base URL for the error details page.
*
@ -13,7 +15,10 @@
* - packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.ts
* - packages/core/src/error_details_base_url.ts
*/
export const ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.dev/errors';
export const ERROR_DETAILS_PAGE_BASE_URL: string = (() => {
const versionSubDomain = VERSION.major !== '0' ? `v${VERSION.major}.` : '';
return `https://${versionSubDomain}angular.dev/errors`;
})();
/**
* URL for the XSS security documentation.