@angular/language-service 10.2.0 → 10.2.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/bundles/ivy.js +23 -10
- package/bundles/language-service.js +64 -50
- package/package.json +1 -1
package/bundles/ivy.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v10.2.
|
|
2
|
+
* @license Angular v10.2.1
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -14229,10 +14229,13 @@ define(['exports', 'os', 'typescript', 'fs', 'constants', 'stream', 'util', 'ass
|
|
|
14229
14229
|
return;
|
|
14230
14230
|
this.error(`Missing expected operator ${operator}`);
|
|
14231
14231
|
}
|
|
14232
|
+
prettyPrintToken(tok) {
|
|
14233
|
+
return tok === EOF ? 'end of input' : `token ${tok}`;
|
|
14234
|
+
}
|
|
14232
14235
|
expectIdentifierOrKeyword() {
|
|
14233
14236
|
const n = this.next;
|
|
14234
14237
|
if (!n.isIdentifier() && !n.isKeyword()) {
|
|
14235
|
-
this.error(`Unexpected
|
|
14238
|
+
this.error(`Unexpected ${this.prettyPrintToken(n)}, expected identifier or keyword`);
|
|
14236
14239
|
return '';
|
|
14237
14240
|
}
|
|
14238
14241
|
this.advance();
|
|
@@ -14241,7 +14244,7 @@ define(['exports', 'os', 'typescript', 'fs', 'constants', 'stream', 'util', 'ass
|
|
|
14241
14244
|
expectIdentifierOrKeywordOrString() {
|
|
14242
14245
|
const n = this.next;
|
|
14243
14246
|
if (!n.isIdentifier() && !n.isKeyword() && !n.isString()) {
|
|
14244
|
-
this.error(`Unexpected
|
|
14247
|
+
this.error(`Unexpected ${this.prettyPrintToken(n)}, expected identifier, keyword, or string`);
|
|
14245
14248
|
return '';
|
|
14246
14249
|
}
|
|
14247
14250
|
this.advance();
|
|
@@ -19163,7 +19166,7 @@ define(['exports', 'os', 'typescript', 'fs', 'constants', 'stream', 'util', 'ass
|
|
|
19163
19166
|
* Use of this source code is governed by an MIT-style license that can be
|
|
19164
19167
|
* found in the LICENSE file at https://angular.io/license
|
|
19165
19168
|
*/
|
|
19166
|
-
const VERSION$1 = new Version('10.2.
|
|
19169
|
+
const VERSION$1 = new Version('10.2.1');
|
|
19167
19170
|
|
|
19168
19171
|
/**
|
|
19169
19172
|
* @license
|
|
@@ -19756,7 +19759,7 @@ define(['exports', 'os', 'typescript', 'fs', 'constants', 'stream', 'util', 'ass
|
|
|
19756
19759
|
* Use of this source code is governed by an MIT-style license that can be
|
|
19757
19760
|
* found in the LICENSE file at https://angular.io/license
|
|
19758
19761
|
*/
|
|
19759
|
-
const VERSION$2 = new Version('10.2.
|
|
19762
|
+
const VERSION$2 = new Version('10.2.1');
|
|
19760
19763
|
|
|
19761
19764
|
/**
|
|
19762
19765
|
* @license
|
|
@@ -20175,12 +20178,20 @@ define(['exports', 'os', 'typescript', 'fs', 'constants', 'stream', 'util', 'ass
|
|
|
20175
20178
|
*/
|
|
20176
20179
|
class LocalIdentifierStrategy {
|
|
20177
20180
|
emit(ref, context, importFlags) {
|
|
20181
|
+
const refSf = getSourceFile(ref.node);
|
|
20178
20182
|
// If the emitter has specified ForceNewImport, then LocalIdentifierStrategy should not use a
|
|
20179
20183
|
// local identifier at all, *except* in the source file where the node is actually declared.
|
|
20180
|
-
if (importFlags & ImportFlags.ForceNewImport &&
|
|
20181
|
-
getSourceFile(ref.node) !== getSourceFile(context)) {
|
|
20184
|
+
if (importFlags & ImportFlags.ForceNewImport && refSf !== context) {
|
|
20182
20185
|
return null;
|
|
20183
20186
|
}
|
|
20187
|
+
// If referenced node is not an actual TS declaration (e.g. `class Foo` or `function foo() {}`,
|
|
20188
|
+
// etc) and it is in the current file then just use it directly.
|
|
20189
|
+
// This is important because the reference could be a property access (e.g. `exports.foo`). In
|
|
20190
|
+
// such a case, the reference's `identities` property would be `[foo]`, which would result in an
|
|
20191
|
+
// invalid emission of a free-standing `foo` identifier, rather than `exports.foo`.
|
|
20192
|
+
if (!isDeclaration(ref.node) && refSf === context) {
|
|
20193
|
+
return new WrappedNodeExpr(ref.node);
|
|
20194
|
+
}
|
|
20184
20195
|
// A Reference can have multiple identities in different files, so it may already have an
|
|
20185
20196
|
// Identifier in the requested context file.
|
|
20186
20197
|
const identifier = ref.getIdentityIn(context);
|
|
@@ -23061,10 +23072,12 @@ define(['exports', 'os', 'typescript', 'fs', 'constants', 'stream', 'util', 'ass
|
|
|
23061
23072
|
});
|
|
23062
23073
|
}
|
|
23063
23074
|
visitAmbiguousDeclaration(decl, declContext) {
|
|
23064
|
-
return decl.kind === 1 /* Inline */ && decl.implementation !== undefined
|
|
23065
|
-
|
|
23075
|
+
return decl.kind === 1 /* Inline */ && decl.implementation !== undefined &&
|
|
23076
|
+
!isDeclaration(decl.implementation) ?
|
|
23077
|
+
// Inline declarations whose `implementation` is a `ts.Expression` should be visited as
|
|
23078
|
+
// an expression.
|
|
23066
23079
|
this.visitExpression(decl.implementation, declContext) :
|
|
23067
|
-
// Otherwise just visit the
|
|
23080
|
+
// Otherwise just visit the `node` as a declaration.
|
|
23068
23081
|
this.visitDeclaration(decl.node, declContext);
|
|
23069
23082
|
}
|
|
23070
23083
|
accessHelper(node, lhs, rhs, context) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v10.2.
|
|
2
|
+
* @license Angular v10.2.1
|
|
3
3
|
* Copyright Google LLC All Rights Reserved.
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -13026,10 +13026,13 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
|
|
|
13026
13026
|
return;
|
|
13027
13027
|
this.error(`Missing expected operator ${operator}`);
|
|
13028
13028
|
}
|
|
13029
|
+
prettyPrintToken(tok) {
|
|
13030
|
+
return tok === EOF ? 'end of input' : `token ${tok}`;
|
|
13031
|
+
}
|
|
13029
13032
|
expectIdentifierOrKeyword() {
|
|
13030
13033
|
const n = this.next;
|
|
13031
13034
|
if (!n.isIdentifier() && !n.isKeyword()) {
|
|
13032
|
-
this.error(`Unexpected
|
|
13035
|
+
this.error(`Unexpected ${this.prettyPrintToken(n)}, expected identifier or keyword`);
|
|
13033
13036
|
return '';
|
|
13034
13037
|
}
|
|
13035
13038
|
this.advance();
|
|
@@ -13038,7 +13041,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
|
|
|
13038
13041
|
expectIdentifierOrKeywordOrString() {
|
|
13039
13042
|
const n = this.next;
|
|
13040
13043
|
if (!n.isIdentifier() && !n.isKeyword() && !n.isString()) {
|
|
13041
|
-
this.error(`Unexpected
|
|
13044
|
+
this.error(`Unexpected ${this.prettyPrintToken(n)}, expected identifier, keyword, or string`);
|
|
13042
13045
|
return '';
|
|
13043
13046
|
}
|
|
13044
13047
|
this.advance();
|
|
@@ -17960,7 +17963,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
|
|
|
17960
17963
|
* Use of this source code is governed by an MIT-style license that can be
|
|
17961
17964
|
* found in the LICENSE file at https://angular.io/license
|
|
17962
17965
|
*/
|
|
17963
|
-
const VERSION$1 = new Version('10.2.
|
|
17966
|
+
const VERSION$1 = new Version('10.2.1');
|
|
17964
17967
|
|
|
17965
17968
|
/**
|
|
17966
17969
|
* @license
|
|
@@ -27242,6 +27245,56 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
|
|
|
27242
27245
|
assertNumber(lView[injectorIndex + 8 /* PARENT */], 'injectorIndex should point to parent injector');
|
|
27243
27246
|
}
|
|
27244
27247
|
|
|
27248
|
+
/**
|
|
27249
|
+
* @license
|
|
27250
|
+
* Copyright Google LLC All Rights Reserved.
|
|
27251
|
+
*
|
|
27252
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
27253
|
+
* found in the LICENSE file at https://angular.io/license
|
|
27254
|
+
*/
|
|
27255
|
+
/**
|
|
27256
|
+
* Used for stringify render output in Ivy.
|
|
27257
|
+
* Important! This function is very performance-sensitive and we should
|
|
27258
|
+
* be extra careful not to introduce megamorphic reads in it.
|
|
27259
|
+
*/
|
|
27260
|
+
function renderStringify(value) {
|
|
27261
|
+
if (typeof value === 'string')
|
|
27262
|
+
return value;
|
|
27263
|
+
if (value == null)
|
|
27264
|
+
return '';
|
|
27265
|
+
return '' + value;
|
|
27266
|
+
}
|
|
27267
|
+
/**
|
|
27268
|
+
* Used to stringify a value so that it can be displayed in an error message.
|
|
27269
|
+
* Important! This function contains a megamorphic read and should only be
|
|
27270
|
+
* used for error messages.
|
|
27271
|
+
*/
|
|
27272
|
+
function stringifyForError(value) {
|
|
27273
|
+
if (typeof value === 'function')
|
|
27274
|
+
return value.name || value.toString();
|
|
27275
|
+
if (typeof value === 'object' && value != null && typeof value.type === 'function') {
|
|
27276
|
+
return value.type.name || value.type.toString();
|
|
27277
|
+
}
|
|
27278
|
+
return renderStringify(value);
|
|
27279
|
+
}
|
|
27280
|
+
const ɵ0$2 = () => (typeof requestAnimationFrame !== 'undefined' &&
|
|
27281
|
+
requestAnimationFrame || // browser only
|
|
27282
|
+
setTimeout // everything else
|
|
27283
|
+
)
|
|
27284
|
+
.bind(_global$1);
|
|
27285
|
+
const defaultScheduler = (ɵ0$2)();
|
|
27286
|
+
|
|
27287
|
+
/** Called when directives inject each other (creating a circular dependency) */
|
|
27288
|
+
function throwCyclicDependencyError(token, path) {
|
|
27289
|
+
const depPath = path ? `. Dependency path: ${path.join(' > ')} > ${token}` : '';
|
|
27290
|
+
throw new Error(`Circular dependency in DI detected for ${token}${depPath}`);
|
|
27291
|
+
}
|
|
27292
|
+
/** Throws an error when a token is not found in DI. */
|
|
27293
|
+
function throwProviderNotFoundError(token, injectorName) {
|
|
27294
|
+
const injectorDetails = injectorName ? ` in ${injectorName}` : '';
|
|
27295
|
+
throw new Error(`No provider for ${stringifyForError(token)} found${injectorDetails}`);
|
|
27296
|
+
}
|
|
27297
|
+
|
|
27245
27298
|
/**
|
|
27246
27299
|
* @license
|
|
27247
27300
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -27396,11 +27449,11 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
|
|
|
27396
27449
|
function isProceduralRenderer(renderer) {
|
|
27397
27450
|
return !!(renderer.listen);
|
|
27398
27451
|
}
|
|
27399
|
-
const ɵ0$
|
|
27452
|
+
const ɵ0$3 = (hostElement, rendererType) => {
|
|
27400
27453
|
return getDocument();
|
|
27401
27454
|
};
|
|
27402
27455
|
const domRendererFactory3 = {
|
|
27403
|
-
createRenderer: ɵ0$
|
|
27456
|
+
createRenderer: ɵ0$3
|
|
27404
27457
|
};
|
|
27405
27458
|
|
|
27406
27459
|
/**
|
|
@@ -28227,45 +28280,6 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
|
|
|
28227
28280
|
return parentView;
|
|
28228
28281
|
}
|
|
28229
28282
|
|
|
28230
|
-
/**
|
|
28231
|
-
* @license
|
|
28232
|
-
* Copyright Google LLC All Rights Reserved.
|
|
28233
|
-
*
|
|
28234
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
28235
|
-
* found in the LICENSE file at https://angular.io/license
|
|
28236
|
-
*/
|
|
28237
|
-
/**
|
|
28238
|
-
* Used for stringify render output in Ivy.
|
|
28239
|
-
* Important! This function is very performance-sensitive and we should
|
|
28240
|
-
* be extra careful not to introduce megamorphic reads in it.
|
|
28241
|
-
*/
|
|
28242
|
-
function renderStringify(value) {
|
|
28243
|
-
if (typeof value === 'string')
|
|
28244
|
-
return value;
|
|
28245
|
-
if (value == null)
|
|
28246
|
-
return '';
|
|
28247
|
-
return '' + value;
|
|
28248
|
-
}
|
|
28249
|
-
/**
|
|
28250
|
-
* Used to stringify a value so that it can be displayed in an error message.
|
|
28251
|
-
* Important! This function contains a megamorphic read and should only be
|
|
28252
|
-
* used for error messages.
|
|
28253
|
-
*/
|
|
28254
|
-
function stringifyForError(value) {
|
|
28255
|
-
if (typeof value === 'function')
|
|
28256
|
-
return value.name || value.toString();
|
|
28257
|
-
if (typeof value === 'object' && value != null && typeof value.type === 'function') {
|
|
28258
|
-
return value.type.name || value.type.toString();
|
|
28259
|
-
}
|
|
28260
|
-
return renderStringify(value);
|
|
28261
|
-
}
|
|
28262
|
-
const ɵ0$3 = () => (typeof requestAnimationFrame !== 'undefined' &&
|
|
28263
|
-
requestAnimationFrame || // browser only
|
|
28264
|
-
setTimeout // everything else
|
|
28265
|
-
)
|
|
28266
|
-
.bind(_global$1);
|
|
28267
|
-
const defaultScheduler = (ɵ0$3)();
|
|
28268
|
-
|
|
28269
28283
|
/**
|
|
28270
28284
|
* @license
|
|
28271
28285
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -28515,7 +28529,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
|
|
|
28515
28529
|
try {
|
|
28516
28530
|
const value = bloomHash();
|
|
28517
28531
|
if (value == null && !(flags & InjectFlags.Optional)) {
|
|
28518
|
-
|
|
28532
|
+
throwProviderNotFoundError(token);
|
|
28519
28533
|
}
|
|
28520
28534
|
else {
|
|
28521
28535
|
return value;
|
|
@@ -28614,7 +28628,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
|
|
|
28614
28628
|
return notFoundValue;
|
|
28615
28629
|
}
|
|
28616
28630
|
else {
|
|
28617
|
-
|
|
28631
|
+
throwProviderNotFoundError(token, 'NodeInjector');
|
|
28618
28632
|
}
|
|
28619
28633
|
}
|
|
28620
28634
|
const NOT_FOUND = {};
|
|
@@ -28698,7 +28712,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
|
|
|
28698
28712
|
if (isFactory(value)) {
|
|
28699
28713
|
const factory = value;
|
|
28700
28714
|
if (factory.resolving) {
|
|
28701
|
-
|
|
28715
|
+
throwCyclicDependencyError(stringifyForError(tData[index]));
|
|
28702
28716
|
}
|
|
28703
28717
|
const previousIncludeViewProviders = setIncludeViewProviders(factory.canSeeViewProviders);
|
|
28704
28718
|
factory.resolving = true;
|
|
@@ -34101,7 +34115,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
|
|
|
34101
34115
|
/**
|
|
34102
34116
|
* @publicApi
|
|
34103
34117
|
*/
|
|
34104
|
-
const VERSION$2 = new Version$1('10.2.
|
|
34118
|
+
const VERSION$2 = new Version$1('10.2.1');
|
|
34105
34119
|
|
|
34106
34120
|
/**
|
|
34107
34121
|
* @license
|
|
@@ -38989,7 +39003,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
|
|
|
38989
39003
|
* Use of this source code is governed by an MIT-style license that can be
|
|
38990
39004
|
* found in the LICENSE file at https://angular.io/license
|
|
38991
39005
|
*/
|
|
38992
|
-
if (ngDevMode) {
|
|
39006
|
+
if (typeof ngDevMode !== 'undefined' && ngDevMode) {
|
|
38993
39007
|
// This helper is to give a reasonable error message to people upgrading to v9 that have not yet
|
|
38994
39008
|
// installed `@angular/localize` in their app.
|
|
38995
39009
|
// tslint:disable-next-line: no-toplevel-property-access
|