-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite node module handling (npm plugin) #874
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 3043967 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
87b2ca9
to
3a5a48c
Compare
3a5a48c
to
a9e22b7
Compare
5b1edcd
to
3043967
Compare
log(kl.dim(`downloading... `) + kl.cyan(id)); | ||
// Download tarball to disk | ||
const tarPath = path.join(downloadDir, `${safeName}-${version}.tgz`); | ||
await streamToDisk(tarball, tarPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like this could instead stream directly into parseTarball, to skip the disk write+read and cut memory usage in half.
Hey! Nice PR, I need this change in order to work with wmr... maybe I can help somehow to make this PR go through? |
This PR is a rewrite of the way we handle node modules and fetch them from the npm registry.
browser
field inpackage.json
development
andproduction
handling into a single plugin. Previously, we used a middleware duringdevelopment
and a rollup plugin forproduction
--autoInstall
and is disabled by default. The auto install feature is contained in a separate plugin.node_modules
folder with the package we're looking for.--registry
.setCwd
hack 🎉Todos:
etag
cachingBring back brotli compression background upgrades- already presentFixes #299, fixes #784, fixes #285, fixes #135, fixes #109, fixes #151, fixes #167