Skip to content

Commit aa19e66

Browse files
crisbetoalan-agius4
authored andcommitted
build: update to TypeScript 5.9 RC
Updates to the release candidate of TypeScript 5.9.
1 parent fc012b7 commit aa19e66

File tree

5 files changed

+117
-98
lines changed

5 files changed

+117
-98
lines changed

WORKSPACE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ http_archive(
204204
load("@aspect_rules_ts//ts:repositories.bzl", "rules_ts_dependencies")
205205

206206
rules_ts_dependencies(
207-
# Obtained by: curl --silent https://registry.npmjs.org/typescript/5.9.0-beta | jq -r '.dist.integrity'
208-
ts_integrity = "sha512-p91qoTdwWKj9YEBYavmGiBn0DF4OBElzw4pW4oPbK4HeCfr/SDz9+yviVWshZXGvGvFCJ3AVQ+J7F1UZXc23QQ==",
207+
# Obtained by: curl --silent https://registry.npmjs.org/typescript/5.9.1-rc | jq -r '.dist.integrity'
208+
ts_integrity = "sha512-pWar+9HGLkLwxu2PX1ItWnWg80r6nZ8qVEyWVRsnlZyZeFkHeR+eCrZ9PcYeVZjdLvcd5p/WgycViI+lsTh2qg==",
209209
ts_version_from = "//:package.json",
210210
)
211211

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
"tar": "^7.0.0",
141141
"ts-node": "^10.9.1",
142142
"tslib": "2.8.1",
143-
"typescript": "5.9.0-beta",
143+
"typescript": "5.9.1-rc",
144144
"undici": "7.12.0",
145145
"unenv": "^1.10.0",
146146
"verdaccio": "6.1.5",
@@ -173,6 +173,6 @@
173173
}
174174
},
175175
"resolutions": {
176-
"typescript": "5.9.0-beta"
176+
"typescript": "5.9.1-rc"
177177
}
178178
}

packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
load("//tools:defaults.bzl", "ts_project")
22

3-
# files fetched on 2025-07-18
3+
# files fetched on 2025-07-25
44

55
# Commands to update from node_modules:
66
# cp node_modules/typescript/lib/typescript.d.ts packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript.d.ts

packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript.js

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2285,7 +2285,7 @@ module.exports = __toCommonJS(typescript_exports);
22852285

22862286
// src/compiler/corePublic.ts
22872287
var versionMajorMinor = "5.9";
2288-
var version = "5.9.0-beta";
2288+
var version = "5.9.1-rc";
22892289
var Comparison = /* @__PURE__ */ ((Comparison3) => {
22902290
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
22912291
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -9400,15 +9400,16 @@ var Diagnostics = {
94009400
An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration: diag(1283, 1 /* Error */, "An_export_declaration_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolve_1283", "An 'export =' declaration must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),
94019401
An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_type: diag(1284, 1 /* Error */, "An_export_default_must_reference_a_value_when_verbatimModuleSyntax_is_enabled_but_0_only_refers_to_a_1284", "An 'export default' must reference a value when 'verbatimModuleSyntax' is enabled, but '{0}' only refers to a type."),
94029402
An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_a_type_only_declaration: diag(1285, 1 /* Error */, "An_export_default_must_reference_a_real_value_when_verbatimModuleSyntax_is_enabled_but_0_resolves_to_1285", "An 'export default' must reference a real value when 'verbatimModuleSyntax' is enabled, but '{0}' resolves to a type-only declaration."),
9403-
ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: diag(1286, 1 /* Error */, "ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled_1286", "ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enabled."),
9403+
ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax: diag(1286, 1 /* Error */, "ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_1286", "ECMAScript imports and exports cannot be written in a CommonJS file under 'verbatimModuleSyntax'."),
94049404
A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled: diag(1287, 1 /* Error */, "A_top_level_export_modifier_cannot_be_used_on_value_declarations_in_a_CommonJS_module_when_verbatimM_1287", "A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled."),
94059405
An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabled: diag(1288, 1 /* Error */, "An_import_alias_cannot_resolve_to_a_type_or_type_only_declaration_when_verbatimModuleSyntax_is_enabl_1288", "An import alias cannot resolve to a type or type-only declaration when 'verbatimModuleSyntax' is enabled."),
94069406
_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported: diag(1289, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1289", "'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),
94079407
_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default: diag(1290, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_marked_type_only_in_this_file_before_re_exporting_1290", "'{0}' resolves to a type-only declaration and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),
94089408
_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported: diag(1291, 1 /* Error */, "_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1291", "'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'import type' where '{0}' is imported."),
94099409
_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default: diag(1292, 1 /* Error */, "_0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enable_1292", "'{0}' resolves to a type and must be marked type-only in this file before re-exporting when '{1}' is enabled. Consider using 'export type { {0} as default }'."),
9410-
ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve: diag(1293, 1 /* Error */, "ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve_1293", "ESM syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'."),
9410+
ECMAScript_module_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve: diag(1293, 1 /* Error */, "ECMAScript_module_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve_1293", "ECMAScript module syntax is not allowed in a CommonJS module when 'module' is set to 'preserve'."),
94119411
This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled: diag(1294, 1 /* Error */, "This_syntax_is_not_allowed_when_erasableSyntaxOnly_is_enabled_1294", "This syntax is not allowed when 'erasableSyntaxOnly' is enabled."),
9412+
ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_Adjust_the_type_field_in_the_nearest_package_json_to_make_this_file_an_ECMAScript_module_or_adjust_your_verbatimModuleSyntax_module_and_moduleResolution_settings_in_TypeScript: diag(1295, 1 /* Error */, "ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_Adjus_1295", "ECMAScript imports and exports cannot be written in a CommonJS file under 'verbatimModuleSyntax'. Adjust the 'type' field in the nearest 'package.json' to make this file an ECMAScript module, or adjust your 'verbatimModuleSyntax', 'module', and 'moduleResolution' settings in TypeScript."),
94129413
with_statements_are_not_allowed_in_an_async_function_block: diag(1300, 1 /* Error */, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."),
94139414
await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1308, 1 /* Error */, "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308", "'await' expressions are only allowed within async functions and at the top levels of modules."),
94149415
The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level: diag(1309, 1 /* Error */, "The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309", "The current file is a CommonJS module and cannot use 'await' at the top level."),
@@ -52126,6 +52127,15 @@ function createTypeChecker(host) {
5212652127
diagnostics.add(diagnostic);
5212752128
return diagnostic;
5212852129
}
52130+
function getVerbatimModuleSyntaxErrorMessage(node) {
52131+
const sourceFile = getSourceFileOfNode(node);
52132+
const fileName = sourceFile.fileName;
52133+
if (fileExtensionIsOneOf(fileName, [".cts" /* Cts */, ".cjs" /* Cjs */])) {
52134+
return Diagnostics.ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax;
52135+
} else {
52136+
return Diagnostics.ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax_Adjust_the_type_field_in_the_nearest_package_json_to_make_this_file_an_ECMAScript_module_or_adjust_your_verbatimModuleSyntax_module_and_moduleResolution_settings_in_TypeScript;
52137+
}
52138+
}
5212952139
function addErrorOrSuggestion(isError, diagnostic) {
5213052140
if (isError) {
5213152141
diagnostics.add(diagnostic);
@@ -55204,7 +55214,7 @@ function createTypeChecker(host) {
5520455214
}
5520555215
}
5520655216
function typeToString(type, enclosingDeclaration, flags = 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */, writer = createTextWriter(""), maximumLength, verbosityLevel, out) {
55207-
const noTruncation = compilerOptions.noErrorTruncation || flags & 1 /* NoTruncation */;
55217+
const noTruncation = !maximumLength && compilerOptions.noErrorTruncation || flags & 1 /* NoTruncation */;
5520855218
const typeNode = nodeBuilder.typeToTypeNode(
5520955219
type,
5521055220
enclosingDeclaration,
@@ -78010,6 +78020,9 @@ function createTypeChecker(host) {
7801078020
}
7801178021
function popContextualType() {
7801278022
contextualTypeCount--;
78023+
contextualTypeNodes[contextualTypeCount] = void 0;
78024+
contextualTypes[contextualTypeCount] = void 0;
78025+
contextualIsCache[contextualTypeCount] = void 0;
7801378026
}
7801478027
function findContextualNode(node, includeCaches) {
7801578028
for (let i = contextualTypeCount - 1; i >= 0; i--) {
@@ -78026,6 +78039,8 @@ function createTypeChecker(host) {
7802678039
}
7802778040
function popInferenceContext() {
7802878041
inferenceContextCount--;
78042+
inferenceContextNodes[inferenceContextCount] = void 0;
78043+
inferenceContexts[inferenceContextCount] = void 0;
7802978044
}
7803078045
function getInferenceContext(node) {
7803178046
for (let i = inferenceContextCount - 1; i >= 0; i--) {
@@ -78036,11 +78051,13 @@ function createTypeChecker(host) {
7803678051
}
7803778052
function pushActiveMapper(mapper) {
7803878053
activeTypeMappers[activeTypeMappersCount] = mapper;
78039-
activeTypeMappersCaches[activeTypeMappersCount] = /* @__PURE__ */ new Map();
78054+
activeTypeMappersCaches[activeTypeMappersCount] ?? (activeTypeMappersCaches[activeTypeMappersCount] = /* @__PURE__ */ new Map());
7804078055
activeTypeMappersCount++;
7804178056
}
7804278057
function popActiveMapper() {
7804378058
activeTypeMappersCount--;
78059+
activeTypeMappers[activeTypeMappersCount] = void 0;
78060+
activeTypeMappersCaches[activeTypeMappersCount].clear();
7804478061
}
7804578062
function findActiveMapper(mapper) {
7804678063
for (let i = activeTypeMappersCount - 1; i >= 0; i--) {
@@ -90487,9 +90504,9 @@ function createTypeChecker(host) {
9048790504
}
9048890505
}
9048990506
if (compilerOptions.verbatimModuleSyntax && node.kind !== 272 /* ImportEqualsDeclaration */ && !isInJSFile(node) && host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) === 1 /* CommonJS */) {
90490-
error2(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);
90507+
error2(node, getVerbatimModuleSyntaxErrorMessage(node));
9049190508
} else if (moduleKind === 200 /* Preserve */ && node.kind !== 272 /* ImportEqualsDeclaration */ && node.kind !== 261 /* VariableDeclaration */ && host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) === 1 /* CommonJS */) {
90492-
error2(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve);
90509+
error2(node, Diagnostics.ECMAScript_module_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve);
9049390510
}
9049490511
if (compilerOptions.verbatimModuleSyntax && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 33554432 /* Ambient */) && targetFlags & 128 /* ConstEnum */) {
9049590512
const constEnumDeclaration = target.valueDeclaration;
@@ -90848,7 +90865,7 @@ function createTypeChecker(host) {
9084890865
checkExpressionCached(node.expression);
9084990866
}
9085090867
if (isIllegalExportDefaultInCJS) {
90851-
error2(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);
90868+
error2(node, getVerbatimModuleSyntaxErrorMessage(node));
9085290869
}
9085390870
checkExternalModuleExports(container);
9085490871
if (node.flags & 33554432 /* Ambient */ && !isEntityNameExpression(node.expression)) {
@@ -94716,7 +94733,7 @@ function createTypeChecker(host) {
9471694733
}
9471794734
function checkGrammarImportCallExpression(node) {
9471894735
if (compilerOptions.verbatimModuleSyntax && moduleKind === 1 /* CommonJS */) {
94719-
return grammarErrorOnNode(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);
94736+
return grammarErrorOnNode(node, getVerbatimModuleSyntaxErrorMessage(node));
9472094737
}
9472194738
if (node.expression.kind === 237 /* MetaProperty */) {
9472294739
if (moduleKind !== 99 /* ESNext */ && moduleKind !== 200 /* Preserve */) {
@@ -169201,6 +169218,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
169201169218
if (firstAccessibleSymbolId && addToSeen(seenPropertySymbols, firstAccessibleSymbolId)) {
169202169219
const index = symbols.length;
169203169220
symbols.push(firstAccessibleSymbol);
169221+
symbolToSortTextMap[getSymbolId(firstAccessibleSymbol)] = SortText.GlobalsOrKeywords;
169204169222
const moduleSymbol = firstAccessibleSymbol.parent;
169205169223
if (!moduleSymbol || !isExternalModuleSymbol(moduleSymbol) || typeChecker.tryGetMemberInModuleExportsAndProperties(firstAccessibleSymbol.name, moduleSymbol) !== firstAccessibleSymbol) {
169206169224
symbolToOriginInfoMap[index] = { kind: getNullableSymbolOriginInfoKind(2 /* SymbolMemberNoExport */) };
@@ -176938,7 +176956,7 @@ function collectElements(sourceFile, cancellationToken) {
176938176956
function addNodeOutliningSpans(sourceFile, cancellationToken, out) {
176939176957
let depthRemaining = 40;
176940176958
let current = 0;
176941-
const statements = [...sourceFile.statements, sourceFile.endOfFileToken];
176959+
const statements = sourceFile.statements;
176942176960
const n = statements.length;
176943176961
while (current < n) {
176944176962
while (current < n && !isAnyImportSyntax(statements[current])) {
@@ -176956,6 +176974,7 @@ function addNodeOutliningSpans(sourceFile, cancellationToken, out) {
176956176974
out.push(createOutliningSpanFromBounds(findChildOfKind(statements[firstImport], 102 /* ImportKeyword */, sourceFile).getStart(sourceFile), statements[lastImport].getEnd(), "imports" /* Imports */));
176957176975
}
176958176976
}
176977+
visitNode3(sourceFile.endOfFileToken);
176959176978
function visitNode3(n2) {
176960176979
var _a;
176961176980
if (depthRemaining === 0) return;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy