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

Plugin does not work with NodeJS 22: Unexpected identifier 'assert' #2482

Closed
4 tasks
janthomasQS opened this issue Aug 9, 2024 · 0 comments · Fixed by #2483
Closed
4 tasks

Plugin does not work with NodeJS 22: Unexpected identifier 'assert' #2482

janthomasQS opened this issue Aug 9, 2024 · 0 comments · Fixed by #2483
Labels
kind/bug Bug :-( stage/6-released The issue has been solved on a released version of the library

Comments

@janthomasQS
Copy link

Issue workflow progress

Progress of the issue based on the
Contributor Workflow

  • 1. The issue provides a reproduction available on GitHub, Stackblitz or CodeSandbox

    For example, you can start off by editng the
    'basic' example on Stackblitz.

    Please make sure the graphql-eslint version under package.json matches yours.

  • 2. A failing test has been provided

  • 3. A local solution has been provided

  • 4. A pull request is pending review


Describe the bug

When you import this plugin in your eslint config and use nodejs 22 eslint will always crash. You do not have to use the plugin itself. It only needs to be imported

To Reproduce Steps to reproduce the behavior:

  • import this plugin into your eslint.config.js
  • run eslint
  • it crashes with SyntaxError: Unexpected identifier 'assert'

Expected behavior

Environment:

  • OS: Windows 11
  • @graphql-eslint/eslint-plugin: 4.0.0-alpha.3
  • Node.js: 22.5.1

Additional context

NodeJS has removed support for "assert" here: nodejs/node#52104
The feature is used in https://github.com/dimaMachina/graphql-eslint/blame/master/packages/plugin/src/meta.ts

@dimaMachina dimaMachina added stage/6-released The issue has been solved on a released version of the library kind/bug Bug :-( labels Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Bug :-( stage/6-released The issue has been solved on a released version of the library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants