Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data API Migrations - Use path exists sync #49

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hellotoby
Copy link

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.

@marcgreenstock
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants