baudehlo / node-fs-ext

Extras missing from node's fs module
MIT License
101 stars 45 forks source link

F_WRLCK not added to constants in Node.js 11 #81

Closed alanshaw closed 4 years ago

alanshaw commented 5 years ago

In Node.js 11:

$ node
> const fs = require('fs-ext')
undefined
> require('constants').F_WRLCK
undefined
> process.versions.node
'11.10.0'

In Node.js 10:

$ node
> const fs = require('fs-ext')
undefined
> require('constants').F_WRLCK
3
> process.versions.node
'10.15.1'
alanshaw commented 5 years ago

Also, require('constants') has been deprecated since Node.js 6 and it should be added to require('fs').constants or require('fs-ext').constants instead (I think the latter would make more sense).

ikokostya commented 4 years ago

o require('fs-ext').constants instead (I think the latter would make more sense).

I totally agree. Created separate issue for this https://github.com/baudehlo/node-fs-ext/issues/89