wireit VS lerna

Compare wireit vs lerna and see what are their differences.

wireit

Wireit upgrades your npm/pnpm/yarn scripts to make them smarter and more efficient. (by google)

lerna

:dragon: Lerna is a fast, modern build system for managing and publishing multiple JavaScript/TypeScript packages from the same repository. (by lerna)
Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
wireit lerna
15 162
5,313 35,352
0.9% 0.4%
9.0 8.9
8 days ago 14 days ago
TypeScript TypeScript
Apache License 2.0 MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

wireit

Posts with mentions or reviews of wireit. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-10-23.
  • Wireit – Google's Alternative to TurboRepo, NX
    1 project | news.ycombinator.com | 1 Jan 2024
  • Wireit: Upgrade your NPM scripts to make them smarter and more efficient
    1 project | news.ycombinator.com | 23 Oct 2023
  • Yarn 4.0
    10 projects | news.ycombinator.com | 23 Oct 2023
    npm workspaces plus Wireit works far better than Lerna, in my experience.

    https://github.com/google/wireit

    Wireit's ability to specify actual script dependencies, do caching (and on Github actions), and it's long-running service script support make it much more useful and comprehensive than Lerna.

    I agree that this should be built into npm. There's an RRFC for it here: https://github.com/npm/rfcs/issues/706

  • We built the fastest CI in the world. It failed
    11 projects | news.ycombinator.com | 12 Sep 2023
    I must admit I'm a bigger fan of the wireit[0] approach, the only pause I have is its a Google project, my temptation is to fork it. The code isn't terribly complex

    My biggest complaint with NX is: lack of a sane API for plugins, and it has more overhead than I'd care for. For the amount of complexity that NX has, I'd rather use Rush[1] which gives you everything NX does. My only complaint with Rush is that its development is really slow going, they really need to focus up on Rush plugins (they're good, but still experimental, and I'd love to see them clean up how `autoinstalls` work to be more intutive)

    I'm on the fence about turbo from Vercel

    [0]: https://github.com/google/wireit

    [1]: https://rushjs.io/

  • Turbowatch – Extremely fast alternative to Nodemon
    7 projects | /r/javascript | 13 Mar 2023
    To further derail the conversation there's also https://github.com/google/wireit
  • With $8.6M in seed funding, Nx wants to take monorepos mainstream
    5 projects | /r/javascript | 17 Nov 2022
    There's also wireit made by Google which pairs well with Yarn/NPM workspaces
  • What are your thoughts on Wireit?
    1 project | /r/learnjavascript | 29 Sep 2022
    Google recently anounced wireit, a program that runs multiple NPM scripts that depend on one another. Combined with NPM Workspaces, it enables monorepo workflows that previously required tools like Yarn and Pnpm.
  • Best Practices for TypeScript Monorepo
    11 projects | news.ycombinator.com | 25 Aug 2022
    etc.

    where a bunch of related projects live top-level in a repo. Each project has a packages folder that includes the core implementation, as well as demos, framework-specific adaptors, etc.

    In each package's package.json, I have a series of commands (convert the TS to JS, make a bundle, deploy to Firebase, etc.). Each command can depend on another, either in the same project or anywhere else in the file hierarchy.

    This provides two benefits:

    1. Iterating across packages is faster, because I don't have to worry about making sure each package rebuilds in the right order if I make a change in a library.

    2. Filesystem concerns are separated: rollup only needs to worry about bundling, and it only needs to bundle web-facing projects. The only tool my libraries need is tsc.

    (Using TypeScript and Rollup together is kind of a pain in the ass because you have to fiddle with picking the right TS plugin and configuring it. This is also often the long pole on doing a Rollup version upgrade. Decoupling the two makes Rollup way simpler/easier/nicer to use, which makes wireit awesome even if you don't have multiple packages.)

    Here's a snippet from one of my package.jsons. They basically all look like this. (start is complicated because of https://github.com/google/wireit/issues/33. When that's resolved, it will be as simple as the others.)

        "scripts": {
  • Ask HN: Anyone Here Use Bazel for Front End (Vue, TypeScript) Monorepos?
    2 projects | news.ycombinator.com | 23 Jun 2022
    Hi HN!

    I have been doing over month long of research in terms of figuring out the best way to manage a growing monorepo. We are trying to consolidate much of our frontend code base into a monorepo, managed by pnpm workspaces, to consolidate dependency management and take advantage of tool (as well as other code sharing benefits) of monorepos that are a good fit for us.

    To that end, I'm looking to understand if anyone has used Bazel extensively for managing monorepos.

    I want to understand how easy it is to configure Bazel, how easy it is to use Bazel, especially newer developers (particularly self discovery of the toolset), how easy it is to maintain it, and how much burden the tool has placed on developers. We really are looking for a tool that is largely self sufficient for the purpose.

    Main features we care about:

    - Maintainability: is it is to maintain (updates etc)

    - Extensibility: how extensible is it? more importantly, how easily can it be extended?

    - Built in watch mode that understands its dependency graph for each task, and can run them simultaneously

    - Works with pnpm / npm workspaces natively

    - Stream based output: e.g. if running multiple tasks it interleaves them appropriately, even better if they're labeled and color coded

    - Dependency graph tracking. IE: if I run build for a package, it understands that it may have dependencies that need to be built first.

    - Able to run tasks arbitrarily on a "per package" process, potentially

    Now, after mentioning all that, I realize, by reading the docs, in theory Bazel supports all this and has lots of feature headroom for growing features over time which I like, however, I've read mixed things about it, but not all of the sources I've read so far are "up to date" (some articles about people adopting Bazel are years old now) and I wanted to get a more accurate picture of what is going on here.

    Alternatively, I'm open minded to looking at a different set of tools

    For context I've done alot of research and experimentation with the follow:

    - nx[0]

    - rush[1]

    - wireit[2]

    - turbo[3]

    We've settled on, for now `wireit` in part because it has a really good watch mode feature that `nx` does not (nx doesn't have a built in watch mode for your task runner, it relies on the plugin / script to handle it, which was really problematic). However, wireit isn't extensible, and I'm not looking to have to manage sub task "phasing" with something like `gulp`. This was an issue with rushjs as well (but rushjs has its own challenges and opinions). While rush is starting to expose a direct `rush-sdk` API, its not really documented and I'm not sure about its stability or best way to go about making rush plugins. They also have a competing task runner called `heft` that I'm not sure about in the light of the `rush-sdk` and its use cases (if someone from the rush team sees this and can clarify about the long term vision and where they're at with it now, I'm all ears)

    tl;dr: I've tried tons of tools, and Bazel seems to check all the boxes, but I'm afraid the complexity will kill us, since we don't have a dedicated tool engineer to oversee it, it has to malleable enough that we can maintain it bit by bit over time

    [0]: https://nx.dev/

    [1]: https://rushjs.io/

    [2]: https://github.com/google/wireit

    [3]: https://turborepo.org/docs

  • Monorepos in JavaScript and TypeScript
    6 projects | news.ycombinator.com | 2 Jun 2022
    In the past, I'd put a "typescript:main" field in package.json and configured my bundler to prefer that field. I gave up at some point - probably when I migrated to rollup.

    Moving forward, I'm going to use wireit for these things. Pure modules get built with tsc. At the highest level (e.g. where it needs to be embedded in a page), make a bundle with rollup.

    wireit has two nice properties: incremental building and file-system-level dependencies. Within a repo, you can depends on ../package-b. However, if you have multiple monorepos that often get used together, you can also depend on ../../../other-package/packages/package-b.

    I've just started with wireit (it was only launched recently), but it seems to be a nice solution to wrangling dependencies between related JS libraries.

    [1] https://github.com/google/wireit

lerna

Posts with mentions or reviews of lerna. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-03-28.
  • Add Step-up Authentication Using Angular and NestJS
    4 projects | dev.to | 28 Mar 2024
    Open the project up in your favorite IDE. Let's take a quick look at the project organization. The project has an Angular frontend and NestJS API backend housed in a Lerna monorepo. If you are curious about how to recreate the project, check out the repo's README file. I'll include all the npx commands, CLI commands, and the manual steps used to create the project.
  • Things I learned while building projects with NX
    5 projects | dev.to | 18 Mar 2024
    Lerna currently maintained by Nx team
  • tsParticles 3.0.0 is out. Breaking changes ahead.
    3 projects | dev.to | 4 Dec 2023
  • Nx 16.8 Release!!!
    5 projects | dev.to | 6 Sep 2023
    On Netlify's enterprise tier, approximately 46% of builds are monorepos, with the majority leveraging Nx and Lerna. Recognizing this trend, Netlify has focused on enhancing the setup and deployment experiences for monorepo projects. In particular they worked on an "automatic monorepo detection" feature. When you connect your project to GitHub, Netlify automatically detects if it's part of a monorepo, reads the relevant settings, and pre-configures your project. This eliminates the need for manual setup. This feature also extends to local development via the Netlify CLI.
  • Mocha/Chai with TypeScript (2023 update)
    3 projects | dev.to | 12 Aug 2023
  • Help with library implementation in a big webapp
    2 projects | /r/webdev | 26 Jun 2023
    This is the exact problem monorepos were born to solve. Not only will a monorepo let you share UI components, you'll be able to gradually add shared application logic as well (for instance, do all of your apps have their own logic for connecting to a database? you could roll that into a shared library with a monorepo). There are a lot of tools for accomplishing this in JS, but probably the most popular is lerna, which is built on top of NX (though lots of teams roll their own monorepo in nx without lerna, which IMO is a totally valid option).
  • How to Build and Publish Your First React NPM Package
    8 projects | dev.to | 9 Jun 2023
    To begin, you need to prepare your environment. A few ways to build a React package include tools like Bit, Storybook, Lerna, and TSDX. However, for this tutorial, you will use a zero-configuration bundler for tiny modules called Microbundle.
  • Utility for making sure that I'm using the right `@types/react`
    2 projects | /r/typescript | 5 Jun 2023
    If so, are you using a monorepo tool like Nx or Lerna? If not, start there and see if it solves your problem.
  • [AskJS] Is there a silver bullet for consuming Typescript libraries in a Monorepo?
    5 projects | /r/javascript | 9 May 2023
    I mean I don't know what your monorepo looks like, but for example infernojs (actually written with typescript) uses lerna, and lerna seems simpler than typescript references
  • Understanding npm Versioning
    3 projects | dev.to | 4 Apr 2023
    Tools for publishing, such as Lerna (when using the --conventional-commit flag), follow this convention when incrementing package versions and generating changelog files.

What are some alternatives?

When comparing wireit and lerna you can also consider the following projects:

starters - Starter repo (used by create-tamagui-app)

turborepo - Incremental bundler and build system optimized for JavaScript and TypeScript, written in Rust – including Turborepo and Turbopack. [Moved to: https://github.com/vercel/turbo]

nx - Smart Monorepos · Fast CI

turbowatch - Extremely fast file change detector and task orchestrator for Node.js.

changesets - 🦋 A way to manage your versioning and changelogs with a focus on monorepos

nx-dotnet

pnpm - Fast, disk space efficient package manager

orogene - Makes `node_modules/` happen. Fast. No fuss.

webpack - A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.

pn - This is an experimental wrapper over the pnpm CLI written in Rust

single-spa - The router for easy microfrontends