-
Notifications
You must be signed in to change notification settings - Fork 2
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
Detect unpublished packages #2
Conversation
Thanks for putting this together! 👏 I wonder what As for how to find a sample, perhaps |
I've just tested, and here is the result: {
// ...
'dist-tags': { latest: '0.0.2' },
versions:
{ '0.0.2':
{
//...
}
},
time:
{ created: '2018-08-28T17:03:13.524Z',
'0.0.1': '2018-08-28T17:03:13.692Z',
modified: '2018-08-28T17:07:04.066Z',
'0.0.2': '2018-08-28T17:06:04.272Z' }, |
Awesome, that's about what I would have expected. The reason that matters is that squatter takes a second (currently undocumented) Anyway, in order to handle the Or to simplify everything, we could get rid of the |
Hmm, I 'm not sure to get it 😕 Being unpublished cannot depend on a version: a package is either completely unpublished (so not a squatter), either has one or more published versions, in that case the additional tests need to be run. By the way, I really don't understand how npm works: {
// ...
'dist-tags': { latest: '0.0.2' },
versions: {
'0.0.2': {
// ...
}
},
time:
{ created: '2018-08-28T17:03:13.524Z',
'0.0.1': '2018-08-28T17:03:13.692Z',
modified: '2018-08-28T19:34:12.799Z',
'0.0.2': '2018-08-28T17:06:04.272Z',
'0.0.3': '2018-08-28T17:19:48.544Z',
'0.0.4': '2018-08-28T17:22:03.420Z',
'0.1.0': '2018-08-28T19:21:15.659Z' },
} I really don't get it. The npmjs.com page shows a 404, but the unpkg.com site still has the 0.0.2 version (and only this one). Note: It may change in a few hours, because the npm command line says I should wait 24 hours after a package is completely unpublished to publish again. |
As the owner, you can choose to unpublish all versions or only some versions. The default behavior when you run So unpublishing depends upon versioning in the same way that publishing does. The only part I'm not super familiar with is how they represent this in the registry data. I'll help investigate that and see if there is a way for us to tell that a specific version was unpublished or whether the entire namespace was unpublished. Give me a few days and I'll look into it! |
Any follow-up on this? I recently was using npm-name zark
⠇ Checking name on npmjs.com… Sat and hung for a while, until I hit Ctrl-C and then I saw:
I'd love to be able to use |
I will be fixing this, for sure. Most likely merging this PR as-is. I just need to find the time to verify my assumptions about the registry data are correct. Tentatively thinking I should be able to do that middle of this week. Soon as this is done, I will make a patch release. Thanks for your patience. :) |
any updates on this? @sholladay |
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "squatter", | |||
"version": "0.2.0", | |||
"version": "0.2.1", |
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.
Could you please either undo this change or give me write access to your fork so I can do it for you? (I'll bump the version during the release process.)
Hi! I finally got around to this. Ready to merge with that one tweak. Thanks for your patience. :) |
@bokub Ping |
Hi Sindre If not, I'll make a new PR tomorrow when I'm around a computer |
For some reason, GitHub will allow me to merge, but not edit. I presume this is because the fork was deleted. Don't worry about recreating the fork. What I'll do is squash merge and then amend the commit on master. Thanks for your work on this! |
I've duplicated this PR in #5 😊 |
@sholladay Ping 🙋 |
I merged PR #5. Thanks for your work. I am aiming to do a release next weekend, possibly sooner. |
@sholladay Reminder about releasing. |
This fix has been released. Thanks for your patience, y'all. I've been taking care of my father who is very sick. I'm behind on many things, but OSS keeps me going. :) |
Fixes #1
I couldn't unpublish 'sunglasses' 😎 , but I found 'leopard' 🐆 to be unpublished too so I added it to the tests