@typescript-deploys/pr-build 6.0.0-pr-62556-14 → 6.0.0-pr-63084-6

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/lib/_tsc.js CHANGED
@@ -18,9 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "6.0";
21
- var version = `${versionMajorMinor}.0-insiders.20260203`;
22
- var tsgoCompatEnv = typeof process !== "undefined" && process.env ? process.env.TSGO_COMPAT : void 0;
23
- var TSGO_COMPAT = tsgoCompatEnv ? tsgoCompatEnv === "true" : true;
21
+ var version = `${versionMajorMinor}.0-insiders.20260204`;
24
22
 
25
23
  // src/compiler/core.ts
26
24
  var emptyArray = [];
@@ -7517,6 +7515,7 @@ var Diagnostics = {
7517
7515
  Check_side_effect_imports: diag(6806, 3 /* Message */, "Check_side_effect_imports_6806", "Check side effect imports."),
7518
7516
  This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2: diag(6807, 1 /* Error */, "This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2_6807", "This operation can be simplified. This shift is identical to `{0} {1} {2}`."),
7519
7517
  Enable_lib_replacement: diag(6808, 3 /* Message */, "Enable_lib_replacement_6808", "Enable lib replacement."),
7518
+ Ensure_types_are_ordered_stably_and_deterministically_across_compilations: diag(6809, 3 /* Message */, "Ensure_types_are_ordered_stably_and_deterministically_across_compilations_6809", "Ensure types are ordered stably and deterministically across compilations."),
7520
7519
  one_of_Colon: diag(6900, 3 /* Message */, "one_of_Colon_6900", "one of:"),
7521
7520
  one_or_more_Colon: diag(6901, 3 /* Message */, "one_or_more_Colon_6901", "one or more:"),
7522
7521
  type_Colon: diag(6902, 3 /* Message */, "type_Colon_6902", "type:"),
@@ -13720,7 +13719,7 @@ function isEffectiveStrictModeSourceFile(node, compilerOptions) {
13720
13719
  if (node.isDeclarationFile) {
13721
13720
  return false;
13722
13721
  }
13723
- if (getStrictOptionValue(compilerOptions, "alwaysStrict")) {
13722
+ if (getAlwaysStrict(compilerOptions)) {
13724
13723
  return true;
13725
13724
  }
13726
13725
  if (startsWithUseStrict(node.statements)) {
@@ -18174,10 +18173,11 @@ var _computedOptions = createComputedCompilerOptions({
18174
18173
  return getStrictOptionValue(compilerOptions, "strictBuiltinIteratorReturn");
18175
18174
  }
18176
18175
  },
18176
+ // Previously a strict-mode flag, but no longer.
18177
18177
  alwaysStrict: {
18178
- dependencies: ["strict"],
18178
+ dependencies: [],
18179
18179
  computeValue: (compilerOptions) => {
18180
- return getStrictOptionValue(compilerOptions, "alwaysStrict");
18180
+ return compilerOptions.alwaysStrict !== false;
18181
18181
  }
18182
18182
  },
18183
18183
  useUnknownInCatchVariables: {
@@ -18205,6 +18205,7 @@ var isIncrementalCompilation = _computedOptions.incremental.computeValue;
18205
18205
  var getAreDeclarationMapsEnabled = _computedOptions.declarationMap.computeValue;
18206
18206
  var getAllowJSCompilerOption = _computedOptions.allowJs.computeValue;
18207
18207
  var getUseDefineForClassFields = _computedOptions.useDefineForClassFields.computeValue;
18208
+ var getAlwaysStrict = _computedOptions.alwaysStrict.computeValue;
18208
18209
  function emitModuleKindIsNonNodeESM(moduleKind) {
18209
18210
  return moduleKind >= 5 /* ES2015 */ && moduleKind <= 99 /* ESNext */;
18210
18211
  }
@@ -18224,7 +18225,7 @@ function moduleSupportsImportAttributes(moduleKind) {
18224
18225
  return 101 /* Node18 */ <= moduleKind && moduleKind <= 199 /* NodeNext */ || moduleKind === 200 /* Preserve */ || moduleKind === 99 /* ESNext */;
18225
18226
  }
18226
18227
  function getStrictOptionValue(compilerOptions, flag) {
18227
- return compilerOptions[flag] === void 0 ? !!compilerOptions.strict : !!compilerOptions[flag];
18228
+ return compilerOptions[flag] === void 0 ? compilerOptions.strict !== false : !!compilerOptions[flag];
18228
18229
  }
18229
18230
  function getNameOfScriptTarget(scriptTarget) {
18230
18231
  return forEachEntry(targetOptionDeclaration.type, (value, key) => value === scriptTarget ? key : void 0);
@@ -37091,7 +37092,7 @@ var commandOptionsWithoutBuild = [
37091
37092
  showInSimplifiedHelpView: true,
37092
37093
  category: Diagnostics.Type_Checking,
37093
37094
  description: Diagnostics.Enable_all_strict_type_checking_options,
37094
- defaultValueDescription: false
37095
+ defaultValueDescription: true
37095
37096
  },
37096
37097
  {
37097
37098
  name: "noImplicitAny",
@@ -37153,6 +37154,15 @@ var commandOptionsWithoutBuild = [
37153
37154
  description: Diagnostics.Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any,
37154
37155
  defaultValueDescription: Diagnostics.false_unless_strict_is_set
37155
37156
  },
37157
+ {
37158
+ name: "stableTypeOrdering",
37159
+ type: "boolean",
37160
+ affectsSemanticDiagnostics: true,
37161
+ affectsBuildInfo: true,
37162
+ category: Diagnostics.Type_Checking,
37163
+ description: Diagnostics.Ensure_types_are_ordered_stably_and_deterministically_across_compilations,
37164
+ defaultValueDescription: false
37165
+ },
37156
37166
  {
37157
37167
  name: "noImplicitThis",
37158
37168
  type: "boolean",
@@ -37179,10 +37189,9 @@ var commandOptionsWithoutBuild = [
37179
37189
  affectsSourceFile: true,
37180
37190
  affectsEmit: true,
37181
37191
  affectsBuildInfo: true,
37182
- strictFlag: true,
37183
37192
  category: Diagnostics.Type_Checking,
37184
37193
  description: Diagnostics.Ensure_use_strict_is_always_emitted,
37185
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
37194
+ defaultValueDescription: true
37186
37195
  },
37187
37196
  // Additional Checks
37188
37197
  {
@@ -42431,7 +42440,7 @@ function createBinder() {
42431
42440
  emitFlags = 0 /* None */;
42432
42441
  }
42433
42442
  function bindInStrictMode(file2, opts) {
42434
- if (getStrictOptionValue(opts, "alwaysStrict") && !file2.isDeclarationFile) {
42443
+ if (getAlwaysStrict(opts) && !file2.isDeclarationFile) {
42435
42444
  return true;
42436
42445
  } else {
42437
42446
  return !!file2.externalModuleIndicator;
@@ -46367,7 +46376,6 @@ function createTypeChecker(host) {
46367
46376
  };
46368
46377
  var cancellationToken;
46369
46378
  var scanner;
46370
- var fileIndexMap = new Map(host.getSourceFiles().map((file, i) => [file, i]));
46371
46379
  var Symbol13 = objectAllocator.getSymbolConstructor();
46372
46380
  var Type7 = objectAllocator.getTypeConstructor();
46373
46381
  var Signature5 = objectAllocator.getSignatureConstructor();
@@ -46401,6 +46409,8 @@ function createTypeChecker(host) {
46401
46409
  var useUnknownInCatchVariables = getStrictOptionValue(compilerOptions, "useUnknownInCatchVariables");
46402
46410
  var exactOptionalPropertyTypes = compilerOptions.exactOptionalPropertyTypes;
46403
46411
  var noUncheckedSideEffectImports = compilerOptions.noUncheckedSideEffectImports !== false;
46412
+ var stableTypeOrdering = !!compilerOptions.stableTypeOrdering;
46413
+ var fileIndexMap = stableTypeOrdering ? new Map(host.getSourceFiles().map((file, i) => [file, i])) : void 0;
46404
46414
  var checkBinaryExpression = createCheckBinaryExpression();
46405
46415
  var emitResolver = createResolver();
46406
46416
  var nodeBuilder = createNodeBuilder();
@@ -50058,7 +50068,7 @@ function createTypeChecker(host) {
50058
50068
  return type;
50059
50069
  }
50060
50070
  function createTypeofType() {
50061
- return getUnionType(map(TSGO_COMPAT ? [...typeofNEFacts.keys()].sort() : arrayFrom(typeofNEFacts.keys()), getStringLiteralType));
50071
+ return getUnionType(map(stableTypeOrdering ? [...typeofNEFacts.keys()].sort() : arrayFrom(typeofNEFacts.keys()), getStringLiteralType));
50062
50072
  }
50063
50073
  function createTypeParameter(symbol) {
50064
50074
  return createTypeWithSymbol(524288 /* TypeParameter */, symbol);
@@ -50067,14 +50077,14 @@ function createTypeChecker(host) {
50067
50077
  return name.charCodeAt(0) === 95 /* _ */ && name.charCodeAt(1) === 95 /* _ */ && name.charCodeAt(2) !== 95 /* _ */ && name.charCodeAt(2) !== 64 /* at */ && name.charCodeAt(2) !== 35 /* hash */;
50068
50078
  }
50069
50079
  function getNamedMembers(members, container) {
50070
- if (!TSGO_COMPAT) {
50080
+ if (!stableTypeOrdering) {
50071
50081
  let result;
50072
50082
  members.forEach((symbol, id) => {
50073
50083
  if (isNamedMember(symbol, id)) {
50074
- (result || (result = [])).push(symbol);
50084
+ (result ?? (result = [])).push(symbol);
50075
50085
  }
50076
50086
  });
50077
- return result || emptyArray;
50087
+ return result ?? emptyArray;
50078
50088
  }
50079
50089
  if (members.size === 0) {
50080
50090
  return emptyArray;
@@ -50095,11 +50105,15 @@ function createTypeChecker(host) {
50095
50105
  });
50096
50106
  contained == null ? void 0 : contained.sort(compareSymbols);
50097
50107
  nonContained == null ? void 0 : nonContained.sort(compareSymbols);
50098
- return concatenate(contained, nonContained) || emptyArray;
50108
+ return concatenate(contained, nonContained) ?? emptyArray;
50099
50109
  function isDeclarationContainedBy(symbol, container2) {
50100
50110
  const declaration = symbol.valueDeclaration;
50101
- if (declaration) {
50102
- return some(container2.declarations, (d) => containedBy(declaration, d));
50111
+ if (declaration && container2.declarations) {
50112
+ for (const d of container2.declarations) {
50113
+ if (containedBy(declaration, d)) {
50114
+ return true;
50115
+ }
50116
+ }
50103
50117
  }
50104
50118
  return false;
50105
50119
  function containedBy(a, b) {
@@ -61260,10 +61274,10 @@ function createTypeChecker(host) {
61260
61274
  return type.id;
61261
61275
  }
61262
61276
  function containsType(types, type) {
61263
- return TSGO_COMPAT ? binarySearch(types, type, identity, compareTypes) >= 0 : binarySearch(types, type, getTypeId, compareValues) >= 0;
61277
+ return stableTypeOrdering ? binarySearch(types, type, identity, compareTypes) >= 0 : binarySearch(types, type, getTypeId, compareValues) >= 0;
61264
61278
  }
61265
61279
  function insertType(types, type) {
61266
- const index = TSGO_COMPAT ? binarySearch(types, type, identity, compareTypes) : binarySearch(types, type, getTypeId, compareValues);
61280
+ const index = stableTypeOrdering ? binarySearch(types, type, identity, compareTypes) : binarySearch(types, type, getTypeId, compareValues);
61267
61281
  if (index < 0) {
61268
61282
  types.splice(~index, 0, type);
61269
61283
  return true;
@@ -61282,7 +61296,7 @@ function createTypeChecker(host) {
61282
61296
  if (!(getObjectFlags(type) & 65536 /* ContainsWideningType */)) includes |= 2097152 /* IncludesNonWideningType */;
61283
61297
  } else {
61284
61298
  const len = typeSet.length;
61285
- const index = TSGO_COMPAT ? binarySearch(typeSet, type, identity, compareTypes) : len && type.id > typeSet[len - 1].id ? ~len : binarySearch(typeSet, type, getTypeId, compareValues);
61299
+ const index = stableTypeOrdering ? binarySearch(typeSet, type, identity, compareTypes) : len && type.id > typeSet[len - 1].id ? ~len : binarySearch(typeSet, type, getTypeId, compareValues);
61286
61300
  if (index < 0) {
61287
61301
  typeSet.splice(~index, 0, type);
61288
61302
  }
@@ -90480,7 +90494,7 @@ function createTypeChecker(host) {
90480
90494
  return specifier;
90481
90495
  }
90482
90496
  function sortSymbolsIfTSGoCompat(array) {
90483
- if (TSGO_COMPAT && array) {
90497
+ if (stableTypeOrdering && array) {
90484
90498
  return array.sort(compareSymbols);
90485
90499
  }
90486
90500
  return array;
@@ -90555,7 +90569,7 @@ function createTypeChecker(host) {
90555
90569
  } else if (getObjectFlags(t2) & 4 /* Reference */) {
90556
90570
  return 1;
90557
90571
  } else {
90558
- let c3 = getObjectFlags(t1) & 142607679 /* ObjectTypeKindMask */ - getObjectFlags(t2) & 142607679 /* ObjectTypeKindMask */;
90572
+ let c3 = (getObjectFlags(t1) & 142607679 /* ObjectTypeKindMask */) - (getObjectFlags(t2) & 142607679 /* ObjectTypeKindMask */);
90559
90573
  if (c3 !== 0) {
90560
90574
  return c3;
90561
90575
  }
@@ -90621,7 +90635,7 @@ function createTypeChecker(host) {
90621
90635
  if (c2 !== 0) {
90622
90636
  return c2;
90623
90637
  }
90624
- c2 = t1.flags - t2.flags;
90638
+ c2 = t1.indexFlags - t2.indexFlags;
90625
90639
  if (c2 !== 0) {
90626
90640
  return c2;
90627
90641
  }
@@ -90721,7 +90735,7 @@ function createTypeChecker(host) {
90721
90735
  if (t1 === t2) {
90722
90736
  return 0;
90723
90737
  }
90724
- if (t1.readonly === t2.readonly) {
90738
+ if (t1.readonly !== t2.readonly) {
90725
90739
  return t1.readonly ? 1 : -1;
90726
90740
  }
90727
90741
  if (t1.elementFlags.length !== t2.elementFlags.length) {
@@ -94295,7 +94309,7 @@ function transformTypeScript(context) {
94295
94309
  }
94296
94310
  }
94297
94311
  function visitSourceFile(node) {
94298
- const alwaysStrict = getStrictOptionValue(compilerOptions, "alwaysStrict") && !(isExternalModule(node) && moduleKind >= 5 /* ES2015 */) && !isJsonSourceFile(node);
94312
+ const alwaysStrict = getAlwaysStrict(compilerOptions) && !(isExternalModule(node) && moduleKind >= 5 /* ES2015 */) && !isJsonSourceFile(node);
94299
94313
  return factory2.updateSourceFile(
94300
94314
  node,
94301
94315
  visitLexicalEnvironment(
@@ -110074,7 +110088,7 @@ function transformModule(context) {
110074
110088
  function transformCommonJSModule(node) {
110075
110089
  startLexicalEnvironment();
110076
110090
  const statements = [];
110077
- const ensureUseStrict = getStrictOptionValue(compilerOptions, "alwaysStrict") || isExternalModule(currentSourceFile);
110091
+ const ensureUseStrict = getAlwaysStrict(compilerOptions) || isExternalModule(currentSourceFile);
110078
110092
  const statementOffset = factory2.copyPrologue(node.statements, statements, ensureUseStrict && !isJsonSourceFile(node), topLevelVisitor);
110079
110093
  if (shouldEmitUnderscoreUnderscoreESModule()) {
110080
110094
  append(statements, createUnderscoreUnderscoreESModule());
@@ -112087,7 +112101,7 @@ function transformSystemModule(context) {
112087
112101
  function createSystemModuleBody(node, dependencyGroups) {
112088
112102
  const statements = [];
112089
112103
  startLexicalEnvironment();
112090
- const ensureUseStrict = getStrictOptionValue(compilerOptions, "alwaysStrict") || isExternalModule(currentSourceFile);
112104
+ const ensureUseStrict = getAlwaysStrict(compilerOptions) || isExternalModule(currentSourceFile);
112091
112105
  const statementOffset = factory2.copyPrologue(node.statements, statements, ensureUseStrict, topLevelVisitor);
112092
112106
  statements.push(
112093
112107
  factory2.createVariableStatement(
@@ -125067,6 +125081,16 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
125067
125081
  }
125068
125082
  });
125069
125083
  checkDeprecations("6.0", "7.0", createDiagnostic, (createDeprecatedDiagnostic) => {
125084
+ if (options.alwaysStrict === false) {
125085
+ createDeprecatedDiagnostic(
125086
+ "alwaysStrict",
125087
+ "false",
125088
+ /*useInstead*/
125089
+ void 0,
125090
+ /*related*/
125091
+ void 0
125092
+ );
125093
+ }
125070
125094
  if (options.target === 1 /* ES5 */) {
125071
125095
  createDeprecatedDiagnostic("target", "ES5");
125072
125096
  }
@@ -7114,6 +7114,7 @@ declare namespace ts {
7114
7114
  strictNullChecks?: boolean;
7115
7115
  strictPropertyInitialization?: boolean;
7116
7116
  strictBuiltinIteratorReturn?: boolean;
7117
+ stableTypeOrdering?: boolean;
7117
7118
  stripInternal?: boolean;
7118
7119
  /** @deprecated */
7119
7120
  suppressExcessPropertyErrors?: boolean;
package/lib/typescript.js CHANGED
@@ -175,7 +175,6 @@ __export(typescript_exports, {
175
175
  SymbolFlags: () => SymbolFlags,
176
176
  SymbolFormatFlags: () => SymbolFormatFlags,
177
177
  SyntaxKind: () => SyntaxKind,
178
- TSGO_COMPAT: () => TSGO_COMPAT,
179
178
  Ternary: () => Ternary,
180
179
  ThrottledCancellationToken: () => ThrottledCancellationToken,
181
180
  TokenClass: () => TokenClass,
@@ -646,6 +645,7 @@ __export(typescript_exports, {
646
645
  getAllowImportingTsExtensions: () => getAllowImportingTsExtensions,
647
646
  getAllowJSCompilerOption: () => getAllowJSCompilerOption,
648
647
  getAllowSyntheticDefaultImports: () => getAllowSyntheticDefaultImports,
648
+ getAlwaysStrict: () => getAlwaysStrict,
649
649
  getAncestor: () => getAncestor,
650
650
  getAnyExtensionFromPath: () => getAnyExtensionFromPath,
651
651
  getAreDeclarationMapsEnabled: () => getAreDeclarationMapsEnabled,
@@ -2288,9 +2288,7 @@ module.exports = __toCommonJS(typescript_exports);
2288
2288
 
2289
2289
  // src/compiler/corePublic.ts
2290
2290
  var versionMajorMinor = "6.0";
2291
- var version = `${versionMajorMinor}.0-insiders.20260203`;
2292
- var tsgoCompatEnv = typeof process !== "undefined" && process.env ? process.env.TSGO_COMPAT : void 0;
2293
- var TSGO_COMPAT = tsgoCompatEnv ? tsgoCompatEnv === "true" : true;
2291
+ var version = `${versionMajorMinor}.0-insiders.20260204`;
2294
2292
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2295
2293
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2296
2294
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -10921,6 +10919,7 @@ var Diagnostics = {
10921
10919
  Check_side_effect_imports: diag(6806, 3 /* Message */, "Check_side_effect_imports_6806", "Check side effect imports."),
10922
10920
  This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2: diag(6807, 1 /* Error */, "This_operation_can_be_simplified_This_shift_is_identical_to_0_1_2_6807", "This operation can be simplified. This shift is identical to `{0} {1} {2}`."),
10923
10921
  Enable_lib_replacement: diag(6808, 3 /* Message */, "Enable_lib_replacement_6808", "Enable lib replacement."),
10922
+ Ensure_types_are_ordered_stably_and_deterministically_across_compilations: diag(6809, 3 /* Message */, "Ensure_types_are_ordered_stably_and_deterministically_across_compilations_6809", "Ensure types are ordered stably and deterministically across compilations."),
10924
10923
  one_of_Colon: diag(6900, 3 /* Message */, "one_of_Colon_6900", "one of:"),
10925
10924
  one_or_more_Colon: diag(6901, 3 /* Message */, "one_or_more_Colon_6901", "one or more:"),
10926
10925
  type_Colon: diag(6902, 3 /* Message */, "type_Colon_6902", "type:"),
@@ -17382,7 +17381,7 @@ function isEffectiveStrictModeSourceFile(node, compilerOptions) {
17382
17381
  if (node.isDeclarationFile) {
17383
17382
  return false;
17384
17383
  }
17385
- if (getStrictOptionValue(compilerOptions, "alwaysStrict")) {
17384
+ if (getAlwaysStrict(compilerOptions)) {
17386
17385
  return true;
17387
17386
  }
17388
17387
  if (startsWithUseStrict(node.statements)) {
@@ -22147,10 +22146,11 @@ var _computedOptions = createComputedCompilerOptions({
22147
22146
  return getStrictOptionValue(compilerOptions, "strictBuiltinIteratorReturn");
22148
22147
  }
22149
22148
  },
22149
+ // Previously a strict-mode flag, but no longer.
22150
22150
  alwaysStrict: {
22151
- dependencies: ["strict"],
22151
+ dependencies: [],
22152
22152
  computeValue: (compilerOptions) => {
22153
- return getStrictOptionValue(compilerOptions, "alwaysStrict");
22153
+ return compilerOptions.alwaysStrict !== false;
22154
22154
  }
22155
22155
  },
22156
22156
  useUnknownInCatchVariables: {
@@ -22178,6 +22178,7 @@ var isIncrementalCompilation = _computedOptions.incremental.computeValue;
22178
22178
  var getAreDeclarationMapsEnabled = _computedOptions.declarationMap.computeValue;
22179
22179
  var getAllowJSCompilerOption = _computedOptions.allowJs.computeValue;
22180
22180
  var getUseDefineForClassFields = _computedOptions.useDefineForClassFields.computeValue;
22181
+ var getAlwaysStrict = _computedOptions.alwaysStrict.computeValue;
22181
22182
  function emitModuleKindIsNonNodeESM(moduleKind) {
22182
22183
  return moduleKind >= 5 /* ES2015 */ && moduleKind <= 99 /* ESNext */;
22183
22184
  }
@@ -22197,7 +22198,7 @@ function moduleSupportsImportAttributes(moduleKind) {
22197
22198
  return 101 /* Node18 */ <= moduleKind && moduleKind <= 199 /* NodeNext */ || moduleKind === 200 /* Preserve */ || moduleKind === 99 /* ESNext */;
22198
22199
  }
22199
22200
  function getStrictOptionValue(compilerOptions, flag) {
22200
- return compilerOptions[flag] === void 0 ? !!compilerOptions.strict : !!compilerOptions[flag];
22201
+ return compilerOptions[flag] === void 0 ? compilerOptions.strict !== false : !!compilerOptions[flag];
22201
22202
  }
22202
22203
  function getNameOfScriptTarget(scriptTarget) {
22203
22204
  return forEachEntry(targetOptionDeclaration.type, (value, key) => value === scriptTarget ? key : void 0);
@@ -41372,7 +41373,7 @@ var commandOptionsWithoutBuild = [
41372
41373
  showInSimplifiedHelpView: true,
41373
41374
  category: Diagnostics.Type_Checking,
41374
41375
  description: Diagnostics.Enable_all_strict_type_checking_options,
41375
- defaultValueDescription: false
41376
+ defaultValueDescription: true
41376
41377
  },
41377
41378
  {
41378
41379
  name: "noImplicitAny",
@@ -41434,6 +41435,15 @@ var commandOptionsWithoutBuild = [
41434
41435
  description: Diagnostics.Built_in_iterators_are_instantiated_with_a_TReturn_type_of_undefined_instead_of_any,
41435
41436
  defaultValueDescription: Diagnostics.false_unless_strict_is_set
41436
41437
  },
41438
+ {
41439
+ name: "stableTypeOrdering",
41440
+ type: "boolean",
41441
+ affectsSemanticDiagnostics: true,
41442
+ affectsBuildInfo: true,
41443
+ category: Diagnostics.Type_Checking,
41444
+ description: Diagnostics.Ensure_types_are_ordered_stably_and_deterministically_across_compilations,
41445
+ defaultValueDescription: false
41446
+ },
41437
41447
  {
41438
41448
  name: "noImplicitThis",
41439
41449
  type: "boolean",
@@ -41460,10 +41470,9 @@ var commandOptionsWithoutBuild = [
41460
41470
  affectsSourceFile: true,
41461
41471
  affectsEmit: true,
41462
41472
  affectsBuildInfo: true,
41463
- strictFlag: true,
41464
41473
  category: Diagnostics.Type_Checking,
41465
41474
  description: Diagnostics.Ensure_use_strict_is_always_emitted,
41466
- defaultValueDescription: Diagnostics.false_unless_strict_is_set
41475
+ defaultValueDescription: true
41467
41476
  },
41468
41477
  // Additional Checks
41469
41478
  {
@@ -46964,7 +46973,7 @@ function createBinder() {
46964
46973
  emitFlags = 0 /* None */;
46965
46974
  }
46966
46975
  function bindInStrictMode(file2, opts) {
46967
- if (getStrictOptionValue(opts, "alwaysStrict") && !file2.isDeclarationFile) {
46976
+ if (getAlwaysStrict(opts) && !file2.isDeclarationFile) {
46968
46977
  return true;
46969
46978
  } else {
46970
46979
  return !!file2.externalModuleIndicator;
@@ -51000,7 +51009,6 @@ function createTypeChecker(host) {
51000
51009
  };
51001
51010
  var cancellationToken;
51002
51011
  var scanner2;
51003
- var fileIndexMap = new Map(host.getSourceFiles().map((file, i) => [file, i]));
51004
51012
  var Symbol48 = objectAllocator.getSymbolConstructor();
51005
51013
  var Type29 = objectAllocator.getTypeConstructor();
51006
51014
  var Signature13 = objectAllocator.getSignatureConstructor();
@@ -51034,6 +51042,8 @@ function createTypeChecker(host) {
51034
51042
  var useUnknownInCatchVariables = getStrictOptionValue(compilerOptions, "useUnknownInCatchVariables");
51035
51043
  var exactOptionalPropertyTypes = compilerOptions.exactOptionalPropertyTypes;
51036
51044
  var noUncheckedSideEffectImports = compilerOptions.noUncheckedSideEffectImports !== false;
51045
+ var stableTypeOrdering = !!compilerOptions.stableTypeOrdering;
51046
+ var fileIndexMap = stableTypeOrdering ? new Map(host.getSourceFiles().map((file, i) => [file, i])) : void 0;
51037
51047
  var checkBinaryExpression = createCheckBinaryExpression();
51038
51048
  var emitResolver = createResolver();
51039
51049
  var nodeBuilder = createNodeBuilder();
@@ -54691,7 +54701,7 @@ function createTypeChecker(host) {
54691
54701
  return type;
54692
54702
  }
54693
54703
  function createTypeofType() {
54694
- return getUnionType(map(TSGO_COMPAT ? [...typeofNEFacts.keys()].sort() : arrayFrom(typeofNEFacts.keys()), getStringLiteralType));
54704
+ return getUnionType(map(stableTypeOrdering ? [...typeofNEFacts.keys()].sort() : arrayFrom(typeofNEFacts.keys()), getStringLiteralType));
54695
54705
  }
54696
54706
  function createTypeParameter(symbol) {
54697
54707
  return createTypeWithSymbol(524288 /* TypeParameter */, symbol);
@@ -54700,14 +54710,14 @@ function createTypeChecker(host) {
54700
54710
  return name.charCodeAt(0) === 95 /* _ */ && name.charCodeAt(1) === 95 /* _ */ && name.charCodeAt(2) !== 95 /* _ */ && name.charCodeAt(2) !== 64 /* at */ && name.charCodeAt(2) !== 35 /* hash */;
54701
54711
  }
54702
54712
  function getNamedMembers(members, container) {
54703
- if (!TSGO_COMPAT) {
54713
+ if (!stableTypeOrdering) {
54704
54714
  let result;
54705
54715
  members.forEach((symbol, id) => {
54706
54716
  if (isNamedMember(symbol, id)) {
54707
- (result || (result = [])).push(symbol);
54717
+ (result ?? (result = [])).push(symbol);
54708
54718
  }
54709
54719
  });
54710
- return result || emptyArray;
54720
+ return result ?? emptyArray;
54711
54721
  }
54712
54722
  if (members.size === 0) {
54713
54723
  return emptyArray;
@@ -54728,11 +54738,15 @@ function createTypeChecker(host) {
54728
54738
  });
54729
54739
  contained == null ? void 0 : contained.sort(compareSymbols);
54730
54740
  nonContained == null ? void 0 : nonContained.sort(compareSymbols);
54731
- return concatenate(contained, nonContained) || emptyArray;
54741
+ return concatenate(contained, nonContained) ?? emptyArray;
54732
54742
  function isDeclarationContainedBy(symbol, container2) {
54733
54743
  const declaration = symbol.valueDeclaration;
54734
- if (declaration) {
54735
- return some(container2.declarations, (d) => containedBy(declaration, d));
54744
+ if (declaration && container2.declarations) {
54745
+ for (const d of container2.declarations) {
54746
+ if (containedBy(declaration, d)) {
54747
+ return true;
54748
+ }
54749
+ }
54736
54750
  }
54737
54751
  return false;
54738
54752
  function containedBy(a, b) {
@@ -65893,10 +65907,10 @@ function createTypeChecker(host) {
65893
65907
  return type.id;
65894
65908
  }
65895
65909
  function containsType(types, type) {
65896
- return TSGO_COMPAT ? binarySearch(types, type, identity, compareTypes) >= 0 : binarySearch(types, type, getTypeId, compareValues) >= 0;
65910
+ return stableTypeOrdering ? binarySearch(types, type, identity, compareTypes) >= 0 : binarySearch(types, type, getTypeId, compareValues) >= 0;
65897
65911
  }
65898
65912
  function insertType(types, type) {
65899
- const index = TSGO_COMPAT ? binarySearch(types, type, identity, compareTypes) : binarySearch(types, type, getTypeId, compareValues);
65913
+ const index = stableTypeOrdering ? binarySearch(types, type, identity, compareTypes) : binarySearch(types, type, getTypeId, compareValues);
65900
65914
  if (index < 0) {
65901
65915
  types.splice(~index, 0, type);
65902
65916
  return true;
@@ -65915,7 +65929,7 @@ function createTypeChecker(host) {
65915
65929
  if (!(getObjectFlags(type) & 65536 /* ContainsWideningType */)) includes |= 2097152 /* IncludesNonWideningType */;
65916
65930
  } else {
65917
65931
  const len = typeSet.length;
65918
- const index = TSGO_COMPAT ? binarySearch(typeSet, type, identity, compareTypes) : len && type.id > typeSet[len - 1].id ? ~len : binarySearch(typeSet, type, getTypeId, compareValues);
65932
+ const index = stableTypeOrdering ? binarySearch(typeSet, type, identity, compareTypes) : len && type.id > typeSet[len - 1].id ? ~len : binarySearch(typeSet, type, getTypeId, compareValues);
65919
65933
  if (index < 0) {
65920
65934
  typeSet.splice(~index, 0, type);
65921
65935
  }
@@ -95113,7 +95127,7 @@ function createTypeChecker(host) {
95113
95127
  return specifier;
95114
95128
  }
95115
95129
  function sortSymbolsIfTSGoCompat(array) {
95116
- if (TSGO_COMPAT && array) {
95130
+ if (stableTypeOrdering && array) {
95117
95131
  return array.sort(compareSymbols);
95118
95132
  }
95119
95133
  return array;
@@ -95188,7 +95202,7 @@ function createTypeChecker(host) {
95188
95202
  } else if (getObjectFlags(t2) & 4 /* Reference */) {
95189
95203
  return 1;
95190
95204
  } else {
95191
- let c3 = getObjectFlags(t1) & 142607679 /* ObjectTypeKindMask */ - getObjectFlags(t2) & 142607679 /* ObjectTypeKindMask */;
95205
+ let c3 = (getObjectFlags(t1) & 142607679 /* ObjectTypeKindMask */) - (getObjectFlags(t2) & 142607679 /* ObjectTypeKindMask */);
95192
95206
  if (c3 !== 0) {
95193
95207
  return c3;
95194
95208
  }
@@ -95254,7 +95268,7 @@ function createTypeChecker(host) {
95254
95268
  if (c2 !== 0) {
95255
95269
  return c2;
95256
95270
  }
95257
- c2 = t1.flags - t2.flags;
95271
+ c2 = t1.indexFlags - t2.indexFlags;
95258
95272
  if (c2 !== 0) {
95259
95273
  return c2;
95260
95274
  }
@@ -95354,7 +95368,7 @@ function createTypeChecker(host) {
95354
95368
  if (t1 === t2) {
95355
95369
  return 0;
95356
95370
  }
95357
- if (t1.readonly === t2.readonly) {
95371
+ if (t1.readonly !== t2.readonly) {
95358
95372
  return t1.readonly ? 1 : -1;
95359
95373
  }
95360
95374
  if (t1.elementFlags.length !== t2.elementFlags.length) {
@@ -99110,7 +99124,7 @@ function transformTypeScript(context) {
99110
99124
  }
99111
99125
  }
99112
99126
  function visitSourceFile(node) {
99113
- const alwaysStrict = getStrictOptionValue(compilerOptions, "alwaysStrict") && !(isExternalModule(node) && moduleKind >= 5 /* ES2015 */) && !isJsonSourceFile(node);
99127
+ const alwaysStrict = getAlwaysStrict(compilerOptions) && !(isExternalModule(node) && moduleKind >= 5 /* ES2015 */) && !isJsonSourceFile(node);
99114
99128
  return factory2.updateSourceFile(
99115
99129
  node,
99116
99130
  visitLexicalEnvironment(
@@ -114889,7 +114903,7 @@ function transformModule(context) {
114889
114903
  function transformCommonJSModule(node) {
114890
114904
  startLexicalEnvironment();
114891
114905
  const statements = [];
114892
- const ensureUseStrict = getStrictOptionValue(compilerOptions, "alwaysStrict") || isExternalModule(currentSourceFile);
114906
+ const ensureUseStrict = getAlwaysStrict(compilerOptions) || isExternalModule(currentSourceFile);
114893
114907
  const statementOffset = factory2.copyPrologue(node.statements, statements, ensureUseStrict && !isJsonSourceFile(node), topLevelVisitor);
114894
114908
  if (shouldEmitUnderscoreUnderscoreESModule()) {
114895
114909
  append(statements, createUnderscoreUnderscoreESModule());
@@ -116902,7 +116916,7 @@ function transformSystemModule(context) {
116902
116916
  function createSystemModuleBody(node, dependencyGroups) {
116903
116917
  const statements = [];
116904
116918
  startLexicalEnvironment();
116905
- const ensureUseStrict = getStrictOptionValue(compilerOptions, "alwaysStrict") || isExternalModule(currentSourceFile);
116919
+ const ensureUseStrict = getAlwaysStrict(compilerOptions) || isExternalModule(currentSourceFile);
116906
116920
  const statementOffset = factory2.copyPrologue(node.statements, statements, ensureUseStrict, topLevelVisitor);
116907
116921
  statements.push(
116908
116922
  factory2.createVariableStatement(
@@ -129939,6 +129953,16 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
129939
129953
  }
129940
129954
  });
129941
129955
  checkDeprecations("6.0", "7.0", createDiagnostic, (createDeprecatedDiagnostic) => {
129956
+ if (options.alwaysStrict === false) {
129957
+ createDeprecatedDiagnostic(
129958
+ "alwaysStrict",
129959
+ "false",
129960
+ /*useInstead*/
129961
+ void 0,
129962
+ /*related*/
129963
+ void 0
129964
+ );
129965
+ }
129942
129966
  if (options.target === 1 /* ES5 */) {
129943
129967
  createDeprecatedDiagnostic("target", "ES5");
129944
129968
  }
@@ -184002,7 +184026,6 @@ __export(ts_exports2, {
184002
184026
  SymbolFlags: () => SymbolFlags,
184003
184027
  SymbolFormatFlags: () => SymbolFormatFlags,
184004
184028
  SyntaxKind: () => SyntaxKind,
184005
- TSGO_COMPAT: () => TSGO_COMPAT,
184006
184029
  Ternary: () => Ternary,
184007
184030
  ThrottledCancellationToken: () => ThrottledCancellationToken,
184008
184031
  TokenClass: () => TokenClass,
@@ -184473,6 +184496,7 @@ __export(ts_exports2, {
184473
184496
  getAllowImportingTsExtensions: () => getAllowImportingTsExtensions,
184474
184497
  getAllowJSCompilerOption: () => getAllowJSCompilerOption,
184475
184498
  getAllowSyntheticDefaultImports: () => getAllowSyntheticDefaultImports,
184499
+ getAlwaysStrict: () => getAlwaysStrict,
184476
184500
  getAncestor: () => getAncestor,
184477
184501
  getAnyExtensionFromPath: () => getAnyExtensionFromPath,
184478
184502
  getAreDeclarationMapsEnabled: () => getAreDeclarationMapsEnabled,
@@ -198782,7 +198806,6 @@ if (typeof console !== "undefined") {
198782
198806
  SymbolFlags,
198783
198807
  SymbolFormatFlags,
198784
198808
  SyntaxKind,
198785
- TSGO_COMPAT,
198786
198809
  Ternary,
198787
198810
  ThrottledCancellationToken,
198788
198811
  TokenClass,
@@ -199253,6 +199276,7 @@ if (typeof console !== "undefined") {
199253
199276
  getAllowImportingTsExtensions,
199254
199277
  getAllowJSCompilerOption,
199255
199278
  getAllowSyntheticDefaultImports,
199279
+ getAlwaysStrict,
199256
199280
  getAncestor,
199257
199281
  getAnyExtensionFromPath,
199258
199282
  getAreDeclarationMapsEnabled,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typescript-deploys/pr-build",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "6.0.0-pr-62556-14",
5
+ "version": "6.0.0-pr-63084-6",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [