@typescript-deploys/pr-build 6.0.0-pr-63239-2 → 6.0.0-pr-63539-29

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/README.md CHANGED
@@ -1,6 +1,7 @@
1
-
2
1
  # TypeScript
3
2
 
3
+ <!-- CODING AGENTS: READ AGENTS.md BEFORE WRITING CODE -->
4
+
4
5
  [![CI](https://github.com/microsoft/TypeScript/actions/workflows/ci.yml/badge.svg)](https://github.com/microsoft/TypeScript/actions/workflows/ci.yml)
5
6
  [![npm version](https://badge.fury.io/js/typescript.svg)](https://www.npmjs.com/package/typescript)
6
7
  [![Downloads](https://img.shields.io/npm/dm/typescript.svg)](https://www.npmjs.com/package/typescript)
@@ -27,6 +28,16 @@ npm install -D typescript@next
27
28
 
28
29
  ## Contribute
29
30
 
31
+ **NOTE: Code changes in this repo are now limited to a small category of fixes**:
32
+
33
+ * Crashes that were introduced in 5.9 or 6.0 that *also* repro in 7.0 *and* have a portable fix *and* don't incur other behavioral changes
34
+ * Security issues
35
+ * Language service crashes that substantially impact mainline usage
36
+ * Serious regressions from 5.9 (these must *seriously* impact a *large* proportion of users)
37
+
38
+ Most bug fixes should be submitted to the [typescript-go](https://github.com/microsoft/TypeScript-go) repository.
39
+ Feature additions and behavioral changes are currently on pause until TypeScript 7.0 is completed.
40
+
30
41
  There are many ways to [contribute](https://github.com/microsoft/TypeScript/blob/main/CONTRIBUTING.md) to TypeScript.
31
42
  * [Submit bugs](https://github.com/microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
32
43
  * Review the [source code changes](https://github.com/microsoft/TypeScript/pulls).
package/lib/_tsc.js CHANGED
@@ -18,7 +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.20260311`;
21
+ var version = `${versionMajorMinor}.0-insiders.20260608`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -6045,7 +6045,7 @@ var Diagnostics = {
6045
6045
  Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0: diag(1340, 1 /* Error */, "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340", "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"),
6046
6046
  Class_constructor_may_not_be_an_accessor: diag(1341, 1 /* Error */, "Class_constructor_may_not_be_an_accessor_1341", "Class constructor may not be an accessor."),
6047
6047
  The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_node18_node20_or_nodenext: diag(1343, 1 /* Error */, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'."),
6048
- A_label_is_not_allowed_here: diag(1344, 1 /* Error */, "A_label_is_not_allowed_here_1344", "'A label is not allowed here."),
6048
+ A_label_is_not_allowed_here: diag(1344, 1 /* Error */, "A_label_is_not_allowed_here_1344", "A label is not allowed here."),
6049
6049
  An_expression_of_type_void_cannot_be_tested_for_truthiness: diag(1345, 1 /* Error */, "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345", "An expression of type 'void' cannot be tested for truthiness."),
6050
6050
  This_parameter_is_not_allowed_with_use_strict_directive: diag(1346, 1 /* Error */, "This_parameter_is_not_allowed_with_use_strict_directive_1346", "This parameter is not allowed with 'use strict' directive."),
6051
6051
  use_strict_directive_cannot_be_used_with_non_simple_parameter_list: diag(1347, 1 /* Error */, "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347", "'use strict' directive cannot be used with non-simple parameter list."),
@@ -45186,6 +45186,8 @@ function getContainerFlags(node) {
45186
45186
  return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */ | 256 /* PropagatesThisKeyword */;
45187
45187
  case 269 /* ModuleBlock */:
45188
45188
  return 4 /* IsControlFlowContainer */;
45189
+ case 173 /* PropertyDeclaration */:
45190
+ return node.initializer ? 4 /* IsControlFlowContainer */ : 0 /* None */;
45189
45191
  case 300 /* CatchClause */:
45190
45192
  case 249 /* ForStatement */:
45191
45193
  case 250 /* ForInStatement */:
@@ -110,7 +110,7 @@ interface Set<T> {
110
110
  */
111
111
  has(value: T): boolean;
112
112
  /**
113
- * @returns the number of (unique) elements in Set.
113
+ * @returns the number of (unique) elements in the Set.
114
114
  */
115
115
  readonly size: number;
116
116
  }
@@ -110,7 +110,7 @@ interface Math {
110
110
  imul(x: number, y: number): number;
111
111
 
112
112
  /**
113
- * Returns the sign of the x, indicating whether x is positive, negative or zero.
113
+ * Returns the sign of x, indicating whether x is positive, negative, or zero.
114
114
  * @param x The numeric expression to test
115
115
  */
116
116
  sign(x: number): number;
@@ -35,7 +35,7 @@ interface SymbolConstructor {
35
35
 
36
36
  /**
37
37
  * Returns a key from the global symbol registry matching the given Symbol if found.
38
- * Otherwise, returns a undefined.
38
+ * Otherwise, returns undefined.
39
39
  * @param sym Symbol to find the key for.
40
40
  */
41
41
  keyFor(sym: symbol): string | undefined;
@@ -16,28 +16,32 @@ and limitations under the License.
16
16
 
17
17
  interface String {
18
18
  /**
19
- * Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.
20
- * The padding is applied from the start (left) of the current string.
19
+ * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length.
20
+ * The padding is applied from the start of the current string.
21
21
  *
22
- * @param maxLength The length of the resulting string once the current string has been padded.
23
- * If this parameter is smaller than the current string's length, the current string will be returned as it is.
22
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart)
24
23
  *
25
- * @param fillString The string to pad the current string with.
26
- * If this string is too long, it will be truncated and the left-most part will be applied.
27
- * The default value for this parameter is " " (U+0020).
24
+ * @param targetLength The length of the resulting string once the current `str` has been padded.
25
+ * If the value is less than or equal to `str.length`, then `str` is returned as-is.
26
+ *
27
+ * @param padString The string to pad the current `str` with.
28
+ * If `padString` is too long to stay within `targetLength`, it will be truncated from the end.
29
+ * The default value is the space character (U+0020).
28
30
  */
29
- padStart(maxLength: number, fillString?: string): string;
31
+ padStart(targetLength: number, padString?: string): string;
30
32
 
31
33
  /**
32
- * Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.
33
- * The padding is applied from the end (right) of the current string.
34
+ * Pads the current string with a given string (repeated and/or truncated, if needed) so that the resulting string has a given length.
35
+ * The padding is applied from the end of the current string.
36
+ *
37
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padEnd)
34
38
  *
35
- * @param maxLength The length of the resulting string once the current string has been padded.
36
- * If this parameter is smaller than the current string's length, the current string will be returned as it is.
39
+ * @param targetLength The length of the resulting string once the current `str` has been padded.
40
+ * If the value is less than or equal to `str.length`, then `str` is returned as-is.
37
41
  *
38
- * @param fillString The string to pad the current string with.
39
- * If this string is too long, it will be truncated and the left-most part will be applied.
40
- * The default value for this parameter is " " (U+0020).
42
+ * @param padString The string to pad the current `str` with.
43
+ * If `padString` is too long to stay within `targetLength`, it will be truncated from the end.
44
+ * The default value is the space character (U+0020).
41
45
  */
42
- padEnd(maxLength: number, fillString?: string): string;
46
+ padEnd(targetLength: number, padString?: string): string;
43
47
  }
@@ -169,15 +169,15 @@ declare namespace Intl {
169
169
  format(value: number, unit: RelativeTimeFormatUnit): string;
170
170
 
171
171
  /**
172
- * Returns an array of objects representing the relative time format in parts that can be used for custom locale-aware formatting.
172
+ * Returns an array of objects representing the relative time format in parts that can be used for custom locale-aware formatting.
173
173
  *
174
- * @param value - Numeric value to use in the internationalized relative time message
174
+ * @param value - Numeric value to use in the internationalized relative time message
175
175
  *
176
- * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message.
176
+ * @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message.
177
177
  *
178
- * @throws `RangeError` if `unit` was given something other than `unit` possible values
178
+ * @throws `RangeError` if `unit` was given something other than `unit` possible values
179
179
  *
180
- * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts).
180
+ * [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts).
181
181
  */
182
182
  formatToParts(value: number, unit: RelativeTimeFormatUnit): RelativeTimeFormatPart[];
183
183
 
package/lib/lib.es5.d.ts CHANGED
@@ -416,8 +416,8 @@ interface String {
416
416
  charAt(pos: number): string;
417
417
 
418
418
  /**
419
- * Returns the Unicode value of the character at the specified location.
420
- * @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.
419
+ * Returns the Unicode value of the character at the specified location, or NaN if the index is out of bounds.
420
+ * @param index The zero-based index of the desired character.
421
421
  */
422
422
  charCodeAt(index: number): number;
423
423
 
@@ -563,19 +563,19 @@ interface Number {
563
563
 
564
564
  /**
565
565
  * Returns a string representing a number in fixed-point notation.
566
- * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
566
+ * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive.
567
567
  */
568
568
  toFixed(fractionDigits?: number): string;
569
569
 
570
570
  /**
571
571
  * Returns a string containing a number represented in exponential notation.
572
- * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
572
+ * @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 100, inclusive.
573
573
  */
574
574
  toExponential(fractionDigits?: number): string;
575
575
 
576
576
  /**
577
577
  * Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
578
- * @param precision Number of significant digits. Must be in the range 1 - 21, inclusive.
578
+ * @param precision Number of significant digits. Must be in the range 1 - 100, inclusive.
579
579
  */
580
580
  toPrecision(precision?: number): string;
581
581
 
package/lib/typescript.js CHANGED
@@ -2289,7 +2289,7 @@ module.exports = __toCommonJS(typescript_exports);
2289
2289
 
2290
2290
  // src/compiler/corePublic.ts
2291
2291
  var versionMajorMinor = "6.0";
2292
- var version = `${versionMajorMinor}.0-insiders.20260311`;
2292
+ var version = `${versionMajorMinor}.0-insiders.20260608`;
2293
2293
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2294
2294
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2295
2295
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -9451,7 +9451,7 @@ var Diagnostics = {
9451
9451
  Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0: diag(1340, 1 /* Error */, "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340", "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"),
9452
9452
  Class_constructor_may_not_be_an_accessor: diag(1341, 1 /* Error */, "Class_constructor_may_not_be_an_accessor_1341", "Class constructor may not be an accessor."),
9453
9453
  The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_node18_node20_or_nodenext: diag(1343, 1 /* Error */, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', 'node18', 'node20', or 'nodenext'."),
9454
- A_label_is_not_allowed_here: diag(1344, 1 /* Error */, "A_label_is_not_allowed_here_1344", "'A label is not allowed here."),
9454
+ A_label_is_not_allowed_here: diag(1344, 1 /* Error */, "A_label_is_not_allowed_here_1344", "A label is not allowed here."),
9455
9455
  An_expression_of_type_void_cannot_be_tested_for_truthiness: diag(1345, 1 /* Error */, "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345", "An expression of type 'void' cannot be tested for truthiness."),
9456
9456
  This_parameter_is_not_allowed_with_use_strict_directive: diag(1346, 1 /* Error */, "This_parameter_is_not_allowed_with_use_strict_directive_1346", "This parameter is not allowed with 'use strict' directive."),
9457
9457
  use_strict_directive_cannot_be_used_with_non_simple_parameter_list: diag(1347, 1 /* Error */, "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347", "'use strict' directive cannot be used with non-simple parameter list."),
@@ -49721,6 +49721,8 @@ function getContainerFlags(node) {
49721
49721
  return 1 /* IsContainer */ | 4 /* IsControlFlowContainer */ | 32 /* HasLocals */ | 8 /* IsFunctionLike */ | 16 /* IsFunctionExpression */ | 256 /* PropagatesThisKeyword */;
49722
49722
  case 269 /* ModuleBlock */:
49723
49723
  return 4 /* IsControlFlowContainer */;
49724
+ case 173 /* PropertyDeclaration */:
49725
+ return node.initializer ? 4 /* IsControlFlowContainer */ : 0 /* None */;
49724
49726
  case 300 /* CatchClause */:
49725
49727
  case 249 /* ForStatement */:
49726
49728
  case 250 /* ForInStatement */:
@@ -139651,7 +139653,8 @@ var NameValidationResult = /* @__PURE__ */ ((NameValidationResult2) => {
139651
139653
  NameValidationResult2[NameValidationResult2["NameTooLong"] = 2] = "NameTooLong";
139652
139654
  NameValidationResult2[NameValidationResult2["NameStartsWithDot"] = 3] = "NameStartsWithDot";
139653
139655
  NameValidationResult2[NameValidationResult2["NameStartsWithUnderscore"] = 4] = "NameStartsWithUnderscore";
139654
- NameValidationResult2[NameValidationResult2["NameContainsNonURISafeCharacters"] = 5] = "NameContainsNonURISafeCharacters";
139656
+ NameValidationResult2[NameValidationResult2["NameContainsInvalidCharacters"] = 5] = "NameContainsInvalidCharacters";
139657
+ NameValidationResult2[NameValidationResult2["NameContainsNonURISafeCharacters"] = 5 /* NameContainsInvalidCharacters */] = "NameContainsNonURISafeCharacters";
139655
139658
  return NameValidationResult2;
139656
139659
  })(NameValidationResult || {});
139657
139660
  var maxPackageNameLength = 214;
@@ -139697,8 +139700,8 @@ function validatePackageNameWorker(packageName, supportScopedPackage) {
139697
139700
  return 0 /* Ok */;
139698
139701
  }
139699
139702
  }
139700
- if (encodeURIComponent(packageName) !== packageName) {
139701
- return 5 /* NameContainsNonURISafeCharacters */;
139703
+ if (!/^[\w.-]+$/.test(packageName)) {
139704
+ return 5 /* NameContainsInvalidCharacters */;
139702
139705
  }
139703
139706
  return 0 /* Ok */;
139704
139707
  }
@@ -139722,8 +139725,8 @@ function renderPackageNameValidationFailureWorker(typing, result, name, isScopeN
139722
139725
  return `'${typing}':: ${kind} name '${name}' cannot start with '.'`;
139723
139726
  case 4 /* NameStartsWithUnderscore */:
139724
139727
  return `'${typing}':: ${kind} name '${name}' cannot start with '_'`;
139725
- case 5 /* NameContainsNonURISafeCharacters */:
139726
- return `'${typing}':: ${kind} name '${name}' contains non URI safe characters`;
139728
+ case 5 /* NameContainsInvalidCharacters */:
139729
+ return `'${typing}':: ${kind} name '${name}' contains invalid characters`;
139727
139730
  case 0 /* Ok */:
139728
139731
  return Debug.fail();
139729
139732
  // Shouldn't have called this.
@@ -186596,6 +186599,22 @@ var TypingsInstaller = class {
186596
186599
  /** @internal */
186597
186600
  installPackage(req) {
186598
186601
  const { fileName, packageName, projectName, projectRootPath, id } = req;
186602
+ const validationResult = ts_JsTyping_exports.validatePackageName(packageName);
186603
+ if (validationResult !== ts_JsTyping_exports.NameValidationResult.Ok) {
186604
+ const message = ts_JsTyping_exports.renderPackageNameValidationFailure(validationResult, packageName);
186605
+ if (this.log.isEnabled()) {
186606
+ this.log.writeLine(message);
186607
+ }
186608
+ const response = {
186609
+ kind: ActionPackageInstalled,
186610
+ projectName,
186611
+ id,
186612
+ success: false,
186613
+ message
186614
+ };
186615
+ this.sendResponse(response);
186616
+ return;
186617
+ }
186599
186618
  const cwd = forEachAncestorDirectory(getDirectoryPath(fileName), (directory) => {
186600
186619
  if (this.installTypingHost.fileExists(combinePaths(directory, "package.json"))) {
186601
186620
  return directory;
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-63239-2",
5
+ "version": "6.0.0-pr-63539-29",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -51,24 +51,24 @@
51
51
  "@types/node": "latest",
52
52
  "@types/source-map-support": "^0.5.10",
53
53
  "@types/which": "^3.0.4",
54
- "@typescript-eslint/rule-tester": "^8.56.1",
55
- "@typescript-eslint/type-utils": "^8.56.1",
56
- "@typescript-eslint/utils": "^8.56.1",
54
+ "@typescript-eslint/rule-tester": "^8.57.2",
55
+ "@typescript-eslint/type-utils": "^8.57.2",
56
+ "@typescript-eslint/utils": "^8.57.2",
57
57
  "azure-devops-node-api": "^15.1.3",
58
58
  "c8": "^10.1.3",
59
59
  "chai": "^4.5.0",
60
60
  "chokidar": "^4.0.3",
61
- "diff": "^8.0.3",
61
+ "diff": "^8.0.4",
62
62
  "dprint": "^0.49.1",
63
- "esbuild": "^0.27.3",
64
- "eslint": "^10.0.2",
65
- "eslint-plugin-regexp": "^3.0.0",
66
- "fast-xml-parser": "^5.4.1",
63
+ "esbuild": "^0.27.4",
64
+ "eslint": "^10.1.0",
65
+ "eslint-plugin-regexp": "^3.1.0",
66
+ "fast-xml-parser": "^5.5.9",
67
67
  "glob": "^10.5.0",
68
68
  "globals": "^17.4.0",
69
- "hereby": "^1.12.0",
69
+ "hereby": "^1.14.0",
70
70
  "jsonc-parser": "^3.3.1",
71
- "knip": "^5.85.0",
71
+ "knip": "^5.88.1",
72
72
  "minimist": "^1.2.8",
73
73
  "mocha": "^10.8.2",
74
74
  "mocha-fivemat-progress-reporter": "^0.1.0",
@@ -78,8 +78,8 @@
78
78
  "playwright": "^1.58.2",
79
79
  "source-map-support": "^0.5.21",
80
80
  "tslib": "^2.8.1",
81
- "typescript": "^5.9.3",
82
- "typescript-eslint": "^8.56.1",
81
+ "typescript": "^6.0.2",
82
+ "typescript-eslint": "^8.57.2",
83
83
  "which": "^3.0.1"
84
84
  },
85
85
  "overrides": {