Skip to content
This repository has been archived by the owner on Dec 12, 2020. It is now read-only.

[Q] Disable upgrading node version #81

Closed
ravangen opened this issue Aug 19, 2018 · 7 comments
Closed

[Q] Disable upgrading node version #81

ravangen opened this issue Aug 19, 2018 · 7 comments

Comments

@ravangen
Copy link

I am trying to configure renovate to not update the version of node defined in the engines section of package.json. I am running code on AWS Lambda which supports specific versions of Node.js.

I've tried the node configuration option without much luck, perhaps there is a different setting to use?

renovate.json:

{
  "extends": [
    "config:base",
    ":rebaseStalePrs",
    ":pinDigestsDisabled",
    "schedule:earlyMondays",
    "group:allNonMajor"
  ],
  "node": {
    "enabled": false
  }
}

package.json:

{
  ...
  "engines": {
    "node": "8.10.0",
    "npm": ">=5.6.0"
  }
}

Thanks

@rarkins
Copy link
Collaborator

rarkins commented Aug 19, 2018

The node configuration object refers to all Node.js "package managers" (e.g. nvm) while node inside engines is technically part of the npm package manager. Unfortunately it's a little confusing but I can't think of a better way so far. So try this if disabling node everywhere is OK for you:

  "packageRules": [{
	"packageNames": ["node"],
    "enabled": false
  }]

@ravangen
Copy link
Author

Thanks! I'll give that a go.

In my case I use a "package manager" (nvm) and have engines defined, so I'll keep both sections.

@rarkins rarkins removed the review label Aug 20, 2018
@bahmutov
Copy link

Hmm, I am trying to do the same thing: pin and keep updating my Node dependencies in package.json files, but keep range in engines

  {
  "engines": {
    "node": ">=4.0.0"
  }
}

I have set the renovate.json to

{
  "extends": [
    "config:base"
  ],
  "automerge": false,
  "rangeStrategy": "pin",
  "packageRules": [
    {
      "packageNames": [
        "node"
      ],
      "enabled": false
    }
  ]
}

and now no PRs from RenovateBot to https://github.com/bahmutov/test-renovate-monorepo/pulls :(

Would be nice to disable engines node updates since this minimum version is for end users and not the latest Node required

@ravangen
Copy link
Author

@bahmutov I would suggest opening a separate question as it is different enough from the original. You can still reference this one, but I fear your question may be lost or not found by the next person.

@rarkins
Copy link
Collaborator

rarkins commented Dec 27, 2018

@bahmutov looks like your repo was just rate limited for previous hour, e.g.

{"branch":"renovate/ramda-0.x","dependencies":["ramda"],"msg":"Reached PR creation limit - skipping branch creation","time":"2018-12-27T19:38:52.557Z"}

@rarkins
Copy link
Collaborator

rarkins commented Dec 27, 2018

Also some are blocked by previous PRs that you closed unmerged. You can set "masterIssue": true if you want greater visibility in a repo

@bahmutov
Copy link

Nice! I see updates now for dependencies, while engines: node stays the same as range, thank you @rarkins

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants