This piece is part of our Customer Convos series. We’re sharing stories of how people use npm at work. Want to share your thoughts? Drop us a line.
A. Phil Schleihauf, co-founder and developer at OpenRide.
Great, thank you! Hope yours is good too :)
We’ve been node/react server/client since day 1, so we naturally used npm to manage dependencies. Private npm packages let us move code outside our private monorepo, so client and server could depend on specific versions, de-coupling library development from synchronization with the app.
We wrote our own testing framework. The intent was to open-source it eventually, but keeping it private let us design it in private, slack on documentation, not fix bugs, etc., until we had a solid design to clean up and release publicly.
We intended to move more things out of the monorepo into private packages, but in the end, did not.
Yes. We discuss it case-by-case. We’re definitely biased toward open-sourcing everything, but we also like to release things that we feel meet a level of quality that we’re happy with, and things that we intend to maintain.
To me, the killer use-case is code reuse. Moving shared code to a library vastly decreases friction around updating that library—it can have its own fast CI, its own releases whenever it wants, and app code can upgrade to the latest version at leisure. It’s nice to be able to get that for code that’s not suitable for open-source, whether because it’s too domain-specific, just-not-ready, or whatever.
I want to stress the joy of a separate CI. Our main app’s CI takes 12–20mins to run. Our private package runs in under a minute. Moving stuff out of our monorepo to their own fast CI has a positive dev-happiness effect!
Good. There is friction—new devs need to have npm accounts and permissions have to be set up for them. CI and build pipelines need to log in to pull the private dependencies, which required some hacks when we set it up. But those are all fixed-cost (or per-dev) items, and the benefits are worth it.
I don’t think we’ve caught up to private orgs yet—I think we had to set up an “organization user” when we were getting things up and running, so I’d have to get up to date before answering this :)
I would ask about their deploy/CI setup first. If they can get the keys/passwords in the right place at the right time easily, then I’d recommend it. So for example, at least at the time I set things up, we couldn’t get a Docker auto-build to work. We keep secrets in our CircleCI environment variables, and have a script that builds our Docker images in that environment instead.
Q: What’s the difference between a hippo and a zippo? A: One’s really heavy, the other is a little lighter.