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

string_decoder: Migrate to use internal/errors #14682

Closed

Conversation

starkwang
Copy link
Contributor

@starkwang starkwang commented Aug 8, 2017

Ref: #11273

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

string_decoder

@nodejs-github-bot nodejs-github-bot added the string_decoder Issues and PRs related to the string_decoder subsystem. label Aug 8, 2017
@refack refack self-assigned this Aug 8, 2017
@refack refack added errors Issues and PRs related to JavaScript errors originated in Node.js core. semver-major PRs that contain breaking changes and should be released in the next major version. labels Aug 8, 2017
@refack
Copy link
Contributor

refack commented Aug 8, 2017

@@ -31,7 +32,7 @@ function normalizeEncoding(enc) {
const nenc = internalUtil.normalizeEncoding(enc);
if (typeof nenc !== 'string' &&
(Buffer.isEncoding === isEncoding || !Buffer.isEncoding(enc)))
throw new Error(`Unknown encoding: ${enc}`);
throw new errors.Error('ERR_UNKNOWN_ENCODING', enc);
Copy link
Member

Choose a reason for hiding this comment

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

As this is semver-major anyway it could probably be changed to a TypeError

@starkwang starkwang force-pushed the string-decoder-internal-errors branch from ed34f34 to 660dc96 Compare August 8, 2017 06:21
@refack
Copy link
Contributor

refack commented Aug 8, 2017

ping @nodejs/ctc, needs approval

@mcollina
Copy link
Member

mcollina commented Aug 8, 2017

We ship this in readable-stream as part of http://npm.im/string_decoder. We need the same solution that we will need for the streams.

Can we hold off until that is ready? I would prefer not having to revert too many commits before releasing 9 if that is not ready.

cc @jasnell

@refack refack added blocked PRs that are blocked by other issues or PRs. stream Issues and PRs related to the stream subsystem. labels Aug 8, 2017
@refack
Copy link
Contributor

refack commented Aug 8, 2017

blocked until we have a modular solution for readable-stream

@mcollina mcollina removed the blocked PRs that are blocked by other issues or PRs. label Sep 12, 2017
@mcollina
Copy link
Member

At the latest streams wg we decided to unblock this. We would like this (and the equals for Writable, Duplex and Transform) to ship in Node 9.

Ref: nodejs/readable-stream#309 (comment)

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

LGTM if CI green.

@BridgeAR
Copy link
Member

Landed in eb4940e

@BridgeAR BridgeAR closed this Sep 13, 2017
BridgeAR pushed a commit that referenced this pull request Sep 13, 2017
PR-URL: #14682
Refs: #11273
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
addaleax pushed a commit to addaleax/ayo that referenced this pull request Sep 17, 2017
PR-URL: nodejs/node#14682
Refs: nodejs/node#11273
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Qard pushed a commit to Qard/ayo that referenced this pull request Sep 21, 2017
PR-URL: nodejs/node#14682
Refs: nodejs/node#11273
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
@refack refack removed their assignment Oct 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
errors Issues and PRs related to JavaScript errors originated in Node.js core. semver-major PRs that contain breaking changes and should be released in the next major version. stream Issues and PRs related to the stream subsystem. string_decoder Issues and PRs related to the string_decoder subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants