Skip to content

fix(version): load the config from a relative --project-dir - #763

Closed
goosewobbler wants to merge 1 commit into
mainfrom
fix/version-relative-project-dir
Closed

goosewobbler wants to merge 1 commit into
mainfrom
fix/version-relative-project-dir

Conversation

@goosewobbler

Copy link
Copy Markdown
Owner

Description

releasekit version --project-dir <relative> changed into the directory, then loaded the config with the same relative path. It read <dir>/<dir>/releasekit.config.json, found nothing and silently ran with the defaults. An absolute path worked.

  • --project-dir is resolved once, before the chdir. The same absolute path is used for the chdir and the config load.
  • --output still resolves against the invocation directory.
  • Other commands:
    • notes and publish have no --project-dir.
    • The release subcommands take it but never chdir, so they already resolve it once.

Related Issue(s)

Fixes #698

Type of Change

  • feat — New feature
  • fix — Bug fix
  • docs — Documentation change
  • refactor — Code refactoring
  • test — Adding or updating tests
  • chore — Maintenance, dependencies, tooling
  • Breaking change — Requires major version bump

Scope

  • @releasekit/version
  • @releasekit/notes
  • @releasekit/publish
  • @releasekit/release
  • @releasekit/config
  • @releasekit/core
  • CI / workflows
  • Root / monorepo

Checklist

  • Lint passes (pnpm lint)
  • Tests pass (pnpm test)
  • Typecheck passes (pnpm typecheck)
  • Documentation updated (if applicable)
  • Breaking changes noted in description

Testing Notes

  • New integration test: runs the built CLI from a parent directory with --project-dir app, and checks that it applies app's config. With versionPrefix: "release-" the tag is release-0.2.0. Without the fix it gets the default v0.2.0.
  • Gate: lint, typecheck, pnpm test and the @releasekit/version test:integration suite all pass.

🤖 Generated with Claude Code

The version command changed into --project-dir and then loaded the config
with the same relative path, so it looked in <dir>/<dir>, found nothing and
ran with the defaults. Resolve --project-dir once, before the chdir, and use
it for both. The other commands that take --project-dir never chdir.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Standing release PR: #730 · v0.42.1 queued (4 packages) · open 2h 48m · ✅ ready to merge

Release Preview — v0.42.0 → v0.42.1

Note: Labels on this PR are advisory in standing-pr mode. Bumps come from conventional commits in the standing PR; override by editing labels on the standing PR itself. Add release:immediate to bypass the standing PR and release this PR directly.

These changes will be added to the release PR (#730) when merged:

Changelog

monorepo 0.42.0 → 0.42.1

Fixed

  • load the config from a relative --project-dir (version)

All packages → 0.42.1 (sync versioning)

  • @releasekit/version
  • @releasekit/notes
  • @releasekit/publish
  • @releasekit/release

After merge — predicted release

No version escalation — this PR's changes will be included in the queued release without affecting the projected versions.

Package Standing PR This PR After merge
monorepo 0.42.1 0.42.1 0.42.1

Updated automatically by ReleaseKit

@goosewobbler

Copy link
Copy Markdown
Owner Author

Closing as a duplicate of #757, which has the same fix for #698 and is already green.

@goosewobbler
goosewobbler deleted the fix/version-relative-project-dir branch October 23, 2026 21:27
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.

version --project-dir <relative path> loads the config from the wrong directory and silently uses defaults

1 participant