From 0a5cee1f2540841ac21e5adebeec4d196dc50ef9 Mon Sep 17 00:00:00 2001 From: ylemkimon <y@ylem.kim> Date: Sun, 12 Sep 2021 23:17:07 +0900 Subject: [PATCH] docs(private-packages): add a note about Yarn 2+ (#11692) --- docs/usage/getting-started/private-packages.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/usage/getting-started/private-packages.md b/docs/usage/getting-started/private-packages.md index 36db3a72ea..f5e70f05a9 100644 --- a/docs/usage/getting-started/private-packages.md +++ b/docs/usage/getting-started/private-packages.md @@ -259,6 +259,12 @@ However be aware that if your `.npmrc` is too big to encrypt then the above comm } ``` +#### Yarn 2+ + +Renovate doesn't support reading `npmRegistries` and `npmScopes` from `.yarnrc.yml`, so `hostRules` (or `npmToken`) and `npmrc` should be configured like above. +Renovate updates `npmRegistries` in `.yarnrc.yml` with resolved `hostRules` before running Yarn. +For Renovate to overwrite existing `npmRegistries` entry, the key should match the `matchHost` without the protocol (`http:` or `https:`) and with the trailing slash. + ### nuget For each known NuGet registry, Renovate searches for `hostRules` with `hostType=nuget` and matching host. -- GitLab