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

zlib: migrate to internal/errors #15618

Closed
wants to merge 2 commits into from

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Sep 25, 2017

Migrate zlib to use internal/errors

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
Affected core subsystem(s)

zlib, errors

@jasnell jasnell 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 Sep 25, 2017
@nodejs-github-bot nodejs-github-bot added errors Issues and PRs related to JavaScript errors originated in Node.js core. zlib Issues and PRs related to the zlib subsystem. labels Sep 25, 2017
@jasnell
Copy link
Member Author

jasnell commented Sep 25, 2017

@jasnell
Copy link
Member Author

jasnell commented Sep 25, 2017

Ping @nodejs/tsc

Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

LGTM

lib/zlib.js Outdated
`than 0x${kMaxLength.toString(16)} bytes`;
const {
kMaxLength
} = require('buffer');
Copy link
Member

Choose a reason for hiding this comment

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

Nit - buffer is actually required before as well and that could be combined by writing

const { kMaxLength, Buffer } = require('buffer');

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll get to that later but feel free to push a commit if you'd like

@BridgeAR
Copy link
Member

@nodejs/tsc this needs some LGs

Copy link
Member

@mhdawson mhdawson 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 except that its missing adding the tests for the new errors in: test/parallel/test-internal-errors.js

See https://github.com/nodejs/node/blob/master/doc/guides/using-internal-errors.md#testing-new-errorss

@mhdawson
Copy link
Member

mhdawson commented Oct 2, 2017

@jasnell can you add the tests for the new errors which are not constants.

@jasnell
Copy link
Member Author

jasnell commented Oct 2, 2017

@mhdawson, added

@jasnell
Copy link
Member Author

jasnell commented Oct 2, 2017

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

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

lgtm

jasnell added a commit that referenced this pull request Oct 2, 2017
PR-URL: #15618
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
@jasnell
Copy link
Member Author

jasnell commented Oct 2, 2017

Landed in 7489141

@jasnell jasnell closed this Oct 2, 2017
addaleax pushed a commit to addaleax/ayo that referenced this pull request Oct 4, 2017
PR-URL: nodejs/node#15618
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
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. zlib Issues and PRs related to the zlib subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants