@biffo/cli 0.429.0 → 0.431.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.
@@ -107,8 +107,22 @@ if [ -f biffo.core.json ]; then
107
107
  # The committed record first. Falls through to the working tree when there is
108
108
  # no HEAD yet (a fresh `biffo init`, before the first commit) or when the file
109
109
  # is newly added and not yet in any commit.
110
- version=$(git show HEAD:biffo.core.json 2>/dev/null |
111
- node -p "JSON.parse(require('fs').readFileSync(0,'utf8')).version" 2>/dev/null || echo '')
110
+ #
111
+ # While a merge is in progress HEAD is the branch being merged INTO, so its
112
+ # pin is the old branch's. Read the index instead so the merged-in pin runs;
113
+ # otherwise a conflict resolution on an older PR is judged by a CLI that
114
+ # predates the merge-aware ownership guard and refuses every merged-in file.
115
+ # Empty when the index carries no biffo.core.json, then HEAD's is used.
116
+ version=''
117
+ if git rev-parse -q --verify MERGE_HEAD >/dev/null 2>&1; then
118
+ version=$(git show :biffo.core.json 2>/dev/null |
119
+ node -p "JSON.parse(require('fs').readFileSync(0,'utf8')).version" 2>/dev/null || echo '')
120
+ [ "$version" = 'undefined' ] && version=''
121
+ fi
122
+ if [ -z "$version" ]; then
123
+ version=$(git show HEAD:biffo.core.json 2>/dev/null |
124
+ node -p "JSON.parse(require('fs').readFileSync(0,'utf8')).version" 2>/dev/null || echo '')
125
+ fi
112
126
  if [ -z "$version" ] || [ "$version" = 'undefined' ]; then
113
127
  version=$(node -p "require('./biffo.core.json').version" 2>/dev/null || echo '')
114
128
  fi
@@ -107,8 +107,22 @@ if [ -f biffo.core.json ]; then
107
107
  # The committed record first. Falls through to the working tree when there is
108
108
  # no HEAD yet (a fresh `biffo init`, before the first commit) or when the file
109
109
  # is newly added and not yet in any commit.
110
- version=$(git show HEAD:biffo.core.json 2>/dev/null |
111
- node -p "JSON.parse(require('fs').readFileSync(0,'utf8')).version" 2>/dev/null || echo '')
110
+ #
111
+ # While a merge is in progress HEAD is the branch being merged INTO, so its
112
+ # pin is the old branch's. Read the index instead so the merged-in pin runs;
113
+ # otherwise a conflict resolution on an older PR is judged by a CLI that
114
+ # predates the merge-aware ownership guard and refuses every merged-in file.
115
+ # Empty when the index carries no biffo.core.json, then HEAD's is used.
116
+ version=''
117
+ if git rev-parse -q --verify MERGE_HEAD >/dev/null 2>&1; then
118
+ version=$(git show :biffo.core.json 2>/dev/null |
119
+ node -p "JSON.parse(require('fs').readFileSync(0,'utf8')).version" 2>/dev/null || echo '')
120
+ [ "$version" = 'undefined' ] && version=''
121
+ fi
122
+ if [ -z "$version" ]; then
123
+ version=$(git show HEAD:biffo.core.json 2>/dev/null |
124
+ node -p "JSON.parse(require('fs').readFileSync(0,'utf8')).version" 2>/dev/null || echo '')
125
+ fi
112
126
  if [ -z "$version" ] || [ "$version" = 'undefined' ]; then
113
127
  version=$(node -p "require('./biffo.core.json').version" 2>/dev/null || echo '')
114
128
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@biffo/cli",
3
- "version": "0.429.0",
3
+ "version": "0.431.0",
4
4
  "description": "Biffo project scaffolding CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",