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

chore(deps): update jest monorepo to v29 (version-4) (major) #6850

Merged
merged 2 commits into from Sep 15, 2022

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Aug 25, 2022

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@jest/globals 28.x -> 28.x || 29.x age adoption passing confidence
@types/jest (source) 28.1.8 -> 29.0.2 age adoption passing confidence
jest (source) 28.x -> 28.x || 29.x age adoption passing confidence
jest (source) 28.1.3 -> 29.0.3 age adoption passing confidence
jest-config 28.1.3 -> 29.0.3 age adoption passing confidence
jest-mock 28.1.3 -> 29.0.3 age adoption passing confidence
ts-jest (source) 28.0.8 -> 29.0.1 age adoption passing confidence

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, click this checkbox. ⚠ Warning: custom changes will be lost.

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot added the 🎄 dependencies Updates to dependencies, generally automatically managed by Renovate. label Aug 25, 2022
@netlify
Copy link

netlify bot commented Aug 25, 2022

Deploy Preview for apollo-server-docs ready!

Name Link
🔨 Latest commit c99e405
🔍 Latest deploy log https://app.netlify.com/sites/apollo-server-docs/deploys/632357cb801753000876cc54
😎 Deploy Preview https://deploy-preview-6850--apollo-server-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 25, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit c99e405:

Sandbox Source
Apollo Server Typescript Configuration
Apollo Server Configuration

@glasser
Copy link
Member

glasser commented Aug 25, 2022

As usual our Jest upgrade is blocked on ts-jest.
kulshekhar/ts-jest#3767

@renovate renovate bot force-pushed the renovate/version-4-major-jest-monorepo branch 14 times, most recently from 6d5dda8 to 0e285a6 Compare September 1, 2022 03:48
@renovate renovate bot force-pushed the renovate/version-4-major-jest-monorepo branch 6 times, most recently from 3b29c21 to 68d1cc9 Compare September 9, 2022 01:11
@renovate renovate bot force-pushed the renovate/version-4-major-jest-monorepo branch 6 times, most recently from 3d963e4 to 79ca0a9 Compare September 13, 2022 02:55
@renovate renovate bot force-pushed the renovate/version-4-major-jest-monorepo branch 5 times, most recently from a7c62ed to 065da89 Compare September 13, 2022 22:56
@trevor-scheer
Copy link
Member

@glasser it looks like adopting ESM mode comes with the requirement of importing jest globals everywhere. This maybe only surfaced after updating to v29?
kulshekhar/ts-jest#3206

Majority of the changes within are updating snapshots due to a simpler serialization format for objects and adding jest imports everywhere.

I removed jest from the tsconfig's global types since it's helpful to get those errors in the editor now (running tests will yield the same errors about jest, it, expect, etc. missing).

My preference is to land this before RC because the integration testsuite has a peer dependency on jest. Though maybe it'll support v28 and v29 fine? Integrations are presumably all greenfield though, so I'd prefer to just have them all on the latest major.

@trevor-scheer trevor-scheer force-pushed the renovate/version-4-major-jest-monorepo branch from cac020f to ef11e67 Compare September 14, 2022 17:12
@trevor-scheer
Copy link
Member

trevor-scheer commented Sep 14, 2022

Additionally, incorporated @SimenB's suggestion for the transitive dependency fix for coverage (and re-enabled coverage) in the most recent commit ef11e67

Edit: going to re-enable coverage separately

@SimenB
Copy link
Contributor

SimenB commented Sep 14, 2022

Native ESM requires importing jest or using import.meta.jest: https://jestjs.io/docs/ecmascript-modules#differences-between-esm-and-commonjs

That's not a difference between v28 and v29, tho - it's been that way all the time.


And if you want to reduce the diff, you can either configure snapshotFormat here to be the same as v28, or use the v29 default in v28 on version-4 and apply all the snapshot changes separately from the upgrade 🙂

trevor-scheer added a commit that referenced this pull request Sep 15, 2022
Ref:
#6850 (comment)

<!--
First, 🌠 thank you 🌠 for taking the time to consider a contribution to
Apollo!

Here are some important details to follow:

* ⏰ Your time is important
To save your precious time, if the contribution you are making will take
more
than an hour, please make sure it has been discussed in an issue first.
          This is especially true for feature requests!
* 💡 Features
Feature requests can be created and discussed within a GitHub Issue. Be
sure to search for existing feature requests (and related issues!) prior
to
opening a new request. If an existing issue covers the need, please
upvote
that issue by using the 👍 emote, rather than opening a new issue.
* 🔌 Integrations
Apollo Server has many web-framework integrations including Express,
Koa,
Hapi and more. When adding a new feature, or fixing a bug, please take a
peak and see if other integrations are also affected. In most cases, the
fix can be applied to the other frameworks as well. Please note that,
since new web-frameworks have a high maintenance cost, pull-requests for
new web-frameworks should be discussed with a project maintainer first.
* 🕷 Bug fixes
These can be created and discussed in this repository. When fixing a
bug,
please _try_ to add a test which verifies the fix. If you cannot, you
should
still submit the PR but we may still ask you (and help you!) to create a
test.
* 📖 Contribution guidelines
Follow
https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md
when submitting a pull request. Make sure existing tests still pass, and
add
          tests for all new behavior.
* ✏️ Explain your pull request
Describe the big picture of your changes here to communicate to what
your
pull request is meant to accomplish. Provide 🔗 links 🔗 to associated
issues!

We hope you will find this to be a positive experience! Open source
contribution can be intimidating and we hope to alleviate that pain as
much as possible. Without following these guidelines, you may be missing
context that can help you succeed with your contribution, which is why
we encourage discussion first. Ultimately, there is no guarantee that we
will be able to merge your pull-request, but by following these
guidelines we can try to avoid disappointment.
-->
trevor-scheer added a commit that referenced this pull request Sep 15, 2022
In ESM mode, the `jest` globals are technically no longer available. For
some reason, we're still getting away with it, but this issue surfaces
in the v29 upgrade PR so I'm going to address it separately.

https://jestjs.io/docs/ecmascript-modules#differences-between-esm-and-commonjs

Ref:
#6850 (comment)

<!--
First, 🌠 thank you 🌠 for taking the time to consider a contribution to
Apollo!

Here are some important details to follow:

* ⏰ Your time is important
To save your precious time, if the contribution you are making will take
more
than an hour, please make sure it has been discussed in an issue first.
          This is especially true for feature requests!
* 💡 Features
Feature requests can be created and discussed within a GitHub Issue. Be
sure to search for existing feature requests (and related issues!) prior
to
opening a new request. If an existing issue covers the need, please
upvote
that issue by using the 👍 emote, rather than opening a new issue.
* 🔌 Integrations
Apollo Server has many web-framework integrations including Express,
Koa,
Hapi and more. When adding a new feature, or fixing a bug, please take a
peak and see if other integrations are also affected. In most cases, the
fix can be applied to the other frameworks as well. Please note that,
since new web-frameworks have a high maintenance cost, pull-requests for
new web-frameworks should be discussed with a project maintainer first.
* 🕷 Bug fixes
These can be created and discussed in this repository. When fixing a
bug,
please _try_ to add a test which verifies the fix. If you cannot, you
should
still submit the PR but we may still ask you (and help you!) to create a
test.
* 📖 Contribution guidelines
Follow
https://github.com/apollographql/apollo-server/blob/main/CONTRIBUTING.md
when submitting a pull request. Make sure existing tests still pass, and
add
          tests for all new behavior.
* ✏️ Explain your pull request
Describe the big picture of your changes here to communicate to what
your
pull request is meant to accomplish. Provide 🔗 links 🔗 to associated
issues!

We hope you will find this to be a positive experience! Open source
contribution can be intimidating and we hope to alleviate that pain as
much as possible. Without following these guidelines, you may be missing
context that can help you succeed with your contribution, which is why
we encourage discussion first. Ultimately, there is no guarantee that we
will be able to merge your pull-request, but by following these
guidelines we can try to avoid disappointment.
-->
@trevor-scheer
Copy link
Member

Thanks for the additional clarity @SimenB - didn't mean to conflate the two, @glasser worked on changing to ESM mode recently, but our tests continued to pass on the version-4 branch and the issue only surfaced on this PR when upgrading to v29. Unfortunately, I don't think digging into why it worked when it shouldn't have is time well spent for me right now.

I like your suggestions to minimize the diff here so I went ahead and put these PRs together:
#6910
#6911

@trevor-scheer trevor-scheer force-pushed the renovate/version-4-major-jest-monorepo branch from ef11e67 to c99e405 Compare September 15, 2022 16:50
@trevor-scheer trevor-scheer merged commit 256f242 into version-4 Sep 15, 2022
@trevor-scheer trevor-scheer deleted the renovate/version-4-major-jest-monorepo branch September 15, 2022 16:54
@SimenB
Copy link
Contributor

SimenB commented Sep 16, 2022

🎉

package.json Show resolved Hide resolved
glasser pushed a commit that referenced this pull request Sep 24, 2022
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to version-4, this PR
will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`version-4` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `version-4`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @apollo/server-integration-testsuite@4.0.0-alpha.12

### Patch Changes

- [#6827](#6827)
[`0c2909aa1`](0c2909a)
Thanks [@glasser](https://github.com/glasser)! - Experimental support
for incremental delivery (`@defer`/`@stream`) when combined with a
prerelease of `graphql-js`.

- [#6850](#6850)
[`256f2424b`](256f242)
Thanks [@renovate](https://github.com/apps/renovate)! - Expand jest peer
deps to include v29

- [#6910](#6910)
[`6541f92c9`](6541f92)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Update
snapshot format to future jest v29 default

- [#6827](#6827)
[`0c2909aa1`](0c2909a)
Thanks [@glasser](https://github.com/glasser)! - Support
application/graphql-response+json content-type if requested via Accept
header, as per graphql-over-http spec.
    Include `charset=utf-8` in content-type headers.

- Updated dependencies
\[[`0c2909aa1`](0c2909a),
[`0c2909aa1`](0c2909a)]:
    -   @apollo/server@4.0.0-alpha.12

## @apollo/server-plugin-response-cache@4.0.0-alpha.5

### Patch Changes

- [#6827](#6827)
[`0c2909aa1`](0c2909a)
Thanks [@glasser](https://github.com/glasser)! - Experimental support
for incremental delivery (`@defer`/`@stream`) when combined with a
prerelease of `graphql-js`.

- Updated dependencies
\[[`0c2909aa1`](0c2909a),
[`0c2909aa1`](0c2909a)]:
    -   @apollo/server@4.0.0-alpha.12

## @apollo/server@4.0.0-alpha.12

### Patch Changes

- [#6827](#6827)
[`0c2909aa1`](0c2909a)
Thanks [@glasser](https://github.com/glasser)! - Experimental support
for incremental delivery (`@defer`/`@stream`) when combined with a
prerelease of `graphql-js`.

- [#6827](#6827)
[`0c2909aa1`](0c2909a)
Thanks [@glasser](https://github.com/glasser)! - Support
application/graphql-response+json content-type if requested via Accept
header, as per graphql-over-http spec.
    Include `charset=utf-8` in content-type headers.

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot mentioned this pull request Oct 10, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🎄 dependencies Updates to dependencies, generally automatically managed by Renovate.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants