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

[jest]: add features released in v29.4 #64052

Merged
merged 18 commits into from Jan 25, 2023
Merged

[jest]: add features released in v29.4 #64052

merged 18 commits into from Jan 25, 2023

Conversation

mrazauskas
Copy link
Contributor

@mrazauskas mrazauskas commented Jan 24, 2023

Please fill in this template.

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: see below.

Summary

Jest v29.4 was released earlier today. This PR is adding typings of new API which are shipped with the new version:

@typescript-bot
Copy link
Contributor

typescript-bot commented Jan 24, 2023

@mrazauskas 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.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Most recent commit is approved by a DT maintainer

All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 64052,
  "author": "mrazauskas",
  "headCommitOid": "d7ce00d455f742beeb0d51d2ffb8af575a7e7532",
  "mergeBaseOid": "67b1826e657efe30626614f4bb5c6b918cd07fc9",
  "lastPushDate": "2023-01-24T17:47:25.000Z",
  "lastActivityDate": "2023-01-25T07:04:06.000Z",
  "mergeOfferDate": "2023-01-24T20:16:23.000Z",
  "mergeRequestDate": "2023-01-25T07:04:06.000Z",
  "mergeRequestUser": "mrazauskas",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "jest",
      "kind": "edit",
      "files": [
        {
          "path": "types/jest/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/jest/jest-tests.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "NoHomey",
        "jwbay",
        "asvetliakov",
        "alexjoverm",
        "epicallan",
        "ikatyang",
        "wsmd",
        "JamieMason",
        "douglasduteil",
        "ahnpnl",
        "UselessPickles",
        "r3nya",
        "hotell",
        "sebald",
        "andys8",
        "antoinebrault",
        "gstamac",
        "ExE-Boss",
        "quassnoi",
        "Belco90",
        "tonyhallett",
        "ycmjason",
        "pawfa",
        "gerkindev",
        "domdomegg",
        "mrazauskas"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "sheetalkamat",
      "date": "2023-01-24T20:15:38.000Z",
      "isMaintainer": true
    }
  ],
  "mainBotCommentID": 1401965980,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added Critical package Author is Owner The author of this PR is a listed owner of the package. labels Jan 24, 2023
@typescript-bot typescript-bot added this to Waiting for Code Reviews in New Pull Request Status Board Jan 24, 2023
@typescript-bot
Copy link
Contributor

typescript-bot commented Jan 24, 2023

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

Comment on lines +460 to +461
interface MockWithArgs<T extends MockableFunction>
extends MockInstance<ReturnType<T>, ArgumentsOf<T>, ConstructorReturnType<T>> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Prettier cleanup up some formatting here and below.

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

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

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

Note: builds which are failing do not end up on the list of PRs for the DT maintainers to review.

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

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

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

Note: builds which are failing do not end up on the list of PRs for the DT maintainers to review.

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

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

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

Note: builds which are failing do not end up on the list of PRs for the DT maintainers to review.

@typescript-bot typescript-bot added Edits multiple packages and removed Author is Owner The author of this PR is a listed owner of the package. The CI failed When GH Actions fails labels Jan 24, 2023
@boginw
Copy link
Contributor

boginw commented Jan 24, 2023

@mrazauskas can you give a quick explanation for why types/jest-when/index.d.ts needs to update Minimum TypeScript Version?

@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in New Pull Request Status Board Jan 24, 2023
@mrazauskas
Copy link
Contributor Author

can you give a quick explanation for why types/jest-when/index.d.ts needs to update Minimum TypeScript Version?

Thanks for asking. Indeed I am not a fan to change TS version in so many packages. Here is the error pushing me to do so:

Screenshot 2023-01-24 at 16 12 31

I looked for a work around with no luck so far. So decided to make the test pass and perhaps someone smarter than me will come up with a better solution.

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

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

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

Note: builds which are failing do not end up on the list of PRs for the DT maintainers to review.

@mrazauskas
Copy link
Contributor Author

And now CI gives: mapbox__aws-sdk-jest Out of memory: failed

My lucky day ;D Have to make a break.

@boginw
Copy link
Contributor

boginw commented Jan 24, 2023

Alright, thanks for the explanation. On behalf of the types of jest-when, I'm happy to approve when the CI passes

@typescript-bot typescript-bot added Author is Owner The author of this PR is a listed owner of the package. and removed Edits multiple packages The CI failed When GH Actions fails labels Jan 24, 2023
@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in New Pull Request Status Board Jan 24, 2023
@mrazauskas
Copy link
Contributor Author

Unfortunately I can’t find a way to implement jest.replaceProperty(). Types copied from Jest repo gave this error:

Screenshot 2023-01-24 at 16 12 31

As you can see from the commits, bumping the version as suggested leads to changing many other packages. After I bump version in all the packages, CI gave this:

Screenshot 2023-01-24 at 19 50 36

As far as I know, there is no way to acquire more memory from GitHub. So I must leave jest.replaceProperty() for smarter than me.

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board Jan 24, 2023
@typescript-bot typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner labels Jan 24, 2023
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Author to Merge in New Pull Request Status Board Jan 24, 2023
@typescript-bot
Copy link
Contributor

@mrazauskas: Everything looks good here. I am ready to merge this PR (at d7ce00d) on your behalf whenever you think it's ready.

If you'd like that to happen, please post a comment saying:

Ready to merge

and I'll merge this PR almost instantly. Thanks for helping out! ❤️

(@NoHomey, @jwbay, @asvetliakov, @alexjoverm, @epicallan, @ikatyang, @wsmd, @JamieMason, @douglasduteil, @ahnpnl, @UselessPickles, @r3nya, @Hotell, @sebald, @andys8, @antoinebrault, @gstamac, @ExE-Boss, @quassnoi, @Belco90, @tonyhallett, @ycmjason, @pawfa, @GerkinDev, @domdomegg: you can do this too.)

@mrazauskas
Copy link
Contributor Author

Ready to merge

@typescript-bot typescript-bot moved this from Waiting for Author to Merge to Recently Merged in New Pull Request Status Board Jan 25, 2023
@typescript-bot typescript-bot merged commit af319cf into DefinitelyTyped:master Jan 25, 2023
@mrazauskas mrazauskas deleted the jest-add-v29.4-features branch January 31, 2023 11:28
@typescript-bot typescript-bot removed this from Recently Merged in New Pull Request Status Board Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author is Owner The author of this PR is a listed owner of the package. Critical package Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants