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-dom] Remove /node-stream entrypoint #59747

Conversation

eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Apr 7, 2022

This entrypoint was added in #18493 which was during the 16 beta time. It was then accidentally included in the v15 fork.

The entrypoint never made it to stable releases. Instead, renderToStream got introduced as renderToNodeStream in react-dom/server and renderToStaticStream got introduced as renderToStaticNodeStream in react-dom/server

https://unpkg.com/browse/react-dom@15.0.0/ -> https://unpkg.com/browse/react@15.0.0/lib/ReactDOMServer.js (no streaming related APIs)
https://unpkg.com/browse/react-dom@16.0.0/ -> https://unpkg.com/browse/react-dom@16.0.0/cjs/react-dom-server.node.development.js (check the ReactDOMServerNodeEntry)
https://unpkg.com/browse/react-dom@17.0.0/ -> https://unpkg.com/browse/react-dom@17.0.0/cjs/react-dom-server.node.development.js (check the exports.* entries)

@typescript-bot typescript-bot added this to Needs Author Action in New Pull Request Status Board Apr 7, 2022
@eps1lon eps1lon mentioned this pull request Apr 7, 2022
6 tasks
@eps1lon eps1lon marked this pull request as ready for review April 7, 2022 18:44
@eps1lon eps1lon requested a review from Jessidhia as a code owner April 7, 2022 18:44
@typescript-bot
Copy link
Contributor

typescript-bot commented Apr 7, 2022

@eps1lon 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": 59747,
  "author": "eps1lon",
  "headCommitOid": "8af38daa0ff0e51727490a9131090f6aa50d3c8f",
  "mergeBaseOid": "874cc2c78ac01b0c7c32bddef4d660d2bf71bc5b",
  "lastPushDate": "2022-04-25T07:00:51.000Z",
  "lastActivityDate": "2022-04-25T17:17:55.000Z",
  "mergeOfferDate": "2022-04-25T16:40:06.000Z",
  "mergeRequestDate": "2022-04-25T17:17:55.000Z",
  "mergeRequestUser": "eps1lon",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "react-dom",
      "kind": "edit",
      "files": [
        {
          "path": "types/react-dom/v15/node-stream/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react-dom/v15/react-dom-tests.ts",
          "kind": "test"
        },
        {
          "path": "types/react-dom/v16/node-stream/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react-dom/v16/test/react-dom-tests.tsx",
          "kind": "test"
        },
        {
          "path": "types/react-dom/v17/node-stream/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react-dom/v17/test/react-dom-tests.tsx",
          "kind": "test"
        }
      ],
      "owners": [
        "MartynasZilinskas",
        "theruther4d",
        "Jessidhia",
        "eps1lon"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "jakebailey",
      "date": "2022-04-25T16:39:25.000Z",
      "isMaintainer": true
    }
  ],
  "mainBotCommentID": 1092085159,
  "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 Apr 7, 2022
@typescript-bot
Copy link
Contributor

🔔 @MartynasZilinskas @theruther4d @Jessidhia — 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.

@typescript-bot typescript-bot moved this from Needs Author Action to Needs Maintainer Review in New Pull Request Status Board Apr 7, 2022
@jakebailey
Copy link
Member

I poked around the react repo and it looks like these were added in facebook/react#10024 for v16 then renamed in facebook/react#10425 and already exist as top level server functions renderToNodeStream and renderToStaticNodeStream. They appear to "exist" on the browser DOM too but give an error. Not sure what the policy is on that but this PR seems correct to me. (I'll wait for another reviewer to say something otherwise before approving, though.)

@eps1lon
Copy link
Collaborator Author

eps1lon commented Apr 13, 2022

Ah they were moved to react-dom/server. Let me fix that.

@eps1lon eps1lon marked this pull request as draft April 13, 2022 20:19
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Needs Author Action in New Pull Request Status Board Apr 13, 2022
@eps1lon eps1lon changed the title [react-dom] Remove /node-stream entrypoint from v15 onwards [react-dom] Remove /node-stream entrypoint Apr 25, 2022
@eps1lon eps1lon force-pushed the fix/react-dom/node-stream-entrypoint branch from 75134f2 to 8af38da Compare April 25, 2022 07:00
@eps1lon eps1lon marked this pull request as ready for review April 25, 2022 07:11
@eps1lon
Copy link
Collaborator Author

eps1lon commented Apr 25, 2022

@jakebailey Thanks for catching this! Updated the v16 and v17 tests instead of just removing the /node-stream tests. The /server entrypoint for 16 and 17 already had the appropriate types for streaming APIs.

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

@eps1lon: Everything looks good here. I am ready to merge this PR (at 8af38da) 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! ❤️

(@MartynasZilinskas, @theruther4d, @Jessidhia: you can do this too.)

@eps1lon
Copy link
Collaborator Author

eps1lon commented Apr 25, 2022

Ready to merge

@typescript-bot typescript-bot moved this from Waiting for Author to Merge to Recently Merged in New Pull Request Status Board Apr 25, 2022
@typescript-bot typescript-bot merged commit 401428d into DefinitelyTyped:master Apr 25, 2022
@eps1lon eps1lon deleted the fix/react-dom/node-stream-entrypoint branch April 25, 2022 17:20
@typescript-bot typescript-bot removed this from Recently Merged in New Pull Request Status Board Apr 26, 2022
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

3 participants