Skip to content

Conversation

@s0
Copy link
Member

@s0 s0 commented May 12, 2025

  • cwd was not working correctly when commitMode was set to git-cli, as it was attempting to resolve the cwd twice. (This problem only occured when specifying a relative path for cwd.)
  • Update ghcommit, and avoid calling process.chdir() to change the working directory. Instead, we now pass the cwd option everywhere.

fixes #475

- `cwd` was not working correctly when commitMode was set to `git-cli`,
  as it was attempting to resolve the `cwd` twice.
  (This problem only occured when specifying a relative path for `cwd`.)
- Update `ghcommit`, and avoid calling `process.chdir()` to change the
  working directory. Instead, we now pass the `cwd` option everywhere.

fixes changesets#475
@changeset-bot
Copy link

changeset-bot bot commented May 12, 2025

🦋 Changeset detected

Latest commit: 4924a42

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@changesets/action Patch

Not sure what this means? Click here to learn what changesets are.

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

@s0
Copy link
Member Author

s0 commented May 12, 2025

@Andarist please take a look and review.

Copy link
Member Author

@s0 s0 left a comment

Choose a reason for hiding this comment

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

Changes LGTM

@Andarist Andarist merged commit 7ed1955 into changesets:main May 16, 2025
1 check passed
@github-actions github-actions bot mentioned this pull request May 15, 2025
@oshytiko
Copy link

I think this fix uncovered another issue, could someone take a look at this PR please!

ping @s0 @Andarist

valpinkman added a commit to LedgerHQ/changeset-action-ledger that referenced this pull request Aug 4, 2025
* upstream/main: (28 commits)
  Version Packages (changesets#480)
  Fixed missed `__dirname` reference (changesets#496)
  Switch to bundling with Rollup (changesets#495)
  Migrate to ESM (changesets#484)
  Fixed situations in which `cwd` was specified as a relative path and used with (default) `commitMode: git-cli` (changesets#486)
  Add LICENSE file (changesets#491)
  Fix PRs sometimes not getting reopened with `commitMode: github-api` (changesets#488)
  Removed `fs-extra` dependency (changesets#481)
  Setup Git user in `release-pr` workflow (changesets#493)
  Use proper ndoe version in `release-pr` workflow (changesets#492)
  Add `release-pr` workflow (changesets#490)
  Migrate to Vitest (changesets#483)
  Switch to `esbuild` for bundling (changesets#479)
  Import only for `semver/functions/lt` (changesets#482)
  Avoid hitting a deprecation warning when encountering errors from `@octokit/request-error` (changesets#461)
  Run typecheck on CI (changesets#478)
  Updated `@actions/*` and `@octokit/*` dependencies (changesets#477)
  Bump @babel/runtime from 7.21.5 to 7.27.1 (changesets#464)
  Version Packages (changesets#476)
  Make git add work consistently with subdirectories (changesets#473)
  ...
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.

Remove usage of process.chdir()

3 participants