-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
feat/publish #1000
feat/publish #1000
Conversation
0b58a78
to
3a0f260
Compare
4d8543b
to
529111d
Compare
529111d
to
daa17fd
Compare
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.
Only some pretty minor changes requested. This is looking great!
lib/pack.js
Outdated
} | ||
}) | ||
.tap(() => lifecycle(pkg, 'postpack', dir)) | ||
const tarballs = await Promise.all(args.map((arg) => pack_(arg))) |
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.
Since there's an await
here, any errors will throw. Probably want to wrap this whole thing in a try { ... } catch (er) { cb(er) }
lib/publish.js
Outdated
defaultTag: 'latest', | ||
json: false, | ||
tmp: {}, | ||
...npm.flatOptions |
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.
The aliasing is weird here, does libnpmpublish
or libnpmpack
do something with those?
Any reason you can't just pass npm.flatOptions
in as the opts?
b9d0625
to
fbf0f01
Compare
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.
Just need to put the usage/completion on the exported function. Otherwise looks great!
fbf0f01
to
8e3ff7c
Compare
💯 |
This PR refactors both
npm publish
andnpm pack
. Both now uselibnpmpack
to pack tarballs andnpm publish
no longer needs to write on disk to display to console the tarball contents.