Skip to content

backfill --config ignores the path when loading the publish config #710

Closed

Description

@goosewobbler

Problem

packages/release/src/commands/backfill-command.ts:92 calls @releasekit/publish's loadConfig(cwd, options.config), but that function takes a single { cwd, configPath } object. The cwd string lands in the options slot, so configPath is undefined and the publish config comes from the default lookup: releasekit backfill --config <path> ignores the path for publish settings. (cwd is process.cwd() anyway, so only --config is lost.)

The notes call on the line above is correct: notes' loadConfig takes (projectDir, configFile).

Typecheck doesn't catch it, because @releasekit/publish's built declarations type its exports as any for other packages (dist/index.d.ts re-exports from ./config.ts and other .ts files that aren't in dist).

Found while reviewing #690.

Fix

Call loadPublishConfig({ cwd, configPath: options.config }), and add a test that backfill --config <path> reads that file's publish settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions