Hi,
I came across a problem when node-detective cannot operate on ES2015+ source code.
This is not a problem solely related to this package. The same problem applies to node-syntax-error package which is used in browserify pipeline.
I can see a clear problem in the fact, that some packages used by browserify internally depend on acorn parser.
This parser dependency is limiting e.g. for using browserify in conjuction with babelify in such situations when you don't want to transpile all the source code down to ES5.
For instance, let's say you don't want to transpile those syntax features, which are already natively supported by browsers, e.g. object spread operator in current Chrome. And now comes the problem with browserify syntax check and module dependecies parsing via module-deps -> node-detective dependency, all caused by code containing syntax features not parseable using acorn parser. It this case with ... operator.
Don't you think it would make sense to replace the parser and be more aligned with babel ecosystem?
Cheers,
Ondrej
PS: The same issue is being solved in these issues in Webpack project:
webpack/webpack#4308
webpack/webpack#2872
Hi,
I came across a problem when
node-detectivecannot operate on ES2015+ source code.This is not a problem solely related to this package. The same problem applies to
node-syntax-errorpackage which is used inbrowserifypipeline.I can see a clear problem in the fact, that some packages used by
browserifyinternally depend onacornparser.This parser dependency is limiting e.g. for using
browserifyin conjuction withbabelifyin such situations when you don't want to transpile all the source code down to ES5.For instance, let's say you don't want to transpile those syntax features, which are already natively supported by browsers, e.g. object spread operator in current Chrome. And now comes the problem with browserify syntax check and module dependecies parsing via
module-deps->node-detectivedependency, all caused by code containing syntax features not parseable usingacornparser. It this case with...operator.Don't you think it would make sense to replace the parser and be more aligned with
babelecosystem?Cheers,
Ondrej
PS: The same issue is being solved in these issues in Webpack project:
webpack/webpack#4308
webpack/webpack#2872