Skip to content

feat/publish#1000

Merged
claudiahdz merged 2 commits intorelease/v7.0.0-betafrom
feat/publish
Mar 30, 2020
Merged

feat/publish#1000
claudiahdz merged 2 commits intorelease/v7.0.0-betafrom
feat/publish

Conversation

@claudiahdz
Copy link
Copy Markdown
Contributor

@claudiahdz claudiahdz commented Mar 10, 2020

This PR refactors both npm publish and npm pack. Both now use libnpmpack to pack tarballs and npm publish no longer needs to write on disk to display to console the tarball contents.

@claudiahdz claudiahdz force-pushed the feat/publish branch 2 times, most recently from 0b58a78 to 3a0f260 Compare March 10, 2020 23:08
Comment thread lib/utils/tar-contents.js Outdated
@claudiahdz claudiahdz force-pushed the feat/publish branch 3 times, most recently from 4d8543b to 529111d Compare March 27, 2020 22:16
@claudiahdz claudiahdz marked this pull request as ready for review March 27, 2020 22:18
@claudiahdz claudiahdz requested a review from a team as a code owner March 27, 2020 22:18
Copy link
Copy Markdown
Contributor

@isaacs isaacs left a 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!

Comment thread lib/pack.js Outdated
Comment thread lib/pack.js Outdated
}
})
.tap(() => lifecycle(pkg, 'postpack', dir))
const tarballs = await Promise.all(args.map((arg) => pack_(arg)))
Copy link
Copy Markdown
Contributor

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) }

Comment thread lib/publish.js Outdated
Comment thread lib/publish.js Outdated
defaultTag: 'latest',
json: false,
tmp: {},
...npm.flatOptions
Copy link
Copy Markdown
Contributor

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?

Comment thread lib/publish.js Outdated
Comment thread lib/publish.js
Comment thread lib/publish.js
Comment thread lib/publish.js Outdated
Comment thread lib/utils/tar.js Outdated
Comment thread lib/utils/tar.js
@claudiahdz claudiahdz force-pushed the feat/publish branch 3 times, most recently from b9d0625 to fbf0f01 Compare March 30, 2020 17:49
Copy link
Copy Markdown
Contributor

@isaacs isaacs left a 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!

Comment thread lib/pack.js Outdated
Comment thread lib/publish.js Outdated
@claudiahdz claudiahdz merged commit bc12db1 into release/v7.0.0-beta Mar 30, 2020
@claudiahdz claudiahdz deleted the feat/publish branch March 30, 2020 21:16
@isaacs
Copy link
Copy Markdown
Contributor

isaacs commented Mar 31, 2020

💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants