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

[react] [react-dom] Add unstable prefix to experimental APIs #44564

Merged
merged 2 commits into from May 11, 2020
Merged

[react] [react-dom] Add unstable prefix to experimental APIs #44564

merged 2 commits into from May 11, 2020

Conversation

leonardodino
Copy link
Contributor

@leonardodino leonardodino commented May 8, 2020

updates existing experimental.d.ts types to match recent changes to prefixes.

PR: facebook/react#18825


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.)
  • 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: Add unstable prefix to experimental APIs facebook/react#18825
  • 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.

@typescript-bot
Copy link
Contributor

typescript-bot commented May 8, 2020

@leonardodino Thank you for submitting 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
  • ✅ Only a DT maintainer can merge changes without tests

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": 44564,
  "author": "leonardodino",
  "owners": [
    "MartynasZilinskas",
    "theruther4d",
    "Jessidhia",
    "johnnyreilly",
    "bbenezech",
    "pzavolinsky",
    "digiguru",
    "ericanderson",
    "DovydasNavickas",
    "guilhermehubner",
    "ferdaber",
    "jrakotoharisoa",
    "pascaloliv",
    "hotell",
    "franklixuefei",
    "saranshkataria",
    "lukyth",
    "eps1lon",
    "zieka",
    "dancerphil",
    "dimitropoulos",
    "disjukr",
    "vhfmag"
  ],
  "dangerLevel": "MultiplePackagesEdited",
  "headCommitAbbrOid": "dce5b2b",
  "headCommitOid": "dce5b2b992d2bc2d5a92bc89ca7f1f2aa859f4db",
  "mergeIsRequested": false,
  "stalenessInDays": 2,
  "lastCommitDate": "2020-05-08T04:33:38.000Z",
  "lastCommentDate": "2020-05-08T07:27:52.000Z",
  "reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/44564/files",
  "hasMergeConflict": false,
  "authorIsOwner": false,
  "isFirstContribution": false,
  "popularityLevel": "Critical",
  "anyPackageIsNew": false,
  "packages": [
    "react-dom",
    "react"
  ],
  "files": [
    {
      "filePath": "types/react-dom/experimental.d.ts",
      "kind": "definition",
      "package": "react-dom"
    },
    {
      "filePath": "types/react-dom/test/experimental-tests.tsx",
      "kind": "test",
      "package": "react-dom"
    },
    {
      "filePath": "types/react/experimental.d.ts",
      "kind": "definition",
      "package": "react"
    },
    {
      "filePath": "types/react/test/experimental.tsx",
      "kind": "test",
      "package": "react"
    }
  ],
  "hasDismissedReview": false,
  "travisResult": "fail",
  "travisUrl": "https://travis-ci.org/github/DefinitelyTyped/DefinitelyTyped/builds/684543487?utm_source=github_status&utm_medium=notification",
  "lastReviewDate": "2020-05-11T01:20:19.000Z",
  "reviewersWithStaleReviews": [],
  "approvalFlags": 7,
  "isChangesRequested": false
}

@typescript-bot
Copy link
Contributor

@typescript-bot typescript-bot moved this from Other to Waiting for Code Reviews in New Pull Request Status Board May 8, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Author Action in New Pull Request Status Board May 8, 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?

react-dom/v*

Comparison details for react-dom/* 📊
master #44564 diff
Batch compilation
Memory usage (MiB) 109.4 112.0 +2.4%
Type count 24825 24825 0%
Assignability cache size 69318 69318 0%
Language service
Samples taken 434 434 0%
Identifiers in tests 434 434 0%
getCompletionsAtPosition
    Mean duration (ms) 560.5 554.7 -1.0%
    Mean CV 8.8% 8.8%
    Worst duration (ms) 733.2 763.8 +4.2%
    Worst identifier TestComponent rootElement
getQuickInfoAtPosition
    Mean duration (ms) 555.3 547.7 -1.4%
    Mean CV 8.4% 8.1% -3.4%
    Worst duration (ms) 728.2 728.1 0.0%
    Worst identifier createElement createElement

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

react/v*

Comparison details for react/* 📊
master #44564 diff
Batch compilation
Memory usage (MiB) 120.7 121.3 +0.6%
Type count 41436 41436 0%
Assignability cache size 64480 64480 0%
Language service
Samples taken 2236 2236 0%
Identifiers in tests 2764 2764 0%
getCompletionsAtPosition
    Mean duration (ms) 360.0 360.4 +0.1%
    Mean CV 7.6% 7.5%
    Worst duration (ms) 2386.6 2352.7 -1.4%
    Worst identifier memoized4Ref memoized4Ref
getQuickInfoAtPosition
    Mean duration (ms) 355.8 356.0 +0.1%
    Mean CV 7.4% 7.4% -0.2%
    Worst duration (ms) 1974.6 1895.7 -4.0%
    Worst identifier ref ref

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 May 8, 2020
@typescript-bot typescript-bot added the Other Approved This PR was reviewed and signed-off by a community member. label May 8, 2020
@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label May 8, 2020
Copy link
Contributor

@dimitropoulos dimitropoulos left a comment

Choose a reason for hiding this comment

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

good catch, thanks!

Copy link
Member

@Jessidhia Jessidhia left a comment

Choose a reason for hiding this comment

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

This sounds like a bug in the test runner:

Error in react-bootstrap/undefined
Error: ENOENT: no such file or directory, open '/home/travis/build/DefinitelyTyped/DefinitelyTyped/types/react-bootstrap/undefined/index.d.ts'

The other test failures are unrelated to the changes.

The changes are already available on the npm experimental tag

@Jessidhia Jessidhia merged commit 7ec0183 into DefinitelyTyped:master May 11, 2020
@typescript-bot typescript-bot removed this from Needs Author Action in New Pull Request Status Board May 11, 2020
@typescript-bot
Copy link
Contributor

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

@typescript-bot
Copy link
Contributor

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

@leonardodino leonardodino deleted the experimental-react branch May 11, 2020 10:14
andreialecu pushed a commit to andreialecu/DefinitelyTyped that referenced this pull request May 12, 2020
…nitelyTyped#44564)

* [react] Add unstable prefix to experimental APIs

* [react-dom] Add unstable prefix to experimental APIs
smmoosavi added a commit to kgolezardi/Performance-Review-Web that referenced this pull request May 17, 2020
jjballano-qatium pushed a commit to jjballano-qatium/DefinitelyTyped that referenced this pull request Jun 16, 2020
…nitelyTyped#44564)

* [react] Add unstable prefix to experimental APIs

* [react-dom] Add unstable prefix to experimental APIs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Critical package Maintainer Approved Other Approved This PR was reviewed and signed-off by a community member. Owner Approved A listed owner of this package signed off on the pull request. 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.

None yet

6 participants