@angular/language-service 10.1.6 → 10.2.0

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v10.1.6
2
+ * @license Angular v10.2.0
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  * License: MIT
5
5
  */
@@ -19163,7 +19163,7 @@ define(['exports', 'os', 'typescript', 'fs', 'constants', 'stream', 'util', 'ass
19163
19163
  * Use of this source code is governed by an MIT-style license that can be
19164
19164
  * found in the LICENSE file at https://angular.io/license
19165
19165
  */
19166
- const VERSION$1 = new Version('10.1.6');
19166
+ const VERSION$1 = new Version('10.2.0');
19167
19167
 
19168
19168
  /**
19169
19169
  * @license
@@ -19756,7 +19756,7 @@ define(['exports', 'os', 'typescript', 'fs', 'constants', 'stream', 'util', 'ass
19756
19756
  * Use of this source code is governed by an MIT-style license that can be
19757
19757
  * found in the LICENSE file at https://angular.io/license
19758
19758
  */
19759
- const VERSION$2 = new Version('10.1.6');
19759
+ const VERSION$2 = new Version('10.2.0');
19760
19760
 
19761
19761
  /**
19762
19762
  * @license
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v10.1.6
2
+ * @license Angular v10.2.0
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  * License: MIT
5
5
  */
@@ -17960,7 +17960,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
17960
17960
  * Use of this source code is governed by an MIT-style license that can be
17961
17961
  * found in the LICENSE file at https://angular.io/license
17962
17962
  */
17963
- const VERSION$1 = new Version('10.1.6');
17963
+ const VERSION$1 = new Version('10.2.0');
17964
17964
 
17965
17965
  /**
17966
17966
  * @license
@@ -26545,7 +26545,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
26545
26545
  if (typeof ngDevMode !== 'object') {
26546
26546
  ngDevModeResetPerfCounters();
26547
26547
  }
26548
- return !!ngDevMode;
26548
+ return typeof ngDevMode !== 'undefined' && !!ngDevMode;
26549
26549
  }
26550
26550
  return false;
26551
26551
  }
@@ -27528,7 +27528,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
27528
27528
  const instructionState = {
27529
27529
  lFrame: createLFrame(null),
27530
27530
  bindingsEnabled: true,
27531
- checkNoChangesMode: false,
27531
+ isInCheckNoChangesMode: false,
27532
27532
  };
27533
27533
  /**
27534
27534
  * Return the current `TView`.
@@ -27547,12 +27547,12 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
27547
27547
  function isCurrentTNodeParent() {
27548
27548
  return instructionState.lFrame.isParent;
27549
27549
  }
27550
- function getCheckNoChangesMode() {
27550
+ function isInCheckNoChangesMode() {
27551
27551
  // TODO(misko): remove this from the LView since it is ngDevMode=true mode only.
27552
- return instructionState.checkNoChangesMode;
27552
+ return instructionState.isInCheckNoChangesMode;
27553
27553
  }
27554
- function setCheckNoChangesMode(mode) {
27555
- instructionState.checkNoChangesMode = mode;
27554
+ function setIsInCheckNoChangesMode(mode) {
27555
+ instructionState.isInCheckNoChangesMode = mode;
27556
27556
  }
27557
27557
  function setBindingIndex(value) {
27558
27558
  return instructionState.lFrame.bindingIndex = value;
@@ -27888,7 +27888,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
27888
27888
  */
27889
27889
  function callHooks(currentView, arr, initPhase, currentNodeIndex) {
27890
27890
  ngDevMode &&
27891
- assertEqual(getCheckNoChangesMode(), false, 'Hooks should never be run in the check no changes mode.');
27891
+ assertEqual(isInCheckNoChangesMode(), false, 'Hooks should never be run when in check no changes mode.');
27892
27892
  const startIndex = currentNodeIndex !== undefined ?
27893
27893
  (currentView[PREORDER_HOOK_FLAGS] & 65535 /* IndexOfTheNextPreOrderHookMaskMask */) :
27894
27894
  0;
@@ -30192,7 +30192,9 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
30192
30192
  if ((flags & 256 /* Destroyed */) === 256 /* Destroyed */)
30193
30193
  return;
30194
30194
  enterView(lView);
30195
- const checkNoChangesMode = getCheckNoChangesMode();
30195
+ // Check no changes mode is a dev only mode used to verify that bindings have not changed
30196
+ // since they were assigned. We do not want to execute lifecycle hooks in that mode.
30197
+ const isInCheckNoChangesPass = isInCheckNoChangesMode();
30196
30198
  try {
30197
30199
  resetPreOrderHookFlags(lView);
30198
30200
  setBindingIndex(tView.bindingStartIndex);
@@ -30202,7 +30204,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
30202
30204
  const hooksInitPhaseCompleted = (flags & 3 /* InitPhaseStateMask */) === 3 /* InitPhaseCompleted */;
30203
30205
  // execute pre-order hooks (OnInit, OnChanges, DoCheck)
30204
30206
  // PERF WARNING: do NOT extract this to a separate function without running benchmarks
30205
- if (!checkNoChangesMode) {
30207
+ if (!isInCheckNoChangesPass) {
30206
30208
  if (hooksInitPhaseCompleted) {
30207
30209
  const preOrderCheckHooks = tView.preOrderCheckHooks;
30208
30210
  if (preOrderCheckHooks !== null) {
@@ -30228,7 +30230,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
30228
30230
  }
30229
30231
  // execute content hooks (AfterContentInit, AfterContentChecked)
30230
30232
  // PERF WARNING: do NOT extract this to a separate function without running benchmarks
30231
- if (!checkNoChangesMode) {
30233
+ if (!isInCheckNoChangesPass) {
30232
30234
  if (hooksInitPhaseCompleted) {
30233
30235
  const contentCheckHooks = tView.contentCheckHooks;
30234
30236
  if (contentCheckHooks !== null) {
@@ -30258,7 +30260,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
30258
30260
  }
30259
30261
  // execute view hooks (AfterViewInit, AfterViewChecked)
30260
30262
  // PERF WARNING: do NOT extract this to a separate function without running benchmarks
30261
- if (!checkNoChangesMode) {
30263
+ if (!isInCheckNoChangesPass) {
30262
30264
  if (hooksInitPhaseCompleted) {
30263
30265
  const viewCheckHooks = tView.viewCheckHooks;
30264
30266
  if (viewCheckHooks !== null) {
@@ -30288,7 +30290,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
30288
30290
  // refresh a `NgClass` binding should work. If we would reset the dirty state in the check
30289
30291
  // no changes cycle, the component would be not be dirty for the next update pass. This would
30290
30292
  // be different in production mode where the component dirty state is not reset.
30291
- if (!checkNoChangesMode) {
30293
+ if (!isInCheckNoChangesPass) {
30292
30294
  lView[FLAGS] &= ~(64 /* Dirty */ | 8 /* FirstLViewPass */);
30293
30295
  }
30294
30296
  if (lView[FLAGS] & 1024 /* RefreshTransplantedView */) {
@@ -30302,7 +30304,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
30302
30304
  }
30303
30305
  function renderComponentOrTemplate(tView, lView, templateFn, context) {
30304
30306
  const rendererFactory = lView[RENDERER_FACTORY];
30305
- const normalExecutionPath = !getCheckNoChangesMode();
30307
+ const normalExecutionPath = !isInCheckNoChangesMode();
30306
30308
  const creationModeIsActive = isCreationMode(lView);
30307
30309
  try {
30308
30310
  if (normalExecutionPath && !creationModeIsActive && rendererFactory.begin) {
@@ -30326,7 +30328,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
30326
30328
  if (rf & 2 /* Update */ && lView.length > HEADER_OFFSET) {
30327
30329
  // When we're updating, inherently select 0 so we don't
30328
30330
  // have to generate that instruction for most update blocks.
30329
- selectIndexInternal(tView, lView, 0, getCheckNoChangesMode());
30331
+ selectIndexInternal(tView, lView, 0, isInCheckNoChangesMode());
30330
30332
  }
30331
30333
  templateFn(rf, context);
30332
30334
  }
@@ -30934,12 +30936,12 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
30934
30936
  tickRootContext(lView[CONTEXT]);
30935
30937
  }
30936
30938
  function checkNoChangesInternal(tView, view, context) {
30937
- setCheckNoChangesMode(true);
30939
+ setIsInCheckNoChangesMode(true);
30938
30940
  try {
30939
30941
  detectChangesInternal(tView, view, context);
30940
30942
  }
30941
30943
  finally {
30942
- setCheckNoChangesMode(false);
30944
+ setIsInCheckNoChangesMode(false);
30943
30945
  }
30944
30946
  }
30945
30947
  /**
@@ -30952,12 +30954,12 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
30952
30954
  * @param lView The view which the change detection should be checked on.
30953
30955
  */
30954
30956
  function checkNoChangesInRootView(lView) {
30955
- setCheckNoChangesMode(true);
30957
+ setIsInCheckNoChangesMode(true);
30956
30958
  try {
30957
30959
  detectChangesInRootView(lView);
30958
30960
  }
30959
30961
  finally {
30960
- setCheckNoChangesMode(false);
30962
+ setIsInCheckNoChangesMode(false);
30961
30963
  }
30962
30964
  }
30963
30965
  function executeViewQueryFn(flags, viewQueryFn, component) {
@@ -33773,6 +33775,110 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
33773
33775
  Object.freeze(EMPTY_ARRAY$2);
33774
33776
  }
33775
33777
 
33778
+ /**
33779
+ * @license
33780
+ * Copyright Google LLC All Rights Reserved.
33781
+ *
33782
+ * Use of this source code is governed by an MIT-style license that can be
33783
+ * found in the LICENSE file at https://angular.io/license
33784
+ */
33785
+ /**
33786
+ * NOTE: changes to the `ngI18nClosureMode` name must be synced with `compiler-cli/src/tooling.ts`.
33787
+ */
33788
+ if (typeof ngI18nClosureMode === 'undefined') {
33789
+ // These property accesses can be ignored because ngI18nClosureMode will be set to false
33790
+ // when optimizing code and the whole if statement will be dropped.
33791
+ // Make sure to refer to ngI18nClosureMode as ['ngI18nClosureMode'] for closure.
33792
+ // NOTE: we need to have it in IIFE so that the tree-shaker is happy.
33793
+ (function () {
33794
+ // tslint:disable-next-line:no-toplevel-property-access
33795
+ _global$1['ngI18nClosureMode'] =
33796
+ // TODO(FW-1250): validate that this actually, you know, works.
33797
+ // tslint:disable-next-line:no-toplevel-property-access
33798
+ typeof goog !== 'undefined' && typeof goog.getMsg === 'function';
33799
+ })();
33800
+ }
33801
+
33802
+ /**
33803
+ * @license
33804
+ * Copyright Google LLC All Rights Reserved.
33805
+ *
33806
+ * Use of this source code is governed by an MIT-style license that can be
33807
+ * found in the LICENSE file at https://angular.io/license
33808
+ */
33809
+ /**
33810
+ * Index of each type of locale data from the locale data array
33811
+ */
33812
+ var LocaleDataIndex;
33813
+ (function (LocaleDataIndex) {
33814
+ LocaleDataIndex[LocaleDataIndex["LocaleId"] = 0] = "LocaleId";
33815
+ LocaleDataIndex[LocaleDataIndex["DayPeriodsFormat"] = 1] = "DayPeriodsFormat";
33816
+ LocaleDataIndex[LocaleDataIndex["DayPeriodsStandalone"] = 2] = "DayPeriodsStandalone";
33817
+ LocaleDataIndex[LocaleDataIndex["DaysFormat"] = 3] = "DaysFormat";
33818
+ LocaleDataIndex[LocaleDataIndex["DaysStandalone"] = 4] = "DaysStandalone";
33819
+ LocaleDataIndex[LocaleDataIndex["MonthsFormat"] = 5] = "MonthsFormat";
33820
+ LocaleDataIndex[LocaleDataIndex["MonthsStandalone"] = 6] = "MonthsStandalone";
33821
+ LocaleDataIndex[LocaleDataIndex["Eras"] = 7] = "Eras";
33822
+ LocaleDataIndex[LocaleDataIndex["FirstDayOfWeek"] = 8] = "FirstDayOfWeek";
33823
+ LocaleDataIndex[LocaleDataIndex["WeekendRange"] = 9] = "WeekendRange";
33824
+ LocaleDataIndex[LocaleDataIndex["DateFormat"] = 10] = "DateFormat";
33825
+ LocaleDataIndex[LocaleDataIndex["TimeFormat"] = 11] = "TimeFormat";
33826
+ LocaleDataIndex[LocaleDataIndex["DateTimeFormat"] = 12] = "DateTimeFormat";
33827
+ LocaleDataIndex[LocaleDataIndex["NumberSymbols"] = 13] = "NumberSymbols";
33828
+ LocaleDataIndex[LocaleDataIndex["NumberFormats"] = 14] = "NumberFormats";
33829
+ LocaleDataIndex[LocaleDataIndex["CurrencyCode"] = 15] = "CurrencyCode";
33830
+ LocaleDataIndex[LocaleDataIndex["CurrencySymbol"] = 16] = "CurrencySymbol";
33831
+ LocaleDataIndex[LocaleDataIndex["CurrencyName"] = 17] = "CurrencyName";
33832
+ LocaleDataIndex[LocaleDataIndex["Currencies"] = 18] = "Currencies";
33833
+ LocaleDataIndex[LocaleDataIndex["Directionality"] = 19] = "Directionality";
33834
+ LocaleDataIndex[LocaleDataIndex["PluralCase"] = 20] = "PluralCase";
33835
+ LocaleDataIndex[LocaleDataIndex["ExtraData"] = 21] = "ExtraData";
33836
+ })(LocaleDataIndex || (LocaleDataIndex = {}));
33837
+
33838
+ /**
33839
+ * @license
33840
+ * Copyright Google LLC All Rights Reserved.
33841
+ *
33842
+ * Use of this source code is governed by an MIT-style license that can be
33843
+ * found in the LICENSE file at https://angular.io/license
33844
+ */
33845
+ /**
33846
+ * The locale id that the application is using by default (for translations and ICU expressions).
33847
+ */
33848
+ const DEFAULT_LOCALE_ID = 'en-US';
33849
+ /**
33850
+ * USD currency code that the application uses by default for CurrencyPipe when no
33851
+ * DEFAULT_CURRENCY_CODE is provided.
33852
+ */
33853
+ const USD_CURRENCY_CODE = 'USD';
33854
+
33855
+ /**
33856
+ * @license
33857
+ * Copyright Google LLC All Rights Reserved.
33858
+ *
33859
+ * Use of this source code is governed by an MIT-style license that can be
33860
+ * found in the LICENSE file at https://angular.io/license
33861
+ */
33862
+ /**
33863
+ * The locale id that the application is currently using (for translations and ICU expressions).
33864
+ * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine
33865
+ * but is now defined as a global value.
33866
+ */
33867
+ let LOCALE_ID = DEFAULT_LOCALE_ID;
33868
+ /**
33869
+ * Sets the locale id that will be used for translations and ICU expressions.
33870
+ * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine
33871
+ * but is now defined as a global value.
33872
+ *
33873
+ * @param localeId
33874
+ */
33875
+ function setLocaleId(localeId) {
33876
+ assertDefined(localeId, `Expected localeId to be defined`);
33877
+ if (typeof localeId === 'string') {
33878
+ LOCALE_ID = localeId.toLowerCase().replace(/_/g, '-');
33879
+ }
33880
+ }
33881
+
33776
33882
  /**
33777
33883
  * @license
33778
33884
  * Copyright Google LLC All Rights Reserved.
@@ -33995,7 +34101,7 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
33995
34101
  /**
33996
34102
  * @publicApi
33997
34103
  */
33998
- const VERSION$2 = new Version$1('10.1.6');
34104
+ const VERSION$2 = new Version$1('10.2.0');
33999
34105
 
34000
34106
  /**
34001
34107
  * @license
@@ -35400,110 +35506,6 @@ define(['exports', 'typescript/lib/tsserverlibrary', 'typescript', 'path'], func
35400
35506
  }
35401
35507
  }
35402
35508
 
35403
- /**
35404
- * @license
35405
- * Copyright Google LLC All Rights Reserved.
35406
- *
35407
- * Use of this source code is governed by an MIT-style license that can be
35408
- * found in the LICENSE file at https://angular.io/license
35409
- */
35410
- /**
35411
- * Index of each type of locale data from the locale data array
35412
- */
35413
- var LocaleDataIndex;
35414
- (function (LocaleDataIndex) {
35415
- LocaleDataIndex[LocaleDataIndex["LocaleId"] = 0] = "LocaleId";
35416
- LocaleDataIndex[LocaleDataIndex["DayPeriodsFormat"] = 1] = "DayPeriodsFormat";
35417
- LocaleDataIndex[LocaleDataIndex["DayPeriodsStandalone"] = 2] = "DayPeriodsStandalone";
35418
- LocaleDataIndex[LocaleDataIndex["DaysFormat"] = 3] = "DaysFormat";
35419
- LocaleDataIndex[LocaleDataIndex["DaysStandalone"] = 4] = "DaysStandalone";
35420
- LocaleDataIndex[LocaleDataIndex["MonthsFormat"] = 5] = "MonthsFormat";
35421
- LocaleDataIndex[LocaleDataIndex["MonthsStandalone"] = 6] = "MonthsStandalone";
35422
- LocaleDataIndex[LocaleDataIndex["Eras"] = 7] = "Eras";
35423
- LocaleDataIndex[LocaleDataIndex["FirstDayOfWeek"] = 8] = "FirstDayOfWeek";
35424
- LocaleDataIndex[LocaleDataIndex["WeekendRange"] = 9] = "WeekendRange";
35425
- LocaleDataIndex[LocaleDataIndex["DateFormat"] = 10] = "DateFormat";
35426
- LocaleDataIndex[LocaleDataIndex["TimeFormat"] = 11] = "TimeFormat";
35427
- LocaleDataIndex[LocaleDataIndex["DateTimeFormat"] = 12] = "DateTimeFormat";
35428
- LocaleDataIndex[LocaleDataIndex["NumberSymbols"] = 13] = "NumberSymbols";
35429
- LocaleDataIndex[LocaleDataIndex["NumberFormats"] = 14] = "NumberFormats";
35430
- LocaleDataIndex[LocaleDataIndex["CurrencyCode"] = 15] = "CurrencyCode";
35431
- LocaleDataIndex[LocaleDataIndex["CurrencySymbol"] = 16] = "CurrencySymbol";
35432
- LocaleDataIndex[LocaleDataIndex["CurrencyName"] = 17] = "CurrencyName";
35433
- LocaleDataIndex[LocaleDataIndex["Currencies"] = 18] = "Currencies";
35434
- LocaleDataIndex[LocaleDataIndex["Directionality"] = 19] = "Directionality";
35435
- LocaleDataIndex[LocaleDataIndex["PluralCase"] = 20] = "PluralCase";
35436
- LocaleDataIndex[LocaleDataIndex["ExtraData"] = 21] = "ExtraData";
35437
- })(LocaleDataIndex || (LocaleDataIndex = {}));
35438
-
35439
- /**
35440
- * @license
35441
- * Copyright Google LLC All Rights Reserved.
35442
- *
35443
- * Use of this source code is governed by an MIT-style license that can be
35444
- * found in the LICENSE file at https://angular.io/license
35445
- */
35446
- /**
35447
- * The locale id that the application is using by default (for translations and ICU expressions).
35448
- */
35449
- const DEFAULT_LOCALE_ID = 'en-US';
35450
- /**
35451
- * USD currency code that the application uses by default for CurrencyPipe when no
35452
- * DEFAULT_CURRENCY_CODE is provided.
35453
- */
35454
- const USD_CURRENCY_CODE = 'USD';
35455
-
35456
- /**
35457
- * @license
35458
- * Copyright Google LLC All Rights Reserved.
35459
- *
35460
- * Use of this source code is governed by an MIT-style license that can be
35461
- * found in the LICENSE file at https://angular.io/license
35462
- */
35463
- /**
35464
- * The locale id that the application is currently using (for translations and ICU expressions).
35465
- * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine
35466
- * but is now defined as a global value.
35467
- */
35468
- let LOCALE_ID = DEFAULT_LOCALE_ID;
35469
- /**
35470
- * Sets the locale id that will be used for translations and ICU expressions.
35471
- * This is the ivy version of `LOCALE_ID` that was defined as an injection token for the view engine
35472
- * but is now defined as a global value.
35473
- *
35474
- * @param localeId
35475
- */
35476
- function setLocaleId(localeId) {
35477
- assertDefined(localeId, `Expected localeId to be defined`);
35478
- if (typeof localeId === 'string') {
35479
- LOCALE_ID = localeId.toLowerCase().replace(/_/g, '-');
35480
- }
35481
- }
35482
-
35483
- /**
35484
- * @license
35485
- * Copyright Google LLC All Rights Reserved.
35486
- *
35487
- * Use of this source code is governed by an MIT-style license that can be
35488
- * found in the LICENSE file at https://angular.io/license
35489
- */
35490
- /**
35491
- * NOTE: changes to the `ngI18nClosureMode` name must be synced with `compiler-cli/src/tooling.ts`.
35492
- */
35493
- if (typeof ngI18nClosureMode === 'undefined') {
35494
- // These property accesses can be ignored because ngI18nClosureMode will be set to false
35495
- // when optimizing code and the whole if statement will be dropped.
35496
- // Make sure to refer to ngI18nClosureMode as ['ngI18nClosureMode'] for closure.
35497
- // NOTE: we need to have it in IIFE so that the tree-shaker is happy.
35498
- (function () {
35499
- // tslint:disable-next-line:no-toplevel-property-access
35500
- _global$1['ngI18nClosureMode'] =
35501
- // TODO(FW-1250): validate that this actually, you know, works.
35502
- // tslint:disable-next-line:no-toplevel-property-access
35503
- typeof goog !== 'undefined' && typeof goog.getMsg === 'function';
35504
- })();
35505
- }
35506
-
35507
35509
  /*! *****************************************************************************
35508
35510
  Copyright (c) Microsoft Corporation. All rights reserved.
35509
35511
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/language-service",
3
- "version": "10.1.6",
3
+ "version": "10.2.0",
4
4
  "description": "Angular - language services",
5
5
  "main": "./bundles/language-service.js",
6
6
  "typings": "./index.d.ts",