@angular-eslint/bundled-angular-compiler 14.0.4-alpha.2 → 14.0.4
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/dist/index.js +37 -36
- package/package.json +2 -2
- package/CHANGELOG.md +0 -68
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.1
|
|
2
|
+
* @license Angular v14.2.1
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -14660,42 +14660,42 @@ const SCHEMA = [
|
|
|
14660
14660
|
'time^[HTMLElement]|dateTime',
|
|
14661
14661
|
':svg:cursor^:svg:|',
|
|
14662
14662
|
];
|
|
14663
|
-
const _ATTR_TO_PROP = {
|
|
14663
|
+
const _ATTR_TO_PROP = new Map(Object.entries({
|
|
14664
14664
|
'class': 'className',
|
|
14665
14665
|
'for': 'htmlFor',
|
|
14666
14666
|
'formaction': 'formAction',
|
|
14667
14667
|
'innerHtml': 'innerHTML',
|
|
14668
14668
|
'readonly': 'readOnly',
|
|
14669
14669
|
'tabindex': 'tabIndex',
|
|
14670
|
-
};
|
|
14670
|
+
}));
|
|
14671
14671
|
// Invert _ATTR_TO_PROP.
|
|
14672
|
-
const _PROP_TO_ATTR =
|
|
14673
|
-
inverted
|
|
14672
|
+
const _PROP_TO_ATTR = Array.from(_ATTR_TO_PROP).reduce((inverted, [propertyName, attributeName]) => {
|
|
14673
|
+
inverted.set(propertyName, attributeName);
|
|
14674
14674
|
return inverted;
|
|
14675
|
-
},
|
|
14675
|
+
}, new Map());
|
|
14676
14676
|
class DomElementSchemaRegistry extends ElementSchemaRegistry {
|
|
14677
14677
|
constructor() {
|
|
14678
14678
|
super();
|
|
14679
|
-
this._schema =
|
|
14679
|
+
this._schema = new Map();
|
|
14680
14680
|
// We don't allow binding to events for security reasons. Allowing event bindings would almost
|
|
14681
14681
|
// certainly introduce bad XSS vulnerabilities. Instead, we store events in a separate schema.
|
|
14682
|
-
this._eventSchema =
|
|
14682
|
+
this._eventSchema = new Map;
|
|
14683
14683
|
SCHEMA.forEach(encodedType => {
|
|
14684
|
-
const type =
|
|
14684
|
+
const type = new Map();
|
|
14685
14685
|
const events = new Set();
|
|
14686
14686
|
const [strType, strProperties] = encodedType.split('|');
|
|
14687
14687
|
const properties = strProperties.split(',');
|
|
14688
14688
|
const [typeNames, superName] = strType.split('^');
|
|
14689
14689
|
typeNames.split(',').forEach(tag => {
|
|
14690
|
-
this._schema
|
|
14691
|
-
this._eventSchema
|
|
14690
|
+
this._schema.set(tag.toLowerCase(), type);
|
|
14691
|
+
this._eventSchema.set(tag.toLowerCase(), events);
|
|
14692
14692
|
});
|
|
14693
|
-
const superType = superName && this._schema
|
|
14693
|
+
const superType = superName && this._schema.get(superName.toLowerCase());
|
|
14694
14694
|
if (superType) {
|
|
14695
|
-
|
|
14696
|
-
type
|
|
14697
|
-
}
|
|
14698
|
-
for (const superEvent of this._eventSchema
|
|
14695
|
+
for (const [prop, value] of superType) {
|
|
14696
|
+
type.set(prop, value);
|
|
14697
|
+
}
|
|
14698
|
+
for (const superEvent of this._eventSchema.get(superName.toLowerCase())) {
|
|
14699
14699
|
events.add(superEvent);
|
|
14700
14700
|
}
|
|
14701
14701
|
}
|
|
@@ -14706,16 +14706,16 @@ class DomElementSchemaRegistry extends ElementSchemaRegistry {
|
|
|
14706
14706
|
events.add(property.substring(1));
|
|
14707
14707
|
break;
|
|
14708
14708
|
case '!':
|
|
14709
|
-
type
|
|
14709
|
+
type.set(property.substring(1), BOOLEAN);
|
|
14710
14710
|
break;
|
|
14711
14711
|
case '#':
|
|
14712
|
-
type
|
|
14712
|
+
type.set(property.substring(1), NUMBER);
|
|
14713
14713
|
break;
|
|
14714
14714
|
case '%':
|
|
14715
|
-
type
|
|
14715
|
+
type.set(property.substring(1), OBJECT);
|
|
14716
14716
|
break;
|
|
14717
14717
|
default:
|
|
14718
|
-
type
|
|
14718
|
+
type.set(property, STRING);
|
|
14719
14719
|
}
|
|
14720
14720
|
}
|
|
14721
14721
|
});
|
|
@@ -14735,8 +14735,8 @@ class DomElementSchemaRegistry extends ElementSchemaRegistry {
|
|
|
14735
14735
|
return true;
|
|
14736
14736
|
}
|
|
14737
14737
|
}
|
|
14738
|
-
const elementProperties = this._schema
|
|
14739
|
-
return
|
|
14738
|
+
const elementProperties = this._schema.get(tagName.toLowerCase()) || this._schema.get('unknown');
|
|
14739
|
+
return elementProperties.has(propName);
|
|
14740
14740
|
}
|
|
14741
14741
|
hasElement(tagName, schemaMetas) {
|
|
14742
14742
|
if (schemaMetas.some((schema) => schema.name === NO_ERRORS_SCHEMA.name)) {
|
|
@@ -14751,7 +14751,7 @@ class DomElementSchemaRegistry extends ElementSchemaRegistry {
|
|
|
14751
14751
|
return true;
|
|
14752
14752
|
}
|
|
14753
14753
|
}
|
|
14754
|
-
return
|
|
14754
|
+
return this._schema.has(tagName.toLowerCase());
|
|
14755
14755
|
}
|
|
14756
14756
|
/**
|
|
14757
14757
|
* securityContext returns the security context for the given property on the given DOM tag.
|
|
@@ -14780,7 +14780,8 @@ class DomElementSchemaRegistry extends ElementSchemaRegistry {
|
|
|
14780
14780
|
return ctx ? ctx : SecurityContext.NONE;
|
|
14781
14781
|
}
|
|
14782
14782
|
getMappedPropName(propName) {
|
|
14783
|
-
|
|
14783
|
+
var _a;
|
|
14784
|
+
return (_a = _ATTR_TO_PROP.get(propName)) !== null && _a !== void 0 ? _a : propName;
|
|
14784
14785
|
}
|
|
14785
14786
|
getDefaultComponentElementName() {
|
|
14786
14787
|
return 'ng-component';
|
|
@@ -14808,16 +14809,16 @@ class DomElementSchemaRegistry extends ElementSchemaRegistry {
|
|
|
14808
14809
|
}
|
|
14809
14810
|
}
|
|
14810
14811
|
allKnownElementNames() {
|
|
14811
|
-
return
|
|
14812
|
+
return Array.from(this._schema.keys());
|
|
14812
14813
|
}
|
|
14813
14814
|
allKnownAttributesOfElement(tagName) {
|
|
14814
|
-
const elementProperties = this._schema
|
|
14815
|
+
const elementProperties = this._schema.get(tagName.toLowerCase()) || this._schema.get('unknown');
|
|
14815
14816
|
// Convert properties to attributes.
|
|
14816
|
-
return
|
|
14817
|
+
return Array.from(elementProperties.keys()).map(prop => { var _a; return (_a = _PROP_TO_ATTR.get(prop)) !== null && _a !== void 0 ? _a : prop; });
|
|
14817
14818
|
}
|
|
14818
14819
|
allKnownEventsOfElement(tagName) {
|
|
14819
14820
|
var _a;
|
|
14820
|
-
return Array.from((_a = this._eventSchema
|
|
14821
|
+
return Array.from((_a = this._eventSchema.get(tagName.toLowerCase())) !== null && _a !== void 0 ? _a : []);
|
|
14821
14822
|
}
|
|
14822
14823
|
normalizeAnimationStyleProperty(propName) {
|
|
14823
14824
|
return dashCaseToCamelCase(propName);
|
|
@@ -19731,7 +19732,7 @@ function publishFacade(global) {
|
|
|
19731
19732
|
* Use of this source code is governed by an MIT-style license that can be
|
|
19732
19733
|
* found in the LICENSE file at https://angular.io/license
|
|
19733
19734
|
*/
|
|
19734
|
-
const VERSION = new Version('14.1
|
|
19735
|
+
const VERSION = new Version('14.2.1');
|
|
19735
19736
|
|
|
19736
19737
|
/**
|
|
19737
19738
|
* @license
|
|
@@ -21758,7 +21759,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$6 = '12.0.0';
|
|
|
21758
21759
|
function compileDeclareClassMetadata(metadata) {
|
|
21759
21760
|
const definitionMap = new DefinitionMap();
|
|
21760
21761
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$6));
|
|
21761
|
-
definitionMap.set('version', literal('14.1
|
|
21762
|
+
definitionMap.set('version', literal('14.2.1'));
|
|
21762
21763
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
21763
21764
|
definitionMap.set('type', metadata.type);
|
|
21764
21765
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -21875,7 +21876,7 @@ function compileDeclareDirectiveFromMetadata(meta) {
|
|
|
21875
21876
|
function createDirectiveDefinitionMap(meta) {
|
|
21876
21877
|
const definitionMap = new DefinitionMap();
|
|
21877
21878
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
21878
|
-
definitionMap.set('version', literal('14.1
|
|
21879
|
+
definitionMap.set('version', literal('14.2.1'));
|
|
21879
21880
|
// e.g. `type: MyDirective`
|
|
21880
21881
|
definitionMap.set('type', meta.internalType);
|
|
21881
21882
|
if (meta.isStandalone) {
|
|
@@ -22086,7 +22087,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
22086
22087
|
function compileDeclareFactoryFunction(meta) {
|
|
22087
22088
|
const definitionMap = new DefinitionMap();
|
|
22088
22089
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
22089
|
-
definitionMap.set('version', literal('14.1
|
|
22090
|
+
definitionMap.set('version', literal('14.2.1'));
|
|
22090
22091
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22091
22092
|
definitionMap.set('type', meta.internalType);
|
|
22092
22093
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -22128,7 +22129,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
22128
22129
|
function createInjectableDefinitionMap(meta) {
|
|
22129
22130
|
const definitionMap = new DefinitionMap();
|
|
22130
22131
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
22131
|
-
definitionMap.set('version', literal('14.1
|
|
22132
|
+
definitionMap.set('version', literal('14.2.1'));
|
|
22132
22133
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22133
22134
|
definitionMap.set('type', meta.internalType);
|
|
22134
22135
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -22186,7 +22187,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
22186
22187
|
function createInjectorDefinitionMap(meta) {
|
|
22187
22188
|
const definitionMap = new DefinitionMap();
|
|
22188
22189
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
22189
|
-
definitionMap.set('version', literal('14.1
|
|
22190
|
+
definitionMap.set('version', literal('14.2.1'));
|
|
22190
22191
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22191
22192
|
definitionMap.set('type', meta.internalType);
|
|
22192
22193
|
definitionMap.set('providers', meta.providers);
|
|
@@ -22223,7 +22224,7 @@ function compileDeclareNgModuleFromMetadata(meta) {
|
|
|
22223
22224
|
function createNgModuleDefinitionMap(meta) {
|
|
22224
22225
|
const definitionMap = new DefinitionMap();
|
|
22225
22226
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
22226
|
-
definitionMap.set('version', literal('14.1
|
|
22227
|
+
definitionMap.set('version', literal('14.2.1'));
|
|
22227
22228
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22228
22229
|
definitionMap.set('type', meta.internalType);
|
|
22229
22230
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -22281,7 +22282,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
22281
22282
|
function createPipeDefinitionMap(meta) {
|
|
22282
22283
|
const definitionMap = new DefinitionMap();
|
|
22283
22284
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
22284
|
-
definitionMap.set('version', literal('14.1
|
|
22285
|
+
definitionMap.set('version', literal('14.2.1'));
|
|
22285
22286
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
22286
22287
|
// e.g. `type: MyPipe`
|
|
22287
22288
|
definitionMap.set('type', meta.internalType);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/bundled-angular-compiler",
|
|
3
|
-
"version": "14.0.4
|
|
3
|
+
"version": "14.0.4",
|
|
4
4
|
"description": "A CJS bundled version of @angular/compiler",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
"package.json",
|
|
16
16
|
"README.md"
|
|
17
17
|
],
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "95a06756d2118ae548798f56d3f759bf157b4933"
|
|
19
19
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
## [14.0.3](https://github.com/angular-eslint/angular-eslint/compare/v14.0.2...v14.0.3) (2022-08-23)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @angular-eslint/bundled-angular-compiler
|
|
9
|
-
|
|
10
|
-
## [14.0.2](https://github.com/angular-eslint/angular-eslint/compare/v14.0.1...v14.0.2) (2022-07-09)
|
|
11
|
-
|
|
12
|
-
**Note:** Version bump only for package @angular-eslint/bundled-angular-compiler
|
|
13
|
-
|
|
14
|
-
## [14.0.1](https://github.com/angular-eslint/angular-eslint/compare/v14.0.0...v14.0.1) (2022-07-08)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @angular-eslint/bundled-angular-compiler
|
|
17
|
-
|
|
18
|
-
# [14.0.0](https://github.com/angular-eslint/angular-eslint/compare/v13.5.0...v14.0.0) (2022-06-23)
|
|
19
|
-
|
|
20
|
-
**Note:** Version bump only for package @angular-eslint/bundled-angular-compiler
|
|
21
|
-
|
|
22
|
-
# [13.5.0](https://github.com/angular-eslint/angular-eslint/compare/v13.4.0...v13.5.0) (2022-06-12)
|
|
23
|
-
|
|
24
|
-
**Note:** Version bump only for package @angular-eslint/bundled-angular-compiler
|
|
25
|
-
|
|
26
|
-
# [13.4.0](https://github.com/angular-eslint/angular-eslint/compare/v13.3.0...v13.4.0) (2022-06-11)
|
|
27
|
-
|
|
28
|
-
**Note:** Version bump only for package @angular-eslint/bundled-angular-compiler
|
|
29
|
-
|
|
30
|
-
# [13.3.0](https://github.com/angular-eslint/angular-eslint/compare/v13.2.1...v13.3.0) (2022-06-10)
|
|
31
|
-
|
|
32
|
-
**Note:** Version bump only for package @angular-eslint/bundled-angular-compiler
|
|
33
|
-
|
|
34
|
-
## [13.2.1](https://github.com/angular-eslint/angular-eslint/compare/v13.2.0...v13.2.1) (2022-04-14)
|
|
35
|
-
|
|
36
|
-
**Note:** Version bump only for package @angular-eslint/bundled-angular-compiler
|
|
37
|
-
|
|
38
|
-
# [13.2.0](https://github.com/angular-eslint/angular-eslint/compare/v13.1.0...v13.2.0) (2022-04-03)
|
|
39
|
-
|
|
40
|
-
**Note:** Version bump only for package @angular-eslint/bundled-angular-compiler
|
|
41
|
-
|
|
42
|
-
# [13.1.0](https://github.com/angular-eslint/angular-eslint/compare/v13.0.1...v13.1.0) (2022-02-13)
|
|
43
|
-
|
|
44
|
-
**Note:** Version bump only for package @angular-eslint/bundled-angular-compiler
|
|
45
|
-
|
|
46
|
-
## [13.0.1](https://github.com/angular-eslint/angular-eslint/compare/v13.0.0...v13.0.1) (2021-11-19)
|
|
47
|
-
|
|
48
|
-
**Note:** Version bump only for package @angular-eslint/bundled-angular-compiler
|
|
49
|
-
|
|
50
|
-
# [13.0.0](https://github.com/angular-eslint/angular-eslint/compare/v12.7.0...v13.0.0) (2021-11-18)
|
|
51
|
-
|
|
52
|
-
### Features
|
|
53
|
-
|
|
54
|
-
- angular-eslint v13 ([#780](https://github.com/angular-eslint/angular-eslint/issues/780)) ([f7ce631](https://github.com/angular-eslint/angular-eslint/commit/f7ce631524dd7834a422a5ac93a4c0534f9f23fa))
|
|
55
|
-
|
|
56
|
-
# [12.7.0](https://github.com/angular-eslint/angular-eslint/compare/v12.6.1...v12.7.0) (2021-11-18)
|
|
57
|
-
|
|
58
|
-
**Note:** Version bump only for package @angular-eslint/bundled-angular-compiler
|
|
59
|
-
|
|
60
|
-
## [12.6.1](https://github.com/angular-eslint/angular-eslint/compare/v12.6.0...v12.6.1) (2021-10-26)
|
|
61
|
-
|
|
62
|
-
**Note:** Version bump only for package @angular-eslint/bundled-angular-compiler
|
|
63
|
-
|
|
64
|
-
# [12.6.0](https://github.com/angular-eslint/angular-eslint/compare/v12.5.0...v12.6.0) (2021-10-25)
|
|
65
|
-
|
|
66
|
-
### Features
|
|
67
|
-
|
|
68
|
-
- **bundled-angular-compiler:** create own bundle for `@angular/compiler` ([#720](https://github.com/angular-eslint/angular-eslint/issues/720)) ([0c42299](https://github.com/angular-eslint/angular-eslint/commit/0c422993496bb2670fbd31f55a5fe829704f5112))
|