Skip to content

build: raise monorepo TypeScript floor to 5.2#1014

Open
michaelgiraldo wants to merge 3 commits into
aws-amplify:mainfrom
michaelgiraldo:codex/typescript-5.2-floor-upgrade
Open

build: raise monorepo TypeScript floor to 5.2#1014
michaelgiraldo wants to merge 3 commits into
aws-amplify:mainfrom
michaelgiraldo:codex/typescript-5.2-floor-upgrade

Conversation

@michaelgiraldo
Copy link
Copy Markdown

@michaelgiraldo michaelgiraldo commented Apr 8, 2026

Summary

Raises the monorepo TypeScript/Jest tooling floor to TypeScript 5.2 and removes the need to rely on a temporary Disposable compatibility bridge for newer graphql-tools type declarations.

Why

The repo's previous TypeScript floor was older than the standard library support assumed by newer upstream dependencies. In particular, newer graphql-tools declarations reference the standard Disposable / AsyncDisposable globals introduced in TypeScript 5.2.

Changes

  • upgrade the repo TypeScript/Jest/tooling versions needed for TS 5.2 compatibility
  • remove the need for a package-local Disposable compatibility shim by moving the repo to a toolchain that natively understands those globals
  • modernize affected Jest config in amplify-codegen, graphql-generator, graphql-types-generator, graphql-docs-generator, appsync-modelgen-plugin, and the e2e packages
  • update snapshots where required by the Jest 29 serialization changes
  • tighten the generator utility APIs so optional closures are modeled as optional instead of requiring placeholder no-op callbacks
  • keep the stricter test/lint cleanup package-local rather than broadening repo rules

Non-goals

Validation

Validation on this stacked branch completed locally:

  • npx -y yarn@1.22.22 lint
  • npx -y yarn@1.22.22 build
  • npx -y yarn@1.22.22 jest --runInBand
  • npx -y yarn@1.22.22 workspace @aws-amplify/graphql-types-generator test --runInBand
  • npx -y yarn@1.22.22 workspace @aws-amplify/amplify-codegen-e2e-core build

AWS-backed PR/e2e workflows were not run locally in this environment. This repo appears to validate that layer through the existing CodeBuild PR workflow, so maintainer/CI validation is still requested for the cloud-backed checks.

Maintainer Context

This PR is intentionally stacked on #1013.

The repo-wide TypeScript/Jest toolchain migration in this PR does not currently build cleanly on main without the appsync-modelgen-plugin scalar-map and visitor updates from #1013. Because of that dependency, this PR is being proposed as the next layer on top of #1013 rather than as an independently mergeable branch today.

If #1013 is merged first, I can respin this PR onto the updated main so the diff shows only the toolchain changes.

Maintainer Ask

Please review this as the stacked repo-wide toolchain follow-up to #1013. Local lint/build/unit coverage is green on this branch; cloud-backed PR validation is still requested through the existing PR workflow / CodeBuild path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant