Skip to content
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

Rename config:base -> config:recommended #12024

Closed
4 tasks
Tracked by #19289 ...
HonkingGoose opened this issue Oct 5, 2021 · 11 comments · Fixed by #21136
Closed
4 tasks
Tracked by #19289 ...

Rename config:base -> config:recommended #12024

HonkingGoose opened this issue Oct 5, 2021 · 11 comments · Fixed by #21136
Assignees
Labels
breaking Breaking change, requires major version bump core:config Related to config capabilities and presets priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others status:in-progress Someone is working on implementation type:feature Feature (new functionality) v36

Comments

@HonkingGoose
Copy link
Collaborator

HonkingGoose commented Oct 5, 2021

What would you like Renovate to be able to do?

Quote from @rarkins 1

BTW I was already thinking that config:base is somewhat misnamed. Even though we try not to keep it too opinionated, it still is. I had been thinking to rename it to config:recommended soon, so people understand from the name it's subjective/opinionated.

If you have any ideas on how this should be implemented, please tell us here.

  • Change config:base to config:recommended in code.
  • Change config:base to config:recommended in our presets.
  • Write migration code.
  • Change references to config:base -> config:recommended in documentation.

Is this a feature you are interested in implementing yourself?

No

Footnotes

  1. Source of quote

@HonkingGoose HonkingGoose added type:feature Feature (new functionality) priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others breaking Breaking change, requires major version bump status:ready core:config Related to config capabilities and presets labels Oct 5, 2021
@rarkins
Copy link
Collaborator

rarkins commented Oct 6, 2021

I'd like to hear others' opinions. FYI this doesn't need to be breaking because we can migrate existing, but still probably best to do it in a major release.

@viceice
Copy link
Member

viceice commented Oct 6, 2021

I link it, and yes let's do it on major bump to have more visibility.

@olegkrivtsov
Copy link
Contributor

I'd like to help with this one.

@olegkrivtsov
Copy link
Contributor

My plan for fixing this issue is the following (copying the idea suggested in the issue description):

  1. Change config:base to config:recommended in code.
  2. Change config:base to config:recommended in our presets.
  3. Write migration code.
  4. Change references to config:base -> config:recommended in documentation.

Currently the following occurrencies seem to exist in the code:

$ grep -rnw './lib' -e 'config:base'
./lib/config/presets/internal/config.ts:20:    extends: ['config:base', ':pinAllExceptPeerDependencies'],
./lib/config/presets/internal/config.ts:24:    extends: ['config:base', ':pinOnlyDevDependencies'],
./lib/config/presets/index.spec.ts:237:      config.extends = ['config:base'];
./lib/config/presets/index.spec.ts:239:        'config:base',
./lib/config/presets/common.ts:4:  ':base': 'config:base',
./lib/config/presets/common.ts:14:  'config:base-js': 'config:base',
./lib/config/presets/common.ts:18:  'default:base': 'config:base',
./lib/workers/global/config/parse/file.spec.ts:64:          "extends": ["config:base"],
./lib/workers/global/config/parse/cli.ts:99:      `    $ renovate singapore/lint-condo --onboarding-config='{"extends":["config:base"]}'`
./lib/workers/global/config/parse/cli.spec.ts:132:      argv.push(`--onboarding-config={"extends": ["config:base"]}`);
./lib/workers/global/config/parse/cli.spec.ts:135:          extends: ['config:base'],

The following occurrencies exist in docs:

$ grep -rnw './docs' -e 'config:base'
./docs/development/creating-editing-renovate-presets.md:30:1. They don't need to be added to `group:recommended`, meaning that users will "opt in" to them one by one and not get them automatically from `config:base`, which includes `group:monorepo` and `group:recommended`
./docs/usage/config-presets.md:105:An example of a full config is `config:base`, which is Renovate's default configuration.
./docs/usage/config-presets.md:115:By default, the Renovate App's onboarding process will suggest `["config:base]"`.
./docs/usage/config-presets.md:116:If you are self hosting you must add `"onboardingConfig": { "extends": ["config:base"] }` to your bot's config.
./docs/usage/config-presets.md:122:  "extends": ["config:base"]
./docs/usage/config-presets.md:131:  "extends": ["config:base", "schedule:nonOfficeHours"]
./docs/usage/config-presets.md:276:      "extends": ["config:base", "schedule:nonOfficeHours"]
./docs/usage/examples/self-hosting.md:241:    extends: ['config:base'],
./docs/usage/docker.md:150:  "extends": ["config:base"],
./docs/usage/key-concepts/dashboard.md:26:  "extends": ["config:base", ":dependencyDashboard"]
./docs/usage/key-concepts/dashboard.md:44:  "extends": ["config:base", ":disableDependencyDashboard"]
./docs/usage/key-concepts/dashboard.md:89:  "extends": ["config:base", ":dependencyDashboardApproval"]
./docs/usage/getting-started/installing-onboarding.md:98:- **rangeStrategy**: By default (with zero config) it's `"replace"` however the `"config:base"` preset overrides it to `"auto"`. If you don't want to pin dependency versions and retain ranges, add the `":preserveSemverRanges"` preset to the `extends` array
./docs/usage/getting-started/use-cases.md:131:Renovate also includes over 100 built-in presets, including the default recommended `config:base` preset.
./docs/usage/configuration-options.md:260:The `config:base` preset that many extend from limits the amount of concurrent branches to 10, but in many cases a limit as low as 3 or 5 can be most efficient for a repository.
./docs/usage/configuration-options.md:484:Starting from version `v26.0.0` the "Dependency Dashboard" is enabled by default as part of the commonly-used `config:base` preset.
./docs/usage/configuration-options.md:490:  "extends": ["config:base", ":disableDependencyDashboard"]
./docs/usage/configuration-options.md:1170:Useful to know: Renovate's default ignore is `node_modules` and `bower_components` only, however if you are extending the popular `config:base` preset then it adds ignore patterns for `vendor`, `examples`, `test(s)` and `fixtures` directories too.
./docs/usage/configuration-options.md:1191:  "extends": ["config:base"],
./docs/usage/configuration-options.md:1196:It would take the entire `"config:base"` preset - which contains a lot of sub-presets - but ignore the `":prHourlyLimit2"` rule.
./docs/usage/modules/manager.md:55:The `config:base` preset ignores common test and example directory names, for example.
./docs/usage/semantic-commits.md:19:When you extend `config:base`, Renovate still defaults to `chore`, but will use the `fix` prefix for npm production dependencies (`devDependencies` still use `chore`).

@rarkins
Copy link
Collaborator

rarkins commented Feb 3, 2022

Also add a hardcoded fallback redirect within the presets lookup in case there's any config:base strings which are missed in migrating somehow

@viceice
Copy link
Member

viceice commented Feb 3, 2022

I think :base is also a valid preset and needs to be migrated. 🤔

@rarkins
Copy link
Collaborator

rarkins commented Feb 3, 2022

Is there a default:base?

@HonkingGoose
Copy link
Collaborator Author

Is there a default:base?

It looks like we once had a default:base preset, but we renamed it to config:base. See line 18:

export const removedPresets: Record<string, string | null> = {
':automergeBranchMergeCommit': ':automergeBranch',
':automergeBranchPush': ':automergeBranch',
':base': 'config:base',
':app': 'config:js-app',
':enableGradleLite': null,
':js-app': 'config:js-app',
':library': 'config:js-lib',
':masterIssue': ':dependencyDashboard',
':masterIssueApproval': ':dependencyDashboardApproval',
':switchToGradleLite': null,
':unpublishSafe': 'npm:unpublishSafe',
'config:application': 'config:js-app',
'config:base-js': 'config:base',
'config:library': 'config:js-lib',
'default:automergeBranchMergeCommit': ':automergeBranch',
'default:automergeBranchPush': ':automergeBranch',
'default:base': 'config:base',
'default:app': 'config:js-app',
'default:js-app': 'config:js-app',
'default:library': 'config:js-lib',
'default:unpublishSafe': 'npm:unpublishSafe',
'helpers:oddIsUnstable': null,
'helpers:oddIsUnstablePackages': null,
};


Our docs say: 1

The :xyz naming convention (with : prefix) is a special shorthand for the default: presets.
e.g. :xyz is equivalent to default:xyz.

Is this still correct? It sounds like maybe we have renamed all default: to config:. What do you think?

Footnotes

  1. Renovate docs, config presets, example configs

@rarkins
Copy link
Collaborator

rarkins commented Jul 16, 2022

I had forgotten but yes your analysis looks correct

@viceice
Copy link
Member

viceice commented Mar 24, 2023

Should be pretty easy to do.

  1. rename preset
  2. add to renamed preset list
  3. update old migrations below

':base': 'config:base',

'default:base': 'config:base',

@HonkingGoose HonkingGoose added status:in-progress Someone is working on implementation and removed status:ready labels Mar 29, 2023
@rarkins rarkins added the v36 label Jun 27, 2023
rarkins pushed a commit that referenced this issue Jul 4, 2023
Closes #12024

Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Bastian Gutschke <bastian.gutschke@gmx.de>

BREAKING CHANGE: Preset config:base is now called config:recommended
rarkins pushed a commit that referenced this issue Jul 4, 2023
Closes #12024

Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Bastian Gutschke <bastian.gutschke@gmx.de>

BREAKING CHANGE: Preset config:base is now called config:recommended
@rarkins rarkins closed this as completed in f9e3e80 Jul 4, 2023
@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 36.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking Breaking change, requires major version bump core:config Related to config capabilities and presets priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others status:in-progress Someone is working on implementation type:feature Feature (new functionality) v36
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants