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: update @types/jest dependencies #48426

Closed
wants to merge 1 commit into from

Conversation

SimenB
Copy link
Contributor

@SimenB SimenB commented Oct 2, 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 YOUR_PACKAGE_NAME.)
  • 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: <>
  • 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.
  • Include tests for your changes
  • 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.

I just made this change in the GH UI, hopefully it'll pass 🙂

@typescript-bot typescript-bot added Critical package Check Config Changes a module config files labels Oct 2, 2020
@typescript-bot typescript-bot added this to Waiting for Code Reviews in New Pull Request Status Board Oct 2, 2020
@typescript-bot
Copy link
Contributor

typescript-bot commented Oct 2, 2020

@SimenB Thank you for submitting this PR!

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

Because this is a widely-used package, a DT maintainer will need to review it before it can be merged.

Status

  • ✅ No merge conflicts
  • ❌ Continuous integration tests have passed
  • ❌ A DT maintainer needs to approve changes which affect module config files
    • jest/package.json: edited

Once every item on this list is checked, I'll ask you for permission to merge and publish the changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 48426,
  "author": "SimenB",
  "owners": [
    "NoHomey",
    "jwbay",
    "asvetliakov",
    "alexjoverm",
    "epicallan",
    "ikatyang",
    "wsmd",
    "JamieMason",
    "douglasduteil",
    "ahnpnl",
    "joshuakgoldberg",
    "UselessPickles",
    "r3nya",
    "hotell",
    "sebald",
    "andys8",
    "antoinebrault",
    "gstamac",
    "ExE-Boss",
    "quassnoi",
    "Belco90",
    "tonyhallett",
    "ycmjason",
    "devanshj",
    "pawfa",
    "regevbr"
  ],
  "dangerLevel": "ScopedAndConfiguration",
  "headCommitAbbrOid": "8529d3b",
  "headCommitOid": "8529d3b87200e3d78ff6460cfa6937ff0865857d",
  "mergeIsRequested": false,
  "stalenessInDays": 0,
  "lastPushDate": "2020-10-02T12:45:19.000Z",
  "lastCommentDate": "2020-10-02T13:25:34.000Z",
  "maintainerBlessed": false,
  "reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/48426/files",
  "hasMergeConflict": false,
  "authorIsOwner": false,
  "isFirstContribution": false,
  "popularityLevel": "Critical",
  "newPackages": [],
  "packages": [
    "jest"
  ],
  "files": [
    {
      "path": "types/jest/package.json",
      "kind": "package-meta",
      "package": "jest",
      "suspect": "edited"
    }
  ],
  "hasDismissedReview": false,
  "ciResult": "fail",
  "ciUrl": "https://github.com/DefinitelyTyped/DefinitelyTyped/commit/8529d3b87200e3d78ff6460cfa6937ff0865857d/checks?check_suite_id=1278729806",
  "reviewersWithStaleReviews": [],
  "approvalFlags": 0,
  "isChangesRequested": false
}

@typescript-bot
Copy link
Contributor

🔔 @NoHomey @jwbay @asvetliakov @alexjoverm @epicallan @ikatyang @wsmd @JamieMason @douglasduteil @ahnpnl @JoshuaKGoldberg @UselessPickles @r3nya @Hotell @sebald @andys8 @antoinebrault @gstamac @ExE-Boss @quassnoi @Belco90 @tonyhallett @ycmjason @devanshj @pawfa @regevbr — 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.

@typescript-bot typescript-bot added the The CI failed When GH Actions fails label Oct 2, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Author Action in New Pull Request Status Board Oct 2, 2020
@typescript-bot
Copy link
Contributor

@SimenB The CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@ExE-Boss
Copy link
Contributor

ExE-Boss commented Oct 2, 2020

@SimenB See #45603 and #47545.

@SimenB
Copy link
Contributor Author

SimenB commented Oct 2, 2020

wonderful 😛 I'm not gonna dig into that, so I'll just close this

@SimenB SimenB closed this Oct 2, 2020
@typescript-bot typescript-bot removed this from Needs Author Action in New Pull Request Status Board Oct 2, 2020
@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?

Comparison details 📊
master #48426 diff
Batch compilation
Memory usage (MiB) 90.9 91.5 +0.6%
Type count 15505 15505 0%
Assignability cache size 4857 4857 0%
Language service
Samples taken 2612 2612 0%
Identifiers in tests 2612 2612 0%
getCompletionsAtPosition
    Mean duration (ms) 464.3 461.1 -0.7%
    Mean CV 6.3% 6.3%
    Worst duration (ms) 665.4 604.3 -9.2%
    Worst identifier toBe toHaveProperty
getQuickInfoAtPosition
    Mean duration (ms) 463.2 460.8 -0.5%
    Mean CV 6.2% 6.2% -0.2%
    Worst duration (ms) 620.5 627.9 +1.2%
    Worst identifier each expect

It looks like nothing changed too much. I won’t post performance data again unless it gets worse.

@typescript-bot typescript-bot added the Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. label Oct 2, 2020
@SimenB SimenB deleted the patch-2 branch October 3, 2020 10:30
@G-Rath
Copy link
Contributor

G-Rath commented Oct 4, 2020

I'm thinking it's probably just time to make the min ts version for @types/jest & dependents 3.8:

3.1 expect-puppeteer
3.5 heft-jest
3.1 jest-axe
3.4 jest-expect-message
3.1 jest-image-snapshot
3.1 jest-image-snapshot/v2
3.1 jest-in-case
3.1 jest-json-schema
3.1 jest-matcher-one-of
3.1 jest-plugin-context
3.8 jest-sinon
3.1 jest-specific-snapshot
3.1 jest-when
3.1 testing-library__jest-dom
3.1 wordpress__jest-console

While breaking, I don't think we could attempt to do this in a major due to the downstream types, and also I don't think it'll be as negative as it may seem, since:

  • if you're using < jest 26 then you shouldn't be using @types/jest@26 so you wouldn't be affected
  • if you're using >= jest 26 then you're currently consuming some jest 24 types, which is wrong anyway, so the act of upgrading the dependencies in theory would cause breakages
  • if you can't upgrade typescript then you can stay on the current version of the types you're using - while not ideal, typescript will need to be updated at some point anyway

@ExE-Boss @L2jLiga what do you think? The best way to go about this is probably to make a PR against each of the above packages bumping their min ts version to 3.8, and then we'll be able to bump @types/jest & the dependencies. (or actually doing it in a single big PR might make more sense as then all the context will be in one place & the authors would get pinged together)

@SimenB
Copy link
Contributor Author

SimenB commented Oct 4, 2020

My hope for @types/jest is still #44365, but if just tweaking the minimum TS version brings us closer, that makes me happy! 😀

@G-Rath
Copy link
Contributor

G-Rath commented Oct 4, 2020

@SimenB yeah this'll be one of the requirements for landing #44365, so we need to do this at some point - 3.8 becomes the min supported by DT in 2022, so it'll happen eventually... provided that jest doesn't bump their min.

All the more reason I think that we should force downstream types to match jest's min, and then ensure they're updated whenever jest ups its min.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Check Config Changes a module config files Critical package Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. The CI failed When GH Actions fails
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants