jaredwray / flat-cache

A stupidly simple key/value storage using files to persist the data
MIT License
165 stars 30 forks source link

Update of del to 3.0.0 breaks backwards compatibility #32

Closed sgilroy85 closed 5 years ago

sgilroy85 commented 5 years ago

Update of del to 3.0.0 breaks backwards compatibility to older versions of node since const was introduced in del v2.1.0. 2.0.2 was the last released version of del that does not include the const keyword.

royriojas commented 5 years ago

Hi @sgilroy85,

Thanks for reporting this. Accordingly to this https://node.green/#ES2015-bindings-const const should be supported in node >= 6.

Will see what it takes to support the previous versions. But for now since the api hasn't change please use the previous version flat-cache@1.3.0

sgilroy85 commented 5 years ago

The package.json defines the minimum node-version as 0.10. I unfortunately don't have control over forcing the use of 1.3.0 as this package is brought in by one of our dependencies. If 0.10 is no longer supported with the 1.3.1 release then the package.json should have been updated to reflect this and those using 0.10 would not be broken.

kvnify commented 5 years ago

In this case the issue is that we use a a package that depends on flat-cache. Our only route at this point would be to create a fork of 3 different modules to avoid this dependency chain altogether. I think we'd prefer to avoid the issue altogether. We'd also be willing to provide PRs to make the changes necessary to address this issue.

royriojas commented 5 years ago

hi @sgilroy85 and @khendry I did revert the upgrade of circular-json to flatted due to an issue with eslint. I'm happy to accept any PR that fixes this issue. Like maybe inlining the functionality of del and avoiding the const altogether.

Also would it be fine to ask in the del repo to export a ES5 version of the module?