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

dtslint TypeError: DeprecationError: 'originalKeywordKind' #30063

Open
MikeMcC399 opened this issue Aug 20, 2024 · 6 comments
Open

dtslint TypeError: DeprecationError: 'originalKeywordKind' #30063

MikeMcC399 opened this issue Aug 20, 2024 · 6 comments
Labels
type: chore Work is required w/ no deliverable to end user

Comments

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Aug 20, 2024

Current behavior

Executing the following command locally causes multiple errors to be reported:

yarn workspace cypress dtslint

The errors are similar to:

The 'unnecessary-bind' rule threw an error in '/home/mike/github/cypress-io/cypress/cli/types/cy-chai.d.ts':
TypeError: DeprecationError: 'originalKeywordKind' has been deprecated since v5.0.0 and can no longer be used. Use 'identifierToKeywordKind(identifier)' instead.

Desired behavior

yarn workspace cypress dtslint

should not throw errors.

Test code to reproduce

git clone https://github.com/cypress-io/cypress
cd cypress
git clean -xfd # in case of repetition
yarn
rm -rf ~/.dts/typescript-installs
yarn workspace cypress dtslint

Cypress Version

Original reported on version 13.13.3
Continues to be reproducible with version 13.15.0

Node version

v18.17.1

Operating System

Ubuntu 22.04.4 LTS and
Ubuntu 24.04.1 LTS

Debug Logs

$ yarn workspace cypress dtslint
yarn workspace v1.22.22
yarn run v1.22.22
$ dtslint types
Installing to /home/mike/.dts/typescript-installs/3.5...
npm WARN config shrinkwrap Use the --package-lock setting instead.

Installed!

Installing to /home/mike/.dts/typescript-installs/3.6...
npm WARN config shrinkwrap Use the --package-lock setting instead.

Installed!

Installing to /home/mike/.dts/typescript-installs/3.7...
npm WARN config shrinkwrap Use the --package-lock setting instead.

Installed!

Installing to /home/mike/.dts/typescript-installs/3.8...
npm WARN config shrinkwrap Use the --package-lock setting instead.

Installed!

Installing to /home/mike/.dts/typescript-installs/3.9...
npm WARN config shrinkwrap Use the --package-lock setting instead.

Installed!

Installing to /home/mike/.dts/typescript-installs/4.0...
npm WARN config shrinkwrap Use the --package-lock setting instead.

Installed!

Installing to /home/mike/.dts/typescript-installs/4.1...
npm WARN config shrinkwrap Use the --package-lock setting instead.

Installed!

Installing to /home/mike/.dts/typescript-installs/4.2...
npm WARN config shrinkwrap Use the --package-lock setting instead.

Installed!

Installing to /home/mike/.dts/typescript-installs/4.3...
npm WARN config shrinkwrap Use the --package-lock setting instead.

Installed!

The 'unnecessary-bind' rule threw an error in '/home/mike/github/cypress-io/cypress/cli/types/cy-chai.d.ts':
TypeError: DeprecationError: 'originalKeywordKind' has been deprecated since v5.0.0 and can no longer be used. Use 'identifierToKeywordKind(identifier)' instead.
    at /home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172041:13
    at IdentifierObject.<anonymous> (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172071:7)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:567:39)
    at Array.forEach (<anonymous>)
    at UsageWalker._handleFunctionLikeDeclaration (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:644:25)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:558:34)
    at visitNodes (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28081:24)
    at forEachChildInInterfaceDeclaration (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28773:203)
    at Object.forEachChild (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28166:37)
    at forEachChild (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:615:23)
The 'unnecessary-bind' rule threw an error in '/home/mike/github/cypress-io/cypress/cli/types/cy-minimatch.d.ts':
TypeError: DeprecationError: 'originalKeywordKind' has been deprecated since v5.0.0 and can no longer be used. Use 'identifierToKeywordKind(identifier)' instead.
    at /home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172041:13
    at IdentifierObject.<anonymous> (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172071:7)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:567:39)
    at Array.forEach (<anonymous>)
    at UsageWalker._handleFunctionLikeDeclaration (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:644:25)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:558:34)
    at visitNodes (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28081:24)
    at forEachChildInBlock (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28126:12)
    at Object.forEachChild (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28166:37)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:596:23)
The 'unnecessary-bind' rule threw an error in '/home/mike/github/cypress-io/cypress/cli/types/cypress-eventemitter.d.ts':
TypeError: DeprecationError: 'originalKeywordKind' has been deprecated since v5.0.0 and can no longer be used. Use 'identifierToKeywordKind(identifier)' instead.
    at /home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172041:13
    at IdentifierObject.<anonymous> (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172071:7)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:567:39)
    at Array.forEach (<anonymous>)
    at UsageWalker._handleFunctionLikeDeclaration (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:644:25)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:558:34)
    at visitNode2 (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28073:20)
    at forEachChildInPropertySignature (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28541:140)
    at Object.forEachChild (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28166:37)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:596:23)
The 'unnecessary-bind' rule threw an error in '/home/mike/github/cypress-io/cypress/cli/types/cypress-npm-api.d.ts':
TypeError: DeprecationError: 'originalKeywordKind' has been deprecated since v5.0.0 and can no longer be used. Use 'identifierToKeywordKind(identifier)' instead.
    at /home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172041:13
    at IdentifierObject.<anonymous> (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172071:7)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:567:39)
    at Array.forEach (<anonymous>)
    at UsageWalker._handleFunctionLikeDeclaration (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:644:25)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:558:34)
    at visitNodes (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28081:24)
    at forEachChildInInterfaceDeclaration (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28773:203)
    at Object.forEachChild (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28166:37)
    at forEachChild (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:615:23)
The 'unnecessary-bind' rule threw an error in '/home/mike/github/cypress-io/cypress/cli/types/cypress.d.ts':
TypeError: DeprecationError: 'originalKeywordKind' has been deprecated since v5.0.0 and can no longer be used. Use 'identifierToKeywordKind(identifier)' instead.
    at /home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172041:13
    at IdentifierObject.<anonymous> (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172071:7)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:567:39)
    at Array.forEach (<anonymous>)
    at UsageWalker._handleFunctionLikeDeclaration (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:644:25)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:558:34)
    at visitNode2 (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28073:20)
    at forEachChildInTypeAliasDeclaration (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28776:150)
    at Object.forEachChild (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28166:37)
    at forEachChild (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:615:23)
The 'unnecessary-bind' rule threw an error in '/home/mike/github/cypress-io/cypress/cli/types/tests/actions.ts':
TypeError: DeprecationError: 'originalKeywordKind' has been deprecated since v5.0.0 and can no longer be used. Use 'identifierToKeywordKind(identifier)' instead.
    at /home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172041:13
    at IdentifierObject.<anonymous> (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172071:7)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:567:39)
    at Array.forEach (<anonymous>)
    at UsageWalker._handleFunctionLikeDeclaration (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:644:25)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:558:34)
    at visitNodes (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28081:24)
    at forEachChildInCallOrNewExpression (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28123:101)
    at Object.forEachChild (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28166:37)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:596:23)
The 'unnecessary-bind' rule threw an error in '/home/mike/github/cypress-io/cypress/cli/types/tests/chainer-examples.ts':
TypeError: DeprecationError: 'originalKeywordKind' has been deprecated since v5.0.0 and can no longer be used. Use 'identifierToKeywordKind(identifier)' instead.
    at /home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172041:13
    at IdentifierObject.<anonymous> (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172071:7)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:567:39)
    at Array.forEach (<anonymous>)
    at UsageWalker._handleFunctionLikeDeclaration (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:644:25)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:558:34)
    at visitNodes (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28081:24)
    at forEachChildInCallOrNewExpression (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28123:101)
    at Object.forEachChild (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28166:37)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:596:23)
The 'unnecessary-bind' rule threw an error in '/home/mike/github/cypress-io/cypress/cli/types/tests/cypress-npm-api-test.ts':
TypeError: DeprecationError: 'originalKeywordKind' has been deprecated since v5.0.0 and can no longer be used. Use 'identifierToKeywordKind(identifier)' instead.
    at /home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172041:13
    at IdentifierObject.<anonymous> (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172071:7)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:567:39)
    at Array.forEach (<anonymous>)
    at UsageWalker._handleFunctionLikeDeclaration (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:644:25)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:558:34)
    at visitNodes (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28081:24)
    at forEachChildInCallOrNewExpression (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28123:101)
    at Object.forEachChild (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28166:37)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:596:23)
The 'unnecessary-bind' rule threw an error in '/home/mike/github/cypress-io/cypress/cli/types/tests/cypress-tests.ts':
TypeError: DeprecationError: 'originalKeywordKind' has been deprecated since v5.0.0 and can no longer be used. Use 'identifierToKeywordKind(identifier)' instead.
    at /home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172041:13
    at IdentifierObject.<anonymous> (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172071:7)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:567:39)
    at Array.forEach (<anonymous>)
    at UsageWalker._handleFunctionLikeDeclaration (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:644:25)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:558:34)
    at visitNodes (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28081:24)
    at forEachChildInCallOrNewExpression (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28123:101)
    at Object.forEachChild (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28166:37)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:596:23)
The 'unnecessary-bind' rule threw an error in '/home/mike/github/cypress-io/cypress/cli/types/tests/kitchen-sink.ts':
TypeError: DeprecationError: 'originalKeywordKind' has been deprecated since v5.0.0 and can no longer be used. Use 'identifierToKeywordKind(identifier)' instead.
    at /home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172041:13
    at IdentifierObject.<anonymous> (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172071:7)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:567:39)
    at Array.forEach (<anonymous>)
    at UsageWalker._handleFunctionLikeDeclaration (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:644:25)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:558:34)
    at visitNodes (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28081:24)
    at forEachChildInCallOrNewExpression (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28123:101)
    at Object.forEachChild (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28166:37)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:596:23)
The 'unnecessary-bind' rule threw an error in '/home/mike/github/cypress-io/cypress/cli/types/tests/net-stubbing-tests.ts':
TypeError: DeprecationError: 'originalKeywordKind' has been deprecated since v5.0.0 and can no longer be used. Use 'identifierToKeywordKind(identifier)' instead.
    at /home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172041:13
    at IdentifierObject.<anonymous> (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172071:7)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:567:39)
    at Array.forEach (<anonymous>)
    at UsageWalker._handleFunctionLikeDeclaration (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:644:25)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:558:34)
    at visitNode2 (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28073:20)
    at forEachChildInVariableDeclaration (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28547:96)
    at Object.forEachChild (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28166:37)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:596:23)
The 'unnecessary-bind' rule threw an error in '/home/mike/github/cypress-io/cypress/cli/types/tests/plugins-config.ts':
TypeError: DeprecationError: 'originalKeywordKind' has been deprecated since v5.0.0 and can no longer be used. Use 'identifierToKeywordKind(identifier)' instead.
    at /home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172041:13
    at IdentifierObject.<anonymous> (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172071:7)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:567:39)
    at Array.forEach (<anonymous>)
    at UsageWalker._handleFunctionLikeDeclaration (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:644:25)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:558:34)
    at visitNode2 (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28073:20)
    at forEachChildInVariableDeclaration (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28547:129)
    at Object.forEachChild (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28166:37)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:596:23)
The 'unnecessary-bind' rule threw an error in '/home/mike/github/cypress-io/cypress/cli/types/tests/plugins-test.ts':
TypeError: DeprecationError: 'originalKeywordKind' has been deprecated since v5.0.0 and can no longer be used. Use 'identifierToKeywordKind(identifier)' instead.
    at /home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172041:13
    at IdentifierObject.<anonymous> (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:172071:7)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:567:39)
    at Array.forEach (<anonymous>)
    at UsageWalker._handleFunctionLikeDeclaration (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:644:25)
    at cb (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:558:34)
    at visitNodes (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28081:24)
    at forEachChildInInterfaceDeclaration (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28773:203)
    at Object.forEachChild (/home/mike/github/cypress-io/cypress/node_modules/typescript/lib/typescript.js:28166:37)
    at forEachChild (/home/mike/github/cypress-io/cypress/node_modules/tsutils/util/usage.js:615:23)
Done in 28.67s.

Other

Cypress is configured to use [email protected] which was published 4 years ago.

"dtslint": "4.0.7",

This package has been deprecated - see https://www.npmjs.com/package/dtslint and https://github.com/Microsoft/dtslint (showing the repo archived).

It appears not to test with TypeScript v5 despite the error messages.

@jennifer-shehane jennifer-shehane added the type: chore Work is required w/ no deliverable to end user label Aug 20, 2024
@jennifer-shehane
Copy link
Member

@MikeMcC399 tsd seems the most equivalent for what we're using this for. This is only used in the CLI to test our types there. I would suggest migrating to tsd: https://github.com/tsdjs/tsd

@jennifer-shehane
Copy link
Member

jennifer-shehane commented Aug 20, 2024

Bumping the dtslint version to latest in the meantime - might as well. #30065

@MikeMcC399
Copy link
Contributor Author

@jennifer-shehane

tsd seems the most equivalent for what we're using this for. This is only used in the CLI to test our types there. I would suggest migrating to tsd: https://github.com/tsdjs/tsd

@MikeMcC399

This comment was marked as outdated.

@MikeMcC399
Copy link
Contributor Author

@jennifer-shehane
Copy link
Member

Yah, I didn't quite think it would be resolved. Sounds good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: chore Work is required w/ no deliverable to end user
Projects
None yet
Development

No branches or pull requests

2 participants