Conversation
|
Contributor
|
Please ensure that this PR:
A repository administrator is required to review this change. |
7d1ab15 to
cc894b1
Compare
# Conflicts: # packages/storage/src/providers/s3/apis/server/index.ts
…te transfer handler
…legacy server context
…kAmplifyContext
Replace jest.mock('@aws-amplify/core') + setUpGetConfig pattern with
createMockAmplifyContext + setGlobalContext in 20 simple CRUD API test files.
Also adds AMPLIFY_CONTEXT_BRAND to mockAmplifyContext.ts (required by
resolveCtxArgs runtime check).
…ockAmplifyContext Migrate 9 sign-in error, resumable, signUp, and WebAuthn test files to use createMockAmplifyContext + setGlobalContext pattern.
…etUpGetConfig Migrate signOut, autoSignIn, confirmSignInHappyCases, and 8 signIn-family tests from Amplify.configure to createMockAmplifyContext + setGlobalContext. Delete setUpGetConfig.ts — all consumers have been migrated.
Export GraphQLAPI as a Proxy that lazily delegates to createGraphQLAPI(getGlobalContext()) on property access. This preserves the v6 import path without requiring context at import time.
…or class Add AmplifyServerContextError as a subclass of AmplifyError for backwards compatibility with v6 error handling (instanceof checks). Add ContextSpec as a type alias for AmplifyContext and restore the AmplifyServer namespace export from aws-amplify/adapter-core.
…nfigure merge
- Re-export fetchAuthSession from @aws-amplify/core in the auth barrel
so that 'import { fetchAuthSession } from aws-amplify/auth' works.
- Restore libraryOptions merge behavior in Amplify.configure(): preserves
previous libraryOptions when not explicitly provided.
If global context is already configured when the OAuth Hub listener registers (e.g., dynamic imports or code-splitting), immediately invoke attemptCompleteOAuthFlow instead of waiting for a configure event that already fired.
Restore runWithAmplifyServerContext as a deprecated export from aws-amplify/adapter-core for custom server adapters (Express, Fastify). Delegates to getGlobalContext() and passes context to the operation.
…access Use hasGlobalContext() guard so that grabbing a reference at module load (const gql = GraphQLAPI.graphql) no longer throws. The error is deferred until the function is actually called without configure().
…config Type errors have been resolved — the suppression is no longer needed.
…-core path Ensures the old import path via @aws-amplify/core/internals/adapter-core still provides AmplifyServerContextError.
Update internal dependency versions to match local workspace versions after rebasing onto main. Removes stale registry entries from yarn.lock. Also removes leftover server/uploadData.ts from conflict resolution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
THIS PR IS A DRAFT. Don't look at it yet (too thouroughly). breaking changes are likely.
Description of changes
Description of how you validated changes
Checklist
yarn testpassesChecklist for repo maintainers
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.