fix(appsync-modelgen-plugin): replace relay 12 dependency chain#1013
fix(appsync-modelgen-plugin): replace relay 12 dependency chain#1013michaelgiraldo wants to merge 1 commit into
Conversation
|
Small scope clarification on this PR: This PR is still intended to be the narrow The I have a local prototype for that broader TypeScript/Jest floor work, but I am keeping it separate from this PR on purpose. For this PR, the review question is only whether the package-scoped dependency-chain migration is acceptable on its own. If maintainers would prefer the broader toolchain work to be proposed, I can open that as a separate follow-up PR. |
|
Follow-up note: the broader monorepo TypeScript/Jest floor work is now proposed separately in #1014. That follow-up is intended to remove the need for the temporary Disposable compatibility bridge without expanding the review scope of this package-level PR. |
Summary
Replaces the
relay-compiler@12dependency chain in@aws-amplify/appsync-modelgen-plugin.This addresses the
appsync-modelgen-pluginsubset of aws-amplify/amplify-backend#3062 and overlaps the broader fresh-install issue in aws-amplify/amplify-backend#3135.Changes
@graphql-codegen/visitor-plugin-common/@graphql-codegen/plugin-helpers/@graphql-tools/utilsline that resolves@graphql-tools/relay-operation-optimizer@7.1.2 -> @ardatan/relay-compiler@13.0.1codegenVersionoptional inRawAppSyncModelConfigto match existing package usage in tests and callersDisposable/AsyncDisposableambient declaration for this package so it remains buildable under the repo's current TypeScript 4.7 floor while using newergraphql-toolstype declarationsStrategy
This chain is owned by
@aws-amplify/appsync-modelgen-plugin, so a downstream-only fix inamplify-backendwould not remove it.The main migration work here was not the dependency bump itself. The newer GraphQL Code Generator packages normalize scalar mappings as
{ input, output }objects instead of plain strings, so the package code had to be updated to use those mappings explicitly. Without that adaptation, generated output regressed and language-specific tests failed.The
Disposablecompatibility declaration is a temporary build-floor bridge, not a runtime change. The repo still pins TypeScript4.7.4, while newergraphql-toolstype declarations reference the standardDisposableglobals introduced in later TypeScript lib definitions. This package does not use those contracts directly, so the ambient declaration keeps the package buildable until the repo's TypeScript floor moves forward.Verification
npx -y yarn@1.22.22 workspace @aws-amplify/appsync-modelgen-plugin buildnpx -y yarn@1.22.22 workspace @aws-amplify/appsync-modelgen-plugin test --runInBand@aws-amplify/appsync-modelgen-plugin@2.15.2showed:@graphql-codegen/visitor-plugin-common@1.22.0 -> @graphql-tools/relay-operation-optimizer@6.5.18 -> @ardatan/relay-compiler@12.0.0 -> glob@7.2.3 -> inflight@1.0.6@babel/plugin-proposal-class-propertiesand@babel/plugin-proposal-object-rest-spread@graphql-tools/relay-operation-optimizer@7.1.2 -> @ardatan/relay-compiler@13.0.1glob@7inflight0 vulnerabilitiesMaintainer Context
This PR is the second narrow package-owned slice of the deprecated dependency chain tracked in aws-amplify/amplify-backend#3062.
The companion PR #1012 addresses the separate
@aws-amplify/graphql-types-generatorBabel 6 /core-js@2/rimraf@3path. Together, those two PRs cover the mainamplify-codegen-owned subtrees from the current repro.Downstream work is still required after release so
amplify-backendcan consume the published packages, and aws-amplify/amplify-backend#3135 remains broader than the codegen-owned surface.Maintainer Ask
If this approach looks acceptable, please review this as an independent
appsync-modelgen-pluginfix. Once merged and released, downstream repos can consume the published package and re-measure the broader fresh-install impact.