typescript 6.0.0-dev.20260324 → 6.0.0-dev.20260416
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 +12 -1
- package/lib/_tsc.js +4 -2
- package/lib/lib.es5.d.ts +2 -2
- package/lib/typescript.js +26 -7
- package/package.json +14 -14
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
|
[](https://github.com/microsoft/TypeScript/actions/workflows/ci.yml)
|
|
5
6
|
[](https://www.npmjs.com/package/typescript)
|
|
6
7
|
[](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 behavorial 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-dev.
|
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20260416`;
|
|
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", "
|
|
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 */:
|
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.
|
|
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
|
|
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-dev.
|
|
2292
|
+
var version = `${versionMajorMinor}.0-dev.20260416`;
|
|
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", "
|
|
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["
|
|
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 (
|
|
139701
|
-
return 5 /*
|
|
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 /*
|
|
139726
|
-
return `'${typing}':: ${kind} name '${name}' contains
|
|
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",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "6.0.0-dev.
|
|
5
|
+
"version": "6.0.0-dev.20260416",
|
|
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.
|
|
55
|
-
"@typescript-eslint/type-utils": "^8.
|
|
56
|
-
"@typescript-eslint/utils": "^8.
|
|
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.
|
|
61
|
+
"diff": "^8.0.4",
|
|
62
62
|
"dprint": "^0.49.1",
|
|
63
|
-
"esbuild": "^0.27.
|
|
64
|
-
"eslint": "^10.0
|
|
65
|
-
"eslint-plugin-regexp": "^3.
|
|
66
|
-
"fast-xml-parser": "^5.
|
|
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.
|
|
69
|
+
"hereby": "^1.14.0",
|
|
70
70
|
"jsonc-parser": "^3.3.1",
|
|
71
|
-
"knip": "^5.
|
|
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": "^
|
|
82
|
-
"typescript-eslint": "^8.
|
|
81
|
+
"typescript": "^6.0.2",
|
|
82
|
+
"typescript-eslint": "^8.57.2",
|
|
83
83
|
"which": "^3.0.1"
|
|
84
84
|
},
|
|
85
85
|
"overrides": {
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"node": "22.22.0",
|
|
115
115
|
"npm": "8.19.4"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "f1a9288c23c04e785bbfb092077a7b70747c5b76"
|
|
118
118
|
}
|