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

fix: remove jest interface types as they can be imported from jest itself #41852

Merged
merged 1 commit into from Jan 27, 2020

Conversation

SimenB
Copy link
Contributor

@SimenB SimenB commented Jan 25, 2020

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Add or edit tests to reflect the change. (Run with npm test.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

Select one of these and delete the others:

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: ☂️TypeScript migration tracking issue jestjs/jest#7807
  • If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.
  • If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }. If for reason the any rule need to be disabled, disable it for that line using // tslint:disable-next-line [ruleName] and not for whole package so that the need for disabling can be reviewed.

Since Jest has been rewritten to TypeScript, all of these interface types can be imported directly from Jest's individual modules. The major of Jest 25 is the perfect time to remove these 🙂

@@ -29,8 +29,6 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.0

/// <reference types="jest-diff" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this in #33030 due to a bug in the publisher meaning it wasn't added as a dependency. However, it was not removed when @types/jest-diff was deprecated in #39589.

@typescript-bot typescript-bot added this to Waiting for Reviewers in Pull Request Status Board Jan 25, 2020
@typescript-bot typescript-bot added Popular package This PR affects a popular package (as counted by NPM download counts). Awaiting reviewer feedback labels Jan 25, 2020
@typescript-bot
Copy link
Contributor

typescript-bot commented Jan 25, 2020

@SimenB Thank you for submitting this PR!

🔔 @NoHomey @jwbay @asvetliakov @alexjoverm @epicallan @ikatyang @wsmd @JamieMason @douglasduteil @ahnpnl @JoshuaKGoldberg @UselessPickles @r3nya @Hotell @sebald @andys8 @antoinebrault @favna @gstamac @ExE-Boss @quassnoi @Belco90 @tonyhallett @ycmjason @devanshj - please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead.

@typescript-bot
Copy link
Contributor

👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings.

Let’s review the numbers, shall we?

These typings are for a package that doesn’t yet exist on master, so I don’t have anything to compare against yet! In the future, I’ll be able to compare PRs to jest with its source on master.

Comparison details 📊
Batch compilation
Type count 14514
Assignability cache size 35860
Language service measurements
Samples taken 2541
Identifiers in tests 2541
getCompletionsAtPosition
    Mean duration (ms) 358.8
    Mean CV 8.8%
    Worst duration (ms) 481.9
    Worst identifier jest
getQuickInfoAtPosition
    Mean duration (ms) 356.5
    Mean CV 9.1%
    Worst duration (ms) 466.8
    Worst identifier b
System information
Node version v12.14.1
CPU count 2
CPU speed 2.294 GHz
CPU model Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
CPU Architecture x64
Memory 6.8 GiB
Platform linux
Release 4.15.0-1066-azure

@typescript-bot typescript-bot moved this from Waiting for Reviewers to Check and Merge in Pull Request Status Board Jan 25, 2020
@typescript-bot typescript-bot added Owner Approved A listed owner of this package signed off on the pull request. Merge:Express and removed Awaiting reviewer feedback labels Jan 25, 2020
@typescript-bot
Copy link
Contributor

A definition owner has approved this PR ⭐️. A maintainer will merge this PR shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait. Thank you for your contribution to DefinitelyTyped!

@weswigham weswigham merged commit ef7406a into DefinitelyTyped:master Jan 27, 2020
Pull Request Status Board automation moved this from Check and Merge to Done Jan 27, 2020
@typescript-bot
Copy link
Contributor

I just published @types/jest@25.1.0 to npm.

@SimenB SimenB deleted the jest-25 branch January 27, 2020 19:02
jlismore pushed a commit to jlismore/DefinitelyTyped that referenced this pull request Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Owner Approved A listed owner of this package signed off on the pull request. Popular package This PR affects a popular package (as counted by NPM download counts).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants