Skip to content

Conversation

@svidgen
Copy link
Member

@svidgen svidgen commented Nov 6, 2025

Description of changes

  1. Updates latest amplify core packages to latest to remove aws-cdk v2 transitive deps (Planned work)
  2. Updates to node 20 to accommodate related bumped package node requirements (Unexpected work)
  3. Updates for jest 30: snapshots to new format, assertion methods, timeouts (Unexpected work)

Updates node runtime to node 20 as part of the build/test scripts. We can explore an image update later if desired.

CDK / CloudFormation Parameters Changed

Issue #, if available

Description of how you validated changes

Checklist

  • PR description included
  • yarn test passes
  • E2E test run linked
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
  • Any CDK or CloudFormation parameter changes are called out explicitly

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

- Updated eslint-plugin-jsdoc from ^40.1.0 to ^61.1.12
- Resolves Node.js 20 compatibility issue in build_linux e2e test
- Latest version requires Node.js >=20.11.0 which supports our Node 20 requirement
- Add @aws-amplify/graphql-transformer dependency
- Add @aws-amplify/graphql-transformer-core dependency
- Add @aws-amplify/graphql-transformer-interfaces dependency
- Add @aws-amplify/graphql-transformer-test-utils dependency

These dependencies were imported in the AWS SDK v3 migration but never
added to package.json, causing build failures in CI clean builds.

Resolves build_linux failure: 'Cannot find module @aws-amplify/graphql-transformer'
- Remove aws-sdk v2 import from MultiAuthV2Transformer.e2e.test.ts
- Remove aws-sdk v2 import from MultiAuthV2TransformerWithFF.e2e.test.ts
- Remove credential clearing code that's no longer needed with SDK v3
- Fixes build-tests failure: 'Cannot find module aws-sdk'
…ormer tests

- Replace aws-sdk v2 imports with mock AWS config objects in test files
- Update AuroraDataAPIClient.test.ts to use mockAwsConfig instead of aws-sdk
- Update AuroraServerlessMySQLDBReader.test.ts to use mockAwsConfig instead of aws-sdk
- Fixes test failures: 'Cannot find module aws-sdk' in graphql-relational-schema-transformer
- Upgrade Jest from 26.6.2 to 30.2.0 for full node: import support
- Update Jest environment and configuration for v30 compatibility
- Remove velocity test exclusion - all tests now passing
- Update snapshot for acm-resolver-auth test
- Fix FixJestEnvironment for Jest 30 API changes

Resolves AWS SDK v3 node: import compatibility issues that were
preventing velocity tests from running.
- replace toThrowError() with toThrow() for jest 30 compatibility
- fix yargs type issue in cleanup script
- update testURL to testEnvironmentOptions in e2e config

resolves typescript compilation errors in e2e test build
- fix toThrowError in graphql-transformers-e2e-tests
- update testURL to testEnvironmentOptions in graphql transformers config

ensures all e2e test packages build successfully with jest 30
- Add testTimeout: 2000000 to Jest configs in e2e test packages
- Remove all jest.setTimeout() calls from 143 test files
- Addresses systematic e2e test timeout failures with Jest 30
…ility

- Fix TypeScript compilation errors in test files
- jest.setTimeout calls are working correctly with Jest 30
- The real issue was incomplete toThrowError -> toThrow conversion
- Add --coverage=false to amplify-util-mock e2e scripts
- Set collectCoverage: false in graphql-transformers-e2e-tests
- Prevents broken pipe errors when coverage reporting is interrupted
- Add npm rebuild to root postinstall to fix node-pty compilation
- Addresses MODULE_NOT_FOUND error for node-pty native binaries in CI
- Update node-pty from 'beta' to '^1.0.0' for reliable prebuilt binaries
- Remove postinstall rebuild script as stable version has prebuilt binaries
- Fixes MODULE_NOT_FOUND error in CI environments
- Replace outdated raw GitHub URL with correct release download URL
- Fixes 404 error preventing Node.js installation on Windows builds
- Uses nvm-windows v1.2.2 release
- Update deprecated Jest matchers (toBeCalledWith → toHaveBeenCalledWith, etc.)
- Update snapshots for Jest 30 format changes
- All tests now passing with Jest 30
- replace deprecated jest.useFakeTimers('modern') with jest.useFakeTimers()
- update snapshots for jest 30 format changes
- all auth transformer tests now passing
- add npm rebuild step to fix node-pty module version mismatch
- ensures native modules are compiled for correct node.js version in e2e environment
- replace nvm-windows installer with chocolatey nodejs installation
- chocolatey is pre-installed and more reliable in codebuild windows environment
- use specific node.js version 20.18.0 for consistency
- update jest-environment-node import to use default export for jest 30
- rebuild compiled javascript files
- fixes 'Class extends value #<Object> is not a constructor' error
- update jest-circus/runner import to use default export for jest 30
- fixes 'circusRunner is not a function' error in e2e tests
- rebuild compiled javascript files
- add proper regex patterns for axios imports
- handle both direct axios imports and subpath imports
- fixes 'Could not locate module axios' error in jest
- use absolute path to axios cjs file instead of relative mapping
- removes regex patterns that may be causing jest resolution issues
- should fix 'Could not locate module axios' error
- replace deprecated jest matchers (toBeCalledWith → toHaveBeenCalledWith, etc.)
- fix ts-jest import issues (ts-jest/utils → @jest/globals)
- update mocked usage to jest.Mocked<typeof T> pattern
- update snapshots for jest 30 format changes
- all unit tests now passing locally
- Update VTL snapshots to use unescaped quotes format
- Fix Jest circus runner configuration in mock package
- Address ES Modules compatibility issues
- Add missing FixJestCircusRunner.js for mock tests
- Fix axios module mapping pattern in transformer e2e tests
- Use proper regex pattern ^axios$ instead of plain string
- Add extensionsToTreatAsEsm and useESM configuration
- Fixes 'You need to run with a version of node that supports ES Modules in the VM API' error
- Required for Jest 30 compatibility with AWS SDK v3 dynamic imports
- Switch from ts-jest to ts-jest/presets/default-cjs
- Use node test environment instead of custom environment
- Remove ES modules configuration that causes dynamic import issues
- Addresses Jest 30 compatibility with AWS SDK v3
The build failure was due to yarn registry 502 error, not Jest config.
Reverting to investigate the ES modules issue with a different approach.
…eprecation

- Move ts-jest config from globals to transform array to fix deprecation warning
- Fix axios module mapping path to use absolute path to node_modules
- Resolves Jest configuration error preventing e2e tests from running
- fix DynamoDB client credential configuration to prevent dynamic import errors
- use credentials object format instead of individual accessKeyId/secretAccessKey
- update configureDDBDataSource to handle both credential formats
- fix ts-jest deprecation warning by moving config to transform array
- resolves ES modules VM API errors in mock e2e tests
- update Object { to { format in e2e test snapshots
- update Array [ to [ format in e2e test snapshots
- resolves snapshot mismatch failures in e2e tests
- fix double-escaped quotes in api_3 test snapshot
- resolves snapshot mismatch for 'updates AppSync API in headless mode 3' test
- jest 30 changed quote escaping behavior in snapshots
- add null check for identityPoolId before calling deleteIdentityPool
- add null check for userPoolId before calling deleteUserPool
- prevents ValidationException when resource IDs are null during cleanup
- resolves Auth V2 test failures in cleanup phase
- add testTimeout: 300000 (5 minutes) to jest config
- resolves 'Exceeded timeout of 5000 ms for a hook' errors
- auth v2 tests need more time for cognito resource setup/cleanup
- jest 30 may have stricter default timeout behavior
- fix Array [ to [ format in resolvers.test.ts inline snapshots
- fix Object { to { format in resolvers.test.ts inline snapshots
- fix Array [ to [ format in populate-cfn-params.test.ts inline snapshot
- resolves remaining snapshot mismatch failures in e2e tests
- fix 5 inline snapshots using old jest format (Array [, Object {)
- update to new jest 30 format ([, {)
- completes comprehensive snapshot format migration across all e2e packages
- Add jest.setTimeout(1000 * 60 * 30) to all Auth V2 exhaustive test files
- Addresses timeout issues where tests exceed 5-minute limit during setup
- Timeout set outside describe blocks per Jest 30 requirements
- Matches the fix used in _setupE2ETestsLinux function
- Rebuilds native modules for current Node.js version
- Resolves node-pty MODULE_VERSION mismatch in cleanup job
@svidgen
Copy link
Member Author

svidgen commented Nov 12, 2025

✅ - E2E Tests
✅ - PR Checks

@svidgen svidgen marked this pull request as ready for review November 12, 2025 15:22
@svidgen svidgen requested review from a team as code owners November 12, 2025 15:22
@svidgen svidgen changed the title Wirej/aws sdk v3 final update deps to remove last bits of transitive aws-sdk v2 Nov 12, 2025
@svidgen svidgen changed the title update deps to remove last bits of transitive aws-sdk v2 chore: update deps to remove last bits of transitive aws-sdk v2 Nov 12, 2025
Copy link
Contributor

@ShadowCat567 ShadowCat567 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, just have some questions

},
}));

jest.setTimeout(40 * 1000);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a Jest 30 thing where timeouts are put here instead of in before/beforeEach like in the previous implementation?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diff is too big to render, I am assuming the changes in here are similar to the other snapshot changes and it is fine

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can always look at it raw and ctrl+f for amplify-graphql-has-many-transformer.test.ts.snap.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Litany of things like this:

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is this file coming from? This snapshot looks really odd

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I didn't catch this change. Q decided to un-inline this snapshot:

image

I'm not sure this matters at all to me...

@svidgen svidgen merged commit c017d9d into release-api-plugin-stable Nov 12, 2025
7 checks passed
@svidgen svidgen deleted the wirej/aws-sdk-v3-final branch November 12, 2025 17:07
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.

2 participants