next-issue 8.2.5 → 8.3.1

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.
Files changed (3) hide show
  1. package/README.md +22 -0
  2. package/dist/cli.mjs +11 -7
  3. package/package.json +2 -3
package/README.md CHANGED
@@ -647,6 +647,10 @@ there already; `--force` replaces it. The file holds no
647
647
  `setupCommand`, because the harness deduces one from the lock file of the
648
648
  project.
649
649
 
650
+ `start` and `serve` also add the two lines to `info/exclude` and remove them
651
+ from `.gitignore`, so a repository needs no `init` to run. They do not write
652
+ the config file.
653
+
650
654
  With no file, every field keeps its default. A field that is not in the file
651
655
  keeps its default. A file that cannot be read, a file that is not valid
652
656
  JSON, a field with a value of the wrong type and a field name that the harness
@@ -1089,6 +1093,24 @@ earlier commit that runs after it does not, as it repairs the tag before its
1089
1093
  own commit. To repair a release without a new commit,
1090
1094
  run the `ci` workflow by hand; after the checks pass, the release job only
1091
1095
  repairs and does nothing else.
1096
+ The publish runs no typecheck and no tests, as the `check` job has run them.
1097
+ So a failing test cannot stop a publish after the tag push. To publish by hand
1098
+ from a clone, run the checks of the `check` job first, then publish:
1099
+
1100
+ ```bash
1101
+ npm ci
1102
+ npm run typecheck
1103
+ npm run lint
1104
+ npm run format:check
1105
+ npm test
1106
+ npm run build
1107
+ .github/scripts/release-bump.test.sh
1108
+ .github/scripts/repair-release.test.sh
1109
+ .github/scripts/check-npm.test.sh
1110
+ .github/scripts/release-notes.test.sh
1111
+ npm publish --workspaces
1112
+ ```
1113
+
1092
1114
  The job uses the npm that comes with Node 24 and never installs another one.
1093
1115
  Trusted publishing needs npm 11.5.1 or later, so the job stops with an error
1094
1116
  before anything else when the bundled npm is older.
package/dist/cli.mjs CHANGED
@@ -35,15 +35,16 @@ async function main() {
35
35
  return init(root, args.force);
36
36
  }
37
37
  await rejectOldConfig(root);
38
- if (args.command === 'serve') {
39
- return serve(root);
40
- }
41
38
  if (args.command === 'stop') {
42
39
  return stop(root);
43
40
  }
44
41
  if (args.command === 'logs') {
45
42
  return logs(root, args.json);
46
43
  }
44
+ await excludeStateDirectories(root, process.stderr);
45
+ if (args.command === 'serve') {
46
+ return serve(root);
47
+ }
47
48
  return run(root, args);
48
49
  }
49
50
  function run(root, args) {
@@ -74,7 +75,6 @@ async function logs(root, json) {
74
75
  return followLog(root, file, { json, tail }, (text) => write(process.stdout, text));
75
76
  }
76
77
  async function init(root, force) {
77
- const exclude = await excludeFile(root);
78
78
  const moved = await moveOldConfig(root, force);
79
79
  if (moved === undefined) {
80
80
  await write(process.stdout, `wrote ${await writeDefaultConfig(root, force)}\n`);
@@ -82,16 +82,20 @@ async function init(root, force) {
82
82
  else {
83
83
  await write(process.stdout, `moved ${OLD_CONFIG_FILE} to ${moved}\n`);
84
84
  }
85
+ await excludeStateDirectories(root, process.stdout);
86
+ return 0;
87
+ }
88
+ async function excludeStateDirectories(root, stream) {
89
+ const exclude = await excludeFile(root);
85
90
  const entries = [STATE_DIR, WORKTREE_DIR].map((directory) => `${directory}/`);
86
91
  for (const entry of entries) {
87
92
  if (await ensureExcluded(exclude, entry)) {
88
- await write(process.stdout, `added ${entry} to ${exclude}\n`);
93
+ await write(stream, `added ${entry} to ${exclude}\n`);
89
94
  }
90
95
  }
91
96
  for (const entry of await removeIgnored(root, entries)) {
92
- await write(process.stdout, `removed ${entry} from .gitignore\n`);
97
+ await write(stream, `removed ${entry} from .gitignore\n`);
93
98
  }
94
- return 0;
95
99
  }
96
100
  main().then((code) => process.exit(code), async (error) => {
97
101
  await write(process.stderr, `next-issue failed: ${message(error)}\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-issue",
3
- "version": "8.2.5",
3
+ "version": "8.3.1",
4
4
  "description": "Autonomous issue harness driven by the pi SDK",
5
5
  "keywords": [
6
6
  "github",
@@ -38,8 +38,7 @@
38
38
  "lint:fix": "oxlint --fix",
39
39
  "format": "oxfmt",
40
40
  "format:check": "oxfmt --check",
41
- "prepack": "npm run build",
42
- "prepublishOnly": "npm run typecheck && npm test"
41
+ "prepack": "npm run build"
43
42
  },
44
43
  "devDependencies": {
45
44
  "@earendil-works/pi-ai": "^1.5.2",