-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
npm v7 support #7474
Comments
I'm here to express my confusion because we're already receiving PRs from renovate with |
@mccxiv it's not intended. Can you reproduce the problem in a public repo? Does your engines allow node 15? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I can reproduce it. If you have an engines that allows
|
I've experimented with using an npm constraint (e.g. |
If you add the following to your
Unfortunately it's only succeeding due to what seems like a bug, but it can work for now and be forwards compatible for anyone who wants to support node 15 in their engines without running it during Renovate PRs. |
This comment has been minimized.
This comment has been minimized.
Actually, the required config will be as following once #7561 is merged and live:
The |
Do you mean by setting
? In that case, it would haven't worked due to the cached location of npm after installing npm: renovate/lib/manager/npm/post-update/npm.ts Lines 30 to 33 in 367e591
I opened a PR to fix the issue including automatically setting the
|
Workspaces seem to work out of the box: https://github.com/ylemkimon/npm-workspace.
The only place renovate/lib/manager/npm/post-update/yarn.ts Lines 145 to 156 in 7573780
|
renovate/lib/manager/npm/post-update/yarn.ts Lines 64 to 67 in 7573780
and npm 7 detects it: https://github.com/npm/cli/blob/a28aff769a77f127f371c31afcb9e9814722e5cd/lib/exec.js#L190-L191 I think we can say Renovate has full support for npm 7. |
#7700 adds support for npm 7 in Docker, but npm 6 is still used when run locally ( EDIT: npm 6 is only used when in local development. Globally installed renovate will properly use your globally installed npm version. |
Looks like this is a technical limitation, as yarn / npm always prefer local bin before global. Maybe we need to migrate away from referencing the full npm package. |
Renovate doesn't reference npm directly, but semantic-release does so it still ends up in the local bin folder. |
Are there any config options to specify the path to npm? |
Semantic release is a dev dependency and shouldn't be installed on production. 🤔 |
Nope |
Okay, I found my issue. I was testing with a local dev build which is why I had npm@6 in that folder. When I run the globally installed renovate, it uses my globally installed npm version. |
I think we properly support npm v7 now. 🤔 I'll close this, feel free to reopen or open a new issue / discussion if there are any problems. |
I think we're missing workspaces, but let's handle that in a separate issue and get a reproduction for it |
🤔 It seems that, despite having From apollographql/apollo-server#4998 (comment):
Is there another way that this is meant to be configured/conveyed? |
@abernix please create a new bug report issue and locate the relevant job logs from |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Can you try again now? I restarted the API process and I think that's cleared it |
This comment has been minimized.
This comment has been minimized.
Hi, for me "force" seems not to work. Renovate is still creating PR with NPM version 7 (see gremo/nest-winston@4f8ddb8). Any help is much appreciated! {
"extends": [
"config:base",
":disablePeerDependencies"
],
"packageRules": [
{
"depTypeList": [
"devDependencies"
],
"rangeStrategy": "bump"
}
],
"force": {
"constraints": {
"node": "< 15.0.0"
}
}
} |
@JamieMagee thanks created a new issue #9103. Hope I find where the problem is. |
It's the same scenario as for @abernix - forced constraints with node only now don't stop npm@latest from being installed. |
Thanks @rarkins, so... what's the proposed / working solution? |
@gremo Do not use the force constraints and let the renovate's magic work. Als long there is a v1 lockfile, renovate will force node v14 and npm v6. |
it would break due to renovatebot/renovate#7474
Fixes issues related to renovatebot/renovate#7474
* chore(deps): set use legagy peer deps to true Fixes issues related to renovatebot/renovate#7474 * chore: track npmrc changes
it would break due to renovatebot/renovate#7474
For reference see: renovatebot/renovate#7474
What would you like Renovate to be able to do?
Support the newly released npm v7. The blog post Presenting v7.0.0 of the npm CLI goes over some of the new features and breaking changes.
I'd like to use this issue as a mega-issue to discuss and co-ordinate npm v7 related changes to Renovate.
Did you already have any implementation ideas?
Some of the key features that will require Renovate changes:
package-lock.json
v2I can't yet find a schema for this, but here's a good example
Workspaces
See RFC 0026
npx
There are a few places we use
npx
, and we should make sure that we are callingnpx
non-interatively.Peer dependencies
Not sure if this one affects us
This list may not be complete.
The new library,
@npmcli/arborist
is also quite interesting, and should make interacting with thenode_modules
tree easier in future.Are there any workarounds or alternative ideas you've tried to avoid needing this feature?
Switch to yarn 😂
Is this a feature you'd be interested in implementing yourself?
Yes, with assistance
The text was updated successfully, but these errors were encountered: