obahareth / are-you-es5

A package to help you find out which of your node_modules aren't ES5 so you can add them to your Webpack/Rollup/Parcel transpilation steps.
MIT License
276 stars 23 forks source link

Recursion support #24

Closed meowtec closed 4 years ago

meowtec commented 4 years ago

For example, I installed query-string which is ES6, and some dependencies of query-string are also ES6. are-you-es5 only found query-string.

obahareth commented 4 years ago

Hey @meowtec, right now the solution for this is to use the --all option when running are-you-es5. It will check all the node modules instead of just direct dependencies. Does this solve your issue?

meowtec commented 4 years ago

Hey @meowtec, right now the solution for this is to use the --all option when running are-you-es5. It will check all the node modules instead of just direct dependencies. Does this solve your issue?

Maybe not. It found too many packages most of which were / were used by devDependencies.

Like this:

/[\\/]node_modules[\\/](?!(abab|ansi-align|ansi-escapes|ansi-styles|ast-types-flow|astral-regex|boxen|caller-callsite|chalk|chownr|cli-cursor|configstore|constants-browserify|cosmiconfig|cross-env|cross-spawn|crypto-random-string|css-color-names|cssstyle|dashdash|data-urls|del|detect-indent|dir-glob|dot-prop|eslint|eslint-plugin-eslint-plugin|eslint-plugin-import|eslint-plugin-react|eslint-scope|eslint-visitor-keys|execa|expect|figures|file-entry-cache|find-cache-dir|find-up|get-stream|getpass|global-dirs|globby|got|graceful-process|has-flag|home-or-tmp|hoopy|html-encoding-sniffer|import-cwd|import-fresh|import-from|import-lazy|import-local|is-ali-env|is-fullwidth-code-point|is-installed-globally|is-wsl|jest-changed-files|jest-cli|jest-config|jest-diff|jest-docblock|jest-environment-jsdom|jest-environment-node|jest-get-type|jest-haste-map|jest-jasmine2|jest-leak-detector|jest-matcher-utils|jest-message-util|jest-mock|jest-regex-util|jest-resolve|jest-resolve-dependencies|jest-runner|jest-runtime|jest-serializer|jest-snapshot|jest-util|jest-worker|jsdom|jsesc|json-parse-better-errors|latest-version|load-json-file|loader-utils|locate-path|lodash-es|make-dir|map-age-cleaner|mem|mimic-fn|npm-package-arg|npm-run-path|onetime|opn|os-locale|p-defer|p-finally|p-is-promise|p-limit|p-locate|p-map|p-try|package-json|path-exists|path-key|path-type|pirates|pkg-dir|pkg-up|postcss-load-config|postcss-modules-extract-imports|pretty-bytes|pretty-format|promise-inflight|query-string|read-pkg|read-pkg-up|realpath-native|regexpp|regexpu-core|resolve-cwd|restore-cursor|selfsigned|slice-ansi|split-on-first|ssri|strict-uri-encode|string-length|string-width|strip-bom|strip-indent|superagent|supports-color|symbol-tree|term-size|test-exclude|tmp|to-fast-properties|tr46|tslint|umi-notify|umi-test|unicode-match-property-ecmascript|unicode-match-property-value-ecmascript|unique-string|universalify|unzip-response|update-notifier|w3c-hr-time|webidl-conversions|whatwg-encoding|whatwg-mimetype|widest-line|window-size|write-file-atomic|write-json-file|ws|xdg-basedir|xml-name-validator|yargs)[\\/])/

2098 chars

While I only want to exclude query-string and its ES6 dependencies

obahareth commented 4 years ago

I'll probably be able to experiment with a fix for this early next year, probably either trying out recursion or a variation of -all that excludes dev dependencies.

obahareth commented 4 years ago

Further discussion should happen on #2.