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.

Is it possible to "disable" publishing certain packages?

See original GitHub issue

There are some packages that do not need to be published to a registry while still have package.json and to be managed by lerna. Is it possible to somehow disable publishing, versioning etc these types of packages when calling lerna publish?

lerna.json

{
    "packages": [
        "packages/*"
    ],
    "version": "0.0.2-dev.0"
}

Context

I have some npm-based projects in a monorepo that will only be used for building (e.g docs, storybook pages). These packages do not need to be stored in a registry.

Your Environment

Executable Version
lerna --version 3.13.0
npm --version 6.5.0
yarn --version 1.13.0
node --version v11.9.0
OS Version
NAME VERSION
macOS Mojave 10.14.3

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:5
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

13reactions
m-mayankcommented, Oct 2, 2020

We can use --no-private flag in lerna version and publish commands to skip the private packages

Reference: https://github.com/lerna/lerna/tree/master/commands/version#--no-private

5reactions
evocateurcommented, Feb 27, 2019

If that is the case, they also don’t need to be managed by Lerna. Use relative file: dependencies from the root, and move them outside the packages/ tree (or wherever you’ve configured lerna.json’s packages).

Alternately, you can set "private": true in the package.json of the modules you never want to publish. They’ll still get a version, but that’s only a big deal if you’re versioning independently (you’re not, it appears) and you’re bothered by extra git tags (you shouldn’t be).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unpublishing packages from the registry - npm Docs
If you want to completely remove all versions of a package from the registry, you can unpublish it completely. This will delete it...
Read more >
Disable Publishing and Distribution - SQL Server
To disable publishing and distribution​​ Right-click the Replication folder, and then click Disable Publishing and Distribution. Complete the ...
Read more >
How to disable package and publish tasks for root aggregate ...
Instead of playing whac-a-mole by listing specific tasks to disable ( publish , publish-local , publish-signed , etc), another option is to turn...
Read more >
Can I purposely prevent users from publishing to the ...
You may not be able to prevent developers from publishing, but you may be able to achieve the same effect with personal workspaces...
Read more >
Enable or disable publishing deep scan
Clones – items that are clones of the selected item. · Media items – media items that are referenced by the selected item....
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