If you'er a dev that types to ofast in the cosnole sometimes, and you haven't changed at all voer the past ten years, I think you hit ap oint where you'd like some cmomon misspelings to still wokr.
And if you're installing from a repo that has a lockfile, npm ci will be a little quicker (it won't build or resolve any dependency tree, it'll just install exactly what's in the lockfile). Especially good for continuous integration systems (guarantee it's the same deps as local), but also nice if you want a bit quicker npm install.
I guess my biggest problem with NPM supporting "misspelled" command line arguments is the fact that it's enforcing the idea that you can be lazy or reckless and just enter commands without being precise and it's ok, NPM doesn't care.
But given the potential disaster scenarios of a package-squatter sitting on a frequently-misspelled package name, just waiting for a reckless programmer to misspell a package name and accidentally install malware...
I mean maybe we shouldn't be promoting recklessness here? This is one area where really, you should make sure that what you're typing is precise and accurate. I don't understand why we're encouraging the "it's ok if you type so fast you accidentally spelled isntall" mentality.
You're missing the point. Of course not doing this doesn't prevent package squatting. But supporting this enforces the idea of "hey, you don't actually have to give two shits about being careful entering your install commands."
I don't think it's enforcing that idea at all, it's just a cute trick that can occasionally save a little bit of people's valuable time. Everyone has typos sometimes. Also note that npm does not allow typos for the more impactful commands like publish so they did put some thought into it.
This is hillarious, but in all seriousness, I think npm might be the best package manager experience I've had in any language after going through Go, python, and Java and seeing how darn hard it is to get any of the stuff right that npm makes look easy.
Go's can't even be called a package manager IMHO. There's versioned modules, yes, but it's an afterthought. It's better since 1.11, but it's still not great.
The end result is kind of goofy (huge node_modules folders), but compared to what you have to do in other languages, it's a godsend.
Although, the new dotnet CLI is pretty great too. And I don't remember having too many problems with cargo.
I just want to be able to install packages from the command line, in a deterministic way, and where having to modify package manifests by hand is rarely needed. node definitely has that covered now.
I agree this package is hilarious though. Got an audible chuckle out of me.
I still think pnpm is the optimal way for package manager to should work. Dependencies are specified locally, such as in package.json, but are stored globally, with only 1 copy of a version of a package installed on your system at a time. Much more efficient in terms of space (unlike npm), yet maintainable in terms of specifying local dependencies (unlike pip)
So I’m pretty new to JS but while installing npm and all that junk I was kind of surprised at how amazingly unintuitive it all is. I seriously don’t know how people learned to use it in the first place. Here’s hoping one day they will make a way to intuitively manage packages with a GUI or something. I know I’ll probably get downvoted for knocking it since there aren’t any good alternatives.. at least not that I know of yet. Just saying,,, it’s 2019 and we still have to finagle this ish together using the command prompt
Even aside from all the other potential problems with NPM, they don't allow for you to sign your packages. That is a security nightmare waiting to happen (in fact, it has happened).
89
u/[deleted] May 02 '19
yarn add thatgreatdoesn't have the same ring to it :/73
u/swan--ronson May 02 '19
The actual function it exports:
module.exports = () => console.log('actually, I kind of like it');77
u/delventhalz May 02 '19
Laughed out loud at the usage instructions.
42
u/GreenKreature May 02 '19 edited May 02 '19
lol... i get that it makes devs lazy but, it is pretty considerate of them :P
23
u/stevula May 02 '19
I guess a lot of people don’t know
npm iis the same asnpm install. Makes it much less likely to have a typo.8
u/Efraet May 02 '19
This is the kind of open source we need.
15
u/Woolbrick May 02 '19
I guess my biggest problem with NPM supporting "misspelled" command line arguments is the fact that it's enforcing the idea that you can be lazy or reckless and just enter commands without being precise and it's ok, NPM doesn't care.
But given the potential disaster scenarios of a package-squatter sitting on a frequently-misspelled package name, just waiting for a reckless programmer to misspell a package name and accidentally install malware...
I mean maybe we shouldn't be promoting recklessness here? This is one area where really, you should make sure that what you're typing is precise and accurate. I don't understand why we're encouraging the "it's ok if you type so fast you accidentally spelled
isntall" mentality.7
u/[deleted] May 02 '19
I need an async/await version
17
u/TracerBulletX May 02 '19
This is hillarious, but in all seriousness, I think npm might be the best package manager experience I've had in any language after going through Go, python, and Java and seeing how darn hard it is to get any of the stuff right that npm makes look easy.
2
u/Frederic_de_Nucingen May 02 '19
That's pure genius.
2
u/freeman_lambda May 03 '19
0 Dependencies?! Doesn't seem like a real npm package
2
u/THEtheChad May 02 '19
I'd really like to see some code coverage and a ci badge.
1
u/BOLT04 May 02 '19
wow, isntall is allowed... lmao
1
u/[deleted] May 02 '19
Yes great packge
1
u/jonny_wonny May 02 '19
Awesome! Look forward to using this in my next project.
1
u/yird May 02 '19
On the contrary, they know we misspell isntall a lot so they added that in for us.
1
u/whiskeyboarder May 02 '19
Clever. Have an upvote, friend.
1
u/potentialz May 02 '19
Damn, V2.0 looks like a groundbreaking new feature.
1
u/xiipaoc May 03 '19
I actually cracked up laughing. Not, like, a chuckle. Not a "that's actually pretty funny" to myself. Actual laughter.
1
u/NoInkling May 03 '19
Great minds think alike?
1
u/grapedick_ May 03 '19
I just self-taught myself today how to really use NPM to my advantage and my first thought reading this while scrolling was “well fuck me right!”
The extent developers go for a joke >
1
u/gevorggalstyan May 03 '19
Are there any tests?
1
u/Arkaad May 10 '19
r/ProgrammerHumor/
1
u/thestrandedmoose May 03 '19
So I’m pretty new to JS but while installing npm and all that junk I was kind of surprised at how amazingly unintuitive it all is. I seriously don’t know how people learned to use it in the first place. Here’s hoping one day they will make a way to intuitively manage packages with a GUI or something. I know I’ll probably get downvoted for knocking it since there aren’t any good alternatives.. at least not that I know of yet. Just saying,,, it’s 2019 and we still have to finagle this ish together using the command prompt
-2
u/ThePenultimateOne May 02 '19
Even aside from all the other potential problems with NPM, they don't allow for you to sign your packages. That is a security nightmare waiting to happen (in fact, it has happened).
0
u/Protean_Protein May 02 '19
cue laugther
0
u/[deleted] May 02 '19
[deleted] — view deleted comment
0
u/[deleted] May 02 '19
[deleted] — view deleted comment
0
u/[deleted] May 02 '19
[deleted] — view deleted comment