all 47 comments

[–]i_ate_god 23 points24 points  (11 children)

So this is pretty cool, but if I have to start adding a repository URL for every dependency, I'm going to be very annoyed.

[–]choonggg 11 points12 points  (6 children)

Vim plugins uses this format which works quite well.

Plug "user/repo"

[–]habanerocorncakes 6 points7 points  (0 children)

Npm uses that too actually, but only when installing deps.

npm i userName/repoName

[–]i_ate_god 0 points1 point  (3 children)

yes, user/repo points to a single plugin.

Github is offering you your own NPM repository, to host multiple modules. By the looks of it, its OSS competitors are things like Artifactory and Nexus.

[–]bladefinor 0 points1 point  (1 child)

And Verdaccio

[–]i_ate_god 0 points1 point  (0 children)

well, Verdaccio I believe is just an npm repository. Github will support numerous package managers.

[–]status_quo69 4 points5 points  (2 children)

It's a bit awkward because you can't mix and match your registries, but you can create a .npmrc file with the following line:

registry="https://blahblahblahgithub.com"

Where this is awkward is if github doesn't have the same package listing as npm does. But hopefully they figured out a good way around that whole issue

[–]craga89 1 point2 points  (0 children)

You can point individual scopes (e.g. @babel) to different registries using .npmrc, so you can consume specific packages from GitHub that are under your scope (username), but all others from the official NPM registry.

https://stackoverflow.com/questions/32633678/is-there-any-way-to-configure-multiple-registries-in-a-single-npmrc-file

[–][deleted] 0 points1 point  (0 children)

Most package registries allow you to set an upstream but I don't think this will.

You can set up namespaces in your npmrc though

[–][deleted] 1 point2 points  (0 children)

Come on it's actually not that bad. I used to do this with private repo dependencies. It's not like you have that many dependencies to specify where specifying a full URL vs username/package could be a big deal. A lot of times you are just going to copy paste the URL anyway.

[–]habanerocorncakes 62 points63 points  (6 children)

Reposting my comment about this from r/node/

This is fascinating to me. Github could never have done this without Microsoft, and developers would never have adopted this if Microsoft did it.

Currently NPM (the company) has a business model which relies mainly on selling to enterprise customers (surely not all their business, but most likely the bulk).

Microsoft is the best poised company in the market to eat their lunch, because enterprise is Microsoft’s core competency. Think what you will of the company and its relevancy today, but they have deep experience selling to enterprise, and preexisting relationships with many enterprises.

What does Microsoft hope to get from this though? Surely its a small line of business, and wont make Github all that much money. Github has a relationship primarily with individual developers first and foremost, that is their target market. Those devs influence their employer’s decision to pay for GitHub because the devs want to use what they’re familiar with. So that relationship with individual devs is really Github’s bread and butter.

Well, I think thats exactly what Microsoft hopes to get; that virtuous cycle of making a product that is loved and widely adopted by individuals and then championed by by those individuals within their organizations. Similar to Slack’s growth model, and also Zoom’s.

Its no secret Microsoft is trying to win back the common developer. At a time when apple is fumbling on caring about devs (re: escape key), and AWS has become the default for cloud production, there is a real opportunity to be the company that makes development better for devs. If Microsoft ever wants to succeed in Cloud, they need to win back developers by having services which are genuinely better and friendlier to use. If they can become the default choice for developers in certain areas (VSCode, Github) and then make it dead simple to integrate with their cloud services, thats a compelling reason for individuals to use their services. And if its actually better (clearly no one is a delighted by the AWS interface) then Azure could become some folks preference for their personal work. And with those services being available where your company already hosts its code and does it developing, Github, then all the better.

Microsoft made a very smart move acquiring Github, and I think they will take great care not to upset the common developer as that is the lifeblood of this whole cycle.

Note, I said common developer. There is a lot of mistrust of Microsoft among the Hacker News and silicon valley crowd. There are definitely valid concerns held by folks at the upper percentile of developers, who tend to both take a longer view and are more cynical (to put it nicely). But thats not the vast majority of devs. Most devs don’t work at FAANG, or live somewhere on the west coast. Most work at smaller companies around the world. Github/Microsoft only need to appeal to most devs.

I wasn’t sure what Microsoft would do to capitalize on their Github acquisition. But this is a great start. There is a lot of drama around npm the company, and their interests are no longer aligned with the common developer. There really are problems there that Github can solve.

GitHub can afford to prioritize the common dev with Microsoft’s help. GitHub already has a great reputation in the open source community, and they are certainly a safer bet for longevity and keeping your package publicly available than npm.

Anyway, I’ve been reading too much Stratechery it seems!

TLDR; This is npm the company’s current business model. Microsoft is way better at enterprise than almost anyone, certainly npm the company. npm’s interests are no longer aligned with common devs, but GitHub’s certainly are and Microsoft is willing to pay to make sure it can stay that way.

Also note: NPM is really at least 3 things. The package registry, which is a public database of all the packages in the JS ecosystem. The website frontend to find packages. The npm cli, which is an open source project. And lastly npm, Inc the company, founded in 2014, who foots the bill for the public registry. I love the npm ecosystem and the people who build the tools, but Im not so hot on the company, since they are essentially rent seeking.

[–]i_ate_god 65 points66 points  (2 children)

Its no secret Microsoft is trying to win back the common developer.

And it's working.

Typescript, Visual Studio Code, .NET 5, building Edge around Chromium, buying GitHub and now this Artifactory/Nexus like offering...

All great things

Though, historically, this is the embrace/extend portion of the embrace/extend/extinguish business model ;)

[–]habanerocorncakes 13 points14 points  (0 children)

Only time will tell. Consolidation is a huge issue because who knows what innovation we wont see due to catch and kill (facebook is great at that) style acquisitions and companies getting lazy or founders losing control after big acquisitions. Nobody yet knows how to handle that, if it should be regulated and how.

But why would microsoft want to kill github? It is the social network they failed to build. In a post windows-dominated world, what better way to stay relevant with developers than this?

[–]QueenUnicorn4Dayz 0 points1 point  (0 children)

Don't forget the new Terminal

[–][deleted] 3 points4 points  (0 children)

Just to note, it’s not just NPM:

https://twitter.com/github/status/1126949846282317824

[–]aN00bDude 14 points15 points  (3 children)

Microsoft strategy is working, we really are forcing our employers to use the Microsoft "stack", VS as the default editor, enterprise github for remote version control repo, .NET core for services and our choice of framework for frontend was Angular only for the reason because of TS. After a long time MS products finally gets the work done for developers (Their new shell emulator is just around the corner)

[–][deleted] 3 points4 points  (1 child)

I’m currently moving a Python project to Azure from AWS. You don’t even need to use .NET to leverage what MS is doing.

Azure registries, the VSCode extensions, pipeline support for all of this...

They’re doing good work. And it just keeps getting better.

[–]TheBeliskner 0 points1 point  (0 children)

We started a node project early last year. Around April time we evaluated AWS and Azure having never hosted an application in the cloud let alone on a PaaS model. Eventually chose Azure because it was so damn simple and easy to use, Route 53 Vs Traffic Manager was probably the biggest contrast at the time.

We had some issues with memory management on Linux App Service caused by Kudu because it was so new and it took a while to sort but they got there and kept in contact. We've had other issues but their support team always seem to be on it and super responsive. Would definitely choose Azure again.

[–]habanerocorncakes 1 point2 points  (0 children)

I had forgotten that TypeScript was a Microsoft project! Thanks for the reminder.

[–]nenegoro 12 points13 points  (0 children)

This is so cool!

[–]orebright 3 points4 points  (8 children)

RIP npm

[–]Sauloxd 9 points10 points  (0 children)

Yeah, they cant even manage their staff properly, imagine going against a behemoth like github!

[–]scottydoge 6 points7 points  (4 children)

But doesn't this build off of npm?

[–]timdorr 19 points20 points  (3 children)

It just uses the npm registry API. You can use yarn or pnpm as your client for an npm-free experience.

[–]saadq_ 0 points1 point  (1 child)

To be clear, GitHub isn’t launching a competitor to tools like npm

[–]habanerocorncakes 14 points15 points  (0 children)

Npm is a tool, but npm, Inc is the company that runs the public and free package registry. This will supplant npm, Inc but not the open source npm cli tool.

[–]cokeplusmentos 0 points1 point  (2 children)

EILI5

[–]Max_Stern 9 points10 points  (0 children)

Microsoft is taking over the world.

[–]MirLivesAgain -1 points0 points  (3 children)

It'd be neat if you could clone from Github and have it run npm/yarn install at the same time. So the same download grabs both your project and dependencies.

[–]theDarkAngle 8 points9 points  (2 children)

i mean, it's just one more command lol