Bump version to 5.9.3 and LKG

This commit is contained in:
TypeScript Bot 2025-09-25 23:11:16 +00:00
parent 8428ca4cc8
commit c63de15a99
7 changed files with 78 additions and 28 deletions

View File

@ -18,7 +18,7 @@ and limitations under the License.
// src/compiler/corePublic.ts
var versionMajorMinor = "5.9";
var version = "5.9.2";
var version = "5.9.3";
// src/compiler/core.ts
var emptyArray = [];
@ -20254,10 +20254,22 @@ function createParenthesizerRules(factory2) {
}
return parenthesizerRule;
}
function mixingBinaryOperatorsRequiresParentheses(a, b) {
if (a === 61 /* QuestionQuestionToken */) {
return b === 56 /* AmpersandAmpersandToken */ || b === 57 /* BarBarToken */;
}
if (b === 61 /* QuestionQuestionToken */) {
return a === 56 /* AmpersandAmpersandToken */ || a === 57 /* BarBarToken */;
}
return false;
}
function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) {
const emittedOperand = skipPartiallyEmittedExpressions(operand);
if (isBinaryExpression(emittedOperand) && mixingBinaryOperatorsRequiresParentheses(binaryOperator, emittedOperand.operatorToken.kind)) {
return true;
}
const binaryOperatorPrecedence = getOperatorPrecedence(227 /* BinaryExpression */, binaryOperator);
const binaryOperatorAssociativity = getOperatorAssociativity(227 /* BinaryExpression */, binaryOperator);
const emittedOperand = skipPartiallyEmittedExpressions(operand);
if (!isLeftSideOfBinary && operand.kind === 220 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) {
return true;
}
@ -53296,7 +53308,22 @@ function createTypeChecker(host) {
function getPropertyNameNodeForSymbol(symbol, context) {
const hashPrivateName = getClonedHashPrivateName(symbol);
if (hashPrivateName) {
return hashPrivateName;
const shouldEmitErroneousFieldName = !!context.tracker.reportPrivateInBaseOfClassExpression && context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */;
if (!shouldEmitErroneousFieldName) {
return hashPrivateName;
} else {
let rawName2 = unescapeLeadingUnderscores(symbol.escapedName);
rawName2 = rawName2.replace(/__#\d+@#/g, "__#private@#");
return createPropertyNameNodeForIdentifierOrLiteral(
rawName2,
getEmitScriptTarget(compilerOptions),
/*singleQuote*/
false,
/*stringNamed*/
true,
!!(symbol.flags & 8192 /* Method */)
);
}
}
const stringNamed = !!length(symbol.declarations) && every(symbol.declarations, isStringNamed);
const singleQuote = !!length(symbol.declarations) && every(symbol.declarations, isSingleQuotedStringNamed);
@ -124188,10 +124215,9 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
}
const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames()));
commandLine.fileNames.forEach((fileName) => {
if (isDeclarationFileName(fileName)) return;
const path = toPath3(fileName);
let outputDts;
if (!fileExtensionIs(fileName, ".json" /* Json */)) {
if (!isDeclarationFileName(fileName) && !fileExtensionIs(fileName, ".json" /* Json */)) {
if (!commandLine.options.outFile) {
outputDts = getOutputDeclarationFileName(fileName, resolvedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory3);
mapOutputFileToResolvedRef.set(toPath3(outputDts), { resolvedRef, source: fileName });

View File

@ -374,6 +374,8 @@ interface Float16ArrayConstructor {
new (length?: number): Float16Array<ArrayBuffer>;
new (array: ArrayLike<number> | Iterable<number>): Float16Array<ArrayBuffer>;
new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): Float16Array<TArrayBuffer>;
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float16Array<ArrayBuffer>;
new (array: ArrayLike<number> | ArrayBuffer): Float16Array<ArrayBuffer>;
/**
* The size in bytes of each element in the array.

1
lib/typescript.d.ts vendored
View File

@ -5907,7 +5907,6 @@ declare namespace ts {
*/
interface SourceFileLike {
readonly text: string;
languageVariant?: LanguageVariant;
}
interface SourceFileLike {
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;

View File

@ -2285,7 +2285,7 @@ module.exports = __toCommonJS(typescript_exports);
// src/compiler/corePublic.ts
var versionMajorMinor = "5.9";
var version = "5.9.2";
var version = "5.9.3";
var Comparison = /* @__PURE__ */ ((Comparison3) => {
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@ -6790,10 +6790,10 @@ var ScriptTarget = /* @__PURE__ */ ((ScriptTarget12) => {
ScriptTarget12[ScriptTarget12["Latest"] = 99 /* ESNext */] = "Latest";
return ScriptTarget12;
})(ScriptTarget || {});
var LanguageVariant = /* @__PURE__ */ ((LanguageVariant3) => {
LanguageVariant3[LanguageVariant3["Standard"] = 0] = "Standard";
LanguageVariant3[LanguageVariant3["JSX"] = 1] = "JSX";
return LanguageVariant3;
var LanguageVariant = /* @__PURE__ */ ((LanguageVariant4) => {
LanguageVariant4[LanguageVariant4["Standard"] = 0] = "Standard";
LanguageVariant4[LanguageVariant4["JSX"] = 1] = "JSX";
return LanguageVariant4;
})(LanguageVariant || {});
var WatchDirectoryFlags = /* @__PURE__ */ ((WatchDirectoryFlags3) => {
WatchDirectoryFlags3[WatchDirectoryFlags3["None"] = 0] = "None";
@ -24351,10 +24351,22 @@ function createParenthesizerRules(factory2) {
}
return parenthesizerRule;
}
function mixingBinaryOperatorsRequiresParentheses(a, b) {
if (a === 61 /* QuestionQuestionToken */) {
return b === 56 /* AmpersandAmpersandToken */ || b === 57 /* BarBarToken */;
}
if (b === 61 /* QuestionQuestionToken */) {
return a === 56 /* AmpersandAmpersandToken */ || a === 57 /* BarBarToken */;
}
return false;
}
function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) {
const emittedOperand = skipPartiallyEmittedExpressions(operand);
if (isBinaryExpression(emittedOperand) && mixingBinaryOperatorsRequiresParentheses(binaryOperator, emittedOperand.operatorToken.kind)) {
return true;
}
const binaryOperatorPrecedence = getOperatorPrecedence(227 /* BinaryExpression */, binaryOperator);
const binaryOperatorAssociativity = getOperatorAssociativity(227 /* BinaryExpression */, binaryOperator);
const emittedOperand = skipPartiallyEmittedExpressions(operand);
if (!isLeftSideOfBinary && operand.kind === 220 /* ArrowFunction */ && binaryOperatorPrecedence > 3 /* Assignment */) {
return true;
}
@ -57907,7 +57919,22 @@ function createTypeChecker(host) {
function getPropertyNameNodeForSymbol(symbol, context) {
const hashPrivateName = getClonedHashPrivateName(symbol);
if (hashPrivateName) {
return hashPrivateName;
const shouldEmitErroneousFieldName = !!context.tracker.reportPrivateInBaseOfClassExpression && context.flags & 2048 /* WriteClassExpressionAsTypeLiteral */;
if (!shouldEmitErroneousFieldName) {
return hashPrivateName;
} else {
let rawName2 = unescapeLeadingUnderscores(symbol.escapedName);
rawName2 = rawName2.replace(/__#\d+@#/g, "__#private@#");
return createPropertyNameNodeForIdentifierOrLiteral(
rawName2,
getEmitScriptTarget(compilerOptions),
/*singleQuote*/
false,
/*stringNamed*/
true,
!!(symbol.flags & 8192 /* Method */)
);
}
}
const stringNamed = !!length(symbol.declarations) && every(symbol.declarations, isStringNamed);
const singleQuote = !!length(symbol.declarations) && every(symbol.declarations, isSingleQuotedStringNamed);
@ -129038,10 +129065,9 @@ function createProgram(_rootNamesOrOptions, _options, _host, _oldProgram, _confi
}
const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames()));
commandLine.fileNames.forEach((fileName) => {
if (isDeclarationFileName(fileName)) return;
const path = toPath3(fileName);
let outputDts;
if (!fileExtensionIs(fileName, ".json" /* Json */)) {
if (!isDeclarationFileName(fileName) && !fileExtensionIs(fileName, ".json" /* Json */)) {
if (!commandLine.options.outFile) {
outputDts = getOutputDeclarationFileName(fileName, resolvedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory3);
mapOutputFileToResolvedRef.set(toPath3(outputDts), { resolvedRef, source: fileName });
@ -140403,7 +140429,7 @@ function isInsideJsxElementOrAttribute(sourceFile, position) {
if (token && token.kind === 20 /* CloseBraceToken */ && token.parent.kind === 295 /* JsxExpression */) {
return true;
}
if (token.kind === 31 /* LessThanSlashToken */ && token.parent.kind === 288 /* JsxClosingElement */) {
if (token.kind === 30 /* LessThanToken */ && token.parent.kind === 288 /* JsxClosingElement */) {
return true;
}
return false;
@ -140431,7 +140457,7 @@ function isInJSXText(sourceFile, position) {
function isInsideJsxElement(sourceFile, position) {
function isInsideJsxElementTraversal(node) {
while (node) {
if (node.kind >= 286 /* JsxSelfClosingElement */ && node.kind <= 295 /* JsxExpression */ || node.kind === 12 /* JsxText */ || node.kind === 30 /* LessThanToken */ || node.kind === 32 /* GreaterThanToken */ || node.kind === 80 /* Identifier */ || node.kind === 20 /* CloseBraceToken */ || node.kind === 19 /* OpenBraceToken */ || node.kind === 44 /* SlashToken */ || node.kind === 31 /* LessThanSlashToken */) {
if (node.kind >= 286 /* JsxSelfClosingElement */ && node.kind <= 295 /* JsxExpression */ || node.kind === 12 /* JsxText */ || node.kind === 30 /* LessThanToken */ || node.kind === 32 /* GreaterThanToken */ || node.kind === 80 /* Identifier */ || node.kind === 20 /* CloseBraceToken */ || node.kind === 19 /* OpenBraceToken */ || node.kind === 44 /* SlashToken */) {
node = node.parent;
} else if (node.kind === 285 /* JsxElement */) {
if (position > node.getStart(sourceFile)) return true;
@ -151873,9 +151899,7 @@ function createChildren(node, sourceFile) {
});
return children;
}
const languageVariant = (sourceFile == null ? void 0 : sourceFile.languageVariant) ?? 0 /* Standard */;
scanner.setText((sourceFile || node.getSourceFile()).text);
scanner.setLanguageVariant(languageVariant);
let pos = node.pos;
const processNode = (child) => {
addSyntheticNodes(children, pos, child.pos, node);
@ -151892,7 +151916,6 @@ function createChildren(node, sourceFile) {
node.forEachChild(processNode, processNodes);
addSyntheticNodes(children, pos, node.end, node);
scanner.setText(void 0);
scanner.setLanguageVariant(0 /* Standard */);
return children;
}
function addSyntheticNodes(nodes, pos, end, parent2) {
@ -167606,7 +167629,7 @@ function getJsxClosingTagCompletion(location, sourceFile) {
switch (node.kind) {
case 288 /* JsxClosingElement */:
return true;
case 31 /* LessThanSlashToken */:
case 44 /* SlashToken */:
case 32 /* GreaterThanToken */:
case 80 /* Identifier */:
case 212 /* PropertyAccessExpression */:
@ -168942,7 +168965,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
location = currentToken;
}
break;
case 31 /* LessThanSlashToken */:
case 44 /* SlashToken */:
if (currentToken.parent.kind === 286 /* JsxSelfClosingElement */) {
location = currentToken;
}
@ -168951,7 +168974,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
}
switch (parent2.kind) {
case 288 /* JsxClosingElement */:
if (contextToken.kind === 31 /* LessThanSlashToken */) {
if (contextToken.kind === 44 /* SlashToken */) {
isStartingCloseTag = true;
location = contextToken;
}
@ -170572,7 +170595,7 @@ function isValidTrigger(sourceFile, triggerCharacter, contextToken, position) {
case "<":
return !!contextToken && contextToken.kind === 30 /* LessThanToken */ && (!isBinaryExpression(contextToken.parent) || binaryExpressionMayBeOpenTag(contextToken.parent));
case "/":
return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind === 31 /* LessThanSlashToken */ && isJsxClosingElement(contextToken.parent));
return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind === 44 /* SlashToken */ && isJsxClosingElement(contextToken.parent));
case " ":
return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 308 /* SourceFile */;
default:

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "typescript",
"version": "5.9.2",
"version": "5.9.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "typescript",
"version": "5.9.2",
"version": "5.9.3",
"license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",

View File

@ -2,7 +2,7 @@
"name": "typescript",
"author": "Microsoft Corp.",
"homepage": "https://www.typescriptlang.org/",
"version": "5.9.2",
"version": "5.9.3",
"license": "Apache-2.0",
"description": "TypeScript is a language for application scale JavaScript development",
"keywords": [

View File

@ -3,7 +3,7 @@
export const versionMajorMinor = "5.9";
// The following is baselined as a literal template type without intervention
/** The version of the TypeScript compiler release */
export const version = "5.9.2" as string;
export const version = "5.9.3" as string;
/**
* Type of objects whose values are all of the same type.