-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Replace yarn, lerna with npm #1654
Conversation
* yarn is having problems hoisting dependencies * workspaces are builtin to npm now * npm has `npm ci` now, which should speed things up
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/mdx/mdx/42urJwU8ARq4Ekrchh3xfHn7Zibp |
Initial time seems at roughly the same time. Now let’s see if caching does something? |
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.
👍 for leveraging npm workspaces
.github/workflows/ci.yml
Outdated
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.npm | ||
key: npm-${{hashFiles('package-lock.json')}} | ||
restore-keys: npm- |
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.
if the setup-node action is used, this could be abstracted away https://github.blog/changelog/2021-09-07-github-actions-setup-node-supports-dependency-caching-for-projects-with-monorepo-and-pnpm-package-manager/
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’m assuming the package-lock.json
will change a ton (it’s 1.4mb, so it’s likely something changes in the ecosystem every day), which is why I’m investigating a different cache strategy.
See also bahmutov/npm-install#108.
Oh, I’m just seeing that setup node
finally supports “nvm lts syntax” (lts/erbium
), then we can at least switch to that
@@ -7,15 +7,16 @@ jobs: | |||
steps: | |||
- uses: actions/checkout@v2 | |||
with: | |||
fetch-depth: 0 # for lerna | |||
fetch-depth: 0 |
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.
this is still needed?
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.
it should at least make cloning much faster. There have been some giant files historicaly in the repo
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.
✅
npm ci
now, which should speed things upLet’s see if this works and is fast in actions