Package Publish Version for Atom Beta


#1

I have a package that (python-indent) that has some logic in it that breaks in beta versions of Atom (1.22). I have a fix ready for it, but the problem is that the fixes then break the package for versions < 1.22.

What is the accepted procedure for handling this? I was thinking I could change the package.json “engine” field from “>=1.0.0 <2.0.0” to “>=1.22.0 <2.0.0”, but would this mean that the package could no longer be newly installed for the current (and earlier) versions of Atom? I would assume that current, non-beta users would just not receive the update, but I’m wondering about new installs. Or is apm able to download the latest compatible version?

Thanks for your help!


#2

Hello.

Would it be possible for you to split the solution in two?
In code you could test for the Atom version…
https://atom.io/docs/api/v1.21.0/AtomEnvironment#instance-getVersion
https://atom.io/docs/api/v1.21.0/AtomEnvironment#instance-getReleaseChannel

Regards.


#3

Ahhh…perfect. I think that would work well in this situation. Thanks for the advice!


#4

I believe this to be the case. I know you can install old releases with APM the same as with NPM. I’d be surprised if apm install didn’t look for the latest compatible version.

It would also be possible for you to make the changes on your GitHub repo, make a new version tag, and have beta users download that specific tag until 1.22 is released.