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

Assert the correct package manager is used for run commands #40893

Merged
merged 5 commits into from
Apr 13, 2020

Conversation

scinos
Copy link
Contributor

@scinos scinos commented Apr 8, 2020

Changes proposed in this Pull Request

  • Adds a guard to every script in package.json to assert that the right package manager (i.e. npm vs yarn) is being used.

This is part of yarn migration (see #40882). Once we have migrated in yarn and we are confident that everybody is used to the change, we can remove these guards.

Testing instructions

  • Run your usual npm run... commands. Everything should work fine.
  • Now run them with yarn run.... You should see the error "please use npm instead of yarn"

@scinos scinos requested review from a team as code owners April 8, 2020 09:53
@matticbot
Copy link
Contributor

"sync:blog-posts-block": "./bin/sync-blog-posts-block.sh",
"wpcom-sync": "./bin/wpcom-watch-and-sync.sh",
"prepare": "npm run sync:blog-posts-block --nodemodules"
"full-site-editing": "check-npm-client && calypso-build --source='dotcom-fse'",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All these changes would be so much cleaner if package.json had support for prerun... oh well 🤷‍♂

@scinos scinos mentioned this pull request Apr 8, 2020
11 tasks
@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@scinos scinos force-pushed the update/assert-package-manager branch from 34b6664 to 97dee66 Compare April 8, 2020 10:50
@scinos scinos self-assigned this Apr 8, 2020
@scinos scinos added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Apr 8, 2020
@scinos scinos added this to the Migration to yarn milestone Apr 8, 2020
Copy link
Contributor

@griffbrad griffbrad left a comment

Choose a reason for hiding this comment

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

🚢LGTM

@scinos scinos force-pushed the update/assert-package-manager branch from d14c2b2 to 06540cc Compare April 13, 2020 06:36
@scinos scinos merged commit ef1342c into master Apr 13, 2020
@scinos scinos deleted the update/assert-package-manager branch April 13, 2020 06:54
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Apr 13, 2020
@scinos scinos mentioned this pull request Aug 11, 2020
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.

None yet

3 participants