You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The (great!) feature to support using globs for configuring ignorePatterns and migrationDir was introduced recently: PR1274
That feature works great when specifying --use-glob true via command line but the flag is ignored when setting it via config file.
The reason is that code is missing in function node-pg-migrate.ts:readJson to apply the flag if found in the config file: readJson
Actual result: Error: Can't get migration files: Error: ENOENT: no such file or directory, scandir 'migrations/dev/*.ts/'
at async readdir (node:internal/fs/promises:948:18)
at async getMigrationFilePaths (/home/axjrd/git-repos/docbot/docbot/docbot/node_modules/node-pg-migrate/dist/migration.js:79:22)
Logs
Error: Can't get migration files: Error: ENOENT: no such file or directory, scandir 'migrations/dev/*.ts/'
at async readdir (node:internal/fs/promises:948:18)
at async getMigrationFilePaths (/home/axjrd/git-repos/docbot/docbot/docbot/node_modules/node-pg-migrate/dist/migration.js:79:22)
at async loadMigrations (/home/axjrd/git-repos/docbot/docbot/docbot/node_modules/node-pg-migrate/dist/runner.js:48:31)
at async Promise.all (index 0)
at async runner (/home/axjrd/git-repos/docbot/docbot/docbot/node_modules/node-pg-migrate/dist/runner.js:233:36)
at loadMigrations (/home/axjrd/git-repos/docbot/docbot/docbot/node_modules/node-pg-migrate/dist/runner.js:71:11)
at async Promise.all (index 0)
at async runner (/home/axjrd/git-repos/docbot/docbot/docbot/node_modules/node-pg-migrate/dist/runner.js:233:36)
System Info
Node 20
Used Module System
cjs
The text was updated successfully, but these errors were encountered:
Describe the bug
The (great!) feature to support using globs for configuring ignorePatterns and migrationDir was introduced recently: PR1274
That feature works great when specifying --use-glob true via command line but the flag is ignored when setting it via config file.
The reason is that code is missing in function node-pg-migrate.ts:readJson to apply the flag if found in the config file:
readJson
Steps to reproduce
Create config file with:
use-glob: true
migrations-dir: migrations/**
Trigger migration up
Expected result: Migration works
Actual result: Error: Can't get migration files: Error: ENOENT: no such file or directory, scandir 'migrations/dev/*.ts/'
at async readdir (node:internal/fs/promises:948:18)
at async getMigrationFilePaths (/home/axjrd/git-repos/docbot/docbot/docbot/node_modules/node-pg-migrate/dist/migration.js:79:22)
Logs
Error: Can't get migration files: Error: ENOENT: no such file or directory, scandir 'migrations/dev/*.ts/'
at async readdir (node:internal/fs/promises:948:18)
at async getMigrationFilePaths (/home/axjrd/git-repos/docbot/docbot/docbot/node_modules/node-pg-migrate/dist/migration.js:79:22)
at async loadMigrations (/home/axjrd/git-repos/docbot/docbot/docbot/node_modules/node-pg-migrate/dist/runner.js:48:31)
at async Promise.all (index 0)
at async runner (/home/axjrd/git-repos/docbot/docbot/docbot/node_modules/node-pg-migrate/dist/runner.js:233:36)
at loadMigrations (/home/axjrd/git-repos/docbot/docbot/docbot/node_modules/node-pg-migrate/dist/runner.js:71:11)
at async Promise.all (index 0)
at async runner (/home/axjrd/git-repos/docbot/docbot/docbot/node_modules/node-pg-migrate/dist/runner.js:233:36)
System Info
Used Module System
cjs
The text was updated successfully, but these errors were encountered: