From 45f682fe46576cb516cbd22f945bd09c0e5ec2ce Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Mon, 13 Jul 2026 21:04:01 +0200 Subject: [PATCH] test: opt version -r changelog test into repository storage (#12984) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "bare version -r applies the release plan and cleans up the intent" test asserts the committed-CHANGELOG flow: it reads lib/CHANGELOG.md and expects the consumed intent to be deleted at version time. Since composing changelogs at publish time (registry storage) became the default, `pnpm version -r` no longer commits CHANGELOG.md — it parks the section under .changeset/changelogs/ and defers intent GC until the registry confirms publication. With no verifyPublished registry in the test, the changelog file is never written (ENOENT) and the intent is never collected, so the test failed. Opt the test into `versioning.changelog.storage: repository` so it keeps exercising the committed-changelog + intent-cleanup path, matching the pattern the versioning package's lifecycle tests already use. Registry-storage behavior (parked section, deferred GC) is covered by those lifecycle tests. Co-authored-by: Claude Opus 4.8 (1M context) --- pnpm11/releasing/commands/test/change/index.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pnpm11/releasing/commands/test/change/index.test.ts b/pnpm11/releasing/commands/test/change/index.test.ts index 265225cef3..b3d1b92edc 100644 --- a/pnpm11/releasing/commands/test/change/index.test.ts +++ b/pnpm11/releasing/commands/test/change/index.test.ts @@ -69,7 +69,12 @@ describe('change command and intent-consuming version -r', () => { it('bare version -r applies the release plan and cleans up the intent', async () => { const lib = addPkg({ name: 'lib', version: '1.0.0' }) const cli = addPkg({ name: 'cli', version: '2.0.0', dependencies: { lib: 'workspace:*' } }) - const opts = baseOpts([lib, cli]) + // Assert the committed-CHANGELOG flow: `repository` storage writes + // CHANGELOG.md and deletes the consumed intent at version time. The default + // `registry` storage instead parks the section and defers intent GC until + // the registry confirms publication — covered in the versioning package's + // lifecycle tests. + const opts = { ...baseOpts([lib, cli]), versioning: { changelog: { storage: 'repository' } } } await change.handler({ ...opts, bump: 'major', summary: 'Breaking change.' } as any, ['lib']) // eslint-disable-line @typescript-eslint/no-explicit-any