Skip to content

Commit

Permalink
Adjust pinning for apollo to not explicitly pin engines.
Browse files Browse the repository at this point in the history
This follows up on @trevor-sheer's #951, which switched to exact pinning for
all deps in the `apollo` CLI.

As the #951 PR body notes, we want exactly that for `apollo`, however using
the `rangeStrategy` of `pin` also includes renovation of the `engines`
setting in `package.json`, which we don't want and resulted in
#1078 which also
exact-pinned `engines` for `node` and `npm`.  (screenshot as it will change
after this PR: https://c.jro.cc/ac9256ebf6ae).

I think @trevor-sheer tried to fix this with #889 and #1069, but I believe
this would be the more complete solution to that configuration.

The #951 which prompted this commit message didn't and won't land, but it's
currently immortal and we want it to go away.  It's existence, as it makes
clear in the PR body, is defined by configuration though.

Specifically, the default Renovate configuration on this repository uses the
`renovate-config-apollo-open-source` defaults. i.e.:

https://github.com/apollographql/renovate-config-apollo-open-source/blob/master/package.json

That default specifies we extend `:pinOnlyDevDependencies`:

https://github.com/apollographql/renovate-config-apollo-open-source/blob/master/package.json#L14

And that `:pinOnlyDevDependencies` is defined as:

https://renovatebot.com/docs/presets-default/#pinonlydevdependencies

This changes to the more appropriate `:pinAllExceptPeerDependencies`:

https://renovatebot.com/docs/presets-default/#pinallexceptpeerdependencies

...which excludes `engines`.
  • Loading branch information
abernix committed Mar 8, 2019
1 parent 50481b9 commit d96c34b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
"extends": ["apollo-open-source"],
"engines": {
"node": { "supportPolicy": ["lts_active"] }
},
"packageRules": [
{
"paths": ["packages/apollo/package.json"],
"rangeStrategy": "pin"
"extends": [":pinAllExceptPeerDependencies"]
},
{
"packageNames": ["@oclif/config"],
Expand Down

0 comments on commit d96c34b

Please sign in to comment.