Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

The electron package name on npm #160

Closed
zeke opened this issue Jul 7, 2016 · 13 comments
Closed

The electron package name on npm #160

zeke opened this issue Jul 7, 2016 · 13 comments
Labels

Comments

@zeke
Copy link
Member

zeke commented Jul 7, 2016

The Electron team at GitHub recently reached out to @logicalparadox to see if he'd be willing to let us take over the electron npm package. He has graciously agreed to do so, and has added our team as owners.

The motivation for the request was this:

The electron installation process can often be a stumbling block for new users. There is an npm package called electron-prebuilt that most apps use to add electron to their development environment. Many users don't read the manual, though, and will often run npm install electron instead, only to discover (often after much confusion) that it's not the electron they're looking for.

So, now that we have the name, the goal is to make npm install electron feel just like npm install electron-prebuilt. How should we accomplish this?

Option A: Pull off the Band-Aid™

npm deprecate the electron-prebuilt package. The deprecate method allows you to specify a message that will be displayed to users when the package is installed. We could say something like: "As of version x.x.x, electron-prebuilt has been renamed to electron.". Change name to electron in the package.json file and begin publishing to npm as electron, but leave the repository name as-is.

Option B: Tandem Releases for a While

Similar to option A, but with a longer window for users to make the switch. We would still deprecate electron-prebuilt on npm immediately, but instead of pulling the plug on the electron-prebuilt package right away, we could publish both packages in tandem for a while, then eventually stop publishing electron-prebuilt entirely.

Option C: Side by Side, Forever

We could just leave electron-prebuilt as-is, and make electron a simple wrapper around it. Both packages would need to be released automatically, as prebuilt is today.

I think the Electron team prefers Option A because it seems the simplest, but we are open to ideas. The end-goal is to make it easier for novices and pros alike to get electron running locally without confusion. The approach we should take is the one that minimizes confusion and maximizes developer happiness. :)

@mafintosh
Copy link
Collaborator

There are quite a few public projects that use electron-prebuilt as a dependency, https://www.npmjs.com/browse/depended/electron-prebuilt.

It might be worth looking at those and seeing how many are affected by option A or B and potentially send PRs to upgrade their dependencies.

@zeke
Copy link
Member Author

zeke commented Jul 7, 2016

send PRs to upgrade their dependencies

I pinged @greenkeeperio about PR automation tools, and @boennemann got back to me with what looks like the perfect thing: https://github.com/boennemann/github-change-remote-file

@zeke
Copy link
Member Author

zeke commented Jul 25, 2016

The Electron team just had a little pow-wow to figure out how to move forward.
Here's the plan we came up with:

✏️ Change the name field in package.json from electron-prebuilt to electron

🍴 Fork the electron-prebuilt-updater repo into the electron org

📡 Create a GitHub-owned Heroku instance to run the electron-prebuilt-updater service that listens for release webhooks.

📦 Refactor the updater app to automatically publish electron-prebuilt and electron in tandem. Two different names, same exact package.

⚠️ npm deprecate electron-prebuilt in 90 days. This will give us a window to open PRs updating the dependency in popular open-source projects.

👻 Stop publishing electron-prebuilt entirely at the end of 2016

💡 We would love feedback on this plan!

@englishextra
Copy link

@zeke Oh my God! My TODO.md is going to be quite a headache.

@zeke
Copy link
Member Author

zeke commented Jul 25, 2016

My TODO.md is going to be quite a headache.

What do you mean? Hopefully we can automate the migration process for most users.

@englishextra
Copy link

@zeke Do I use npm -g install electron instead of npm -g install electron-prebuilt when using electron-packager to build windowed packages? Is that going to be redirected sort of at npm registry?

@zeke
Copy link
Member Author

zeke commented Jul 25, 2016

@englishextra per my comment above, our plan is to continue publishing the package under both names on npm through the end of 2016.

@englishextra
Copy link

@zeke I see, Option C—is my choice, and I had no confusion with what to install— electron or electron-prebuilt when I started building packages with electron-packager tool.

@develar
Copy link
Member

develar commented Aug 4, 2016

electron-builder 5.23.0 will support electron npm package to detect electron version.

@zeke
Copy link
Member Author

zeke commented Aug 4, 2016

Awesome, @develar! Thanks for fixing, and for letting us know.

electron-userland/electron-builder@aa0682f

@anaisbetts
Copy link

Hm, wonder what I'm gonna rename electron-prebuilt-compile to...

@englishextra
Copy link

englishextra commented Aug 15, 2016

assemble compose

@zeke
Copy link
Member Author

zeke commented Aug 17, 2016

This is a done deal!

Blog post: http://electron.atom.io/blog/2016/08/16/npm-install-electron

@zeke zeke closed this as completed Aug 17, 2016
bshouse added a commit to bshouse/blockstack-browser that referenced this issue Nov 22, 2016
electron-prebuilt is a legacy package name that made it difficult for developer to find Electron with npm. electron-prebuild still exists for backward compatibility, but developers are encouraged to migrate. electron-userland/electron-prebuilt#160
bshouse added a commit to bshouse/blockstack-browser that referenced this issue Nov 22, 2016
electron-prebuilt is a legacy package name that made it difficult for developer to find Electron with npm. electron-prebuild still exists for backward compatibility, but developers are encouraged to migrate. electron-userland/electron-prebuilt#160
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants