Skip to content

introduces ca-changesets plugin #55

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

Merged
merged 7 commits into from
Nov 20, 2024
Merged

Conversation

t-monaghan
Copy link
Member

@t-monaghan t-monaghan commented Nov 19, 2024

A thin wrapper to @changesets/cli, using the npx command to call changeset.
This will install changeset if it does not already exist, without requirement of a package.json file, and without creating a node_modules/ directory.

I have ensured that:

  • This plugin will install nodejs, however the consuming devbox project's node version will not be clobbered, as the project's environment is loaded after the plugin environment.

Copy link
Contributor

@elliotthilaire-ca elliotthilaire-ca left a comment

Choose a reason for hiding this comment

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

Nice work. Especially the extra thinking around checking if the nodejs version would be clobbered. And working out how to get it installed without the node_modules folder.

I tested on ca-hellowworld-ruby by adding:

"include": [
    "github:cultureamp/devbox-extras/tfm/changeset-thin-fef-1768/?dir=plugins/ca-changesets"
  ],

It looks like changeset wasn't appearing on my path so I couldn't call it with just changeset

I was able to call it directly with:

.devbox/virtenv/cultureamp.devbox-extras.ca-changesets/bin/changeset

and verified that that works.

@t-monaghan
Copy link
Member Author

I've fixed the issue with changeset not appearing on path. It's due to a bug in devbox not being able to manipulate an environment variable twice. See: jetify-com/devbox#2138

@elliotthilaire-ca elliotthilaire-ca self-requested a review November 20, 2024 05:13
Copy link
Contributor

@elliotthilaire-ca elliotthilaire-ca left a comment

Choose a reason for hiding this comment

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

Nice. Have tested against ca-helloworld-ruby and this works so I think you can merge.

(It didn't seem to work first go. I tried deleting .devbox and it still didn't seem to work. after a devbox update it worked though. THere's no mention of the plugin in devbox.lock so I'm not sure how that works.)

@t-monaghan t-monaghan merged commit 69cbb9b into main Nov 20, 2024
5 checks passed
@t-monaghan t-monaghan deleted the tfm/changeset-thin-fef-1768 branch November 20, 2024 05:25
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.

3 participants