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

deps: pin amplify versions #7040

Merged
merged 18 commits into from
Nov 12, 2020
Merged

deps: pin amplify versions #7040

merged 18 commits into from
Nov 12, 2020

Conversation

wlee221
Copy link
Contributor

@wlee221 wlee221 commented Oct 22, 2020

Issue #, if available:

Description of changes: This pins amplify versions across our monorepo. See #6972 for discussions. 🥕

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

@wlee221
Copy link
Contributor Author

wlee221 commented Oct 22, 2020

Not familiar with how lerna handles version bumps, will lerna no longer add 🥕 based on this commit?

@sammartinez
Copy link
Contributor

Not familiar with how lerna handles version bumps, will lerna no longer add 🥕 based on this commit?

@iartemiev would know more so on this.

@ericclemmons
Copy link
Contributor

Not familiar with how lerna handles version bumps, will lerna no longer add 🥕 based on this commit?

@iartemiev would know more so on this.

lerna should respect the presence/absence of a caret (this can be tested locally with verdaccio), though lerna --init's behavior defaults to ^.

We can force the version using --exact, IIRC:

https://github.com/lerna/lerna/blob/master/commands/version/README.md#--exact

@codecov
Copy link

codecov bot commented Nov 3, 2020

Codecov Report

Merging #7040 (803547a) into main (1fb9298) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #7040   +/-   ##
=======================================
  Coverage   72.99%   72.99%           
=======================================
  Files         213      213           
  Lines       13321    13321           
  Branches     2610     2514   -96     
=======================================
  Hits         9724     9724           
- Misses       3401     3432   +31     
+ Partials      196      165   -31     
Impacted Files Coverage Δ
packages/auth/src/OAuth/OAuth.ts 56.11% <0.00%> (ø)
packages/core/src/Credentials.ts 31.51% <0.00%> (ø)
packages/analytics/src/Analytics.ts 63.58% <0.00%> (ø)
packages/datastore/src/sync/index.ts 14.53% <0.00%> (ø)
packages/datastore/src/sync/outbox.ts 24.00% <0.00%> (ø)
packages/datastore/src/storage/storage.ts 71.66% <0.00%> (ø)
packages/core/src/OAuthHelper/GoogleOAuth.ts 33.33% <0.00%> (ø)
packages/core/src/Util/Reachability.native.ts 37.50% <0.00%> (ø)
packages/datastore/src/datastore/datastore.ts 78.42% <0.00%> (ø)
packages/xr/src/Providers/SumerianProvider.ts 47.55% <0.00%> (ø)
... and 9 more

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 1fb9298...803547a. Read the comment docs.

@wlee221
Copy link
Contributor Author

wlee221 commented Nov 3, 2020

Running integration on https://app.circleci.com/pipelines/github/aws-amplify/amplify-js/6509/workflows/781214eb-0d4a-4781-857b-3a1151ec661d. I will have to test for duplicate packages in modular import scenarios. eta. this Fri.

@wlee221
Copy link
Contributor Author

wlee221 commented Nov 6, 2020

To do based on today's discussion: we should test that there are no duplicated packages when customers install divergent ui-components and aws-amplify. Also need to test this behavior with modular imports, although this is the discouraged behavior.

"npmClient": "yarn",
"useWorkspaces": true,
"packages": ["packages/*"],
"exact": true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is equivalent to --exact tag.

@wlee221
Copy link
Contributor Author

wlee221 commented Nov 12, 2020

Based on our offline discussion today, this is ready to be reviewed.

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 🌮 Thanks for getting this change in @wlee221. Lets get @iartemiev and @ericclemmons to approve and we will be good to merge

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.

This looks good to me.
I appreciate all the thought you put into solutions to this problem 😸 great job!

Copy link
Contributor

@ericclemmons ericclemmons left a comment

Choose a reason for hiding this comment

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

Great work @wlee221!

This will allow customers to "roll back" to a previous version if they have any issues. Plus, it'll allow us to reproduce issues more easily using their exact version!

I added a few notes regarding peerDependencies for legacy packages (e.g. aws-amplify-react) to avoid warnings since they're unpinned.

IIRC, lerna doesn't manage peerDependencies, so those can remain as ^3.0.0? Otherwise can they be 3.x.x?

I don't consider this a blocker, but possible noise when customers install...

"rxjs-compat": "^6.2.1"
},
"peerDependencies": {
"aws-amplify": "^3.0.0"
"aws-amplify": "3.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be 3.x.x, right? Otherwise every non 3.0.0 version will have a warning?

(I understand it's been this way since 3.0.0)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the catch! You're right, I'll change them to range again.

@wlee221
Copy link
Contributor Author

wlee221 commented Nov 12, 2020

Thanks everyone for the help! Merging it in now.

@wlee221 wlee221 merged commit 16e07b8 into main Nov 12, 2020
@wlee221 wlee221 deleted the pin-amplify branch November 18, 2020 19:54
CryogenicPlanet pushed a commit to MLH-Fellowship/amplify-js that referenced this pull request Jan 20, 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 Nov 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants