text
stringlengths
0
1.36k
**Kat Marchán:** Yeah, the --cache-max 0...?
**Rebecca Turner:** No, because it's still 304 checks. --cache-max 0 would make it not even 304 check.
**Kat Marchán:** Right, right. So we have stuff on the pipeline now, things like... I've talked about --low-mem, which I need to spec out and hopefully get in something like that.
**Rebecca Turner:** Yeah, that would be really exciting.
**Kat Marchán:** Yeah... Literally, a mode in npm that drops concurrency massively and then makes sure to stream everything, so you have very low memory usage for npm, which is great for people running on constrained VPS's.
**Rebecca Turner:** ...and embedded systems, which is a surprisingly common use case.
**Alex Sexton:** That is interesting that the install would happen on the embedded system, versus somewhere else and then just load it on...
**Rebecca Turner:** Right, but it's just because that has been people's development mode. They wanna do their development on it. I imagine for deploying it they wouldn't do it that way, I would hope, but while they're working on it, they still have the little Raspberry Pi sitting next to their computer.
**Kat Marchán:** It's easier than having to do all the setup to do deployments on the clients...
**Rebecca Turner:** Yeah.
**Alex Sexton:** I think one of the primary overarching stories behind a lot of this is most people do a thing, and they do that thing and they're like "How come npm doesn't do this?" and I think no one's invoked the "yarn" word yet, but I think a lot of what yarn was was "Hey, there's this use case that if we take awa...
**Kat Marchán:** Yeah, I mean npm is the default, and that means that we have to support all these people; not just new people that are coming in, but what five, six years of people who have old setups and don't wanna have their keys moved too much. Although that's the - \[laughter\] we had a conversation yesterday. M...
Another aspect of npm@5 is that it is probably our most significant step in a while towards breaking npm down into significant chunks, with the intention of -- like, the dream here is to (the platonic idea, if you will) be able to take all the components that npm uses right now, pick only the ones that you like and nee...
\[12:24\] All the work that you don't have to change, you won't have to rewrite. We have several new packages that are meant to be used by the community more generally.
We're talking about "How the heck will you yank out parts of the installer so that people can make decisions about how they install the tree?" A really good example of things that npm isn't gonna sacrifice is npm has a very -- I guess we're sacrificing it maybe in like some distant future, but right now it is a very co...
For those unfamiliar, dependency hell is when you have two packages have dependency on two incompatible versions of the same other package. There's two ways to resolve that diamond. Either you install both versions of the package in nested dependencies, which is what npm does, or you have some kind of conflict resoluti...
It's why we never integrated any kind of flat install like Bower would do. We're just not gonna do that. I don't see us doing that.
**Rebecca Turner:** No.
**Kat Marchán:** Even though flat installs are really important to web developers...
**Alex Sexton:** Right... You don't want seven versions of jQuery just because you have seven jQuery plugins.
**Kat Marchán:** We want to maximize how flat our tree is, so that people using tools like Webpack or Rollup are able to use tools to reduce the package size of that. But as far as guaranteeing that something is gonna be unique in the tree, unless you use something like peerdeps manually or you have your own mechanism ...
**Rebecca Turner:** We would hope that people would be able to build on our tools to make that, if they wanted a package manager that did that.
**Kat Marchán:** Yes. And we, fantastically, have basically about that literally just wraps the \[unintelligible 00:14:32.19\] and that's the flat tree.
**Rebecca Turner:** I mean, that's very hard... \[laughter\]
**Alex Sexton:** I feel like it's a common place for a project the age of npm to reach this building pieces part... I think it speaks to the success and the breadth of usage; there's the jQuery UI builder, it's like "build the parts of jQuery you need." Modernizer has a builder, it's too many tests; Babel switched at 5...
**Rebecca Turner:** What we have today is we have the new cache - it's a content-addressable cache... It's a pain to spell cache... \[laughter\]
**Alex Sexton:** It's a Canadian cache...
**Rebecca Turner:** \[16:01\] But it's super fast and it has a very nice API, and all of the npm@5 cache access is built on that. And then there's pacote which is a... We'll provide links.
**Kat Marchán:** It's a manifest in tarball-fetching library. It does all the resolution of identifiers and stuff like that, identical to what npm does; in fact, it's what npm uses now. So you can say pacote.extract and then you give it like npm@5 and it will extract the contents of the npm@5 tarball according to semve...
**Rebecca Turner:** And it supports all the sources that npm does.
**Kat Marchán:** Yes!
**Rebecca Turner:** So yeah, the registry, but also Git sources, including the new Git semver support, which is one of the other exciting new features...
**Kat Marchán:** And building. You can build Git deps now. If you have a prepare script and you npm a Git dependency, we will install as step dependencies and run the install script to pretend that you're -- you know, basically simulate publishing to a registry.
**Alex Sexton:** I see. You're cannibalizing npm Enterprise.
**Kat Marchán:** Sure, why not!? \[laughter\]
**Alex Sexton:** I guess you'd have to have GitHub Enterprise to fully cannibalize, but...
**Kat Marchán:** It is not that, by the way... we \[unintelligible 00:17:29.21\] for every single Git dep. That is not something you want to do a lot.
**Alex Sexton:** Yeah, yeah. So how does it differ from tagging something in -- oh, I guess the resolution of the tag can increase in version as a different... Before, you used to be able to do a Git dep and do hash some tag version number; now you're saying that you can kind of do like a carrot version number and it w...
**Kat Marchán:** Yeah. It will do that I think to references.
**Alex Sexton:** Awesome. That is nifty.
**Mikeal Rogers:** I wanna go at a little bit higher level... We talked earlier on this podcast about yarn a little bit... For people that don't know, yarn is an npm alternative client that pulls from the npm registry, but it sort of touts two main features: one was performance and one was defaulting this lockfile. Giv...
**Rebecca Turner:** npm always had a lockfile, of course, in the form of a shrinkwrap, so we didn't feel like we should reinvent the wheel there... We just reused that for the new npm@5 package lock. The main difference between yarn's lockfile and the package lock is -- yarn's lockfile, what it stores in it is the rela...
The npm lockfile stores exactly how your Node modules should look when it's done. The npm lockfile guarantees that you will have exactly the same shape of Node modules, as well as the same content, regardless of what you're using to install it.
**Alex Sexton:** I've seen Kat talk about that a little bit. You mentioned that became obvious to you all that it was important to maintain that directory structure... What have you seen people do? What is the reason that is important?
**Kat Marchán:** I think every single person who's ever run CI that runs on Node 4, Node 6 and Node 7 at the same time has run into something at some point where they forget to set up a dependency or something happens with the tree, and suddenly only Node 4 breaks, because Node 4 still defaults to npm 2, which is befor...
**Alex Sexton:** \[20:07\] So they're grabbing into the Node modules folder directly, you mean... With the fs.read...
**Kat Marchán:** They do that. Sometimes they just mess up their tree in some way, but they've been testing on one platform... So being able to recreate that exactly is really important.
**Rebecca Turner:** Yeah, I mean... In a perfect world this wouldn't be the case, and certainly when we introduced npm@3 we thought we were going into that perfect world. We learned very quickly that that was not the case; people are doing all kinds of scary things to their modules. People are doing things like having ...
**Alex Sexton:** \[whispering\] Oh my god...
**Rebecca Turner:** It's not a thing I recommend... \[laughter\]