Accept diffs where the only difference is union ordering#3178
Accept diffs where the only difference is union ordering#3178RyanCavanaugh wants to merge 3 commits intomicrosoft:mainfrom
Conversation
There was a problem hiding this comment.
This one has union ordering, yes, but only because it's not reprinting the original node with parens in it
There was a problem hiding this comment.
(in general, I think a lot of these remaining union ordering ones are things missing node reuse)
There was a problem hiding this comment.
But, we're keeping it in accepted?
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s “accepted submodule diffs” set so the baseline comparison harness treats a large set of TypeScript-vs-tsgo output differences as expected, with an emphasis on (a) union ordering changes and (b) quote-style fidelity changes in emitted type text.
Changes:
- Extends
testdata/submoduleAccepted.txtwith two new acceptance groups: “Improved quote style fidelity” and “Different union ordering”. - Adds the corresponding
.diffbaseline artifacts undertestdata/baselines/reference/submoduleAccepted/...for the newly accepted cases.
Reviewed changes
Copilot reviewed 1 out of 142 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| testdata/submoduleAccepted.txt | Adds new acceptance sections listing many newly accepted baseline diffs (quote-style + union ordering). |
| testdata/baselines/reference/submoduleAccepted/conformance/usePromiseFinally(target=es2015).types.diff | Adds accepted baseline diff artifact (union ordering in `null |
| testdata/baselines/reference/submoduleAccepted/conformance/unionTypeReduction2.types.diff | Adds accepted baseline diff artifact (literal formatting/quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/typesWithSpecializedConstructSignatures.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/typesWithSpecializedCallSignatures.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/typedefMultipleTypeParameters.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/typeTagOnPropertyAssignment.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/typeGuardNarrowsToLiteralTypeUnion.types.diff | Adds accepted baseline diff artifact (union ordering for `"bar" |
| testdata/baselines/reference/submoduleAccepted/conformance/typeGuardFunctionErrors.types.diff | Adds accepted baseline diff artifact (union ordering within a type predicate). |
| testdata/baselines/reference/submoduleAccepted/conformance/templateLiteralTypes3.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/templateLiteralTypes2.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/switchWithConstrainedTypeVariable.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/subtypingWithConstructSignaturesWithSpecializedSignatures.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/subtypingWithCallSignaturesWithSpecializedSignatures.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/stringLiteralTypesInImplementationSignatures.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/stringLiteralType.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/primtiveTypesAreIdentical.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/parserOverloadOnConstants1.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/override2.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/narrowExceptionVariableInCatchClause.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/narrowExceptionVariableInCatchClause.errors.txt.diff | Adds accepted baseline diff artifact (literal quoting changes in diagnostics). |
| testdata/baselines/reference/submoduleAccepted/conformance/memberFunctionsWithPublicPrivateOverloads.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/memberFunctionsWithPublicOverloads.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/memberFunctionsWithPrivateOverloads.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/mappedTypeProperties.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/mappedTypeConstraints.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/keyofAndIndexedAccess.js.diff | Adds accepted baseline diff artifact (property access quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/jsDeclarationsUniqueSymbolUsage.types.diff | Adds accepted baseline diff artifact (import quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/intrinsicTypes.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/intersectionMemberOfUnionNarrowsCorrectly.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/intersectionIncludingPropFromGlobalAugmentation.types.diff | Adds accepted baseline diff artifact (union member quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/independentPropertyVariance.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/generatorReturnContextualType.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/generatorReturnContextualType.errors.txt.diff | Adds accepted baseline diff artifact (literal quoting changes in diagnostics). |
| testdata/baselines/reference/submoduleAccepted/conformance/es2020IntlAPIs.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/es2018IntlAPIs.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/discriminatedUnionTypes2.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/destructuringParameterDeclaration8.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/dependentDestructuredVariables.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/controlFlowOptionalChain.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/controlFlowGenericTypes.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/constAssertions.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/commonTypeIntersection.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/assignmentCompatWithDiscriminatedUnion.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/conformance/ambientErrors.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/undefinedAsDiscriminantWithUnknown(strictnullchecks=true).types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/typeofImportInstantiationExpression.types.diff | Adds accepted baseline diff artifact (import/literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/typeVariableConstraintIntersections.types.diff | Adds accepted baseline diff artifact (indexed access quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/typePredicatesOptionalChaining3.types.diff | Adds accepted baseline diff artifact (union ordering `null |
| testdata/baselines/reference/submoduleAccepted/compiler/typePredicatesCanNarrowByDiscriminant.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/stableTypeOrdering(stabletypeordering=false).types.diff | Adds accepted baseline diff artifact (union ordering differences). |
| testdata/baselines/reference/submoduleAccepted/compiler/spuriousCircularityOnTypeImport.types.diff | Adds accepted baseline diff artifact (import quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/spreadsAndContextualTupleTypes.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/spreadOfParamsFromGeneratorMakesRequiredParams.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/specializedSignatureAsCallbackParameter1.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/specializedOverloadWithRestParameters.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/recursiveConditionalTypes.types.diff | Adds accepted baseline diff artifact (indexed access quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/ramdaToolsNoInfinite2.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/overloadingOnConstantsInImplementation.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/overloadOnConstNoStringImplementation2.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/overloadOnConstNoStringImplementation2.errors.txt.diff | Adds accepted baseline diff artifact (literal quoting changes in diagnostics). |
| testdata/baselines/reference/submoduleAccepted/compiler/overloadOnConstNoStringImplementation.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/overloadOnConstNoNonSpecializedSignature.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/overloadOnConstNoAnyImplementation2.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/overloadOnConstNoAnyImplementation2.errors.txt.diff | Adds accepted baseline diff artifact (literal quoting changes in diagnostics). |
| testdata/baselines/reference/submoduleAccepted/compiler/overloadOnConstNoAnyImplementation.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/overloadOnConstInheritance4.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/overloadOnConstInheritance3.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/overloadOnConstInheritance2.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/overloadOnConstInheritance2.errors.txt.diff | Adds accepted baseline diff artifact (literal quoting changes in diagnostics). |
| testdata/baselines/reference/submoduleAccepted/compiler/overloadOnConstInheritance1.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/overloadOnConstInObjectLiteralImplementingAnInterface.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/overloadOnConstInCallback1.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/overloadOnConstInBaseWithBadImplementationInDerived.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/overloadOnConstDuplicateOverloads1.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/overloadOnConstConstraintChecks4.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/overloadOnConstConstraintChecks3.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/overloadOnConstConstraintChecks2.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/overloadOnConstConstraintChecks1.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/overloadOnConstAsTypeAnnotation.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/objectLiteralComputedNameNoDeclarationError.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/neverAsDiscriminantType(strict=true).types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/neverAsDiscriminantType(strict=false).types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/nestedExcessPropertyChecking.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/narrowingTypeofDiscriminant.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/narrowingNoInfer1.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/narrowingByTypeofInSwitch.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/mappedTypeGenericIndexedAccess.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/mappedTypeContextualTypesApplied.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/jsxIntrinsicElementsCompatability.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/jsxIntrinsicDeclaredUsingTemplateLiteralTypeSignatures.errors.txt.diff | Adds accepted baseline diff artifact (literal quoting changes in diagnostics). |
| testdata/baselines/reference/submoduleAccepted/compiler/jsdocBracelessTypeTag1.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/jsdocBracelessTypeTag1.errors.txt.diff | Adds accepted baseline diff artifact (literal quoting changes in diagnostics). |
| testdata/baselines/reference/submoduleAccepted/compiler/jsFileMethodOverloads.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/invariantGenericErrorElaboration.types.diff | Adds accepted baseline diff artifact (indexed access quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/intersectionTypeNormalization.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/inferenceOfNullableObjectTypesWithCommonBase.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/inferFromNestedSameShapeTuple.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/inferFromGenericFunctionReturnTypes3.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/indexedAccessWithFreshObjectLiteral.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/indexedAccessTypeConstraints.types.diff | Adds accepted baseline diff artifact (indexed access quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/genericObjectSpreadResultInSwitch.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/forwardRefInTypeDeclaration(strict=true).types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/forwardRefInTypeDeclaration(strict=false).types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/excessPropertyCheckWithMultipleDiscriminants.errors.txt.diff | Adds accepted baseline diff artifact (literal quoting changes in diagnostics). |
| testdata/baselines/reference/submoduleAccepted/compiler/excessPropertyCheckIntersectionWithRecursiveType.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/excessPropertyCheckIntersectionWithRecursiveType.errors.txt.diff | Adds accepted baseline diff artifact (literal quoting changes in diagnostics). |
| testdata/baselines/reference/submoduleAccepted/compiler/deferredLookupTypeResolution.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/destructuredDeclarationEmit.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/discriminatedUnionWithIndexSignature.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/discriminantPropertyCheck.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/discriminableUnionWithIntersectedMembers.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitJsReExportDefault.js.diff | Adds accepted baseline diff artifact (module specifier quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitClassMemberWithComputedPropertyName.js.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitAliasInlineing.types.diff | Adds accepted baseline diff artifact (indexed access quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/declarationEmitAliasInlineing.js.diff | Adds accepted baseline diff artifact (indexed access quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/correlatedUnions.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/correlatedUnions.js.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/controlFlowAliasedDiscriminants.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/contextuallyTypedSymbolNamedProperties.types.diff | Adds accepted baseline diff artifact (indexed access quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/contextualTypeBasedOnIntersectionWithAnyInTheMix3.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/consistentAliasVsNonAliasRecordBehavior.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/constantOverloadFunctionNoSubtypeError.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/constantOverloadFunction.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/conditionalTypeDiscriminatingLargeUnionRegularTypeFetchingSpeedReasonable.types.diff | Adds accepted baseline diff artifact (indexed access quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/coAndContraVariantInferences.js.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/callbackArgsDifferByOptionality.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/callSignatureFunctionOverload.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/assignmentToConditionalBrandedStringTemplateOrMapping.types.diff | Adds accepted baseline diff artifact (literal quoting changes). |
| testdata/baselines/reference/submoduleAccepted/compiler/es2018ObjectAssign.types.diff | Adds accepted baseline diff artifact (union ordering `undefined |
| ## Improved quote style fidelity ## | ||
| compiler/assignmentToConditionalBrandedStringTemplateOrMapping.types.diff | ||
| compiler/callSignatureFunctionOverload.types.diff | ||
| compiler/callbackArgsDifferByOptionality.types.diff | ||
| compiler/coAndContraVariantInferences.js.diff |
There was a problem hiding this comment.
This PR is titled as accepting diffs where the only difference is union ordering, but this hunk adds a large new acceptance section for "Improved quote style fidelity" (mostly single-vs-double quote changes and bracket quoting), which goes beyond union ordering. Consider either (1) narrowing this commit to just the union-ordering acceptances, or (2) updating the PR title/description to reflect that it also accepts quote-style fidelity diffs (or splitting into a separate PR).
This is based on the prior diff-accepting PR so please only review the appropriate commit