Skip to content

Commit 48e9da0

Browse files
authored
Fix chokidar glob (#602)
* Fix chokidar glob * Install dep in cli package
1 parent d1f7846 commit 48e9da0

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

package-lock.json

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cli/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"glob": "^11.0.0",
4747
"io-ts": "^2.2.20",
4848
"io-ts-reporters": "^2.0.1",
49+
"minimatch": "^10.0.1",
4950
"nunjucks": "3.2.4",
5051
"pascal-case": "^4.0.0",
5152
"piscina": "^4.0.0",

packages/cli/src/typescriptAndSqlTransformer.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { ParsedConfig, TransformConfig } from './config.js';
55
import { TransformJob, WorkerPool } from './index.js';
66
import { debug } from './util.js';
77
import { processFileFnResult } from './worker.js';
8+
import { minimatch } from 'minimatch';
89

910
// tslint:disable:no-console
1011

@@ -28,8 +29,10 @@ export class TypescriptAndSqlTransformer {
2829
};
2930

3031
chokidar
31-
.watch(this.includePattern, {
32+
.watch(this.config.srcDir, {
3233
persistent: true,
34+
ignored: (fileName, stats) =>
35+
!!stats?.isFile() && !minimatch(fileName, this.transform.include),
3336
})
3437
.on('add', cb)
3538
.on('change', cb);

0 commit comments

Comments
 (0)