dhoulb / multi-semantic-release

Proof of concept that wraps semantic-release to work with monorepos.
BSD Zero Clause License
202 stars 37 forks source link

package-lock.json is not updated #87

Closed kettil closed 2 years ago

kettil commented 2 years ago

I have created a test monorepo and when I publish a package, the global package-lock.json is not updated with it.

Timeline:

antongolub commented 2 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 ...

kettil commented 2 years ago

@antongolub Thank you for the quick reply.

Your quick fix seems the best solution if structurally it is not possible....

Thanks

kettil commented 2 years ago

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.