FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

http2: add constant to already destructured constants by dnalborczyk · Pull Request #28176 · nodejs/node · GitHub

/ node Public

http2: add constant to already destructured constants - #28176

Closed
dnalborczyk wants to merge 2 commits into
nodejs:masterfrom
dnalborczyk:destruct
Closed

http2: add constant to already destructured constants#28176
dnalborczyk wants to merge 2 commits into
nodejs:masterfrom
dnalborczyk:destruct

Conversation

Copy link
Copy Markdown
Contributor

add constant to already destructured constants and while we're at it, destructure Readable and constants as well, remove binding.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

nodejs-github-bot added the http2 Issues or PRs related to the http2 subsystem. label Jun 11, 2019
Comment thread lib/internal/http2/compat.js Outdated
const Readable = Stream.Readable;
const binding = internalBinding('http2');
const constants = binding.constants;
const { Readable } = Stream;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
Suggested change
const { Readable } = Stream;
const { Readable } = require('stream');

dnalborczyk Jun 11, 2019
edited
Loading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

thing is that Http2ServerResponse extends from Stream below, so we need a Stream reference as well. if we could use ES6 modules internally, I'd use a 'default', and a 'named import': import Stream, { Readable } from ....

@@ -4,9 +4,8 @@ const { Object, ObjectPrototype, Reflect } = primordials;

const assert = require('internal/assert');
const Stream = require('stream');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
Suggested change
const Stream = require('stream');

BridgeAR commented Jul 5, 2019

Copy link
Copy Markdown
Member

I am not a huge fan of changes like these. They do not seem to bring much benefit but I won't block this either.

BridgeAR added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Jul 5, 2019

This comment has been minimized.

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Trott commented Jul 30, 2019

Copy link
Copy Markdown
Member

Landed in 3a9cb5c...b04de23

Trott closed this Jul 30, 2019
Trott pushed a commit to Trott/io.js that referenced this pull request Jul 30, 2019
PR-URL: nodejs#28176
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Trott pushed a commit to Trott/io.js that referenced this pull request Jul 30, 2019
PR-URL: nodejs#28176
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit that referenced this pull request Aug 2, 2019
PR-URL: #28176
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit that referenced this pull request Aug 2, 2019
PR-URL: #28176
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
dnalborczyk deleted the destruct branch May 21, 2020 04:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. http2 Issues or PRs related to the http2 subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants


Back | FazBrowse Home | New Git URL