question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature] lerna --dryrun

See original GitHub issue

Hi,

Really liking lerna so far. However I’ve encountered some unexpected behavior that wound up getting pushed to our public repo and published to npm.

I’d like to be able to run lerna publish to the point of creating the version commit and tag and stop it there so I can inspect what it did before proceeding.

My first thought for an interface for this is:

$ lerna prepublish
... make sure everything's as expected...
$ lerna publish

Where in this case lerna publish would see that the head revision is a version tag and skip the prepublish steps.

It might also be nice to have a lerna revert that’s basically just git reset --hard HEAD^ after verifying that the HEAD revision is a version commit.

I’d be happy to do the work for this and submit a PR if you’re open to the idea. How does it sound? Ideas for a better interface?

Thanks!

Bo

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:93
  • Comments:44 (14 by maintainers)

github_iconTop GitHub Comments

52reactions
tamlyncommented, Feb 1, 2018

An alternative way to test what lerna will do is to install a local npm registry and publish to that:

npm i -g verdaccio
verdaccio
npm set registry http://localhost:4873
npm adduser --registry http://localhost:4873
lerna publish

Then use npm pack <name> to inspect the tarballs it published.

(Updated to use verdaccio which is a more up to date fork of sinopia.)

43reactions
jamiebuildscommented, Feb 12, 2016

Oh like a --dry-run flag

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - [Feature] lerna --dryrun - - Bountysource
Hi,. Really liking lerna so far. However I've encountered some unexpected behavior that wound up getting pushed to our public repo and ...
Read more >
@lerna/publish - npm
When run, this command does one of the following things: Publish packages updated since the last release (calling lerna version behind the scenes)....
Read more >
Lerna: Documentation
Lerna is a fast modern build system for managing and publishing multiple JavaScript/TypeScript packages from the same repository.
Read more >
lerna run, lerna publish, lerna dry-run, lerna github, lerna & yarn,
Lerna is a tool that optimizes the workflow around managing multi-package repositories with git and npm. Lerna can also reduce the time and...
Read more >
Replacing Lerna with npm builtins - Ty Hopp
PRPL makes use of Lerna's publish command to bump package ... [OTP] core server` # - `npm run publish dry-run core server` #...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found