lodash / babel-plugin-lodash

Modular Lodash builds without the hassle.
Other
1.95k stars 95 forks source link

3.2.10 does no longer work on node 0.12.x #148

Closed zinserjan closed 7 years ago

zinserjan commented 7 years ago

I just noticed that node 0.12.x does no longer work with the latest version (3.2.10) due to babel-preset-envin https://github.com/lodash/babel-plugin-lodash/commit/edbdc00c97972eb601fa1073e18740e050ea349b#diff-e56633f72ecc521128b3db6586074d2c

See

/home/travis/build/zinserjan/wdio-screenshot/node_modules/babel-plugin-lodash/lib/index.js:85
    Program(path, state) {
           ^
SyntaxError: Unexpected token (
    at exports.runInThisContext (vm.js:73:16)
    at Module._compile (module.js:443:25)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at /home/travis/build/zinserjan/wdio-screenshot/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:174:20
    at Array.map (native)
    at Function.normalisePlugins (/home/travis/build/zinserjan/wdio-screenshot/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:154:20)
elhigu commented 7 years ago

I suppose we need to drop babel-plugin-lodash dependency from knex since we still support node 0.12.

jdalton commented 7 years ago

Hi @elhigu!

Support for 0.12 was kind of an oversight. The use of babel-preset-env was to enforce the support we had, or thought we had. Since 0.12 has such low IRL usage and just a few weeks left before it EOLs there's no real point in patching it now. You can always pin your version of babel-plugin-lodash to before the change until you drop 0.12 support, which should be sooner than later since knex is pre-1.0 and can drop 0.12 support at will.

That said, babel-plugin-lodash is usually a dev dependency, as it is with knex, and as a dev dependency it has no impact on your consumable package level support. So your consumable package can still support EOL'd versions of Node while the dev dependencies, to build it, raise their support bar.