Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ http_archive(
load("@aspect_rules_ts//ts:repositories.bzl", "rules_ts_dependencies")

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

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
"tar": "^7.0.0",
"ts-node": "^10.9.1",
"tslib": "2.8.1",
"typescript": "5.9.0-beta",
"typescript": "5.9.1-rc",
"undici": "7.12.0",
"unenv": "^1.10.0",
"verdaccio": "6.1.5",
Expand Down Expand Up @@ -173,6 +173,6 @@
}
},
"resolutions": {
"typescript": "5.9.0-beta"
"typescript": "5.9.1-rc"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("//tools:defaults.bzl", "ts_project")

# files fetched on 2025-07-18
# files fetched on 2025-07-25

# Commands to update from node_modules:
# cp node_modules/typescript/lib/typescript.d.ts packages/schematics/angular/third_party/github.com/Microsoft/TypeScript/lib/typescript.d.ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2285,7 +2285,7 @@ module.exports = __toCommonJS(typescript_exports);

// src/compiler/corePublic.ts
var versionMajorMinor = "5.9";
var version = "5.9.0-beta";
var version = "5.9.1-rc";
var Comparison = /* @__PURE__ */ ((Comparison3) => {
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
Expand Down Expand Up @@ -9400,15 +9400,16 @@ var Diagnostics = {
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."),
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."),
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."),
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."),
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'."),
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."),
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."),
_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."),
_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 }'."),
_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."),
_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 }'."),
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'."),
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'."),
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."),
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."),
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."),
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."),
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."),
Expand Down Expand Up @@ -52126,6 +52127,15 @@ function createTypeChecker(host) {
diagnostics.add(diagnostic);
return diagnostic;
}
function getVerbatimModuleSyntaxErrorMessage(node) {
const sourceFile = getSourceFileOfNode(node);
const fileName = sourceFile.fileName;
if (fileExtensionIsOneOf(fileName, [".cts" /* Cts */, ".cjs" /* Cjs */])) {
return Diagnostics.ECMAScript_imports_and_exports_cannot_be_written_in_a_CommonJS_file_under_verbatimModuleSyntax;
} else {
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;
}
}
function addErrorOrSuggestion(isError, diagnostic) {
if (isError) {
diagnostics.add(diagnostic);
Expand Down Expand Up @@ -55204,7 +55214,7 @@ function createTypeChecker(host) {
}
}
function typeToString(type, enclosingDeclaration, flags = 1048576 /* AllowUniqueESSymbolType */ | 16384 /* UseAliasDefinedOutsideCurrentScope */, writer = createTextWriter(""), maximumLength, verbosityLevel, out) {
const noTruncation = compilerOptions.noErrorTruncation || flags & 1 /* NoTruncation */;
const noTruncation = !maximumLength && compilerOptions.noErrorTruncation || flags & 1 /* NoTruncation */;
const typeNode = nodeBuilder.typeToTypeNode(
type,
enclosingDeclaration,
Expand Down Expand Up @@ -78010,6 +78020,9 @@ function createTypeChecker(host) {
}
function popContextualType() {
contextualTypeCount--;
contextualTypeNodes[contextualTypeCount] = void 0;
contextualTypes[contextualTypeCount] = void 0;
contextualIsCache[contextualTypeCount] = void 0;
}
function findContextualNode(node, includeCaches) {
for (let i = contextualTypeCount - 1; i >= 0; i--) {
Expand All @@ -78026,6 +78039,8 @@ function createTypeChecker(host) {
}
function popInferenceContext() {
inferenceContextCount--;
inferenceContextNodes[inferenceContextCount] = void 0;
inferenceContexts[inferenceContextCount] = void 0;
}
function getInferenceContext(node) {
for (let i = inferenceContextCount - 1; i >= 0; i--) {
Expand All @@ -78036,11 +78051,13 @@ function createTypeChecker(host) {
}
function pushActiveMapper(mapper) {
activeTypeMappers[activeTypeMappersCount] = mapper;
activeTypeMappersCaches[activeTypeMappersCount] = /* @__PURE__ */ new Map();
activeTypeMappersCaches[activeTypeMappersCount] ?? (activeTypeMappersCaches[activeTypeMappersCount] = /* @__PURE__ */ new Map());
activeTypeMappersCount++;
}
function popActiveMapper() {
activeTypeMappersCount--;
activeTypeMappers[activeTypeMappersCount] = void 0;
activeTypeMappersCaches[activeTypeMappersCount].clear();
}
function findActiveMapper(mapper) {
for (let i = activeTypeMappersCount - 1; i >= 0; i--) {
Expand Down Expand Up @@ -90487,9 +90504,9 @@ function createTypeChecker(host) {
}
}
if (compilerOptions.verbatimModuleSyntax && node.kind !== 272 /* ImportEqualsDeclaration */ && !isInJSFile(node) && host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) === 1 /* CommonJS */) {
error2(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);
error2(node, getVerbatimModuleSyntaxErrorMessage(node));
} else if (moduleKind === 200 /* Preserve */ && node.kind !== 272 /* ImportEqualsDeclaration */ && node.kind !== 261 /* VariableDeclaration */ && host.getEmitModuleFormatOfFile(getSourceFileOfNode(node)) === 1 /* CommonJS */) {
error2(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve);
error2(node, Diagnostics.ECMAScript_module_syntax_is_not_allowed_in_a_CommonJS_module_when_module_is_set_to_preserve);
}
if (compilerOptions.verbatimModuleSyntax && !isTypeOnlyImportOrExportDeclaration(node) && !(node.flags & 33554432 /* Ambient */) && targetFlags & 128 /* ConstEnum */) {
const constEnumDeclaration = target.valueDeclaration;
Expand Down Expand Up @@ -90848,7 +90865,7 @@ function createTypeChecker(host) {
checkExpressionCached(node.expression);
}
if (isIllegalExportDefaultInCJS) {
error2(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);
error2(node, getVerbatimModuleSyntaxErrorMessage(node));
}
checkExternalModuleExports(container);
if (node.flags & 33554432 /* Ambient */ && !isEntityNameExpression(node.expression)) {
Expand Down Expand Up @@ -94716,7 +94733,7 @@ function createTypeChecker(host) {
}
function checkGrammarImportCallExpression(node) {
if (compilerOptions.verbatimModuleSyntax && moduleKind === 1 /* CommonJS */) {
return grammarErrorOnNode(node, Diagnostics.ESM_syntax_is_not_allowed_in_a_CommonJS_module_when_verbatimModuleSyntax_is_enabled);
return grammarErrorOnNode(node, getVerbatimModuleSyntaxErrorMessage(node));
}
if (node.expression.kind === 237 /* MetaProperty */) {
if (moduleKind !== 99 /* ESNext */ && moduleKind !== 200 /* Preserve */) {
Expand Down Expand Up @@ -169201,6 +169218,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
if (firstAccessibleSymbolId && addToSeen(seenPropertySymbols, firstAccessibleSymbolId)) {
const index = symbols.length;
symbols.push(firstAccessibleSymbol);
symbolToSortTextMap[getSymbolId(firstAccessibleSymbol)] = SortText.GlobalsOrKeywords;
const moduleSymbol = firstAccessibleSymbol.parent;
if (!moduleSymbol || !isExternalModuleSymbol(moduleSymbol) || typeChecker.tryGetMemberInModuleExportsAndProperties(firstAccessibleSymbol.name, moduleSymbol) !== firstAccessibleSymbol) {
symbolToOriginInfoMap[index] = { kind: getNullableSymbolOriginInfoKind(2 /* SymbolMemberNoExport */) };
Expand Down Expand Up @@ -176938,7 +176956,7 @@ function collectElements(sourceFile, cancellationToken) {
function addNodeOutliningSpans(sourceFile, cancellationToken, out) {
let depthRemaining = 40;
let current = 0;
const statements = [...sourceFile.statements, sourceFile.endOfFileToken];
const statements = sourceFile.statements;
const n = statements.length;
while (current < n) {
while (current < n && !isAnyImportSyntax(statements[current])) {
Expand All @@ -176956,6 +176974,7 @@ function addNodeOutliningSpans(sourceFile, cancellationToken, out) {
out.push(createOutliningSpanFromBounds(findChildOfKind(statements[firstImport], 102 /* ImportKeyword */, sourceFile).getStart(sourceFile), statements[lastImport].getEnd(), "imports" /* Imports */));
}
}
visitNode3(sourceFile.endOfFileToken);
function visitNode3(n2) {
var _a;
if (depthRemaining === 0) return;
Expand Down
Loading
Loading