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: Match runtime type of baseElement in TypeScript types #1023

Merged
merged 2 commits into from
Mar 9, 2022

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Mar 4, 2022

What:

Closes #1004

Why:

We always assumed baseElement has a static type. However, it's type depends on the Container

How:

Same approach as #868

Checklist:

  • [ ] Documentation added to the
    docs site
  • Tests
  • TypeScript definitions updated
  • Ready to be merged

@eps1lon eps1lon added bug Something isn't working TypeScript Related to TypeScript. Note: only certain maintainers handle TypeScript labeled issues. labels Mar 4, 2022
@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 4, 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 66c65ac:

Sandbox Source
React Configuration
react-testing-library-examples Configuration
react-testing-library demo Issue #1004

@codecov
Copy link

codecov bot commented Mar 4, 2022

Codecov Report

Merging #1023 (66c65ac) into main (b0f9d97) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##              main     #1023   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines          142       142           
  Branches        30        30           
=========================================
  Hits           142       142           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b0f9d97...66c65ac. Read the comment docs.

@eps1lon eps1lon changed the title test: Expected behavior for baseElement type fix: Match runtime type of baseElement in TypeScript types Mar 4, 2022
@eps1lon eps1lon marked this pull request as ready for review March 4, 2022 21:26
@eps1lon eps1lon merged commit 96ed8da into testing-library:main Mar 9, 2022
@eps1lon eps1lon deleted the fix/baselement-type branch March 9, 2022 14:32
@github-actions
Copy link

github-actions bot commented Mar 9, 2022

🎉 This PR is included in version 12.1.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version 13.0.0-alpha.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version 12.1.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

cbush pushed a commit to mongodb/docs-realm that referenced this pull request Mar 15, 2023
<h3>Snyk has created this PR to upgrade @testing-library/react from
12.1.3 to 12.1.5.</h3>

:information_source: Keep your dependencies up-to-date. This makes it
easier to fix existing vulnerabilities and to more quickly identify and
fix newly disclosed vulnerabilities when they affect your project.
<hr/>

- The recommended version is **2 versions** ahead of your current
version.
- The recommended version was released **a year ago**, on 2022-04-11.


<details>
<summary><b>Release notes</b></summary>
<br/>
  <details>
    <summary>Package name: <b>@testing-library/react</b></summary>
    <ul>
      <li>
<b>12.1.5</b> - <a
href="https://snyk.io/redirect/github/testing-library/react-testing-library/releases/tag/v12.1.5">2022-04-11</a></br><h2><a
href="https://snyk.io/redirect/github/testing-library/react-testing-library/compare/v12.1.4...v12.1.5">12.1.5</a>
(2022-04-11)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>Only supports React &lt; 18 (<a
href="https://snyk.io/redirect/github/testing-library/react-testing-library/issues/1041"
data-hovercard-type="pull_request"
data-hovercard-url="/testing-library/react-testing-library/pull/1041/hovercard">#1041</a>)
(<a
href="https://snyk.io/redirect/github/testing-library/react-testing-library/commit/9e2b5dbb4632799ae38f1341cb79ef35d1bd6652">9e2b5db</a>)</li>
</ul>
      </li>
      <li>
<b>12.1.4</b> - <a
href="https://snyk.io/redirect/github/testing-library/react-testing-library/releases/tag/v12.1.4">2022-03-09</a></br><h2><a
href="https://snyk.io/redirect/github/testing-library/react-testing-library/compare/v12.1.3...v12.1.4">12.1.4</a>
(2022-03-09)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>Match runtime type of baseElement in TypeScript types (<a
href="https://snyk.io/redirect/github/testing-library/react-testing-library/issues/1023"
data-hovercard-type="pull_request"
data-hovercard-url="/testing-library/react-testing-library/pull/1023/hovercard">#1023</a>)
(<a
href="https://snyk.io/redirect/github/testing-library/react-testing-library/commit/96ed8dafa5d02add2168a3da65d1cc0ffe6d6d1f">96ed8da</a>)</li>
</ul>
      </li>
      <li>
<b>12.1.3</b> - <a
href="https://snyk.io/redirect/github/testing-library/react-testing-library/releases/tag/v12.1.3">2022-02-15</a></br><h2><a
href="https://snyk.io/redirect/github/testing-library/react-testing-library/compare/v12.1.2...v12.1.3">12.1.3</a>
(2022-02-15)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>Add <code>@ types/react-dom</code> as a direct dependency (<a
href="https://snyk.io/redirect/github/testing-library/react-testing-library/issues/1001"
data-hovercard-type="pull_request"
data-hovercard-url="/testing-library/react-testing-library/pull/1001/hovercard">#1001</a>)
(<a
href="https://snyk.io/redirect/github/testing-library/react-testing-library/commit/149d9a9af3addeb6c49696867b05b87afe0d0b3c">149d9a9</a>)</li>
</ul>
      </li>
    </ul>
from <a
href="https://snyk.io/redirect/github/testing-library/react-testing-library/releases">@testing-library/react
GitHub release notes</a>
  </details>
</details>


<details>
  <summary><b>Commit messages</b></summary>
  </br>
  <details>
    <summary>Package name: <b>@testing-library/react</b></summary>
    <ul>
<li><a
href="https://snyk.io/redirect/github/testing-library/react-testing-library/commit/646129b59659e2f3509a6fff606a9871b2a68a9c">646129b</a>
chore: Run release from 12.x branch (#1044)</li>
<li><a
href="https://snyk.io/redirect/github/testing-library/react-testing-library/commit/9e2b5dbb4632799ae38f1341cb79ef35d1bd6652">9e2b5db</a>
fix: Only supports React &lt; 18 (#1041)</li>
<li><a
href="https://snyk.io/redirect/github/testing-library/react-testing-library/commit/0c4aabe0da1587754229f7614a2ddfdaddd0b1aa">0c4aabe</a>
chore: Fix failing codesandbox/ci (#1026)</li>
<li><a
href="https://snyk.io/redirect/github/testing-library/react-testing-library/commit/96ed8dafa5d02add2168a3da65d1cc0ffe6d6d1f">96ed8da</a>
fix: Match runtime type of baseElement in TypeScript types (#1023)</li>
    </ul>

<a
href="https://snyk.io/redirect/github/testing-library/react-testing-library/compare/b0f9d9741205c54836bf82b76b86ec001a8c0e1f...646129b59659e2f3509a6fff606a9871b2a68a9c">Compare</a>
  </details>
</details>
<hr/>

**Note:** *You are seeing this because you or someone else with access
to this repository has authorized Snyk to open upgrade PRs.*

For more information: <img
src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiI2ZDcwZTlkNC05OGFjLTRkNDktYjc0Ny1mY2NlMDI4MTBhMjEiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6IjZkNzBlOWQ0LTk4YWMtNGQ0OS1iNzQ3LWZjY2UwMjgxMGEyMSJ9fQ=="
width="0" height="0"/>

🧐 [View latest project
report](https://app.snyk.io/org/sandbox-2ba/project/9043c51f-3f0d-45c6-8455-b658274f2872?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)

🛠 [Adjust upgrade PR
settings](https://app.snyk.io/org/sandbox-2ba/project/9043c51f-3f0d-45c6-8455-b658274f2872/settings/integration?utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr)

🔕 [Ignore this dependency or unsubscribe from future upgrade
PRs](https://app.snyk.io/org/sandbox-2ba/project/9043c51f-3f0d-45c6-8455-b658274f2872/settings/integration?pkg&#x3D;@testing-library/react&amp;utm_source&#x3D;github&amp;utm_medium&#x3D;referral&amp;page&#x3D;upgrade-pr#auto-dep-upgrades)

<!---
(snyk:metadata:{"prId":"6d70e9d4-98ac-4d49-b747-fcce02810a21","prPublicId":"6d70e9d4-98ac-4d49-b747-fcce02810a21","dependencies":[{"name":"@testing-library/react","from":"12.1.3","to":"12.1.5"}],"packageManager":"npm","type":"auto","projectUrl":"https://app.snyk.io/org/sandbox-2ba/project/9043c51f-3f0d-45c6-8455-b658274f2872?utm_source=github&utm_medium=referral&page=upgrade-pr","projectPublicId":"9043c51f-3f0d-45c6-8455-b658274f2872","env":"prod","prType":"upgrade","vulns":[],"issuesToFix":[],"upgrade":[],"upgradeInfo":{"versionsDiff":2,"publishedDate":"2022-04-11T20:14:35.067Z"},"templateVariants":[],"hasFixes":false,"isMajorUpgrade":false,"isBreakingChange":false,"priorityScoreList":[]})
--->

---------

Co-authored-by: snyk-bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released on @alpha released on @12.x released TypeScript Related to TypeScript. Note: only certain maintainers handle TypeScript labeled issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

types: error in the baseElement typings
1 participant