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

Bump aws-amplify peer deps to 4.x.x #8440

Merged
merged 3 commits into from
Jun 15, 2021
Merged

Bump aws-amplify peer deps to 4.x.x #8440

merged 3 commits into from
Jun 15, 2021

Conversation

wlee221
Copy link
Contributor

@wlee221 wlee221 commented Jun 14, 2021

Description of changes

Bumps ui-components peer dependency to 4.x.x

Issue #, if available

Fixes #8437

Description of how you validated changes

Matches current version:

Checklist

  • PR description included
  • yarn test passes

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

@wlee221 wlee221 requested a review from a team June 14, 2021 06:47
@wlee221 wlee221 changed the title Bump aws-amplify to 4.x.x Bump aws-amplify peer deps to 4.x.x Jun 14, 2021
Copy link
Contributor

@sammartinez sammartinez left a comment

Choose a reason for hiding this comment

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

LGTM 🌮

Copy link
Member

@iartemiev iartemiev left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -35,7 +35,7 @@
"clean": "rimraf dist .stencil"
},
"peerDependencies": {
"aws-amplify": "3.x.x"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be 3.x.x || 4.x.x, since we're backwards compatible? Otherwise, I'm good to keep since it could be a hint for customers to upgrade 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is a good point! Let's keep backwards compatibility. I'll adjust.

Copy link
Member

Choose a reason for hiding this comment

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

How does npm7 treat ||? Normally it will attempt to auto-install peerDeps, but how will it work in this case?

Copy link
Contributor

Choose a reason for hiding this comment

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

That's a great question. Ignoring the poor reception npm7 got, their docs indicate:

npm 7 will block installations if an upstream dependency conflict is present that cannot be automatically resolved.
https://github.blog/2021-02-02-npm-7-is-now-generally-available/

  • We instruct customers to install aws-amplify alongside @aws-amplify/ui-*, so few should experience the auto-install behavior.
  • I don't know what npm7 will do without aws-amplify.
  • I'd expect it'd not install anything & throw an error because it doesn't know which one is the right version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AFAIK, npm7 will try to install the most latest version among the satisfied range. So ideally, this will be matched with whichever aws-amplify version customer specified in package.json. Let me do a manual validation of this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did some manual validation. Given peer dependency 3.x.x || 4.x.x, npm 7 install works with both aws-amplify@3 and aws-amplify@4.

If customer doesn't have any aws-amplify version in package.json, then npm will install the latest aws-amplify on version 4.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll go ahead and merge this!

Copy link
Member

Choose a reason for hiding this comment

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

Thank you for confirming!

@codecov-commenter
Copy link

codecov-commenter commented Jun 14, 2021

Codecov Report

Merging #8440 (e191aac) into main (d333997) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #8440   +/-   ##
=======================================
  Coverage   77.79%   77.79%           
=======================================
  Files         236      236           
  Lines       16682    16682           
  Branches     3581     3581           
=======================================
  Hits        12978    12978           
  Misses       3576     3576           
  Partials      128      128           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d333997...e191aac. Read the comment docs.

@wlee221 wlee221 merged commit 1ba2a1f into main Jun 15, 2021
@github-actions
Copy link

This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 16, 2022
@jimblanc jimblanc deleted the bump-peer-deps branch November 23, 2022 15:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
6 participants