exec-staged 0.1.2 → 0.1.3

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
@@ -137,7 +137,7 @@ To filter files by name, add a `glob` filter (defaults to `'*'`):
137
137
  { task: 'prettier --write $FILES', glob: '*.{js,ts,json,md}' }
138
138
  ```
139
139
 
140
- To filter files by git status, add a `diff` filter (defaults to `'ACMR'`; see [here](https://git-scm.com/docs/git-status#_short_format)):
140
+ To filter files by git status, add a `diff` filter (defaults to `'AM'`; see [here](https://git-scm.com/docs/git-status#_short_format)):
141
141
 
142
142
  ```typescript
143
143
  { task: 'prettier --write $FILES', diff: 'A' }
@@ -1,6 +1,6 @@
1
1
  import pkg from '../../package.json' with { type: 'json' };
2
2
  export const DEFAULT_CONFIG_ENTRY = {
3
- diff: 'ACMR',
3
+ diff: 'AM',
4
4
  glob: '**',
5
5
  };
6
6
  export const MERGE_FILES = ['MERGE_HEAD', 'MERGE_MODE', 'MERGE_MSG'];
package/dist/lib/stage.js CHANGED
@@ -164,7 +164,7 @@ export class Stage {
164
164
  if (interpolationIndex !== -1) {
165
165
  const files = micromatch(Object.entries(this.status)
166
166
  .filter(([, s]) => s.match(new RegExp(`^[${diff}]`)))
167
- .map(([f]) => f), glob);
167
+ .map(([f]) => f), glob, { dot: true });
168
168
  if (files.length === 0) {
169
169
  this.logger.log(`➡️ No matching files, skipping task...`);
170
170
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exec-staged",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Run commands against the current git index",
5
5
  "keywords": [
6
6
  "git",
@@ -2,7 +2,7 @@ import pkg from '../../package.json' with { type: 'json' };
2
2
  import type { ExecStagedConfigEntry } from '../types.js';
3
3
 
4
4
  export const DEFAULT_CONFIG_ENTRY: Omit<ExecStagedConfigEntry, 'task'> = {
5
- diff: 'ACMR',
5
+ diff: 'AM',
6
6
  glob: '**',
7
7
  };
8
8
 
package/src/lib/stage.ts CHANGED
@@ -211,6 +211,7 @@ export class Stage {
211
211
  .filter(([, s]) => s.match(new RegExp(`^[${diff}]`)))
212
212
  .map(([f]) => f),
213
213
  glob,
214
+ { dot: true },
214
215
  );
215
216
 
216
217
  if (files.length === 0) {