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

meta: use Yarn v3 instead of npm #3237

Merged
merged 4 commits into from
Oct 20, 2021
Merged

meta: use Yarn v3 instead of npm #3237

merged 4 commits into from
Oct 20, 2021

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented Oct 3, 2021

Introduce use of Yarn (Berry) instead of npm+lerna. It's recommended to use Corepack rather than downloading yarn directly. It's included with Node.js v16.x, or can be installed with npm install -g corepack on Node.js v14.x.

CI is passing, but there might be stuff to test before merging to ensure every thing keeps working. Main changes are:

  • remove lerna as it looks like yarn workspaces cover all the use we had for it. we are keeping lerna for the releases for the time being.
  • Replace npm commands by yarn ones in CI – except some in the endtoend test, e.g. create-react-app is still tested with npm as I believe it's the most common scenario.
  • Replace use of file: protocol in package.jsons with Yarn's workspace: protocol.

Checkout https://yarnpkg.com/getting-started/migration for documentation regarding yarn's commands.

Notice: if running yarn --version in the root of this repo returns you something like 1.xx.xx, it means you have a yarn binary in your path that is not provided by Corepack. You should be able to run corepack yarn instead of yarn: corepack yarn --version always return 3.0.2.

Get started with the following commands:

corepack -v || npm i -g corepack # install Corepack if not already installed
yarn -v || corepack enable # install Yarn through Corepack if not already installed
yarn || corepack yarn install # install npm dependencies using yarn

Copy link
Member

@Murderlon Murderlon left a comment

Choose a reason for hiding this comment

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

Are we sure we can rid of lerna? We also depended on lerna for determining which packages were touched since the last release and what versions they will become. I'm not sure if that's in yarn workspaces as well?

package.json Show resolved Hide resolved
@arturi arturi requested a review from goto-bus-stop October 4, 2021 16:49
@arturi
Copy link
Contributor

arturi commented Oct 6, 2021

@goto-bus-stop Renée, we could definitely use your expertise in reviewing this, please.

@goto-bus-stop
Copy link
Contributor

Is there something specific you'd like me to look at? it high-level looks good to me, i'm not familiar with corepack or yarn 3.

@Murderlon
Copy link
Member

A note in contributing.md would be good about Node 16x or manually installing corepack is required to run things locally.

@aduh95 aduh95 force-pushed the yarn branch 2 times, most recently from 8105e61 to 2e94741 Compare October 12, 2021 12:49
@aduh95
Copy link
Contributor Author

aduh95 commented Oct 12, 2021

A note in contributing.md would be good about Node 16x or manually installing corepack is required to run things locally.

Added, PTAL.

Are we sure we can rid of lerna? We also depended on lerna for determining which packages were touched since the last release and what versions they will become. I'm not sure if that's in yarn workspaces as well?

I reverted this, we will explore replacing lerna with Yarn workspaces for releases in a follow up PR.

@aduh95 aduh95 requested a review from Murderlon October 12, 2021 12:50
@aduh95 aduh95 force-pushed the yarn branch 2 times, most recently from 8486423 to ffcd577 Compare October 14, 2021 23:39
@arturi arturi self-requested a review October 20, 2021 11:57
@aduh95 aduh95 merged commit 01d7ea1 into main Oct 20, 2021
@aduh95 aduh95 deleted the yarn branch October 20, 2021 13:17
Murderlon added a commit that referenced this pull request Oct 20, 2021
* main:
  Disable drop state for non-files (#2449)
  meta: use Yarn v3 instead of npm (#3237)
  examples: Update to Parcel 2 (#3275)
  ci: test Companion with Node.js 16.x (#3273)
  e2e tests: Move transloadit2 test into transloadit, remove the former (#3271)
  Release
  ci: fix tranloadit2 e2e tests (#3270)
  Add unique class to discard button (#3269)
aduh95 added a commit to aduh95/uppy that referenced this pull request Jan 13, 2022
aduh95 added a commit that referenced this pull request Jan 13, 2022
HeavenFox pushed a commit to docsend/uppy that referenced this pull request Jun 27, 2023
* meta: use Yarn v3 instead of npm

* Update CONTRIBUTING.md to fix linter errors

* remove remaining npm commands

* Update deps
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.

4 participants