Closed deanohyeah closed 2 years ago
Similar issues raises in yarn 2+. We use a semrel/exec
-based workaround:
module.exports = {
branch: 'master',
plugins: [
[
'@semantic-release/commit-analyzer',
{
preset: 'angular',
releaseRules: [
{type: 'docs', release: 'patch'},
{type: 'refactor', release: 'patch'},
],
parserOpts: {
noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES']
}
}
],
'@semantic-release/release-notes-generator',
'@semantic-release/changelog',
[
'@semantic-release/exec',
{
prepareCmd: 'YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install && git add ../../yarn.lock',
}
],
'@semrel-extra/npm',
'@semantic-release/github'
...
@antongolub thank you for the suggestion!
I was actually able to get it to work by running
npm config set workspaces-update false
before the MSR command
I wasn't aware that was a valid config
Great! Maybe you'd lke to add some notes to the readme.md troubleshooting section?
Sure thing, how bout this #113
After NPM V8.5 MSR fails to properly version packages.
The cause seems to be rooted in NPM version here. https://github.com/npm/cli/commit/723a0918a5a9d9f795584f85d04506fafda9ca42
npm version now triggers an update. This causes MSR to fail because it hasn't updated the version numbers to the packages workspace dependencies.
Since this behavior is now default, would need to some how get a --no-workspaces-update to semantic releases use of npm version in https://github.com/semantic-release/npm/blob/master/lib/prepare.js#L12