-
-
Notifications
You must be signed in to change notification settings - Fork 885
web: Migrate to npm workspaces #6025
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
Conversation
13c6b60
to
c0f5223
Compare
Could this help with the CI failures: https://issueexplorer.com/issue/nextcloud/contacts/2352 ? |
Some other places recommend passing |
5a86a55
to
7018f9d
Compare
7018f9d
to
3be019a
Compare
`lerna` is a bit stale, and as such it currently has some outdated dependencies which Dependabot warns on. Fortunately, npm 7 supports monorepos natively, via "workspaces". So simply replace `lerna` with this feature. The migration is pretty neat and requires a very little invervention. Because Node.js 14 comes with npm 6 by default, upgrade it manually as shown in bahmutov/npm-install#103 (comment).
3be019a
to
86ccf30
Compare
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.
Thank you!
@@ -32,12 +37,11 @@ | |||
"webpack-cli": "^4.9.1" | |||
}, | |||
"scripts": { | |||
"bootstrap": "npm install && lerna bootstrap --hoist", | |||
"build": "lerna run build --stream", | |||
"build": "npm run build --workspaces", | |||
"build:debug": "cross-env NODE_ENV=development CARGO_FEATURES=avm_debug npm run build", |
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.
Shouldn't the --workspaces
argument also have been added on this line?
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's not needed because it uses build
that does npm run build --workspaces
.
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 see, thanks. It's still not entirely clear to me "which" build
script where runs when and why. I might read up on it. Until then, I'll remove it from #5834.
lerna
is a bit stale, and as such it currently has some outdateddependencies which Dependabot warns on.
Fortunately, npm 7 supports monorepos natively, via "workspaces". So
simply replace
lerna
with this feature. The migration is prettyneat and requires a very little invervention.
Because Node.js 14 comes with npm 6 by default, upgrade it manually
as shown in bahmutov/npm-install#103 (comment).