-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Conversation
4.x.x
4.x.x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🌮
There was a problem hiding this 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" |
There was a problem hiding this comment.
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 🤔
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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 Report
@@ 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.
|
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 |
Description of changes
Bumps
ui-components
peer dependency to4.x.x
Issue #, if available
Fixes #8437
Description of how you validated changes
Matches current version:
amplify-js/packages/aws-amplify/package.json
Line 3 in eb3b707
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.