pm-ops 2026.9.13 → 2026.9.23

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": "pm-ops",
3
- "version": "2026.9.13",
3
+ "version": "2026.9.23",
4
4
  "description": "Multi-repo fleet operations for pm-cli",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,13 +34,30 @@
34
34
  "types": "./dist/attestation.d.ts",
35
35
  "default": "./dist/attestation.js"
36
36
  },
37
+ "./merge-driver": {
38
+ "types": "./dist/merge-driver.d.ts",
39
+ "default": "./dist/merge-driver.js"
40
+ },
41
+ "./merge-driver/prepare": {
42
+ "types": "./dist/merge-driver-prepare.d.ts",
43
+ "default": "./dist/merge-driver-prepare.js"
44
+ },
37
45
  "./lifecycle-policy": {
38
46
  "types": "./dist/lifecycle-policy.d.ts",
39
47
  "default": "./dist/lifecycle-policy.js"
48
+ },
49
+ "./eslint": {
50
+ "types": "./dist/eslint.d.ts",
51
+ "default": "./dist/eslint.js"
52
+ },
53
+ "./duplication": {
54
+ "types": "./dist/duplication.d.ts",
55
+ "default": "./dist/duplication.js"
40
56
  }
41
57
  },
42
58
  "files": [
43
59
  "dist/",
60
+ "templates/",
44
61
  "manifest.json",
45
62
  "README.md",
46
63
  "CHANGELOG.md"
@@ -58,7 +75,9 @@
58
75
  "changelog:full": "pm-changelog --pm-root .agents/pm --mode replace --output CHANGELOG.md --all-release-tags --release-version-from-package --date-from-version --item-url-base https://github.com/unbraind/pm-ops/blob/main/.agents/pm --respect-item-release --pm-bin ./node_modules/.bin/pm --pm-arg=--output-budget --pm-arg=unbounded --pm-arg=--output-limit --pm-arg=unbounded",
59
76
  "changelog:check": "pm-changelog --pm-root .agents/pm --mode replace --output CHANGELOG.md --all-release-tags --release-version-from-package --date-from-version --item-url-base https://github.com/unbraind/pm-ops/blob/main/.agents/pm --respect-item-release --check --pm-bin ./node_modules/.bin/pm --pm-arg=--output-budget --pm-arg=unbounded --pm-arg=--output-limit --pm-arg=unbounded",
60
77
  "docstring": "node scripts/docstring-gate.ts",
61
- "release:check": "npm run check && npm run docstring && npm run coverage && npm run audit:prod && npm run pack:dry-run && npm run changelog:check && npm run verify:release-changelog-date && npm run verify:release-publish-attestation && npm run verify:lifecycle-policy",
78
+ "lint": "node scripts/lint.ts",
79
+ "duplication": "node scripts/duplication-gate.ts",
80
+ "release:check": "npm run check && npm run lint && npm run duplication && npm run docstring && npm run coverage && npm run audit:prod && npm run pack:dry-run && npm run changelog:check && npm run verify:release-changelog-date && npm run verify:release-publish-attestation && npm run verify:lifecycle-policy",
62
81
  "prepublishOnly": "npm run release:check",
63
82
  "release:notes": "pm-changelog --pm-root .agents/pm --stdout --since-previous-tag --until-release-tag --release-version-from-package --date-from-version --item-url-base https://github.com/unbraind/pm-ops/blob/main/.agents/pm --respect-item-release --pm-bin ./node_modules/.bin/pm --pm-arg=--output-budget --pm-arg=unbounded --pm-arg=--output-limit --pm-arg=unbounded --github-step-summary",
64
83
  "prepare": "node scripts/prepare-merge-driver.ts",
@@ -74,13 +93,41 @@
74
93
  "typescript": "7.0.2"
75
94
  },
76
95
  "peerDependencies": {
77
- "@unbrained/pm-cli": ">=2026.8.20"
96
+ "@babel/eslint-parser": "^8.0.5",
97
+ "@babel/plugin-syntax-typescript": "^8.0.3",
98
+ "@unbrained/pm-cli": ">=2026.8.20",
99
+ "eslint": "^10.10.0",
100
+ "fast-glob": "^3.3.3",
101
+ "jscpd": ">=4.3.0 <6.0.0"
102
+ },
103
+ "peerDependenciesMeta": {
104
+ "@babel/eslint-parser": {
105
+ "optional": true
106
+ },
107
+ "@babel/plugin-syntax-typescript": {
108
+ "optional": true
109
+ },
110
+ "eslint": {
111
+ "optional": true
112
+ },
113
+ "fast-glob": {
114
+ "optional": true
115
+ },
116
+ "jscpd": {
117
+ "optional": true
118
+ }
78
119
  },
79
120
  "devDependencies": {
121
+ "@babel/eslint-parser": "^8.0.5",
122
+ "@babel/plugin-syntax-typescript": "^8.0.3",
80
123
  "@types/node": "^26.2.0",
81
- "@unbrained/pm-cli": "2026.9.10",
124
+ "@unbrained/pm-cli": "2026.9.21",
82
125
  "c8": "^12.0.0",
83
- "pm-changelog": "2026.9.6"
126
+ "eslint": "^10.10.0",
127
+ "fast-glob": "^3.3.3",
128
+ "jscpd": "^5.2.1",
129
+ "jscpd4": "npm:jscpd@4.3.0",
130
+ "pm-changelog": "2026.9.18"
84
131
  },
85
132
  "keywords": [
86
133
  "pm-cli",
@@ -145,5 +192,9 @@
145
192
  "functions": 100
146
193
  },
147
194
  "ignore": []
195
+ },
196
+ "duplicationGate": {
197
+ "threshold": 0,
198
+ "minTokens": 50
148
199
  }
149
200
  }
@@ -0,0 +1,42 @@
1
+ /**
2
+ * npm `prepare` hook that registers pm's field-aware Git merge drivers.
3
+ *
4
+ * Git never clones `.git/config`, so every clone must register the drivers
5
+ * `.gitattributes` declares. The installer lives in the devDependency pm-ops,
6
+ * which an `npm install --omit=dev` checkout does not have. This launcher
7
+ * therefore imports nothing from pm-ops: it resolves the installer entry from
8
+ * the package root and runs it in a child process. Only a missing pm-ops package skips, with one
9
+ * notice; any other resolution failure (for example a pm-ops too old to export
10
+ * the entry) and any installer failure fail the install.
11
+ *
12
+ * Canonical copy: `pm-ops/templates/prepare-merge-driver.ts`. Copy it
13
+ * unchanged to `scripts/prepare-merge-driver.ts`.
14
+ */
15
+
16
+ import { spawnSync } from "node:child_process";
17
+ import { createRequire } from "node:module";
18
+ import { join } from "node:path";
19
+
20
+ // npm runs `prepare` from the package root, so pm-ops is resolved from there.
21
+ const resolver = createRequire(join(process.cwd(), "package.json"));
22
+ let installer: string | undefined;
23
+ try {
24
+ installer = resolver.resolve("pm-ops/merge-driver/prepare");
25
+ } catch (error) {
26
+ // Only an absent pm-ops package may skip. Probing its package.json tells that
27
+ // apart from an installed pm-ops that cannot serve the entry (exports without
28
+ // it, no exports map, a missing file): those resolve or fail differently, and
29
+ // the original error is rethrown.
30
+ let packagePresent = true;
31
+ try {
32
+ resolver.resolve("pm-ops/package.json");
33
+ } catch (probe) {
34
+ packagePresent = !(probe instanceof Error && "code" in probe && probe.code === "MODULE_NOT_FOUND");
35
+ }
36
+ if (packagePresent) throw error;
37
+ }
38
+ if (installer === undefined) {
39
+ console.error("pm-ops is not installed (omit-dev install); skipping merge-driver install");
40
+ } else {
41
+ process.exitCode = spawnSync(process.execPath, [installer], { stdio: "inherit" }).status ?? 1;
42
+ }