breakaway 1.0.2-main.2 → 1.0.2-main.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "breakaway",
3
- "version": "1.0.2-main.2",
3
+ "version": "1.0.2-main.4",
4
4
  "description": "The task board for you and your coding agents: a Cloudflare Worker, its web app, Taskwarrior sync, and the CLI (npx breakaway).",
5
5
  "license": "FSL-1.1-Apache-2.0",
6
6
  "type": "module",
@@ -14,10 +14,10 @@ const DEFAULT_DIR = '~/.config/breakaway';
14
14
  export { routinePrompt };
15
15
 
16
16
  /**
17
- * The CLI on npm (BRK-7), as a repository runs it: `npx breakaway`. Pinned to the `next` channel until the first stable
18
- * release exists; then this becomes the major (`breakaway@1`), so a breaking change never reaches a repository by itself.
17
+ * The CLI on npm (BRK-7), as a repository runs it: `npx breakaway`, pinned to the major (BRK-47), so a breaking change
18
+ * never reaches a repository by itself. It was the `next` channel until the first stable release.
19
19
  */
20
- export const CLI_PACKAGE = 'breakaway@next';
20
+ export const CLI_PACKAGE = 'breakaway@1';
21
21
  /**
22
22
  * Where the CLI starts: the command, and the two session hooks. repos init no longer copies them (BRK-7): an old copy
23
23
  * is replaced by npx, and these still version the CLI and say which files an old copy holds.
@@ -134,7 +134,10 @@ export function sessionHooks(pkg = CLI_PACKAGE) {
134
134
  };
135
135
  }
136
136
 
137
- /** settings.json with the session hooks' commands (either form) set to the current one; the rest is untouched. */
137
+ /**
138
+ * settings.json with the session hooks' commands set to the current one, whichever form they had: the copy's, or npx
139
+ * with an earlier channel or version of the package (`breakaway@next` before BRK-47). The rest is untouched.
140
+ */
138
141
  export function rewireHooks(text) {
139
142
  let out = text;
140
143
  for (const name of ['session', 'wait'])
@@ -143,7 +146,9 @@ export function rewireHooks(text) {
143
146
  const now = JSON.stringify(hookCommand(name)).slice(1, -1);
144
147
  out = out.split(was).join(now);
145
148
  }
146
- return out;
149
+ return out.replace(/npx --yes breakaway(?:@[^\s"\\]+)? hook (session|wait)\b/gu, (_, name) =>
150
+ JSON.stringify(hookCommand(name)).slice(1, -1),
151
+ );
147
152
  }
148
153
 
149
154
  /** A short SHA-256 of `paths` and their text: changes whenever one of them does. */
@@ -5,5 +5,5 @@
5
5
  * bump CLI_VERSION and set CLI_FINGERPRINT to the value it prints. Constants only: the board's Worker imports it,
6
6
  * so it lives in the board's package (CLD-135) and the CLI imports it from here.
7
7
  */
8
- export const CLI_VERSION = 36;
9
- export const CLI_FINGERPRINT = '252bee7de1e280f7';
8
+ export const CLI_VERSION = 37;
9
+ export const CLI_FINGERPRINT = 'a89db36a822e72f3';