Skip to content

fix dep type errors #101

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

Merged
merged 1 commit into from
Jan 15, 2023
Merged

Conversation

connectdotz
Copy link
Collaborator

@connectdotz connectdotz commented Jan 15, 2023

v31.0.0 had 2 problem when trying to integrate:

  1. typescript tsc compile problem
node_modules/jest-editor-support/build/parsers/index.d.ts:8:29 - error TS7016: Could not find a declaration file for module './parser_nodes'. '/Users/vsun/github/open-source/sandbox/vscode-jest-2023-01-13/node_modules/jest-editor-support/build/parsers/parser_nodes.js' implicitly has an 'any' type.

8 import { ParseResult } from './parser_nodes';
                              ~~~~~~~~~~~~~~~~


Found 1 error in node_modules/jest-editor-support/build/parsers/index.d.ts:8

This is fixed by modifying index.d.ts

  1. type error when importing from jest-editor-support: TypeError: defineType is not a function
    This one is baffling. Some how jest-editor-support and its dependencies have problem finding the @babel/traverse. I had to lock the version down (in package.json) to make sure it can be located regardless of the client env. For future updates, it will be better to resolve the root cause; otherwise we have to continue this hack...

Also added a typescript flag "importsNotUsedAsValues": "error" so we can be more precise to import type vs. value. Fixed the import code accordingly.

Bump version to 31.0.1.

@connectdotz connectdotz merged commit b5323ef into jest-community:master Jan 15, 2023
@connectdotz connectdotz deleted the fix-ts-types branch January 15, 2023 03:22
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 this pull request may close these issues.

1 participant