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(unpublish): Show warning when last version is being removed #4191

Merged
merged 1 commit into from
Jan 6, 2022
Merged

fix(unpublish): Show warning when last version is being removed #4191

merged 1 commit into from
Jan 6, 2022

Conversation

ebsaral
Copy link
Contributor

@ebsaral ebsaral commented Dec 25, 2021

Issue:
When we use npm unpublish command with the last version of a package, we don't get a warning and we can't republish until 24 hours pass.

Solution:
I wanted to give a warning to the user and force them to use --force if they are really sure about this action.

Fixes npm/rfcs#355

@ebsaral ebsaral requested a review from a team as a code owner December 25, 2021 13:06
@ebsaral ebsaral changed the title Show warning on unpublish command when last version is being removed WIP: Show warning on unpublish command when last version is being removed Dec 25, 2021
@ebsaral ebsaral changed the title WIP: Show warning on unpublish command when last version is being removed Show warning on unpublish command when last version is being removed Dec 25, 2021
@FelixSelter
Copy link

Please implement this

lib/commands/unpublish.js Outdated Show resolved Hide resolved
@ebsaral
Copy link
Contributor Author

ebsaral commented Jan 4, 2022 via email

@ebsaral ebsaral changed the title Show warning on unpublish command when last version is being removed WIP: Show warning on unpublish command when last version is being removed Jan 6, 2022
@ebsaral ebsaral changed the title WIP: Show warning on unpublish command when last version is being removed Show warning on unpublish command when last version is being removed Jan 6, 2022
@wraithgar wraithgar changed the base branch from latest to release-next January 6, 2022 15:22
@wraithgar wraithgar changed the title Show warning on unpublish command when last version is being removed fix(unpublish): Show warning when last version is being removed Jan 6, 2022
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.

LGTM 👍 thanks for the contribution @ebsaral

@nlf nlf merged commit 65c3a7b into npm:release-next Jan 6, 2022
@fritzy fritzy mentioned this pull request Jan 13, 2022
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.

5 participants