-
Notifications
You must be signed in to change notification settings - Fork 86
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
feat: support bigint option in fs.stat, fs.lstat, and fs.fstat #325
Conversation
fillStatsArray needs to be updated to support bigint too. |
There is one more stat array in fs binding:
|
Since nodejs v10.0.0, the internal return of binding.stat/lstat/fstat are now Float64Array or BigUint64Array. The old nodejs returns a Stats object with properties like I am trying to make it work for both old and new nodejs. The implementation might work (I have not tested enough), but there are tons of test code needs two copies (one for old, and one for new). Since nodejs v10.0.0 is already EOL, @tschaub should we consider for a major version upgrade to target only nodejs v12+? The benefits are:
|
Sounds like a good plan. |
closes #321 BREAKING CHANGE: drop support of Nodejs before v12.0.0
The added code are for test.
|
I will get a win10 box to test the NaN uid/gid thing. |
GitHub actions still wants to see nodejs 6/8/10 results. I don't know how to remove them in the checks. Windows now uses 0 for uid and gid, not NaN anymore (this is probably a change in nodejs v10.0.0 when stats is a Float64Array internally). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very impressive! Thanks for all the effort on this, @3cp.
@tschaub I will do a small cleanup of uid/gid for Windows soon. It's unnecessary to use NaN internally in our code. |
"env": { | ||
"es2020": true | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this has the effect of overriding instead of extending the existing config in package.json
. I've opened #327 to move this to package.json
and conform with the existing rules.
|
@tschaub can you release v5.0.0? |
closes #321
BREAKING CHANGE: drop support of Nodejs before v12.0.0