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

feat(react): Update stable types for v17 #48971

Merged
merged 13 commits into from Nov 20, 2020

Conversation

eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Oct 20, 2020

Closes #43985

Not including updates for experimental release channel. Goal is to have a minimal update that can be shipped as soon as possible. Experimental release channel handled in #49152

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:

@typescript-bot typescript-bot added this to Needs Author Action in New Pull Request Status Board Oct 20, 2020
@eps1lon eps1lon mentioned this pull request Oct 20, 2020
1 task
@eps1lon eps1lon marked this pull request as ready for review October 20, 2020 23:51
@typescript-bot typescript-bot added Critical package Edits multiple packages Author is Owner The author of this PR is a listed owner of the package. labels Oct 20, 2020
@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in New Pull Request Status Board Oct 20, 2020
@typescript-bot
Copy link
Contributor

typescript-bot commented Oct 20, 2020

@eps1lon Thank you for submitting this PR!

This is a live comment which I will keep updated.

4 packages 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 more than one package

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": 48971,
  "author": "eps1lon",
  "headCommitAbbrOid": "ff3e81e",
  "headCommitOid": "ff3e81ee5146465089131975734ff31c863f4bd8",
  "stalenessInDays": 0,
  "lastPushDate": "2020-11-20T14:36:41.000Z",
  "reopenedDate": "2020-10-20T23:51:51.000Z",
  "lastCommentDate": "2020-11-20T11:38:38.000Z",
  "maintainerBlessed": false,
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "react-dom",
      "kind": "edit",
      "files": [
        {
          "path": "types/react-dom/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react-dom/v16/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react-dom/v16/node-stream/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react-dom/v16/server/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react-dom/v16/test-utils/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react-dom/v16/test/react-dom-tests.tsx",
          "kind": "test"
        },
        {
          "path": "types/react-dom/v16/tsconfig.json",
          "kind": "package-meta",
          "suspect": "not the required form"
        },
        {
          "path": "types/react-dom/v16/tslint.json",
          "kind": "package-meta",
          "suspect": "not the required form"
        }
      ],
      "owners": [
        "MartynasZilinskas",
        "theruther4d",
        "Jessidhia"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    },
    {
      "name": "react-is",
      "kind": "edit",
      "files": [
        {
          "path": "types/react-is/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react-is/v16/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react-is/v16/react-is-tests.tsx",
          "kind": "test"
        },
        {
          "path": "types/react-is/v16/tsconfig.json",
          "kind": "package-meta",
          "suspect": "not the required form"
        },
        {
          "path": "types/react-is/v16/tslint.json",
          "kind": "package-meta-ok"
        }
      ],
      "owners": [
        "AviVahl",
        "christianchown",
        "eps1lon"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Popular"
    },
    {
      "name": "react-test-renderer",
      "kind": "edit",
      "files": [
        {
          "path": "types/react-test-renderer/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react-test-renderer/v16/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react-test-renderer/v16/react-test-renderer-tests.ts",
          "kind": "test"
        },
        {
          "path": "types/react-test-renderer/v16/shallow/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react-test-renderer/v16/tsconfig.json",
          "kind": "package-meta",
          "suspect": "not the required form"
        },
        {
          "path": "types/react-test-renderer/v16/tslint.json",
          "kind": "package-meta",
          "suspect": "not the required form"
        }
      ],
      "owners": [
        "arvitaly",
        "lochbrunner",
        "johnnyreilly",
        "jgoz",
        "Jessidhia",
        "maddhruv"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    },
    {
      "name": "react",
      "kind": "edit",
      "files": [
        {
          "path": "types/react/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react/test/elementAttributes.tsx",
          "kind": "test"
        },
        {
          "path": "types/react/v16/OTHER_FILES.txt",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/react/v16/global.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react/v16/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react/v16/jsx-dev-runtime.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react/v16/jsx-runtime.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react/v16/test/cssProperties.tsx",
          "kind": "test"
        },
        {
          "path": "types/react/v16/test/elementAttributes.tsx",
          "kind": "test"
        },
        {
          "path": "types/react/v16/test/hooks.tsx",
          "kind": "test"
        },
        {
          "path": "types/react/v16/test/index.ts",
          "kind": "test"
        },
        {
          "path": "types/react/v16/test/managedAttributes.tsx",
          "kind": "test"
        },
        {
          "path": "types/react/v16/test/tsx.tsx",
          "kind": "test"
        },
        {
          "path": "types/react/v16/tsconfig.json",
          "kind": "package-meta",
          "suspect": "not the required form"
        },
        {
          "path": "types/react/v16/tslint.json",
          "kind": "package-meta",
          "suspect": "not the required form"
        }
      ],
      "owners": [
        "johnnyreilly",
        "bbenezech",
        "pzavolinsky",
        "digiguru",
        "ericanderson",
        "DovydasNavickas",
        "theruther4d",
        "guilhermehubner",
        "ferdaber",
        "jrakotoharisoa",
        "pascaloliv",
        "hotell",
        "franklixuefei",
        "Jessidhia",
        "saranshkataria",
        "lukyth",
        "eps1lon",
        "zieka",
        "dancerphil",
        "dimitropoulos",
        "disjukr",
        "vhfmag",
        "hellatan"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "ferdaber",
      "date": "2020-11-20T16:49:12.000Z",
      "isMaintainer": false
    },
    {
      "type": "stale",
      "reviewer": "Andarist",
      "date": "2020-11-20T11:24:15.000Z",
      "abbrOid": "87585b4"
    },
    {
      "type": "stale",
      "reviewer": "n1ru4l",
      "date": "2020-11-20T10:08:12.000Z",
      "abbrOid": "df6978a"
    },
    {
      "type": "stale",
      "reviewer": "maraisr",
      "date": "2020-10-24T04:47:45.000Z",
      "abbrOid": "3d3fb93"
    }
  ],
  "ciResult": "pass"
}

@typescript-bot
Copy link
Contributor

@danger-public
Copy link

danger-public commented Oct 20, 2020

Inspecting the JavaScript source for this package found some properties that are not in the .d.ts files.
The check for missing properties isn't always right, so take this list as advice, not a requirement.

react-dom (unpkg)

was missing the following properties:

  1. flushSync
  2. unstable_createPortal
  3. flushSync
  4. unstable_createPortal

react-is (unpkg)

was missing the following properties:

  1. isConcurrentMode
  2. isConcurrentMode
  3. isConcurrentMode

react-test-renderer (unpkg)

was missing the following properties:

  1. unstable_batchedUpdates
  2. unstable_concurrentAct

Generated by 🚫 dangerJS against ff3e81e

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board Oct 20, 2020
@eps1lon
Copy link
Collaborator Author

eps1lon commented Oct 21, 2020

Looks like there's just too much to benchmark.

@dispix
Copy link

dispix commented Oct 27, 2020

I think this PR should take the time to fix a long running issue with the FC type: #40993

Having an optional children by default doesn't make sense but since it's a breaking change, we could remove it in this PR while respecting semver.

@eps1lon
Copy link
Collaborator Author

eps1lon commented Oct 27, 2020

I think this PR should take the time to fix a long running issue with the FC type: #40993

Having an optional children by default doesn't make sense but since it's a breaking change, removing it in this PR would make sense.

We've discussed this in #46691 and decided to postpone any type related breaking change to v18 because React core members specifically asked us not to. If you disagree please continue the discussion in the issue.

@dispix
Copy link

dispix commented Oct 27, 2020

I think this PR should take the time to fix a long running issue with the FC type: #40993
Having an optional children by default doesn't make sense but since it's a breaking change, removing it in this PR would make sense.

We've discussed this in #46691 and decided to postpone any type related breaking change to v18 because React core members specifically asked us not to. If you disagree please continue the discussion in the issue.

Oh, I missed that one but that makes sense. Thanks for the info 👍

@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Code Reviews in New Pull Request Status Board Oct 27, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board Oct 27, 2020
@eps1lon
Copy link
Collaborator Author

eps1lon commented Nov 20, 2020

His intentions were good

I never assume something else. What matters is the impact.

He could also not be fully aware of all the implications of his actions on the automated process.

Now he is. We'll see if this changes his actions.

bashing him like this is not helpful

If that was bashing then how is bashing me helpful?

Anyway, I don't see an issue as the bot clearly mentions you can just dismiss it?

Collaborators can which I'm not.

Honestly, I think this behaviour of blaming is pretty toxic and will scare people away from making meaningful contributions...

Considering you had no problem coming in and requesting changes I don't see how you're easily scared. Just open an issue, explain your problem and we go from there. But demanding a certain implementation is certainly the more toxic behavior.

@Andarist
Copy link
Contributor

If that was bashing then how is bashing me helpful?

I was trying to stand up for a fellow OSS contributor - because I think he had more right here and I didn't want to stay silent about this. Just trying to bring my 2 cents here so you could maybe see an alternative perspective and reconsider if how you have handled this was appropriate or not.

If you have considered the words used by me as bashing to you, please take my sincere apologies. I'm not a native speaker so choosing the appropriate, polite, wording is not my strongest suit. My intention was not to bash you but to stand up for @n1ru4l .

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board Nov 20, 2020
@typescript-bot
Copy link
Contributor

@Andarist, @n1ru4l, @maraisr Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

@eps1lon
Copy link
Collaborator Author

eps1lon commented Nov 20, 2020

I definitely assumed knowledge about the contribution workflow. It seemed patronizing to explain what "request changes" means in GitHub. I'll explain this the next time so that we're on the same level. Sorry about that @n1ru4l. I hope this doesn't stop you from opening issues or commenting on PRs in the future. In my particular github "cultural-bubble" it's generally considered rude to approve/reject PRs targeting code that you do not maintain. So if we accuse each other of toxicity we should consider these different backgrounds.

Copy link
Contributor

@ferdaber ferdaber left a comment

Choose a reason for hiding this comment

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

This looks good. We would need to merge in the latest changes in master to get jsx runtime running for the older versions so hopefully no big merge conflicts 🤞

@typescript-bot typescript-bot added the Has Merge Conflict This PR can't be merged because it has a merge conflict. The author needs to update it. label Nov 20, 2020
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Needs Author Action in New Pull Request Status Board Nov 20, 2020
@typescript-bot
Copy link
Contributor

@eps1lon Unfortunately, this pull request currently has a merge conflict 😥. Please update your PR branch to be up-to-date with respect to master. Have a nice day!

@typescript-bot typescript-bot removed the Has Merge Conflict This PR can't be merged because it has a merge conflict. The author needs to update it. label Nov 20, 2020
@typescript-bot typescript-bot moved this from Needs Author Action to Needs Maintainer Review in New Pull Request Status Board Nov 20, 2020
@typescript-bot
Copy link
Contributor

@ferdaber, @Andarist, @n1ru4l, @maraisr Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

@johnnyreilly johnnyreilly merged commit 09d10b6 into DefinitelyTyped:master Nov 20, 2020
@typescript-bot typescript-bot removed this from Needs Maintainer Review in New Pull Request Status Board Nov 20, 2020
@eps1lon eps1lon deleted the feat/react-17 branch November 20, 2020 21:36
@typescript-bot
Copy link
Contributor

I just published @types/react@17.0.0 to npm.

@typescript-bot
Copy link
Contributor

I just published @types/react@16.14.1 to npm.

@typescript-bot
Copy link
Contributor

I just published @types/react-dom@17.0.0 to npm.

@typescript-bot
Copy link
Contributor

I just published @types/react-dom@16.9.10 to npm.

@typescript-bot
Copy link
Contributor

I just published @types/react-is@17.0.0 to npm.

@typescript-bot
Copy link
Contributor

I just published @types/react-is@16.7.2 to npm.

@typescript-bot
Copy link
Contributor

I just published @types/react-test-renderer@17.0.0 to npm.

@typescript-bot
Copy link
Contributor

I just published @types/react-test-renderer@16.9.4 to npm.

owenlow pushed a commit to owenlow/DefinitelyTyped that referenced this pull request Dec 8, 2020
* feat(react): Update stable types for v17

* Fix new lint rules

* Add v16 types

* fix malformed json

* fix baseUrl

* Add globals to v16

* Remove experimental tests

* add v16 shallow renderer

* Add MVP for new jsx runtime

* Just expose the namespace
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 Edits multiple packages Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[@types/react] add enterkeyhint attribute to input and textarea
10 participants