data-api-suite
data-api-suite copied to clipboard
Data API Migrations - Use path exists sync
If using the data api migrations library without Typescript, migrations will fail as fs.pathExists
returns a promise not a boolean.
Currently the migration will always fail in plain javascript projects with the error Error: ENOENT: no such file or directory, open '/path/to/project/tsconfig.json'
This PR changes the conditional to use fs.pathExistsSync
which will return a boolean instead.
Hi @hellotoby, great catch!
I'd love to merge but tests are failing: see https://github.com/marcgreenstock/data-api-suite/runs/3288104728?check_suite_focus=true#step:7:165
It appears the version of fs-extra
doesn't define pathExistsSync
, can you please upgrade the library.