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

The CI builds for cli-hooks package failure #1894

Closed
seratch opened this issue Aug 19, 2024 · 1 comment · Fixed by #1895
Closed

The CI builds for cli-hooks package failure #1894

seratch opened this issue Aug 19, 2024 · 1 comment · Fixed by #1895
Assignees
Labels
bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented pkg:cli-hooks applies to `@slack/cli-hooks` tests M-T: Testing work only

Comments

@seratch
Copy link
Member

seratch commented Aug 19, 2024

The CI builds for cli-hooks package started failing on August 19 or so although there is no change since the last revision. Perhaps, dependency version issue or something like that?

@zimeg I assigned you for now because you've been working on the package but please feel free to re-assign or just remove it if it's tno relevant or you don't have the bandwidth for it.

> @slack/[email protected] prelint
> tsc --noemit --module es2022 --project ./jsconfig.json

Error: node_modules/punycode/punycode.js(42,23): error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ overflow: string; 'not-basic': string; 'invalid-input': string; }'.
  No index signature with a parameter of type 'string' was found on type '{ overflow: string; 'not-basic': string; 'invalid-input': string; }'.
Error: node_modules/punycode/punycode.js(48,12): error TS2314: Generic type 'Array<T>' requires 1 type argument(s).
Error: node_modules/punycode/punycode.js(51,14): error TS2314: Generic type 'Array<T>' requires 1 type argument(s).
Error: node_modules/punycode/punycode.js(94,9): error TS1003: Identifier expected.
Error: node_modules/punycode/punycode.js(95,9): error TS1003: Identifier expected.
Error: node_modules/punycode/punycode.js(99,14): error TS2314: Generic type 'Array<T>' requires 1 type argument(s).
Error: node_modules/punycode/punycode.js(127,9): error TS1003: Identifier expected.
Error: node_modules/punycode/punycode.js(130,12): error TS2314: Generic type 'Array<T>' requires 1 type argument(s).
Error: node_modules/punycode/punycode.js(137,9): error TS1003: Identifier expected.
Error: node_modules/punycode/punycode.js(159,9): error TS1003: Identifier expected.
Error: node_modules/punycode/punycode.js(168,38): error TS7006: Parameter 'flag' implicitly has an 'any' type.
Error: node_modules/punycode/punycode.js(171,27): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
Error: node_modules/punycode/punycode.js(171,43): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
Error: node_modules/punycode/punycode.js(179,24): error TS7006: Parameter 'delta' implicitly has an 'any' type.
Error: node_modules/punycode/punycode.js(179,31): error TS7006: Parameter 'numPoints' implicitly has an 'any' type.
Error: node_modules/punycode/punycode.js(179,42): error TS7006: Parameter 'firstTime' implicitly has an 'any' type.
Error: node_modules/punycode/punycode.js(294,2): error TS2322: Type 'any[]' is not assignable to type 'string'.
Error: node_modules/punycode/punycode.js(306,7): error TS2365: Operator '<' cannot be applied to types 'string' and 'number'.
Error: node_modules/punycode/punycode.js(307,35): error TS2[34](https://github.com/slackapi/node-slack-sdk/actions/runs/10448756253/job/28929779489#step:6:35)5: Argument of type 'string' is not assignable to parameter of type 'number'.
Error: node_modules/punycode/punycode.js(329,8): error TS2365: Operator '>=' cannot be applied to types 'string' and 'number'.
Error: node_modules/punycode/punycode.js(329,29): error TS2365: Operator '<' cannot be applied to types 'string' and 'number'.
Error: node_modules/punycode/punycode.js(330,5): error TS2322: Type 'string' is not assignable to type 'number'.
Error: node_modules/punycode/punycode.js(345,8): error TS2365: Operator '<' cannot be applied to types 'string' and 'number'.
Error: node_modules/punycode/punycode.js(348,8): error TS2367: This comparison appears to be unintentional because the types 'string' and 'number' have no overlap.
Error: node_modules/punycode/punycode.js(390,[35](https://github.com/slackapi/node-slack-sdk/actions/runs/10448756253/job/28929779489#step:6:36)): error TS7006: Parameter 'string' implicitly has an 'any' type.
Error: node_modules/punycode/punycode.js(409,35): error TS7006: Parameter 'string' implicitly has an 'any' type.
Error: node_modules/punycode/punycode.js(429,10): error TS1003: Identifier expected.
Error: Process completed with exit code 2.

https://github.com/slackapi/node-slack-sdk/actions/runs/10448756253/job/28929779489

@seratch seratch added bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented tests M-T: Testing work only pkg:cli-hooks applies to `@slack/cli-hooks` labels Aug 19, 2024
@seratch seratch added this to the [email protected] milestone Aug 19, 2024
@filmaj
Copy link
Contributor

filmaj commented Aug 19, 2024

Interesting, tsc is trying to build dependency code (puny). I can reproduce the issue.

I tried setting various jsconfig options like skipLibCheck: true and exclude: ['node_modules'] to no avail. However, this comment in the TypeScript repo helps explain what is going (also microsoft/TypeScript#50862 goes into more depth as well).

By adding --maxNodeModuleJsDepth 0 to the prelint run script, I can get this to pass locally. I think that's an acceptable short-term solution.

Longer term, we should look at getting rid of eslint and moving to biome. The punycode dependency comes from the eslint dependency tree. However, when we do this, we should apply it to the entire node-slack-sdk repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug M-T: A confirmed bug report. Issues are confirmed when the reproduction steps are documented pkg:cli-hooks applies to `@slack/cli-hooks` tests M-T: Testing work only
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants