From 5034ad90f39125034e9b63b6a3a705dfddadba25 Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Wed, 14 Oct 2026 09:41:27 +0200 Subject: [PATCH] fix(s3): add repository metadata required for provenance; idempotent bump Publishing @platformatic/sqlite-js-stream-s3 with --provenance failed with `"repository.url" is ""`: npm verifies the provenance bundle against the package's repository field. Add repository (with directory), homepage, bugs and author. bump-version.mjs now exits cleanly when the version is already set, so a release whose bump landed but whose publish failed can be re-dispatched with the same version; pnpm -r publish skips versions already on npm. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0162xGMZU6wtdADEwqhqNqnY --- packages/backend-s3/package.json | 10 ++++++++++ scripts/bump-version.mjs | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/packages/backend-s3/package.json b/packages/backend-s3/package.json index 80878e5..098447d 100644 --- a/packages/backend-s3/package.json +++ b/packages/backend-s3/package.json @@ -7,6 +7,16 @@ "node": ">=24" }, "license": "Apache-2.0", + "author": "Matteo Collina", + "homepage": "https://github.com/platformatic/sqlite-js-stream/tree/main/packages/backend-s3", + "repository": { + "type": "git", + "url": "git+https://github.com/platformatic/sqlite-js-stream.git", + "directory": "packages/backend-s3" + }, + "bugs": { + "url": "https://github.com/platformatic/sqlite-js-stream/issues" + }, "main": "./dist/index.js", "types": "./dist/index.d.ts", "exports": { diff --git a/scripts/bump-version.mjs b/scripts/bump-version.mjs index c7c72db..f58258b 100644 --- a/scripts/bump-version.mjs +++ b/scripts/bump-version.mjs @@ -75,6 +75,13 @@ for (const file of await getPackageFiles()) { await writeFile(file, JSON.stringify(pkg, null, 2) + '\n') } +// Re-running a release whose bump already landed (e.g. a failed publish) leaves +// nothing to commit; publish then only pushes versions missing from npm. +if (execFileSync('git', ['status', '--porcelain', '--untracked-files=no'], { encoding: 'utf8' }).trim() === '') { + console.log(`version is already ${version}; nothing to commit`) + process.exit(0) +} + if (process.env.GITHUB_ACTIONS === 'true') { execFileSync('git', ['config', '--global', 'user.name', userInfo[0]]) execFileSync('git', ['config', '--global', 'user.email', userInfo[1]])