@oorabona/release-it-preset 0.5.1 → 0.6.0

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/README.md CHANGED
@@ -308,9 +308,9 @@ Retries npm/GitHub publishing for an existing tag without modifying git history;
308
308
  **CLI:**
309
309
  ```bash
310
310
  # Step 1: Run pre-flight checks (optional)
311
- node node_modules/@oorabona/release-it-preset/dist/scripts/retry-publish.js
312
- # or during local development (TypeScript sources):
313
- pnpm tsx scripts/retry-publish.ts
311
+ pnpm release-it-preset retry-publish-preflight
312
+ # Advanced (direct compiled call)
313
+ # node node_modules/@oorabona/release-it-preset/dist/scripts/retry-publish.js
314
314
 
315
315
  # Step 2: Retry the publish
316
316
  pnpm release-it-preset retry-publish
@@ -428,6 +428,26 @@ pnpm release-it-preset check
428
428
 
429
429
  Useful for debugging release issues.
430
430
 
431
+ #### `check-pr` - Pull Request Hygiene
432
+
433
+ Evaluates PR readiness by analysing commits and changelog changes. Designed for CI usage but safe locally when the required environment variables are set (`PR_BASE_REF`, `PR_HEAD_REF`).
434
+
435
+ ```bash
436
+ PR_BASE_REF=origin/main PR_HEAD_REF=HEAD pnpm release-it-preset check-pr
437
+ ```
438
+
439
+ Outputs JSON summaries for workflows (base64 encoded) and prints a human-readable report.
440
+
441
+ #### `retry-publish-preflight` - Retry Safety Checks
442
+
443
+ Runs the retry publish pre-flight script with the same CLI convenience wrapper as other utilities. Verifies that the latest tag exists, matches `package.json`, and that there are no unexpected workspace changes before attempting a retry.
444
+
445
+ ```bash
446
+ pnpm release-it-preset retry-publish-preflight
447
+ ```
448
+
449
+ Use this before calling `pnpm release-it-preset retry-publish` when recovering from a failed publish.
450
+
431
451
  ### pnpm Script Shortcuts
432
452
 
433
453
  The root `package.json` defines helper scripts that wrap the CLI so you can run the most common flows with `pnpm run`:
@@ -439,6 +459,7 @@ The root `package.json` defines helper scripts that wrap the CLI so you can run
439
459
  - `pnpm run release:manual-changelog` → release with manually edited changelog (skip auto-generation)
440
460
  - `pnpm run release:hotfix` → execute the hotfix workflow
441
461
  - `pnpm run release:republish` → trigger the republish workflow (dangerous flow)
462
+ - `pnpm run release:retry-preflight` → run retry publish safety checks
442
463
  - `pnpm run release:retry-publish` → retry npm/GitHub publishing for an existing tag
443
464
  - `pnpm run release:update` → populate the `[Unreleased]` section
444
465
  - `pnpm run release:validate` → run release validation checks
@@ -498,12 +519,10 @@ node node_modules/@oorabona/release-it-preset/dist/scripts/republish-changelog.j
498
519
  Performs pre-flight checks before retrying a failed publish.
499
520
 
500
521
  ```bash
501
- # Preferred
502
- pnpm run release:retry-publish
503
- # or
504
- pnpm release-it-preset retry-publish
522
+ # Preferred (CLI)
523
+ pnpm release-it-preset retry-publish-preflight
505
524
 
506
- # Advanced
525
+ # Advanced (call compiled output directly)
507
526
  node node_modules/@oorabona/release-it-preset/dist/scripts/retry-publish.js
508
527
  ```
509
528
 
package/bin/cli.js CHANGED
@@ -19,6 +19,8 @@
19
19
  * release-it-preset update
20
20
  * release-it-preset validate [--allow-dirty]
21
21
  * release-it-preset check
22
+ * release-it-preset check-pr
23
+ * release-it-preset retry-publish-preflight
22
24
  */
23
25
 
24
26
  import { spawn } from 'node:child_process';
@@ -44,6 +46,8 @@ const UTILITY_COMMANDS = {
44
46
  update: 'populate-unreleased-changelog',
45
47
  validate: 'validate-release',
46
48
  check: 'check-config',
49
+ 'check-pr': 'check-pr-status',
50
+ 'retry-publish-preflight': 'retry-publish',
47
51
  };
48
52
 
49
53
  function showHelp() {
@@ -64,6 +68,8 @@ Utility Commands:
64
68
  update Update [Unreleased] section from commits
65
69
  validate [--allow-dirty] Validate project is ready for release
66
70
  check Display configuration and project status
71
+ check-pr Evaluate PR hygiene (branch diff, changelog status, conventions)
72
+ retry-publish-preflight Run retry publish safety checks without executing release
67
73
 
68
74
  Examples:
69
75
  # Release commands
@@ -76,6 +82,8 @@ Examples:
76
82
  release-it-preset update
77
83
  release-it-preset validate
78
84
  release-it-preset check
85
+ release-it-preset check-pr
86
+ release-it-preset retry-publish-preflight
79
87
 
80
88
  For release-it options, see: https://github.com/release-it/release-it
81
89
  For environment variables, see: https://github.com/oorabona/release-it-preset#environment-variables
@@ -10,7 +10,7 @@
10
10
  * Usage:
11
11
  * First run the retry script to checkout the tag:
12
12
  * ```bash
13
- * node node_modules/@oorabona/release-it-preset/dist/scripts/retry-publish.js
13
+ * pnpm release-it-preset retry-publish-preflight
14
14
  * pnpm release-it --config node_modules/@oorabona/release-it-preset/config/retry-publish.js
15
15
  * ```
16
16
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oorabona/release-it-preset",
3
- "version": "0.5.1",
3
+ "version": "0.6.0",
4
4
  "description": "Shared release-it configuration and scripts for the organisation",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -55,6 +55,7 @@
55
55
  "release:manual-changelog": "node ./bin/cli.js manual-changelog",
56
56
  "release:hotfix": "node ./bin/cli.js hotfix",
57
57
  "release:republish": "node ./bin/cli.js republish",
58
+ "release:retry-preflight": "node ./bin/cli.js retry-publish-preflight",
58
59
  "release:retry-publish": "node ./bin/cli.js retry-publish",
59
60
  "release:update": "node ./bin/cli.js update",
60
61
  "release:validate": "node ./bin/cli.js validate",
@@ -78,7 +79,7 @@
78
79
  },
79
80
  "devDependencies": {
80
81
  "@biomejs/biome": "^2.2.5",
81
- "@types/node": "^22.10.5",
82
+ "@types/node": "^24.6.2",
82
83
  "@vitest/coverage-v8": "^3.2.4",
83
84
  "nano-staged": "^0.8.0",
84
85
  "rimraf": "^6.0.1",