Closed kettil closed 3 years ago
Hey, @kettil,
msr by design splits pkg scopes by directories. Each release process operates a single path, so none of them even know about the root level, where package-lock.json
is placed.
As a quick workaround, you may create a magic package to invoke smth like npm i && git add package-lock.json && git commit ...
after all other packages have produced their changes.
See https://github.com/semantic-release/exec plugin docs for details.
UPD
Or much simpler:
multi-semantic-release && npm i && git add package-lock.json && git commit ...
@antongolub Thank you for the quick reply.
Your quick fix seems the best solution if structurally it is not possible....
Thanks
FYI
I had planned to run the npm i && git add <...>
before the commit of SR. But due to parallelization this is not possible, because the different packages can interfere with each other.
The other disadvantage is that the npm i && git add <...>
command is executed per package.
So the command must be executed outside of SR.
I have created a test monorepo and when I publish a package, the global
package-lock.json
is not updated with it.Timeline:
npx multi-semantic-release
,package.json
andCHANGELOG.md
are updated.npm install
and thepackage-lock.json
is updated with the version jump.