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

fs.constants.R_OK in utils.ts is not compatible with Node 4.x LTS. #35

Closed
xuqingkuang opened this issue Oct 25, 2016 · 1 comment
Closed

Comments

@xuqingkuang
Copy link

xuqingkuang commented Oct 25, 2016

In the code:
https://github.com/kulshekhar/ts-jest/blob/master/src/utils.ts#L29

Is using fs.constants.R_OK, but fs.constants is not exist in Node 4.

https://nodejs.org/dist/latest-v4.x/docs/api/fs.html#fs_fs_access_path_mode_callback

I'm hoping author could a add fs.constants checking, just like

const R_OK = fs.constants && fs.constants.R_OK || fs.R_OK;
try {
    fs.accessSync(filePath, R_OK);
}
Igmat added a commit that referenced this issue Oct 25, 2016
@Igmat Igmat mentioned this issue Oct 25, 2016
@Igmat
Copy link
Contributor

Igmat commented Oct 25, 2016

We have more general issue now (#36), so I'm closing this one in favor of it.

@Igmat Igmat closed this as completed Oct 25, 2016
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

No branches or pull requests

2 participants