Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package typescript for openSUSE:Factory checked in at 2025-01-13 17:50:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/typescript (Old) and /work/SRC/openSUSE:Factory/.typescript.new.1881 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "typescript" Mon Jan 13 17:50:17 2025 rev:31 rq:1237158 version:5.7.3 Changes: -------- --- /work/SRC/openSUSE:Factory/typescript/typescript.changes 2024-11-25 23:21:18.202181005 +0100 +++ /work/SRC/openSUSE:Factory/.typescript.new.1881/typescript.changes 2025-01-13 17:50:31.515607903 +0100 @@ -1,0 +2,17 @@ +Sat Jan 11 14:49:27 UTC 2025 - Andrea Manzini <andrea.manz...@suse.com> + +- Update to version 5.7.3 + * fix missing react error with fragments in react-native + * Do not require import attributes for JSON imports in --module node16 + * Cache started nonexistent property error checks to prevent reentrancy i + in the check + * Fix library inclusions for ES2024 target + * Remove reference not found errors from jsx: preserve + * Avoid incorrectly reusing assertion nodes from property assignments + * Do not require import attribute on type-only JSON import + * Mark the inherited any-based index signature so it can be elided in declaration emit + * Harden sanitizeLog against incorrect matches on TypeScript versions + * Don't try to add an implicit undefined for mapped properties outside of strictNullChecks + * Fix CodeQL configuration, releases + +------------------------------------------------------------------- Old: ---- typescript-5.7.2.tgz New: ---- typescript-5.7.3.tgz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ typescript.spec ++++++ --- /var/tmp/diff_new_pack.6kkvSN/_old 2025-01-13 17:50:31.971626744 +0100 +++ /var/tmp/diff_new_pack.6kkvSN/_new 2025-01-13 17:50:31.971626744 +0100 @@ -1,7 +1,7 @@ # # spec file for package typescript # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: typescript -Version: 5.7.2 +Version: 5.7.3 Release: 0 Summary: A language for application scale JavaScript development License: Apache-2.0 ++++++ typescript-5.7.2.tgz -> typescript-5.7.3.tgz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/package/lib/_tsc.js new/package/lib/_tsc.js --- old/package/lib/_tsc.js 1985-10-26 09:15:00.000000000 +0100 +++ new/package/lib/_tsc.js 1985-10-26 09:15:00.000000000 +0100 @@ -18,7 +18,7 @@ // src/compiler/corePublic.ts var versionMajorMinor = "5.7"; -var version = "5.7.2"; +var version = "5.7.3"; // src/compiler/core.ts var emptyArray = []; @@ -11143,6 +11143,7 @@ } var targetToLibMap = /* @__PURE__ */ new Map([ [99 /* ESNext */, "lib.esnext.full.d.ts"], + [11 /* ES2024 */, "lib.es2024.full.d.ts"], [10 /* ES2023 */, "lib.es2023.full.d.ts"], [9 /* ES2022 */, "lib.es2022.full.d.ts"], [8 /* ES2021 */, "lib.es2021.full.d.ts"], @@ -11158,6 +11159,7 @@ const target = getEmitScriptTarget(options); switch (target) { case 99 /* ESNext */: + case 11 /* ES2024 */: case 10 /* ES2023 */: case 9 /* ES2022 */: case 8 /* ES2021 */: @@ -46776,6 +46778,12 @@ /*isReadonly*/ true ); + var anyBaseTypeIndexInfo = createIndexInfo( + stringType, + anyType, + /*isReadonly*/ + false + ); var iterationTypesCache = /* @__PURE__ */ new Map(); var noIterationTypes = { get yieldType() { @@ -50319,7 +50327,7 @@ return true; } if (requiresAddingUndefined && annotationType) { - annotationType = getOptionalType(annotationType, !isParameter(node)); + annotationType = addOptionality(annotationType, !isParameter(node)); } return !!annotationType && typeNodeIsEquivalentToType(node, type, annotationType) && existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(existing, type); } @@ -56577,12 +56585,7 @@ addInheritedMembers(members, getPropertiesOfType(instantiatedBaseType)); callSignatures = concatenate(callSignatures, getSignaturesOfType(instantiatedBaseType, 0 /* Call */)); constructSignatures = concatenate(constructSignatures, getSignaturesOfType(instantiatedBaseType, 1 /* Construct */)); - const inheritedIndexInfos = instantiatedBaseType !== anyType ? getIndexInfosOfType(instantiatedBaseType) : [createIndexInfo( - stringType, - anyType, - /*isReadonly*/ - false - )]; + const inheritedIndexInfos = instantiatedBaseType !== anyType ? getIndexInfosOfType(instantiatedBaseType) : [anyBaseTypeIndexInfo]; indexInfos = concatenate(indexInfos, filter(inheritedIndexInfos, (info) => !findIndexInfo(indexInfos, info.keyType))); } } @@ -57108,12 +57111,7 @@ members = createSymbolTable(getNamedOrIndexSignatureMembers(members)); addInheritedMembers(members, getPropertiesOfType(baseConstructorType)); } else if (baseConstructorType === anyType) { - baseConstructorIndexInfo = createIndexInfo( - stringType, - anyType, - /*isReadonly*/ - false - ); + baseConstructorIndexInfo = anyBaseTypeIndexInfo; } } const indexSymbol = getIndexSymbolFromSymbolTable(members); @@ -70460,12 +70458,13 @@ const jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? Diagnostics.This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found : void 0; const jsxFactoryNamespace = getJsxNamespace(node); const jsxFactoryLocation = isJsxOpeningLikeElement(node) ? node.tagName : node; + const shouldFactoryRefErr = compilerOptions.jsx !== 1 /* Preserve */ && compilerOptions.jsx !== 3 /* ReactNative */; let jsxFactorySym; if (!(isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) { jsxFactorySym = resolveName( jsxFactoryLocation, jsxFactoryNamespace, - compilerOptions.jsx === 1 /* Preserve */ ? 111551 /* Value */ & ~384 /* Enum */ : 111551 /* Value */, + shouldFactoryRefErr ? 111551 /* Value */ : 111551 /* Value */ & ~384 /* Enum */, jsxFactoryRefErr, /*isUse*/ true @@ -70484,7 +70483,7 @@ resolveName( jsxFactoryLocation, localJsxNamespace, - compilerOptions.jsx === 1 /* Preserve */ ? 111551 /* Value */ & ~384 /* Enum */ : 111551 /* Value */, + shouldFactoryRefErr ? 111551 /* Value */ : 111551 /* Value */ & ~384 /* Enum */, jsxFactoryRefErr, /*isUse*/ true @@ -74045,6 +74044,13 @@ return getIntersectionType(x); } function reportNonexistentProperty(propNode, containingType, isUncheckedJS) { + const links = getNodeLinks(propNode); + const cache = links.nonExistentPropCheckCache || (links.nonExistentPropCheckCache = /* @__PURE__ */ new Set()); + const key = `${getTypeId(containingType)}|${isUncheckedJS}`; + if (cache.has(key)) { + return; + } + cache.add(key); let errorInfo; let relatedInfo; if (!isPrivateIdentifier(propNode) && containingType.flags & 1048576 /* Union */ && !(containingType.flags & 402784252 /* Primitive */)) { @@ -76003,12 +76009,14 @@ const sourceFileLinks = getNodeLinks(getSourceFileOfNode(node)); if (sourceFileLinks.jsxFragmentType !== void 0) return sourceFileLinks.jsxFragmentType; const jsxFragmentFactoryName = getJsxNamespace(node); - if (jsxFragmentFactoryName === "null") return sourceFileLinks.jsxFragmentType = anyType; + const shouldResolveFactoryReference = (compilerOptions.jsx === 2 /* React */ || compilerOptions.jsxFragmentFactory !== void 0) && jsxFragmentFactoryName !== "null"; + if (!shouldResolveFactoryReference) return sourceFileLinks.jsxFragmentType = anyType; + const shouldModuleRefErr = compilerOptions.jsx !== 1 /* Preserve */ && compilerOptions.jsx !== 3 /* ReactNative */; const jsxFactoryRefErr = diagnostics ? Diagnostics.Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found : void 0; const jsxFactorySymbol = getJsxNamespaceContainerForImplicitImport(node) ?? resolveName( node, jsxFragmentFactoryName, - compilerOptions.jsx === 1 /* Preserve */ ? 111551 /* Value */ & ~384 /* Enum */ : 111551 /* Value */, + shouldModuleRefErr ? 111551 /* Value */ : 111551 /* Value */ & ~384 /* Enum */, /*nameNotFoundMessage*/ jsxFactoryRefErr, /*isUse*/ @@ -78574,7 +78582,9 @@ switch (node.kind) { case 223 /* AwaitExpression */: case 213 /* CallExpression */: + case 215 /* TaggedTemplateExpression */: case 212 /* ElementAccessExpression */: + case 236 /* MetaProperty */: case 214 /* NewExpression */: case 211 /* PropertyAccessExpression */: case 229 /* YieldExpression */: @@ -78590,6 +78600,8 @@ case 56 /* AmpersandAmpersandToken */: case 77 /* AmpersandAmpersandEqualsToken */: return 3 /* Sometimes */; + case 28 /* CommaToken */: + return getSyntacticNullishnessSemantics(node.right); } return 2 /* Never */; case 227 /* ConditionalExpression */: @@ -84702,7 +84714,7 @@ } } } - if (isOnlyImportableAsDefault(node.moduleSpecifier, resolvedModule) && !hasTypeJsonImportAttribute(node)) { + if (!importClause.isTypeOnly && moduleKind === 199 /* NodeNext */ && isOnlyImportableAsDefault(node.moduleSpecifier, resolvedModule) && !hasTypeJsonImportAttribute(node)) { error(node.moduleSpecifier, Diagnostics.Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_module_is_set_to_0, ModuleKind[moduleKind]); } } else if (noUncheckedSideEffectImports && !importClause) { @@ -86986,6 +86998,7 @@ result || (result = []); for (const info of infoList) { if (info.declaration) continue; + if (info === anyBaseTypeIndexInfo) continue; const node = nodeBuilder.indexInfoToIndexSignatureDeclaration(info, enclosing, flags, internalFlags, tracker); if (node && infoList === staticInfos) { (node.modifiers || (node.modifiers = factory.createNodeArray())).unshift(factory.createModifier(126 /* StaticKeyword */)); @@ -131703,9 +131716,9 @@ } if (!result && node.kind === 303 /* PropertyAssignment */) { const initializer = node.initializer; - const type = isJSDocTypeAssertion(initializer) ? getJSDocTypeAssertionType(initializer) : initializer.kind === 234 /* AsExpression */ || initializer.kind === 216 /* TypeAssertionExpression */ ? initializer.type : void 0; - if (type && !isConstTypeReference(type)) { - result = serializeExistingTypeNode(type, context); + const assertionNode = isJSDocTypeAssertion(initializer) ? getJSDocTypeAssertionType(initializer) : initializer.kind === 234 /* AsExpression */ || initializer.kind === 216 /* TypeAssertionExpression */ ? initializer.type : void 0; + if (assertionNode && !isConstTypeReference(assertionNode) && resolver.canReuseTypeNodeAnnotation(context, node, assertionNode, symbol)) { + result = serializeExistingTypeNode(assertionNode, context); } } return result ?? inferTypeOfDeclaration( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/package/lib/typescript.js new/package/lib/typescript.js --- old/package/lib/typescript.js 1985-10-26 09:15:00.000000000 +0100 +++ new/package/lib/typescript.js 1985-10-26 09:15:00.000000000 +0100 @@ -2278,7 +2278,7 @@ // src/compiler/corePublic.ts var versionMajorMinor = "5.7"; -var version = "5.7.2"; +var version = "5.7.3"; var Comparison = /* @__PURE__ */ ((Comparison3) => { Comparison3[Comparison3["LessThan"] = -1] = "LessThan"; Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo"; @@ -14547,6 +14547,7 @@ } var targetToLibMap = /* @__PURE__ */ new Map([ [99 /* ESNext */, "lib.esnext.full.d.ts"], + [11 /* ES2024 */, "lib.es2024.full.d.ts"], [10 /* ES2023 */, "lib.es2023.full.d.ts"], [9 /* ES2022 */, "lib.es2022.full.d.ts"], [8 /* ES2021 */, "lib.es2021.full.d.ts"], @@ -14562,6 +14563,7 @@ const target = getEmitScriptTarget(options); switch (target) { case 99 /* ESNext */: + case 11 /* ES2024 */: case 10 /* ES2023 */: case 9 /* ES2022 */: case 8 /* ES2021 */: @@ -51379,6 +51381,12 @@ /*isReadonly*/ true ); + var anyBaseTypeIndexInfo = createIndexInfo( + stringType, + anyType, + /*isReadonly*/ + false + ); var iterationTypesCache = /* @__PURE__ */ new Map(); var noIterationTypes = { get yieldType() { @@ -54922,7 +54930,7 @@ return true; } if (requiresAddingUndefined && annotationType) { - annotationType = getOptionalType(annotationType, !isParameter(node)); + annotationType = addOptionality(annotationType, !isParameter(node)); } return !!annotationType && typeNodeIsEquivalentToType(node, type, annotationType) && existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(existing, type); } @@ -61180,12 +61188,7 @@ addInheritedMembers(members, getPropertiesOfType(instantiatedBaseType)); callSignatures = concatenate(callSignatures, getSignaturesOfType(instantiatedBaseType, 0 /* Call */)); constructSignatures = concatenate(constructSignatures, getSignaturesOfType(instantiatedBaseType, 1 /* Construct */)); - const inheritedIndexInfos = instantiatedBaseType !== anyType ? getIndexInfosOfType(instantiatedBaseType) : [createIndexInfo( - stringType, - anyType, - /*isReadonly*/ - false - )]; + const inheritedIndexInfos = instantiatedBaseType !== anyType ? getIndexInfosOfType(instantiatedBaseType) : [anyBaseTypeIndexInfo]; indexInfos = concatenate(indexInfos, filter(inheritedIndexInfos, (info) => !findIndexInfo(indexInfos, info.keyType))); } } @@ -61711,12 +61714,7 @@ members = createSymbolTable(getNamedOrIndexSignatureMembers(members)); addInheritedMembers(members, getPropertiesOfType(baseConstructorType)); } else if (baseConstructorType === anyType) { - baseConstructorIndexInfo = createIndexInfo( - stringType, - anyType, - /*isReadonly*/ - false - ); + baseConstructorIndexInfo = anyBaseTypeIndexInfo; } } const indexSymbol = getIndexSymbolFromSymbolTable(members); @@ -75063,12 +75061,13 @@ const jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? Diagnostics.This_JSX_tag_requires_0_to_be_in_scope_but_it_could_not_be_found : void 0; const jsxFactoryNamespace = getJsxNamespace(node); const jsxFactoryLocation = isJsxOpeningLikeElement(node) ? node.tagName : node; + const shouldFactoryRefErr = compilerOptions.jsx !== 1 /* Preserve */ && compilerOptions.jsx !== 3 /* ReactNative */; let jsxFactorySym; if (!(isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) { jsxFactorySym = resolveName( jsxFactoryLocation, jsxFactoryNamespace, - compilerOptions.jsx === 1 /* Preserve */ ? 111551 /* Value */ & ~384 /* Enum */ : 111551 /* Value */, + shouldFactoryRefErr ? 111551 /* Value */ : 111551 /* Value */ & ~384 /* Enum */, jsxFactoryRefErr, /*isUse*/ true @@ -75087,7 +75086,7 @@ resolveName( jsxFactoryLocation, localJsxNamespace, - compilerOptions.jsx === 1 /* Preserve */ ? 111551 /* Value */ & ~384 /* Enum */ : 111551 /* Value */, + shouldFactoryRefErr ? 111551 /* Value */ : 111551 /* Value */ & ~384 /* Enum */, jsxFactoryRefErr, /*isUse*/ true @@ -78648,6 +78647,13 @@ return getIntersectionType(x); } function reportNonexistentProperty(propNode, containingType, isUncheckedJS) { + const links = getNodeLinks(propNode); + const cache = links.nonExistentPropCheckCache || (links.nonExistentPropCheckCache = /* @__PURE__ */ new Set()); + const key = `${getTypeId(containingType)}|${isUncheckedJS}`; + if (cache.has(key)) { + return; + } + cache.add(key); let errorInfo; let relatedInfo; if (!isPrivateIdentifier(propNode) && containingType.flags & 1048576 /* Union */ && !(containingType.flags & 402784252 /* Primitive */)) { @@ -80606,12 +80612,14 @@ const sourceFileLinks = getNodeLinks(getSourceFileOfNode(node)); if (sourceFileLinks.jsxFragmentType !== void 0) return sourceFileLinks.jsxFragmentType; const jsxFragmentFactoryName = getJsxNamespace(node); - if (jsxFragmentFactoryName === "null") return sourceFileLinks.jsxFragmentType = anyType; + const shouldResolveFactoryReference = (compilerOptions.jsx === 2 /* React */ || compilerOptions.jsxFragmentFactory !== void 0) && jsxFragmentFactoryName !== "null"; + if (!shouldResolveFactoryReference) return sourceFileLinks.jsxFragmentType = anyType; + const shouldModuleRefErr = compilerOptions.jsx !== 1 /* Preserve */ && compilerOptions.jsx !== 3 /* ReactNative */; const jsxFactoryRefErr = diagnostics ? Diagnostics.Using_JSX_fragments_requires_fragment_factory_0_to_be_in_scope_but_it_could_not_be_found : void 0; const jsxFactorySymbol = getJsxNamespaceContainerForImplicitImport(node) ?? resolveName( node, jsxFragmentFactoryName, - compilerOptions.jsx === 1 /* Preserve */ ? 111551 /* Value */ & ~384 /* Enum */ : 111551 /* Value */, + shouldModuleRefErr ? 111551 /* Value */ : 111551 /* Value */ & ~384 /* Enum */, /*nameNotFoundMessage*/ jsxFactoryRefErr, /*isUse*/ @@ -83177,7 +83185,9 @@ switch (node.kind) { case 223 /* AwaitExpression */: case 213 /* CallExpression */: + case 215 /* TaggedTemplateExpression */: case 212 /* ElementAccessExpression */: + case 236 /* MetaProperty */: case 214 /* NewExpression */: case 211 /* PropertyAccessExpression */: case 229 /* YieldExpression */: @@ -83193,6 +83203,8 @@ case 56 /* AmpersandAmpersandToken */: case 77 /* AmpersandAmpersandEqualsToken */: return 3 /* Sometimes */; + case 28 /* CommaToken */: + return getSyntacticNullishnessSemantics(node.right); } return 2 /* Never */; case 227 /* ConditionalExpression */: @@ -89305,7 +89317,7 @@ } } } - if (isOnlyImportableAsDefault(node.moduleSpecifier, resolvedModule) && !hasTypeJsonImportAttribute(node)) { + if (!importClause.isTypeOnly && moduleKind === 199 /* NodeNext */ && isOnlyImportableAsDefault(node.moduleSpecifier, resolvedModule) && !hasTypeJsonImportAttribute(node)) { error2(node.moduleSpecifier, Diagnostics.Importing_a_JSON_file_into_an_ECMAScript_module_requires_a_type_Colon_json_import_attribute_when_module_is_set_to_0, ModuleKind[moduleKind]); } } else if (noUncheckedSideEffectImports && !importClause) { @@ -91589,6 +91601,7 @@ result || (result = []); for (const info of infoList) { if (info.declaration) continue; + if (info === anyBaseTypeIndexInfo) continue; const node = nodeBuilder.indexInfoToIndexSignatureDeclaration(info, enclosing, flags, internalFlags, tracker); if (node && infoList === staticInfos) { (node.modifiers || (node.modifiers = factory.createNodeArray())).unshift(factory.createModifier(126 /* StaticKeyword */)); @@ -136663,9 +136676,9 @@ } if (!result && node.kind === 303 /* PropertyAssignment */) { const initializer = node.initializer; - const type = isJSDocTypeAssertion(initializer) ? getJSDocTypeAssertionType(initializer) : initializer.kind === 234 /* AsExpression */ || initializer.kind === 216 /* TypeAssertionExpression */ ? initializer.type : void 0; - if (type && !isConstTypeReference(type)) { - result = serializeExistingTypeNode(type, context); + const assertionNode = isJSDocTypeAssertion(initializer) ? getJSDocTypeAssertionType(initializer) : initializer.kind === 234 /* AsExpression */ || initializer.kind === 216 /* TypeAssertionExpression */ ? initializer.type : void 0; + if (assertionNode && !isConstTypeReference(assertionNode) && resolver.canReuseTypeNodeAnnotation(context, node, assertionNode, symbol)) { + result = serializeExistingTypeNode(assertionNode, context); } } return result ?? inferTypeOfDeclaration( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/package/package.json new/package/package.json --- old/package/package.json 1985-10-26 09:15:00.000000000 +0100 +++ new/package/package.json 1985-10-26 09:15:00.000000000 +0100 @@ -2,7 +2,7 @@ "name": "typescript", "author": "Microsoft Corp.", "homepage": "https://www.typescriptlang.org/", - "version": "5.7.2", + "version": "5.7.3", "license": "Apache-2.0", "description": "TypeScript is a language for application scale JavaScript development", "keywords": [ @@ -116,5 +116,5 @@ "node": "20.1.0", "npm": "8.19.4" }, - "gitHead": "d701d908d534e68cfab24b6df15539014ac348a3" + "gitHead": "a5e123d9e0690fcea92878ea8a0a382922009fc9" }