Skip to content

Commit f596039

Browse files
committed
a416414 fix(compiler): use chunk origin in template HMR request URL (#59459)
1 parent daab0a5 commit f596039

File tree

5 files changed

+22
-18
lines changed

5 files changed

+22
-18
lines changed

BUILD_INFO

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Thu Jan 9 20:47:05 UTC 2025
2-
c1bc06c337761a427eb3a54b09ec3a7e9c261818
1+
Thu Jan 9 23:27:01 UTC 2025
2+
a4164141a38e03becad32b9e71d1f4243cc06461

fesm2022/compiler.mjs

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license Angular v19.2.0-next.0+sha-c1bc06c
2+
* @license Angular v19.2.0-next.0+sha-a416414
33
* (c) 2010-2024 Google LLC. https://angular.io/
44
* License: MIT
55
*/
@@ -30986,7 +30986,7 @@ function publishFacade(global) {
3098630986
* @description
3098730987
* Entry point for all public APIs of the compiler package.
3098830988
*/
30989-
const VERSION = new Version('19.2.0-next.0+sha-c1bc06c');
30989+
const VERSION = new Version('19.2.0-next.0+sha-a416414');
3099030990

3099130991
class CompilerConfig {
3099230992
defaultEncapsulation;
@@ -32757,14 +32757,18 @@ function compileHmrInitializer(meta) {
3275732757
// '<urlPartial>' + encodeURIComponent(t)
3275832758
const urlValue = literal(urlPartial)
3275932759
.plus(variable('encodeURIComponent').callFn([variable(timestampName)]));
32760+
// import.meta.url
32761+
const urlBase = variable('import').prop('meta').prop('url');
32762+
// new URL(urlValue, urlBase).href
32763+
const urlHref = new InstantiateExpr(variable('URL'), [urlValue, urlBase]).prop('href');
3276032764
// function Cmp_HmrLoad(t) {
32761-
// import(/* @vite-ignore */ url).then((m) => m.default && replaceMetadata(...));
32765+
// import(/* @vite-ignore */ urlHref).then((m) => m.default && replaceMetadata(...));
3276232766
// }
3276332767
const importCallback = new DeclareFunctionStmt(importCallbackName, [new FnParam(timestampName)], [
3276432768
// The vite-ignore special comment is required to prevent Vite from generating a superfluous
3276532769
// warning for each usage within the development code. If Vite provides a method to
3276632770
// programmatically avoid this warning in the future, this added comment can be removed here.
32767-
new DynamicImportExpr(urlValue, null, '@vite-ignore')
32771+
new DynamicImportExpr(urlHref, null, '@vite-ignore')
3276832772
.prop('then')
3276932773
.callFn([replaceCallback])
3277032774
.toStmt(),
@@ -32838,7 +32842,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
3283832842
function compileDeclareClassMetadata(metadata) {
3283932843
const definitionMap = new DefinitionMap();
3284032844
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
32841-
definitionMap.set('version', literal('19.2.0-next.0+sha-c1bc06c'));
32845+
definitionMap.set('version', literal('19.2.0-next.0+sha-a416414'));
3284232846
definitionMap.set('ngImport', importExpr(Identifiers.core));
3284332847
definitionMap.set('type', metadata.type);
3284432848
definitionMap.set('decorators', metadata.decorators);
@@ -32856,7 +32860,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
3285632860
callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));
3285732861
callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));
3285832862
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
32859-
definitionMap.set('version', literal('19.2.0-next.0+sha-c1bc06c'));
32863+
definitionMap.set('version', literal('19.2.0-next.0+sha-a416414'));
3286032864
definitionMap.set('ngImport', importExpr(Identifiers.core));
3286132865
definitionMap.set('type', metadata.type);
3286232866
definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
@@ -32951,7 +32955,7 @@ function createDirectiveDefinitionMap(meta) {
3295132955
const definitionMap = new DefinitionMap();
3295232956
const minVersion = getMinimumVersionForPartialOutput(meta);
3295332957
definitionMap.set('minVersion', literal(minVersion));
32954-
definitionMap.set('version', literal('19.2.0-next.0+sha-c1bc06c'));
32958+
definitionMap.set('version', literal('19.2.0-next.0+sha-a416414'));
3295532959
// e.g. `type: MyDirective`
3295632960
definitionMap.set('type', meta.type.value);
3295732961
if (meta.isStandalone !== undefined) {
@@ -33370,7 +33374,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
3337033374
function compileDeclareFactoryFunction(meta) {
3337133375
const definitionMap = new DefinitionMap();
3337233376
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
33373-
definitionMap.set('version', literal('19.2.0-next.0+sha-c1bc06c'));
33377+
definitionMap.set('version', literal('19.2.0-next.0+sha-a416414'));
3337433378
definitionMap.set('ngImport', importExpr(Identifiers.core));
3337533379
definitionMap.set('type', meta.type.value);
3337633380
definitionMap.set('deps', compileDependencies(meta.deps));
@@ -33405,7 +33409,7 @@ function compileDeclareInjectableFromMetadata(meta) {
3340533409
function createInjectableDefinitionMap(meta) {
3340633410
const definitionMap = new DefinitionMap();
3340733411
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
33408-
definitionMap.set('version', literal('19.2.0-next.0+sha-c1bc06c'));
33412+
definitionMap.set('version', literal('19.2.0-next.0+sha-a416414'));
3340933413
definitionMap.set('ngImport', importExpr(Identifiers.core));
3341033414
definitionMap.set('type', meta.type.value);
3341133415
// Only generate providedIn property if it has a non-null value
@@ -33456,7 +33460,7 @@ function compileDeclareInjectorFromMetadata(meta) {
3345633460
function createInjectorDefinitionMap(meta) {
3345733461
const definitionMap = new DefinitionMap();
3345833462
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
33459-
definitionMap.set('version', literal('19.2.0-next.0+sha-c1bc06c'));
33463+
definitionMap.set('version', literal('19.2.0-next.0+sha-a416414'));
3346033464
definitionMap.set('ngImport', importExpr(Identifiers.core));
3346133465
definitionMap.set('type', meta.type.value);
3346233466
definitionMap.set('providers', meta.providers);
@@ -33489,7 +33493,7 @@ function createNgModuleDefinitionMap(meta) {
3348933493
throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
3349033494
}
3349133495
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
33492-
definitionMap.set('version', literal('19.2.0-next.0+sha-c1bc06c'));
33496+
definitionMap.set('version', literal('19.2.0-next.0+sha-a416414'));
3349333497
definitionMap.set('ngImport', importExpr(Identifiers.core));
3349433498
definitionMap.set('type', meta.type.value);
3349533499
// We only generate the keys in the metadata if the arrays contain values.
@@ -33540,7 +33544,7 @@ function compileDeclarePipeFromMetadata(meta) {
3354033544
function createPipeDefinitionMap(meta) {
3354133545
const definitionMap = new DefinitionMap();
3354233546
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
33543-
definitionMap.set('version', literal('19.2.0-next.0+sha-c1bc06c'));
33547+
definitionMap.set('version', literal('19.2.0-next.0+sha-a416414'));
3354433548
definitionMap.set('ngImport', importExpr(Identifiers.core));
3354533549
// e.g. `type: MyPipe`
3354633550
definitionMap.set('type', meta.type.value);

fesm2022/compiler.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license Angular v19.2.0-next.0+sha-c1bc06c
2+
* @license Angular v19.2.0-next.0+sha-a416414
33
* (c) 2010-2024 Google LLC. https://angular.io/
44
* License: MIT
55
*/

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@angular/compiler",
3-
"version": "19.2.0-next.0+sha-c1bc06c",
3+
"version": "19.2.0-next.0+sha-a416414",
44
"description": "Angular - the compiler library",
55
"author": "angular",
66
"license": "MIT",
@@ -11,7 +11,7 @@
1111
"tslib": "^2.3.0"
1212
},
1313
"peerDependencies": {
14-
"@angular/core": "19.2.0-next.0+sha-c1bc06c"
14+
"@angular/core": "19.2.0-next.0+sha-a416414"
1515
},
1616
"peerDependenciesMeta": {
1717
"@angular/core": {

0 commit comments

Comments
 (0)