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

v4.4.2 of the eslint plugin doesn't work under node v14 #708

Closed
timbeadle opened this issue Jan 10, 2023 · 3 comments · Fixed by #720
Closed

v4.4.2 of the eslint plugin doesn't work under node v14 #708

timbeadle opened this issue Jan 10, 2023 · 3 comments · Fixed by #720

Comments

@timbeadle
Copy link

timbeadle commented Jan 10, 2023

What is the problem?

  • On my projects that use eslint-plugin-redos, Dependabot opened upgrade PRs for v4.4.2 of the plugin.
  • My projects' CI checks fail under node v14, as it doesn't understand the ||= operator on L22 of lib/main.js:
for (var prop in b ||= {})

How to fix the problem?

  1. (For me) Wait until node v14 is end-of-life in April 2023, then upgrade to the new version of the plugin and publish a major version update to my projects.
  2. (For you) Unpublish 4.4.2 and publish 5.0.0, as this is a breaking change?
  3. Update (or add) the engines field in package.json to accurately reflect the node version support.

Related issues

@makenowjust
Copy link
Contributor

@timbeadle Sorry for the late response. I missed this issue.

This issue is completely unexpected. Thus, I will try to fix it.

TODO:

  • Fix for working under Node v14.
    • I guess it will be fixed by modifying the bundler or tsc config.
  • Set the correct value to the engines field.
    • But, it is hard to maintain.
  • Add tests for some Node versions before releasing as a CI task.

Thanks for reporting.

@timbeadle
Copy link
Author

@makenowjust Thanks for responding.

For maintaining the engines field, take a look at using the ls-engines package in your CI tests: this reports whether your engines field matches your dependencies tree's engine support.

https://npmjs.com/package/ls-engines

@makenowjust
Copy link
Contributor

Related issue: evanw/esbuild#2628

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

Successfully merging a pull request may close this issue.

2 participants