Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perform es-check for dependencies inpackages.json #177

Open
matccent opened this issue Mar 7, 2023 · 0 comments
Open

Perform es-check for dependencies inpackages.json #177

matccent opened this issue Mar 7, 2023 · 0 comments

Comments

@matccent
Copy link

matccent commented Mar 7, 2023

Requested Update

Allow es-check to check individual modules located in node_modules folder with their nested dependencies in a similar way like are-you-es5 do it.

Scenario:

  • I have a frontend react project with dependencies in package.json
  • One of those dependencies package-example-in-es2022 includes es2022 code i.e. nullish coalescing
  • When I run webpack build, es2022 code in my project gets transpiled by babel, but dependencies from node_modules are not (unless specified in the config), so package-example-in-es2022 with nullish coalescing will cause an issue in browsers like < Chrome 80, < Firefox 72, < Opera 67, < Safari 13.1
  • In result I'll end up with build unable to run in browsers with lower versions than specified above

With this feature I would like to be able to identify non-es5 dependencies and list them in a way so they can be easily imported in babel config, so babel will transpile them. I think listing package names is good enough, it can be used then to generate regex easily.

Why Is This Update Needed?

To automate node builds.

If I run es-check in my project, with is a module with "package.json", I would expect to execute es-check for each dependency (and their nested dependencies), and list incompatible modules.

Are There Examples Of This Requested Update Elsewhere?

are-you-es5 unfortunately packages can't detect es2022, probably due to no updates since 2 years

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant