@goodfoot/git-mesh 1.0.25 → 1.0.27

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/bin/git-mesh ADDED
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+ # Replaced by postinstall with a symlink to the native binary.
3
+ echo "@goodfoot/git-mesh: Installation incomplete. Run 'npm install @goodfoot/git-mesh' to finish setup." >&2
4
+ exit 1
package/man/git-mesh.1 CHANGED
@@ -1,6 +1,6 @@
1
1
  .ie \n(.g .ds Aq \(aq
2
2
  .el .ds Aq '
3
- .TH git-mesh 1 "git-mesh 1.0.25"
3
+ .TH git-mesh 1 "git-mesh 1.0.27"
4
4
  .ie \n(.g .ds Aq \(aq
5
5
  .el .ds Aq '
6
6
  .SH NAME
@@ -92,7 +92,7 @@ git\-mesh\-rm(1)
92
92
  Stage anchors to remove on the next mesh commit
93
93
  .TP
94
94
  git\-mesh\-why(1)
95
- Read or stage the mesh\*(Aqs why — the durable one\-sentence definition of the relationship the anchors hold
95
+ Read or stage the mesh\*(Aqs why — a one\-sentence definition of the subsystem, flow, or concern the anchors collectively form
96
96
  .TP
97
97
  git\-mesh\-commit(1)
98
98
  Resolve staged operations and write a mesh commit
@@ -132,7 +132,7 @@ Print this message or the help of the given subcommand(s)
132
132
  .ie \n(.g .ds Aq \(aq
133
133
  .el .ds Aq '
134
134
  .SH VERSION
135
- v1.0.25
135
+ v1.0.27
136
136
  .SH EXAMPLES
137
137
  Anchor a new mesh alongside a code change:
138
138
  .PP
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodfoot/git-mesh",
3
- "version": "1.0.25",
3
+ "version": "1.0.27",
4
4
  "bin": "bin/git-mesh",
5
5
  "man": [
6
6
  "man/git-mesh.1"
@@ -21,11 +21,11 @@
21
21
  "scripts/postinstall.js"
22
22
  ],
23
23
  "optionalDependencies": {
24
- "@goodfoot/git-mesh-darwin-arm64": "1.0.25",
25
- "@goodfoot/git-mesh-darwin-x64": "1.0.25",
26
- "@goodfoot/git-mesh-linux-arm64": "1.0.25",
27
- "@goodfoot/git-mesh-linux-x64": "1.0.25",
28
- "@goodfoot/git-mesh-win32-x64": "1.0.25"
24
+ "@goodfoot/git-mesh-darwin-arm64": "1.0.27",
25
+ "@goodfoot/git-mesh-darwin-x64": "1.0.27",
26
+ "@goodfoot/git-mesh-linux-arm64": "1.0.27",
27
+ "@goodfoot/git-mesh-linux-x64": "1.0.27",
28
+ "@goodfoot/git-mesh-win32-x64": "1.0.27"
29
29
  },
30
30
  "repository": {
31
31
  "type": "git",
@@ -54,7 +54,29 @@ function buildFromSource(destBinary, binaryName) {
54
54
  fs.chmodSync(destBinary, 0o755);
55
55
  }
56
56
 
57
+ function isInsideSourceTree() {
58
+ // Walk up from this script looking for a `.git` entry. If found, this is
59
+ // the @goodfoot/git-mesh source repo (developer doing `yarn install`), not
60
+ // a consumer install under node_modules. Mutating the tracked `bin/git-mesh`
61
+ // shim in that case dirties the working tree and — if committed — ships a
62
+ // dangling symlink in the published tarball (see git-mesh-v1.0.25 regression).
63
+ let dir = path.resolve(__dirname, '..');
64
+ for (let i = 0; i < 16; i++) {
65
+ if (fs.existsSync(path.join(dir, '.git'))) return true;
66
+ const parent = path.dirname(dir);
67
+ if (parent === dir) return false;
68
+ if (path.basename(parent) === 'node_modules') return false;
69
+ dir = parent;
70
+ }
71
+ return false;
72
+ }
73
+
57
74
  function main() {
75
+ if (isInsideSourceTree()) {
76
+ console.log('@goodfoot/git-mesh: postinstall skipped (running inside source tree).');
77
+ return;
78
+ }
79
+
58
80
  const platform = PLATFORM_MAP[process.platform];
59
81
  const arch = ARCH_MAP[process.arch];
60
82