@exadev/semantic-release-workspace 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -14,7 +14,7 @@ import { glob } from "tinyglobby";
14
14
  import { parse } from "yaml";
15
15
  import { pathToFileURL } from "node:url";
16
16
  //#region package.json
17
- var version = "1.2.2";
17
+ var version = "1.2.3";
18
18
  //#endregion
19
19
  //#region src/errors.ts
20
20
  /**
@@ -299,10 +299,11 @@ async function assertCleanWorkingTree(options) {
299
299
  const changes = await workingTreeChanges(options);
300
300
  if (changes.length > 0) throw new WorkspaceStateError(`The working tree in ${options.cwd} is not clean: ${changes.join(", ")}. commitStrategy "single" discovers what it touched via "git status", so it requires a clean tree to start from; commit, stash elsewhere, or discard these changes first.`);
301
301
  }
302
- /** Pushes the current branch's head and a set of tags to origin in one push, so a combined release commit and every tag pointing at it land on the remote as a single atomic-looking update rather than as separate pushes an interrupted run could split across. */
302
+ /** Pushes the current branch's head and a set of tags to origin as one atomic update: either every ref lands or none do. `--atomic` is load-bearing, not cosmetic -- a plain multi-refspec `git push` negotiates each ref independently, so a branch update the remote rejects (e.g. a non-fast-forward, because an ordinary PR merged to this branch while this run was still preparing its own commit) can still let the tag refs through, since a brand-new tag has no fast-forward constraint to fail. That leaves a tag on the remote with no commit reachable from the branch behind it -- and because the release this tag names gets recomputed identically, deterministically, from the branch's own commit history on every future run, a stranded tag is not a one-off failure: it is a permanent block, since `git tag <name>` refuses to recreate a name that already exists. Atomicity turns a silent partial success into a clean, retriable failure: the branch and its tags either both advance together, or neither does, so a rejected push leaves nothing behind for the next run to trip over. */
303
303
  async function pushHeadAndTags(tagNames, options) {
304
304
  await git([
305
305
  "push",
306
+ "--atomic",
306
307
  "origin",
307
308
  `HEAD:${await currentBranch(options)}`,
308
309
  ...tagNames
package/dist/index.cjs CHANGED
@@ -250,10 +250,11 @@ async function assertCleanWorkingTree(options) {
250
250
  const changes = await workingTreeChanges(options);
251
251
  if (changes.length > 0) throw new WorkspaceStateError(`The working tree in ${options.cwd} is not clean: ${changes.join(", ")}. commitStrategy "single" discovers what it touched via "git status", so it requires a clean tree to start from; commit, stash elsewhere, or discard these changes first.`);
252
252
  }
253
- /** Pushes the current branch's head and a set of tags to origin in one push, so a combined release commit and every tag pointing at it land on the remote as a single atomic-looking update rather than as separate pushes an interrupted run could split across. */
253
+ /** Pushes the current branch's head and a set of tags to origin as one atomic update: either every ref lands or none do. `--atomic` is load-bearing, not cosmetic -- a plain multi-refspec `git push` negotiates each ref independently, so a branch update the remote rejects (e.g. a non-fast-forward, because an ordinary PR merged to this branch while this run was still preparing its own commit) can still let the tag refs through, since a brand-new tag has no fast-forward constraint to fail. That leaves a tag on the remote with no commit reachable from the branch behind it -- and because the release this tag names gets recomputed identically, deterministically, from the branch's own commit history on every future run, a stranded tag is not a one-off failure: it is a permanent block, since `git tag <name>` refuses to recreate a name that already exists. Atomicity turns a silent partial success into a clean, retriable failure: the branch and its tags either both advance together, or neither does, so a rejected push leaves nothing behind for the next run to trip over. */
254
254
  async function pushHeadAndTags(tagNames, options) {
255
255
  await git([
256
256
  "push",
257
+ "--atomic",
257
258
  "origin",
258
259
  `HEAD:${await currentBranch(options)}`,
259
260
  ...tagNames
package/dist/index.js CHANGED
@@ -225,10 +225,11 @@ async function assertCleanWorkingTree(options) {
225
225
  const changes = await workingTreeChanges(options);
226
226
  if (changes.length > 0) throw new WorkspaceStateError(`The working tree in ${options.cwd} is not clean: ${changes.join(", ")}. commitStrategy "single" discovers what it touched via "git status", so it requires a clean tree to start from; commit, stash elsewhere, or discard these changes first.`);
227
227
  }
228
- /** Pushes the current branch's head and a set of tags to origin in one push, so a combined release commit and every tag pointing at it land on the remote as a single atomic-looking update rather than as separate pushes an interrupted run could split across. */
228
+ /** Pushes the current branch's head and a set of tags to origin as one atomic update: either every ref lands or none do. `--atomic` is load-bearing, not cosmetic -- a plain multi-refspec `git push` negotiates each ref independently, so a branch update the remote rejects (e.g. a non-fast-forward, because an ordinary PR merged to this branch while this run was still preparing its own commit) can still let the tag refs through, since a brand-new tag has no fast-forward constraint to fail. That leaves a tag on the remote with no commit reachable from the branch behind it -- and because the release this tag names gets recomputed identically, deterministically, from the branch's own commit history on every future run, a stranded tag is not a one-off failure: it is a permanent block, since `git tag <name>` refuses to recreate a name that already exists. Atomicity turns a silent partial success into a clean, retriable failure: the branch and its tags either both advance together, or neither does, so a rejected push leaves nothing behind for the next run to trip over. */
229
229
  async function pushHeadAndTags(tagNames, options) {
230
230
  await git([
231
231
  "push",
232
+ "--atomic",
232
233
  "origin",
233
234
  `HEAD:${await currentBranch(options)}`,
234
235
  ...tagNames
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exadev/semantic-release-workspace",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "Independent per-package semantic-release orchestration for pnpm workspaces, without lockstep versioning.",
5
5
  "type": "module",
6
6
  "repository": {