@angular/compiler 18.2.0-next.0 → 18.2.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/src/jit_compiler_facade.mjs +40 -21
- package/esm2022/src/ml_parser/lexer.mjs +2 -2
- package/esm2022/src/render3/partial/class_metadata.mjs +2 -2
- package/esm2022/src/render3/partial/directive.mjs +1 -1
- package/esm2022/src/render3/partial/factory.mjs +1 -1
- package/esm2022/src/render3/partial/injectable.mjs +1 -1
- package/esm2022/src/render3/partial/injector.mjs +1 -1
- package/esm2022/src/render3/partial/ng_module.mjs +1 -1
- package/esm2022/src/render3/partial/pipe.mjs +1 -1
- package/esm2022/src/version.mjs +1 -1
- package/fesm2022/compiler.mjs +50 -31
- package/fesm2022/compiler.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -24,7 +24,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
|
|
|
24
24
|
export function compileDeclareClassMetadata(metadata) {
|
|
25
25
|
const definitionMap = new DefinitionMap();
|
|
26
26
|
definitionMap.set('minVersion', o.literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
27
|
-
definitionMap.set('version', o.literal('18.2.0-next.
|
|
27
|
+
definitionMap.set('version', o.literal('18.2.0-next.1'));
|
|
28
28
|
definitionMap.set('ngImport', o.importExpr(R3.core));
|
|
29
29
|
definitionMap.set('type', metadata.type);
|
|
30
30
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -42,7 +42,7 @@ export function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
42
42
|
callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? o.literal(null));
|
|
43
43
|
callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? o.literal(null));
|
|
44
44
|
definitionMap.set('minVersion', o.literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
45
|
-
definitionMap.set('version', o.literal('18.2.0-next.
|
|
45
|
+
definitionMap.set('version', o.literal('18.2.0-next.1'));
|
|
46
46
|
definitionMap.set('ngImport', o.importExpr(R3.core));
|
|
47
47
|
definitionMap.set('type', metadata.type);
|
|
48
48
|
definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -28,7 +28,7 @@ export function createDirectiveDefinitionMap(meta) {
|
|
|
28
28
|
const definitionMap = new DefinitionMap();
|
|
29
29
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
30
30
|
definitionMap.set('minVersion', o.literal(minVersion));
|
|
31
|
-
definitionMap.set('version', o.literal('18.2.0-next.
|
|
31
|
+
definitionMap.set('version', o.literal('18.2.0-next.1'));
|
|
32
32
|
// e.g. `type: MyDirective`
|
|
33
33
|
definitionMap.set('type', meta.type.value);
|
|
34
34
|
if (meta.isStandalone) {
|
|
@@ -21,7 +21,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION = '12.0.0';
|
|
|
21
21
|
export function compileDeclareFactoryFunction(meta) {
|
|
22
22
|
const definitionMap = new DefinitionMap();
|
|
23
23
|
definitionMap.set('minVersion', o.literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
24
|
-
definitionMap.set('version', o.literal('18.2.0-next.
|
|
24
|
+
definitionMap.set('version', o.literal('18.2.0-next.1'));
|
|
25
25
|
definitionMap.set('ngImport', o.importExpr(R3.core));
|
|
26
26
|
definitionMap.set('type', meta.type.value);
|
|
27
27
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -34,7 +34,7 @@ export function compileDeclareInjectableFromMetadata(meta) {
|
|
|
34
34
|
export function createInjectableDefinitionMap(meta) {
|
|
35
35
|
const definitionMap = new DefinitionMap();
|
|
36
36
|
definitionMap.set('minVersion', o.literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
37
|
-
definitionMap.set('version', o.literal('18.2.0-next.
|
|
37
|
+
definitionMap.set('version', o.literal('18.2.0-next.1'));
|
|
38
38
|
definitionMap.set('ngImport', o.importExpr(R3.core));
|
|
39
39
|
definitionMap.set('type', meta.type.value);
|
|
40
40
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -29,7 +29,7 @@ export function compileDeclareInjectorFromMetadata(meta) {
|
|
|
29
29
|
function createInjectorDefinitionMap(meta) {
|
|
30
30
|
const definitionMap = new DefinitionMap();
|
|
31
31
|
definitionMap.set('minVersion', o.literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
32
|
-
definitionMap.set('version', o.literal('18.2.0-next.
|
|
32
|
+
definitionMap.set('version', o.literal('18.2.0-next.1'));
|
|
33
33
|
definitionMap.set('ngImport', o.importExpr(R3.core));
|
|
34
34
|
definitionMap.set('type', meta.type.value);
|
|
35
35
|
definitionMap.set('providers', meta.providers);
|
|
@@ -33,7 +33,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
33
33
|
throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
|
|
34
34
|
}
|
|
35
35
|
definitionMap.set('minVersion', o.literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
36
|
-
definitionMap.set('version', o.literal('18.2.0-next.
|
|
36
|
+
definitionMap.set('version', o.literal('18.2.0-next.1'));
|
|
37
37
|
definitionMap.set('ngImport', o.importExpr(R3.core));
|
|
38
38
|
definitionMap.set('type', meta.type.value);
|
|
39
39
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -32,7 +32,7 @@ export function compileDeclarePipeFromMetadata(meta) {
|
|
|
32
32
|
export function createPipeDefinitionMap(meta) {
|
|
33
33
|
const definitionMap = new DefinitionMap();
|
|
34
34
|
definitionMap.set('minVersion', o.literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
35
|
-
definitionMap.set('version', o.literal('18.2.0-next.
|
|
35
|
+
definitionMap.set('version', o.literal('18.2.0-next.1'));
|
|
36
36
|
definitionMap.set('ngImport', o.importExpr(R3.core));
|
|
37
37
|
// e.g. `type: MyPipe`
|
|
38
38
|
definitionMap.set('type', meta.type.value);
|
package/esm2022/src/version.mjs
CHANGED
|
@@ -11,5 +11,5 @@
|
|
|
11
11
|
* Entry point for all public APIs of the compiler package.
|
|
12
12
|
*/
|
|
13
13
|
import { Version } from './util';
|
|
14
|
-
export const VERSION = new Version('18.2.0-next.
|
|
14
|
+
export const VERSION = new Version('18.2.0-next.1');
|
|
15
15
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvbXBpbGVyL3NyYy92ZXJzaW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRztBQUVIOzs7O0dBSUc7QUFFSCxPQUFPLEVBQUMsT0FBTyxFQUFDLE1BQU0sUUFBUSxDQUFDO0FBRS9CLE1BQU0sQ0FBQyxNQUFNLE9BQU8sR0FBRyxJQUFJLE9BQU8sQ0FBQyxtQkFBbUIsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbGljZW5zZVxuICogQ29weXJpZ2h0IEdvb2dsZSBMTEMgQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZVxuICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2FuZ3VsYXIuaW8vbGljZW5zZVxuICovXG5cbi8qKlxuICogQG1vZHVsZVxuICogQGRlc2NyaXB0aW9uXG4gKiBFbnRyeSBwb2ludCBmb3IgYWxsIHB1YmxpYyBBUElzIG9mIHRoZSBjb21waWxlciBwYWNrYWdlLlxuICovXG5cbmltcG9ydCB7VmVyc2lvbn0gZnJvbSAnLi91dGlsJztcblxuZXhwb3J0IGNvbnN0IFZFUlNJT04gPSBuZXcgVmVyc2lvbignMC4wLjAtUExBQ0VIT0xERVInKTtcbiJdfQ==
|
package/fesm2022/compiler.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v18.2.0-next.
|
|
2
|
+
* @license Angular v18.2.0-next.1
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -18012,7 +18012,7 @@ class _Tokenizer {
|
|
|
18012
18012
|
let allowDigit = false;
|
|
18013
18013
|
this._attemptCharCodeUntilFn((code) => {
|
|
18014
18014
|
if (isAsciiLetter(code) ||
|
|
18015
|
-
code
|
|
18015
|
+
code === $$ ||
|
|
18016
18016
|
code === $_ ||
|
|
18017
18017
|
// `@let` names can't start with a digit, but digits are valid anywhere else in the name.
|
|
18018
18018
|
(allowDigit && isDigit(code))) {
|
|
@@ -29128,6 +29128,25 @@ function convertDirectiveFacadeToMetadata(facade) {
|
|
|
29128
29128
|
});
|
|
29129
29129
|
}
|
|
29130
29130
|
}
|
|
29131
|
+
const hostDirectives = facade.hostDirectives?.length
|
|
29132
|
+
? facade.hostDirectives.map((hostDirective) => {
|
|
29133
|
+
return typeof hostDirective === 'function'
|
|
29134
|
+
? {
|
|
29135
|
+
directive: wrapReference(hostDirective),
|
|
29136
|
+
inputs: null,
|
|
29137
|
+
outputs: null,
|
|
29138
|
+
isForwardReference: false,
|
|
29139
|
+
}
|
|
29140
|
+
: {
|
|
29141
|
+
directive: wrapReference(hostDirective.directive),
|
|
29142
|
+
isForwardReference: false,
|
|
29143
|
+
inputs: hostDirective.inputs ? parseMappingStringArray(hostDirective.inputs) : null,
|
|
29144
|
+
outputs: hostDirective.outputs
|
|
29145
|
+
? parseMappingStringArray(hostDirective.outputs)
|
|
29146
|
+
: null,
|
|
29147
|
+
};
|
|
29148
|
+
})
|
|
29149
|
+
: null;
|
|
29131
29150
|
return {
|
|
29132
29151
|
...facade,
|
|
29133
29152
|
typeArgumentCount: 0,
|
|
@@ -29143,10 +29162,18 @@ function convertDirectiveFacadeToMetadata(facade) {
|
|
|
29143
29162
|
providers: facade.providers != null ? new WrappedNodeExpr(facade.providers) : null,
|
|
29144
29163
|
viewQueries: facade.viewQueries.map(convertToR3QueryMetadata),
|
|
29145
29164
|
fullInheritance: false,
|
|
29146
|
-
hostDirectives
|
|
29165
|
+
hostDirectives,
|
|
29147
29166
|
};
|
|
29148
29167
|
}
|
|
29149
29168
|
function convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan) {
|
|
29169
|
+
const hostDirectives = declaration.hostDirectives?.length
|
|
29170
|
+
? declaration.hostDirectives.map((dir) => ({
|
|
29171
|
+
directive: wrapReference(dir.directive),
|
|
29172
|
+
isForwardReference: false,
|
|
29173
|
+
inputs: dir.inputs ? getHostDirectiveBindingMapping(dir.inputs) : null,
|
|
29174
|
+
outputs: dir.outputs ? getHostDirectiveBindingMapping(dir.outputs) : null,
|
|
29175
|
+
}))
|
|
29176
|
+
: null;
|
|
29150
29177
|
return {
|
|
29151
29178
|
name: declaration.type.name,
|
|
29152
29179
|
type: wrapReference(declaration.type),
|
|
@@ -29166,7 +29193,7 @@ function convertDeclareDirectiveFacadeToMetadata(declaration, typeSourceSpan) {
|
|
|
29166
29193
|
fullInheritance: false,
|
|
29167
29194
|
isStandalone: declaration.isStandalone ?? false,
|
|
29168
29195
|
isSignal: declaration.isSignal ?? false,
|
|
29169
|
-
hostDirectives
|
|
29196
|
+
hostDirectives,
|
|
29170
29197
|
};
|
|
29171
29198
|
}
|
|
29172
29199
|
function convertHostDeclarationToMetadata(host = {}) {
|
|
@@ -29180,25 +29207,17 @@ function convertHostDeclarationToMetadata(host = {}) {
|
|
|
29180
29207
|
},
|
|
29181
29208
|
};
|
|
29182
29209
|
}
|
|
29183
|
-
|
|
29184
|
-
|
|
29185
|
-
|
|
29186
|
-
|
|
29187
|
-
|
|
29188
|
-
|
|
29189
|
-
|
|
29190
|
-
|
|
29191
|
-
|
|
29192
|
-
}
|
|
29193
|
-
: {
|
|
29194
|
-
directive: wrapReference(hostDirective.directive),
|
|
29195
|
-
isForwardReference: false,
|
|
29196
|
-
inputs: hostDirective.inputs ? parseMappingStringArray(hostDirective.inputs) : null,
|
|
29197
|
-
outputs: hostDirective.outputs ? parseMappingStringArray(hostDirective.outputs) : null,
|
|
29198
|
-
};
|
|
29199
|
-
});
|
|
29210
|
+
/**
|
|
29211
|
+
* Parses a host directive mapping where each odd array key is the name of an input/output
|
|
29212
|
+
* and each even key is its public name, e.g. `['one', 'oneAlias', 'two', 'two']`.
|
|
29213
|
+
*/
|
|
29214
|
+
function getHostDirectiveBindingMapping(array) {
|
|
29215
|
+
let result = null;
|
|
29216
|
+
for (let i = 1; i < array.length; i += 2) {
|
|
29217
|
+
result = result || {};
|
|
29218
|
+
result[array[i - 1]] = array[i];
|
|
29200
29219
|
}
|
|
29201
|
-
return
|
|
29220
|
+
return result;
|
|
29202
29221
|
}
|
|
29203
29222
|
function convertOpaqueValuesToExpressions(obj) {
|
|
29204
29223
|
const result = {};
|
|
@@ -29521,7 +29540,7 @@ function publishFacade(global) {
|
|
|
29521
29540
|
* @description
|
|
29522
29541
|
* Entry point for all public APIs of the compiler package.
|
|
29523
29542
|
*/
|
|
29524
|
-
const VERSION = new Version('18.2.0-next.
|
|
29543
|
+
const VERSION = new Version('18.2.0-next.1');
|
|
29525
29544
|
|
|
29526
29545
|
class CompilerConfig {
|
|
29527
29546
|
constructor({ defaultEncapsulation = ViewEncapsulation.Emulated, preserveWhitespaces, strictInjectionParameters, } = {}) {
|
|
@@ -31159,7 +31178,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
|
|
|
31159
31178
|
function compileDeclareClassMetadata(metadata) {
|
|
31160
31179
|
const definitionMap = new DefinitionMap();
|
|
31161
31180
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
31162
|
-
definitionMap.set('version', literal('18.2.0-next.
|
|
31181
|
+
definitionMap.set('version', literal('18.2.0-next.1'));
|
|
31163
31182
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
31164
31183
|
definitionMap.set('type', metadata.type);
|
|
31165
31184
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -31177,7 +31196,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
31177
31196
|
callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));
|
|
31178
31197
|
callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));
|
|
31179
31198
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
31180
|
-
definitionMap.set('version', literal('18.2.0-next.
|
|
31199
|
+
definitionMap.set('version', literal('18.2.0-next.1'));
|
|
31181
31200
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
31182
31201
|
definitionMap.set('type', metadata.type);
|
|
31183
31202
|
definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -31272,7 +31291,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
31272
31291
|
const definitionMap = new DefinitionMap();
|
|
31273
31292
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
31274
31293
|
definitionMap.set('minVersion', literal(minVersion));
|
|
31275
|
-
definitionMap.set('version', literal('18.2.0-next.
|
|
31294
|
+
definitionMap.set('version', literal('18.2.0-next.1'));
|
|
31276
31295
|
// e.g. `type: MyDirective`
|
|
31277
31296
|
definitionMap.set('type', meta.type.value);
|
|
31278
31297
|
if (meta.isStandalone) {
|
|
@@ -31694,7 +31713,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
31694
31713
|
function compileDeclareFactoryFunction(meta) {
|
|
31695
31714
|
const definitionMap = new DefinitionMap();
|
|
31696
31715
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
31697
|
-
definitionMap.set('version', literal('18.2.0-next.
|
|
31716
|
+
definitionMap.set('version', literal('18.2.0-next.1'));
|
|
31698
31717
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
31699
31718
|
definitionMap.set('type', meta.type.value);
|
|
31700
31719
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -31729,7 +31748,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
31729
31748
|
function createInjectableDefinitionMap(meta) {
|
|
31730
31749
|
const definitionMap = new DefinitionMap();
|
|
31731
31750
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
31732
|
-
definitionMap.set('version', literal('18.2.0-next.
|
|
31751
|
+
definitionMap.set('version', literal('18.2.0-next.1'));
|
|
31733
31752
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
31734
31753
|
definitionMap.set('type', meta.type.value);
|
|
31735
31754
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -31780,7 +31799,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
31780
31799
|
function createInjectorDefinitionMap(meta) {
|
|
31781
31800
|
const definitionMap = new DefinitionMap();
|
|
31782
31801
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
31783
|
-
definitionMap.set('version', literal('18.2.0-next.
|
|
31802
|
+
definitionMap.set('version', literal('18.2.0-next.1'));
|
|
31784
31803
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
31785
31804
|
definitionMap.set('type', meta.type.value);
|
|
31786
31805
|
definitionMap.set('providers', meta.providers);
|
|
@@ -31813,7 +31832,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
31813
31832
|
throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
|
|
31814
31833
|
}
|
|
31815
31834
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
31816
|
-
definitionMap.set('version', literal('18.2.0-next.
|
|
31835
|
+
definitionMap.set('version', literal('18.2.0-next.1'));
|
|
31817
31836
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
31818
31837
|
definitionMap.set('type', meta.type.value);
|
|
31819
31838
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -31864,7 +31883,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
31864
31883
|
function createPipeDefinitionMap(meta) {
|
|
31865
31884
|
const definitionMap = new DefinitionMap();
|
|
31866
31885
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
31867
|
-
definitionMap.set('version', literal('18.2.0-next.
|
|
31886
|
+
definitionMap.set('version', literal('18.2.0-next.1'));
|
|
31868
31887
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
31869
31888
|
// e.g. `type: MyPipe`
|
|
31870
31889
|
definitionMap.set('type', meta.type.value);
|