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

ASDF #2798

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

ASDF #2798

wants to merge 5 commits into from

Conversation

TheSonOfThomp
Copy link
Collaborator

@TheSonOfThomp TheSonOfThomp commented Apr 3, 2025

✍️ Proposed changes

Replaces our implicit node & pnpm version management with a more explicit tool manager; asdf

Running asdf install ensures all contributors are using the same version of Node & pnpm, which can avoid versioning conflicts.

  brew install asdf;
  asdf install;

Note: the MMS codebase also uses asdf, which would make moving between codebases easier

Don't we already list these versions?

We list Node version in engines, and the pnpm version is already identified twice, in engines and packageManager, so this may seem like a third source of truth.
But asdf install will actually install the correct version, whereas the "engines" attribute will only tell you if you're out of date

Alternatives

An alternative to asdf would be nvm (which many of us already use).
We could set the required node version in a .nvmrc file, which would solve the Node versioning issue.

Ensure you have the correct Node version with nvm install.,

However, installing the correct pnpm version requires another tool; corepack.
This would require contributors to manually enable the tool (corepack enable) and install the correct version corepack install [email protected].
As far as I can tell, there is no version file we can write to that will automatically install corepack dependencies

Copy link

changeset-bot bot commented Apr 3, 2025

⚠️ No Changeset found

Latest commit: 1ae812d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@TheSonOfThomp TheSonOfThomp changed the title A/asdf ASDF Apr 3, 2025
@TheSonOfThomp TheSonOfThomp requested a review from tsck April 3, 2025 21:30
Copy link
Collaborator

@tsck tsck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this and I think bringing it in definitely makes sense. I like that it brings us in line with MMS.

Looks like there's a mismatch in the pnpm versions causing a build error atm though. Might have bump some more in other places.

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 this pull request may close these issues.

2 participants