Skip to content
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

fix: publish --dry-run require login & publishConfig loaded after registry check #2445

Merged
merged 3 commits into from
Jan 28, 2021

Conversation

dr-js
Copy link
Contributor

@dr-js dr-js commented Jan 6, 2021

Fix publish --dry-run with v7.3.0 will require login (ENEEDAUTH). (already fixed)
Fix publishConfig from package.json loaded after the registry check.

This PR delayed publish login check till config merge (from the code should wait for 1 more file read or pacote manifest load), and added publish read registry only from publishConfig test.

References

Fixes #2411
Related PR also fix dry-run #2422

@dr-js dr-js requested a review from a team as a code owner January 6, 2021 01:58
@dr-js
Copy link
Contributor Author

dr-js commented Jan 6, 2021

Should I split the last fix as a separate PR? Currently the coverage error will affect other PR made in this year.

@darcyclarke darcyclarke added Release 7.x work is associated with a specific npm 7 release release: next These items should be addressed in the next release semver:patch semver patch level for changes Needs Review labels Jan 7, 2021
@isaacs
Copy link
Contributor

isaacs commented Jan 7, 2021

Can you please remove the dry-run and birthday tests, since they're unrelated to the issue of merging in publishConfig prior to checking the registry/login?

Also, this needs a test that fails without the patch, and passes with the patch. Thanks!

@ruyadorno ruyadorno added pr: needs tests requires tests before merging and removed Needs Review labels Jan 7, 2021
@dr-js
Copy link
Contributor Author

dr-js commented Jan 8, 2021

Sure, I see there's 7.4.0, will rebase & change the code.

@foxxyz
Copy link
Contributor

foxxyz commented Jan 10, 2021

@dr-js Thank you for doing this! Let me know if I can assist in any way.

@dr-js
Copy link
Contributor Author

dr-js commented Jan 22, 2021

@ruyadorno There is one test added for the fix, should I add some other type of tests for this?
And 2 related test is edited due to changed code execution order.

Copy link
Contributor

@ruyadorno ruyadorno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 looks great, thanks @dr-js !

@ruyadorno ruyadorno added release: next These items should be addressed in the next release and removed pr: needs tests requires tests before merging labels Jan 22, 2021
@nlf nlf changed the base branch from latest to release/v7.5.0 January 28, 2021 20:30
@nlf nlf merged commit d2f8af2 into npm:release/v7.5.0 Jan 28, 2021
@nlf nlf mentioned this pull request Jan 28, 2021
@dr-js dr-js deleted the fix-publish-dry-run branch January 30, 2021 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: next These items should be addressed in the next release Release 7.x work is associated with a specific npm 7 release semver:patch semver patch level for changes
Projects
None yet
6 participants