4 ms·
In my company we had been using Git links in our package.json files to point to private dependencies hosted on our local GitLab instance. Recently, we setup an
by Osiris 12y ago
In my company we had been using Git links in our package.json files to point to private dependencies hosted on our local GitLab instance. Recently, we setup an npm-compatible private repository that allows us to publish private packages as well as cache public ones.
It's been awesome to finally get back to using semver to manage all our dependencies. Our build server automatically publishes to our private repo on a successful build.
I think that a lot of companies will find this service extremely helpful and a lot cheaper than having an employee spend the time to try to set up a private repository locally.
- untog 12y agoDid you manage to handle versioning through Git, or is that why you set up a repo? The lack of versioning is the only thing holding the git-based solution back for me.
- Osiris 12y agoNo. We setup the private npm repository specifically because of the lack of support for git version tags in npm.
- awinder 12y agoWhat's the issue with version tags? I've been cutting release branches so that I can reference github urls at a branch with a version number. Understand that it's totally not the same thing, and it's working out for right now, but feel like I'm missing the 700 lb gorilla in the room now :)
- Osiris 12y agoSemver. Everything you upgrade a dependency you have to update the package.json in every other modules that uses it. With semver you can just say "^2.0.0" and always the get latest 2.x release.
- awinder 12y agoI had set up a private repo at a previous company around the time NPM was experiencing a lot of outages, and also to handle our private modules. It worked well when it worked well, but it did definitely require babysitting once a month or so. Totally the kind of thing you want to NOT just have one developer understand. What "npm-compatible" package did you end up going with? Assume you're not doing the couchdb mirror, which I really don't want to do again either, so I'm curious if this is a low-dependency sort of thing.
- Osiris 12y agoOur Ops guy did it using Nexus.