You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to configure this action when project is not in the root folder? #133
The project using changeset is currently in a sub-directory and the action is failing due to process.cwd not being in the correct folder. Is there a way to configure this for this action?
I'm pretty sure that using our version and publish inputs with a script changing the working directory and invoking the appropriate Changesets command would do the trick.
We potentially could also support a new cwd input if you'd like to implement such a feature - this didn't come up until now.
@Andarist I was able to get this working. The issue with using cd in the version script, is in the index.ts it calls readChangesetState, which uses process.cwd so it's before the version cmd. Changing the directory just for the node process also allows all the other default params using process.cwd() to be in the correct dir was well.
I was hoping to write a test for this, but it seems there isn't anything setup for index.ts (without mocking everything). Is that correct?
@Andarist I was able to get this working. The issue with using cd in the version script, is in the index.ts it calls readChangesetState, which uses process.cwd so it's before the version cmd. Changing the directory just for the node process also allows all the other default params using process.cwd() to be in the correct dir was well.
I was hoping to write a test for this, but it seems there isn't anything setup for index.ts (without mocking everything). Is that correct?
Nice!
It's a game changer feature! We can't wait for merge! :)
The project using changeset is currently in a sub-directory and the action is failing due to
process.cwdnot being in the correct folder. Is there a way to configure this for this action?