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

Change package.json key to 'volta' from 'toolchain' #412

Closed
charlespierce opened this issue May 8, 2019 · 4 comments · Fixed by #413
Closed

Change package.json key to 'volta' from 'toolchain' #412

charlespierce opened this issue May 8, 2019 · 4 comments · Fixed by #413

Comments

@charlespierce
Copy link
Contributor

For the package.json key that is used by Volta, we originally landed on toolchain in an attempt to be general and not try to make it specific to this one tool. However, there are a few reasons why this isn't ideal:

  1. It's a premature optimization, nobody else is doing similar configurations in package.json at the moment. If we gain traction and there is a push to align on a single key with several other packages, then we can tackle that with all the relevant stakeholders at that point.
  2. It doesn't align with the Packages/1.1 spec that defines the package.json, specifically the comment about striving to avoid collisions by using names that don't have meanings relevant to package management. toolchain is definitely a generic term that is relevant to package management.
  3. It's not easily discoverable. If you are looking at a package.json and see a toolchain, you don't know what this is about or what tool uses it. It's not part of the standard spec (though as mentioned above, it looks like it could be), but there's no way for you to know that it's a Volta configuration.

For these reasons, it seems best to switch to using volta. That solves the problem of discoverability and removes the potential for collisions with general-purpose package-management terms.

@charlespierce charlespierce added breaking-change to notate PRs for the release process and removed breaking-change to notate PRs for the release process labels May 8, 2019
@dherman
Copy link
Collaborator

dherman commented May 9, 2019

I agree!

Right now, the concept of pinning a project's engines is new and unfamiliar, and it won't appear in any standard documentation so people won't know how to search for it when they've never heard of Volta and come across the configuration it in a random project's package.json. So better google-juice will make for a better discoverability experience for that use case.

I would love to see the concept of pinning engines become something more standard. At some point, maybe other tools would like to adopt the idea, or even the core Node platform. At that point, I do think it would be nicer to have a more semantic name than "volta". But as you say, we're not there yet, and it seems like good citizenship not to try to claim a generic key without (a) more real-world proof of the concept and (b) wider engagement. (I'm not sure how much significance CommonJS has anymore, but it does seem like better citizenship to stick to our own "space.")

@rwjblue
Copy link
Contributor

rwjblue commented May 9, 2019

👍 I think this is absolutely the right direction. I'd love to end up in a future where toolchain is an agreed upon standard, but right now it feels like a bit of a barrier for onboarding folks (teams mostly).

@mikrostew
Copy link
Contributor

I agree with this change, but want to point out that for teams already using Notion (like the pilot devs here at LI), there will need to be some kind of migration.

Either:

  • Some transition period where both "toolchain" and "volta" exist in package.json, until everyone has migrated to Volta, or
  • Hard cutover from "toolchain""volta" in package.json, where anyone using Notion will have issues because "toolchain" is gone, so Notion will no longer be used for the project

@charlespierce
Copy link
Contributor Author

Good call out, I'll make sure to create a Wiki page calling out the migration steps.

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 a pull request may close this issue.

4 participants