Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Switch to yarn for dependency management #2773

Merged
merged 6 commits into from
Mar 13, 2019
Merged

Conversation

jryans
Copy link
Collaborator

@jryans jryans commented Mar 11, 2019

Most npm operations are replaced with yarn, which generally has better
behavior. However, steps like publish that write to the NPM registry are left to
npm, which currently handles these tasks best.

Part of element-hq/element-web#7756

Previously reviewed portion for JS SDK: matrix-org/matrix-js-sdk#856

We have changed our release scripts to commit changes to lock files during
release, so it should be safe to allow them again.
For the React SDK, we did not commit npm lock files, so there is no correct copy
to import from. For this repo, I created a fresh yarn lock file using yarn
install.
Most `npm` operations are replaced with `yarn`, which generally has better
behavior. However, steps like publish that write to the NPM registry are left to
`npm`, which currently handles these tasks best.
@jryans jryans requested a review from a team March 11, 2019 14:23
This avoids the deprecation warning about `prepublish` scripts. It should not
change when the script is run.
@jryans jryans removed the request for review from a team March 11, 2019 17:52
Take advantage of Yarn's preservation of links while installing and set up links
first and install second. This should result in a small speedup since we no
longer install the published SDKs just to replace them on the next line.
@jryans
Copy link
Collaborator Author

jryans commented Mar 12, 2019

This looks to be passing on Travis and I verified that yarn link works on Jenkins as well, so this should be ready for review.

Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

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

giphy (2)

@@ -14,6 +14,3 @@ npm-debug.log
/src/component-index.js

.DS_Store

# https://github.com/vector-im/riot-web/issues/7083
package-lock.json
Copy link
Member

Choose a reason for hiding this comment

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

something I encountered while breaking my local environment was that a yarn-error.log can be created. We should ignore that at all 3 levels.

@jryans jryans merged commit 9585f11 into matrix-org:develop Mar 13, 2019
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.

2 participants