Trying to rename a package


#1

I want to rename this package: https://atom.io/packages/css-clean

To this package: https://atom.io/packages/atom-css-clean

I did apm publish --rename atom-css-clean and I received this error Registering package in SeanJM/atom-css-clean repository failed: A package by that name already exists

I thought it had to do with how I renamed it manually in the package.json file, so I renamed it back, committed the change, tried again. That did not work.

Then I tried using the API: curl -v -H "Authorization: [token]" -X POST -d '{"rename": true, "tag": "rename"}' https://atom.io/packages/css-clean

This also failed.

Then I committed and pushed the new name, and then tried simply apm publish patch, now I have two versions (half way there).

Help appreciated.


#2

It depends on whether you want people to be redirected from the old package to the new package automatically. If you aren’t worried about people being upgraded, then I can delete the old package and you’re good. If you’d rather that the people using your package get brought along to the new name, then you should unpublish the new package and rename your package by following the instructions in the Atom Flight Manual. I may need to go spelunking into the database because your failed attempts might have left some residue. Let me know which you want to do.


#3

I want them to be redirected to the new package. :smiley:


#4

Ok, let me know when you’ve unpublished the new package and I’ll take a look later today at the database.


#5

Unpublished :triumph:


#6

Have you thought about implementing a user interface to make this simple? :neutral_face:


#7

Thought a ton about it yes :laughing:

Ironically, we haven’t had someone who is tasked with maintaining the website for several months. I understand that is changing soon :tada:


#8

Ok, I’ve ensured that there isn’t anything in the database that should block the rename. If you start with your package configured just as it was when you last published it to the old name and follow the commands in the Atom Flight Manual, things should work for you.

Let me know :+1:


#9

Renamed, everything looks good. Thank you @leedohm