You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module.exports=async(npmrc,{tarballDir, pkgRoot},{cwd, env, stdout, stderr,nextRelease: {version}, logger})=>{constbasePath=pkgRoot ? path.resolve(cwd,pkgRoot) : cwd;logger.log('Write version %s to package.json in %s',version,basePath);constversionResult=execa('npm',['version',version,'--userconfig',npmrc,'--no-git-tag-version','--allow-same-version'],{cwd: basePath,
env,});
And here's the place, where msr can just override package.json.version value:
constprepare=async(pluginOptions,context)=>{// Wait until the current pkg is ready to be taggedgetLucky("_readyForTagging",pkg);awaitwaitFor("_readyForTagging",pkg);updateManifestDeps(pkg);pkg._depsUpdated=true;constres=awaitplugins.prepare(context);pkg._prepared=true;debug("prepared: %s",pkg.name);returnres;};
But it may affect other plugins prepare result (like commit creation). I don't see a quick fix for the problem.
@antongolub Thank you !
Currently I removed "package.json" file from "@semantic-release/git" releaserc to avoid this issue, even it will cause inconsistency of "real" version.
While using PNPM workspace in monorepo, dependencies could be:
"somePkg" : "workspace:^"
However, semantic release will change it to 1.0.x when writing version back to package.json.
Expect Behavior:
Remain original string: "workspace:^", otherwise, pnpm install will resuilt in wrong module structure.
The text was updated successfully, but these errors were encountered: