glayzzle / php-parser

:herb: NodeJS PHP Parser - extract AST or tokens
https://php-parser.glayzzle.com/
BSD 3-Clause "New" or "Revised" License
534 stars 71 forks source link

chore: update dependencies #1139

Closed czosel closed 2 weeks ago

czosel commented 2 weeks ago

CI is currently failing with errors like this:

Error: node_modules/@types/eslint-scope/index.d.ts(50,5): error TS2416: Property 'writeExpr' in type 'Reference' is not assignable to the same property in base type 'Reference'.

I have no typescript experience - any pointers are appreciated!

cc @ichiriac @cseufert

cseufert commented 2 weeks ago

I am pretty sure we do not want @types/eslint-scope to be installed, as it seems to be out of date, and eslint seems to have the types included already

cseufert commented 2 weeks ago

ok on further investigation, it appears that webpack imports @types/eslint-scope however the actualy eslint package looks to have updated typescript types. I am not sure how to solve this, without a PR to webpack to update its use of the eslint-scope types to consume directly from eslint.

cseufert commented 2 weeks ago

Well rolling back webpack to 5.96.0 to avoid this fix: https://github.com/webpack/webpack/issues/18916

has resulted in

Error: node_modules/@types/node/module.d.ts(108,13): error TS2386: Overload signatures must all be optional or required.

which make no sense either.

czosel commented 2 weeks ago

@cseufert Thanks for looking into this! I tried following up on the remaining error, and it seems that installing a more recent version of @types/node fixes the issue: https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/70562#discussioncomment-10666769

czosel commented 2 weeks ago

@cseufert CI seems to pass now. Let me know if this is ready to be merged from your side :-)