baudehlo / node-fs-ext

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

node@11 freezing constants #76

Closed mikesamuel closed 5 years ago

mikesamuel commented 5 years ago

https://nodejs.org/en/blog/release/v11.0.0/ says

[90e8f79f65] - (SEMVER-MAJOR) constants: freeze the constants object (Bryan English) #19813

which causes problems for https://github.com/baudehlo/node-fs-ext/blob/7c9824f3dc330e795aa13359d96252860bd3a684/fs-ext.js#L139-L144

// put constants into constants module (don't like doing this but...)
for (key in binding) {
  if (/^[A-Z_]+$/.test(key) && !constants.hasOwnProperty(key)) {
    constants[key] = binding[key];
  }
}
davedoesdev commented 5 years ago

Thanks! Any chance of a new version on npm?