Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: explicitly assign buffer to node.global #10308

Merged
merged 1 commit into from
Apr 28, 2022

Conversation

sachscode
Copy link
Contributor

@sachscode sachscode commented Apr 27, 2022

Description of changes

After a discussion with @josefaidt , the Initial change which explicitly initialized global.buffer in polyfills.ts has been removed and the buffer library is now imported through a webpack.config plugin.

Issue #, if available

10304

Description of how you validated changes

amplify mock does not correctly render GraphiQL explorer and Cognito fails OIDC token generation with the error
"Error: Error when generating OIDC token: Buffer is not defined".
The change explicitly defines global ( if missing on platforms ) and assigns buffer to global .
Test:

amplify add api   (graphql + cognito user pools + iam auth)
amplify mock 

and Update graphql schema

type Todo
  @model
  @auth(rules: [{ allow: public }, { allow: private, provider: iam }]) {
  id: ID!
  name: String!
  description: String
}

GraphiQL UI works fine.

Checklist

  • [*] PR description included
  • [*] yarn test passes
  • 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

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

@codecov-commenter
Copy link

Codecov Report

Merging #10308 (b522199) into master (5483d68) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #10308   +/-   ##
=======================================
  Coverage   54.35%   54.35%           
=======================================
  Files         851      851           
  Lines       46974    46974           
  Branches    10011    10011           
=======================================
  Hits        25532    25532           
  Misses      19427    19427           
  Partials     2015     2015           

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@sachscode sachscode merged commit 3cc7e76 into aws-amplify:master Apr 28, 2022
lazpavel added a commit that referenced this pull request Apr 28, 2022
lazpavel added a commit that referenced this pull request Apr 28, 2022
lazpavel added a commit that referenced this pull request Jun 13, 2022
lazpavel added a commit that referenced this pull request Jun 13, 2022
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.

None yet

5 participants