[Bug?]: `@yarnpkg/plugin-version < 3.1.0-rc.2` is not compatible with `@yarnpkg/cli >= 3.1.0-rc.12`
See original GitHub issueSelf-service
- I’d be willing to implement a fix
Describe the bug
@yarnpkg/plugin-version@3.1.0-rc.2 is not compatible with @yarnpkg/cli < 3.1.0-rc.12
@yarnpkg/plugin-version < 3.1.0-rc.2 is not compatible with @yarnpkg/cli >= 3.1.0-rc.12
To reproduce
const util = require('util');
const _exec = util.promisify(require('child_process').exec);
const _execFile = util.promisify(require('child_process').execFile);
const env = {...process.env, YARN_ENABLE_COLORS: 0, YARN_IGNORE_PATH: 1, YARN_ENABLE_INLINE_BUILDS: 1, YARN_ENABLE_IMMUTABLE_INSTALLS: 0};
const exec = async cmd => {
let stdout
try {
({stdout} = await _exec(cmd, { env }));
} catch (error) {
error.message = error.stdout
throw error
}
return stdout
};
const execFile = async (...args) => {
let stdout
try {
({stdout} = await _execFile(process.execPath,[...args], { env }));
} catch (error) {
error.message = error.stdout
throw error
}
return stdout
};
await packageJson({});
await exec('yarn set version 3.1.0-rc.11');
await expect(execFile(...'./.yarn/releases/yarn-3.1.0-rc.11.cjs plugin import @yarnpkg/plugin-version'.split(' '))).resolves.toBeTruthy();
await expect(execFile(...'./.yarn/releases/yarn-3.1.0-rc.11.cjs set version 3.1.0-rc.12'.split(' '))).resolves.toBeTruthy();
await expect(execFile(...'./.yarn/releases/yarn-3.1.0-rc.12.cjs plugin import @yarnpkg/plugin-version'.split(' '))).resolves.toBeTruthy();
Environment
System:
OS: macOS 10.15.7
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Binaries:
Node: 12.22.7 - /private/var/folders/x9/m_y2fpmn1wgcd33f1y0tdhgr0000gq/T/xfs-3eedbbd3/node
Yarn: 3.1.0-rc.12 - /private/var/folders/x9/m_y2fpmn1wgcd33f1y0tdhgr0000gq/T/xfs-3eedbbd3/yarn
npm: 6.14.15 - ~/.nvm/versions/node/v12.22.7/bin/npm
npmPackages:
jest: ^27.3.1 => 27.2.0
Additional context
Errlog
Error: Internal Error: Cannot redefine settings "changesetBaseRefs"
Issue Analytics
- State:
- Created 2 years ago
- Reactions:11
- Comments:12 (1 by maintainers)
Top Results From Across the Web
@yarnpkg/plugin-version | Yarn - Package Manager
@yarnpkg/sdks is a CLI tool to generate the PnP Editor SDKs. @yarnpkg/shell is a portable bash-like shell interpreter. Yarn packages. The following packages...
Read more >ubuntupackages.cgi - UDD - Debian
0ad 0.0.26-2 0ad-data 0.0.26-1 0xffff 0.9-1 1oom 1.0-2 2048 0.20220905.1556-1 ... dahdi-linux 1:2.11.1~dfsg-1ubuntu12 dahdi-tools 1:3.1.0-2 dailystrips ...
Read more >@yarnpkg/builder - npm
A CLI tool designed for creating, building, and managing complex plugins. This version of the builder is for creating plugins for Yarn 3.x....
Read more >yarnpkg: depends on incompatible version of commander
Bug #1019291: yarnpkg: depends on incompatible version of ... at /usr/share/nodejs/yarn/lib/cli/index.js:511:88 ... ii node-bytes 3.1.2-1
Read more >Compare Packages Between Distributions - DistroWatch.com
angband-audio 1:3.1.0-1 angelscript 2.35.0+ds-1.1 angrydd 1.0.1-13 angular.js 1.8.2-2 angular-maven-plugin 0.3.4-3 animals 201207131226-2.1
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I also encountered this bug and any attempt to upgrade yarn to v3.1.0 and plugin-version to v3.1.0 resulted in the following error for me:
Workaround
.yarnrc.ymlfile manually and remove the@yarnpkg/plugin-versionfrom thepluginslist and any configuration options specific toplugin-versionyarn set version 3.1.xor a similaryarn set versioncommandyarn plugin import @yarnpkg/plugin-version@3.1.0-rc.3.yarnrc.ymlfile to add back your versions plugin configuration optionsThis error was introduced by d2f7bea7f0749e656aa68263b8d7d7f68d7f1905 .
Maybe it is better to catch the error as a warning instead of exit directly. so we can run
yarn plugin import @yarnpkg/plugin-versionto update the incompatible plugin to a new version.