exec-staged 0.2.1 → 0.2.2

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
@@ -24,6 +24,10 @@ Install from npm, using your preferred package manager:
24
24
  npm install --save-dev exec-staged
25
25
  ```
26
26
 
27
+ ## Requirements
28
+
29
+ - Git >= 2.22.0
30
+
27
31
  ## Usage
28
32
 
29
33
  ### Run from the CLI
package/dist/lib/stage.js CHANGED
@@ -66,7 +66,7 @@ export class Stage {
66
66
  this.logger.log('⚠️ Git installation not found!');
67
67
  throw new Error('git installation not found');
68
68
  }
69
- if (!version || semver.lte(version, '2.13.0')) {
69
+ if (!version || semver.lt(version, '2.22.0')) {
70
70
  this.logger.log('⚠️ Unsupported git version!');
71
71
  throw new Error('unsupported git version');
72
72
  }
@@ -135,7 +135,8 @@ export class Stage {
135
135
  this.git([
136
136
  'diff',
137
137
  '--binary',
138
- '--default-prefix',
138
+ '--src-prefix=a/',
139
+ '--dst-prefix=b/',
139
140
  // skip deleted files because patch doesn't apply if they're modified
140
141
  '--diff-filter=d',
141
142
  '--no-color',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exec-staged",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Run commands against the current git index",
5
5
  "keywords": [
6
6
  "git",
package/src/lib/stage.ts CHANGED
@@ -85,7 +85,7 @@ export class Stage {
85
85
  throw new Error('git installation not found');
86
86
  }
87
87
 
88
- if (!version || semver.lte(version, '2.13.0')) {
88
+ if (!version || semver.lt(version, '2.22.0')) {
89
89
  this.logger.log('⚠️ Unsupported git version!');
90
90
  throw new Error('unsupported git version');
91
91
  }
@@ -185,7 +185,8 @@ export class Stage {
185
185
  this.git([
186
186
  'diff',
187
187
  '--binary',
188
- '--default-prefix',
188
+ '--src-prefix=a/',
189
+ '--dst-prefix=b/',
189
190
  // skip deleted files because patch doesn't apply if they're modified
190
191
  '--diff-filter=d',
191
192
  '--no-color',