Support custom yarn protocols #32139
Replies: 2 comments 5 replies
-
Hi there, Get your discussion fixed faster by creating a minimal reproduction. This means a repository dedicated to reproducing this issue with the minimal dependencies and config possible. Before we start working on your issue we need to know exactly what's causing the current behavior. A minimal reproduction helps us with this. Discussions without reproductions are less likely to be converted to Issues. Please follow these steps:
If you need help with running renovate on your minimal reproduction repository, please refer to our Running Renovate guide. The Renovate team |
Beta Was this translation helpful? Give feedback.
-
Reproduction needed. Also does Yarn document the protocols it supports? |
Beta Was this translation helpful? Give feedback.
-
Tell us more.
As you know yarn supports custom protocols.
Let's say we written
version
protocol, which only writespackage.json: {name: packageName, version}
to node_modules.Purpose is to pin version, but it doesn't really matter.
Issue is that renovate will not update custom protocols, it only supports builtin (file, npm).
renovate/lib/modules/manager/npm/extract/common/dependency.ts
Line 100 in def0299
Custom protocol will look like this in package.json:
"depName": "version:^1.3.5"
But of course format could be different (look at patch protocol).
Possible solutions:
customProtocols: string[]
in npm manager config and support it in npm manager.matchVersion: string[]
, which in this case will be"^version:(?<currentValue>)"
. Advantage that it will support different formats.Wdyt?
Beta Was this translation helpful? Give feedback.
All reactions