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

util: use a shared symbol for util.inspect.custom #20857

Closed
wants to merge 12 commits into
base: master
from

Conversation

@chocolateboy
Contributor

chocolateboy commented May 20, 2018

Define util.inspect.custom as:

Symbol.for("util.inspect.custom")

rather than:

Symbol("util.inspect.custom")

This allows util.inspect hooks to easily/safely be defined in non-Node.js environments.

The old symbol and the new symbol stringify to the same value, so much of the test code remains the same.

Fixes: #20821

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
Show outdated Hide outdated doc/api/util.md
Show outdated Hide outdated doc/api/util.md
@BridgeAR

This comment has been minimized.

Show comment
Hide comment
@BridgeAR

BridgeAR May 20, 2018

Member

@chocolateboy thanks a lot for working on this! 👍

Member

BridgeAR commented May 20, 2018

@chocolateboy thanks a lot for working on this! 👍

@devsnek

This comment has been minimized.

Show comment
Hide comment
@devsnek

devsnek May 20, 2018

Member

i think we should namespace any global symbols we create with node, otherwise looks good

Member

devsnek commented May 20, 2018

i think we should namespace any global symbols we create with node, otherwise looks good

@chocolateboy

This comment has been minimized.

Show comment
Hide comment
@chocolateboy

chocolateboy May 20, 2018

Contributor

i think we should namespace any global symbols we create with node

I agree, but I think that should be addressed in a separate issue as there are other symbols which would also need to be updated e.g. util.promisify.custom.

Contributor

chocolateboy commented May 20, 2018

i think we should namespace any global symbols we create with node

I agree, but I think that should be addressed in a separate issue as there are other symbols which would also need to be updated e.g. util.promisify.custom.

Show outdated Hide outdated doc/api/util.md
@BridgeAR

This comment has been minimized.

Show comment
Hide comment
@BridgeAR

BridgeAR May 20, 2018

Member

@chocolateboy you mean because the name would change for the symbol?

Member

BridgeAR commented May 20, 2018

@chocolateboy you mean because the name would change for the symbol?

@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell May 20, 2018

Member

Marking semver-major because this impacts the global symbol namespace.

Member

jasnell commented May 20, 2018

Marking semver-major because this impacts the global symbol namespace.

@BridgeAR

This comment has been minimized.

Show comment
Hide comment
@BridgeAR

BridgeAR May 20, 2018

Member

If we handle this as semver-major, we should be fine to change the symbol name to node:util.inspect.custom right away.

I think it would really be good if this could be backported though... so I wonder if we should really handle this as semver-major.

Member

BridgeAR commented May 20, 2018

If we handle this as semver-major, we should be fine to change the symbol name to node:util.inspect.custom right away.

I think it would really be good if this could be backported though... so I wonder if we should really handle this as semver-major.

@mscdex

This comment has been minimized.

Show comment
Hide comment
@mscdex

mscdex May 20, 2018

Contributor

That last checkbox shouldn't be ticked, the commit messages don't follow the commit message guidelines.

Contributor

mscdex commented May 20, 2018

That last checkbox shouldn't be ticked, the commit messages don't follow the commit message guidelines.

@addaleax

Changes to lib/ and test/ look good :)

Show outdated Hide outdated doc/api/util.md
Show outdated Hide outdated doc/api/util.md
@BridgeAR

This comment has been minimized.

Show comment
Hide comment
@BridgeAR

BridgeAR May 20, 2018

Member

@mscdex the first commit message does follow the commit guidlines. The others are not but it would be squashed anyway.

Member

BridgeAR commented May 20, 2018

@mscdex the first commit message does follow the commit guidlines. The others are not but it would be squashed anyway.

@chocolateboy

This comment has been minimized.

Show comment
Hide comment
@chocolateboy

chocolateboy May 20, 2018

Contributor

@mscdex

the commit messages don't follow the commit message guidelines.

Is this an issue with the follow-up commits or the first commit?

I can't see anything here about the format of commit messages for review/feedback fixes. I assumed they would be squashed:

Note that multiple commits often get squashed when they are landed

Contributor

chocolateboy commented May 20, 2018

@mscdex

the commit messages don't follow the commit message guidelines.

Is this an issue with the follow-up commits or the first commit?

I can't see anything here about the format of commit messages for review/feedback fixes. I assumed they would be squashed:

Note that multiple commits often get squashed when they are landed

@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell May 20, 2018

Member

so I wonder if we should really handle this as semver-major

Yes, it should be semver-major.

Any uses of the new symbol would fail on LTS release lines. And if backported, there'd be a breaking difference between releases in the same LTS line

Member

jasnell commented May 20, 2018

so I wonder if we should really handle this as semver-major

Yes, it should be semver-major.

Any uses of the new symbol would fail on LTS release lines. And if backported, there'd be a breaking difference between releases in the same LTS line

Show outdated Hide outdated doc/api/util.md
Show outdated Hide outdated doc/api/util.md
Show outdated Hide outdated doc/api/util.md
@addaleax

This comment has been minimized.

Show comment
Hide comment
@addaleax

addaleax May 20, 2018

Member

@jasnell Can you give an example of code that would that would be broken by backporting this to older release lines? I can’t seem to think of anything.

Member

addaleax commented May 20, 2018

@jasnell Can you give an example of code that would that would be broken by backporting this to older release lines? I can’t seem to think of anything.

Show outdated Hide outdated doc/api/util.md
@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell May 21, 2018

Member

@jasnell Can you give an example of code that would that would be broken by backporting this to older release lines? I can’t seem to think of anything.

I should have said potentially breaking. Marking as major is defensive given that this consumes a symbol from the global namespace. Just need a demonstration that a backport wouldn't break. A good CITGM run should be enough if any of the modules there use the current exported symbol.

Keep in mind, however, that any code written to use the Symbol.for rather than the exported symbol won't work in current release lines. So a note should be added to that effect.

Member

jasnell commented May 21, 2018

@jasnell Can you give an example of code that would that would be broken by backporting this to older release lines? I can’t seem to think of anything.

I should have said potentially breaking. Marking as major is defensive given that this consumes a symbol from the global namespace. Just need a demonstration that a backport wouldn't break. A good CITGM run should be enough if any of the modules there use the current exported symbol.

Keep in mind, however, that any code written to use the Symbol.for rather than the exported symbol won't work in current release lines. So a note should be added to that effect.

Show outdated Hide outdated test/parallel/test-util-inspect.js
@TimothyGu

This comment has been minimized.

Show comment
Hide comment
@TimothyGu

TimothyGu May 21, 2018

Member

I also think we should namespace the symbol to node:.

Member

TimothyGu commented May 21, 2018

I also think we should namespace the symbol to node:.

@devsnek

the symbol needs to be namespaced to node somehow

@addaleax

This comment has been minimized.

Show comment
Hide comment
@addaleax

addaleax May 21, 2018

Member

@nodejs/tsc Can you take a look at this? I think namespacing with node is not a good idea. (i.e. I’m -1 on namespacing to node unless we have a good reason.)

It would be a different story if this was actually about a Node.js-specific concept, but as I understand it the whole point here is to enable libraries to have isomorphic support for this feature in browsers. It’s not like the idea of inspecting JS objects is tied to Node in any way.

(Also /cc @mafintosh whose https://github.com/mafintosh/inspect-custom-symbol package already uses Symbol.for('util.inspect.custom').)

Member

addaleax commented May 21, 2018

@nodejs/tsc Can you take a look at this? I think namespacing with node is not a good idea. (i.e. I’m -1 on namespacing to node unless we have a good reason.)

It would be a different story if this was actually about a Node.js-specific concept, but as I understand it the whole point here is to enable libraries to have isomorphic support for this feature in browsers. It’s not like the idea of inspecting JS objects is tied to Node in any way.

(Also /cc @mafintosh whose https://github.com/mafintosh/inspect-custom-symbol package already uses Symbol.for('util.inspect.custom').)

@devsnek

This comment has been minimized.

Show comment
Hide comment
@devsnek

devsnek May 21, 2018

Member

@addaleax

It would be a different story if this was actually about a Node.js-specific concept

util.inspect is super duper node centric though. what browser mechanism matches it such that we shouldn't namespace this symbol?

Member

devsnek commented May 21, 2018

@addaleax

It would be a different story if this was actually about a Node.js-specific concept

util.inspect is super duper node centric though. what browser mechanism matches it such that we shouldn't namespace this symbol?

@addaleax

This comment has been minimized.

Show comment
Hide comment
@addaleax

addaleax May 21, 2018

Member

It would be a different story if this was actually about a Node.js-specific concept

util.inspect is super duper node centric though.

I mean, yes, our implementation is, but the API conceptually isn’t; and this is modifying a part of the API, not the implementation.

what browser mechanism matches it such that we shouldn't namespace this symbol?

None (and I wouldn’t expect built-in support in browsers either) – what I was trying to say is that this is a missing puzzle piece for people who want to provide a matching library for browsers.

Member

addaleax commented May 21, 2018

It would be a different story if this was actually about a Node.js-specific concept

util.inspect is super duper node centric though.

I mean, yes, our implementation is, but the API conceptually isn’t; and this is modifying a part of the API, not the implementation.

what browser mechanism matches it such that we shouldn't namespace this symbol?

None (and I wouldn’t expect built-in support in browsers either) – what I was trying to say is that this is a missing puzzle piece for people who want to provide a matching library for browsers.

@mcollina

This comment has been minimized.

Show comment
Hide comment
@mcollina

mcollina May 21, 2018

Member

I'm +1 on this being semver-minor because:

> Symbol('util.custom.inspect').toString() === Symbol.for('util.custom.inspect').toString()
true

IMHO we should really discuss a policy for symbols. I might be ok if we want to namespace all of them, and maybe document them all in a single place. Namespacing only one does not resonate with me.

I think we should release it as a minor in 10, and see if there are actual breakages and bake it for LTS for a bit.

Member

mcollina commented May 21, 2018

I'm +1 on this being semver-minor because:

> Symbol('util.custom.inspect').toString() === Symbol.for('util.custom.inspect').toString()
true

IMHO we should really discuss a policy for symbols. I might be ok if we want to namespace all of them, and maybe document them all in a single place. Namespacing only one does not resonate with me.

I think we should release it as a minor in 10, and see if there are actual breakages and bake it for LTS for a bit.

@devsnek

This comment has been minimized.

Show comment
Hide comment
@devsnek

devsnek May 21, 2018

Member

what I was trying to say is that this is a missing puzzle piece for people who want to provide a matching library for browsers.

perhaps thats where the miscommunication lies, i wouldn't encourage the community to standardise object inspection around this symbol, unless we name it something a lot more generic (Symbol.for('custom inspect') or something) and even then i wouldn't seek this out as a connection between the ecosystems.

Member

devsnek commented May 21, 2018

what I was trying to say is that this is a missing puzzle piece for people who want to provide a matching library for browsers.

perhaps thats where the miscommunication lies, i wouldn't encourage the community to standardise object inspection around this symbol, unless we name it something a lot more generic (Symbol.for('custom inspect') or something) and even then i wouldn't seek this out as a connection between the ecosystems.

@addaleax

This comment has been minimized.

Show comment
Hide comment
@addaleax

addaleax May 21, 2018

Member

@devsnek I am a bit torn between what you’re suggesting and @mcollina’s comment – being more generic seems fine to me, but I could see how that change might more realistically break somebody’s code than the current version of this patch.

Member

addaleax commented May 21, 2018

@devsnek I am a bit torn between what you’re suggesting and @mcollina’s comment – being more generic seems fine to me, but I could see how that change might more realistically break somebody’s code than the current version of this patch.

@targos targos closed this Sep 15, 2018

targos added a commit that referenced this pull request Sep 15, 2018

util: use a shared symbol for util.inspect.custom
Define `util.inspect.custom` as
`Symbol.for("nodejs.util.inspect.custom")` rather than
`Symbol("util.inspect.custom")`. This allows `inspect` hooks to
easily/safely be defined in non-Node.js environments.

Fixes: #20821
Refs: #22684

PR-URL: #20857
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
@targos

This comment has been minimized.

Show comment
Hide comment
@targos

targos Sep 17, 2018

Member

This will need a manual backport to land on v10.x-staging.

Member

targos commented Sep 17, 2018

This will need a manual backport to land on v10.x-staging.

@targos targos removed their assignment Sep 18, 2018

@targos targos added this to Backport requested in v10.x Sep 23, 2018

targos added a commit to targos/node that referenced this pull request Sep 23, 2018

util: use a shared symbol for util.inspect.custom
Define `util.inspect.custom` as
`Symbol.for("nodejs.util.inspect.custom")` rather than
`Symbol("util.inspect.custom")`. This allows `inspect` hooks to
easily/safely be defined in non-Node.js environments.

Fixes: nodejs#20821
Refs: nodejs#22684

PR-URL: nodejs#20857
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>

@targos targos referenced this pull request Sep 23, 2018

Closed

[v10.x] Backport util PRs #23039

targos added a commit that referenced this pull request Sep 24, 2018

util: use a shared symbol for util.inspect.custom
Define `util.inspect.custom` as
`Symbol.for("nodejs.util.inspect.custom")` rather than
`Symbol("util.inspect.custom")`. This allows `inspect` hooks to
easily/safely be defined in non-Node.js environments.

Fixes: #20821
Refs: #22684

Backport-PR-URL: #23039
PR-URL: #20857
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>

@targos targos moved this from Backport requested to Backported in v10.x Sep 24, 2018

@oyyd oyyd referenced this pull request Sep 26, 2018

Closed

[v10.x] Backport assert PRs #23095

2 of 2 tasks complete

targos added a commit that referenced this pull request Oct 7, 2018

2018-10-XX, Version 10.12.0 (Current)
Notable changes:

* assert
  * The diff output is now a tiny bit improved by sorting object
    properties when inspecting the values that are compared with each
    other. #22788
* cli
  * The options parser now normalizes `_` to `-` in all multi-word
    command-line flags, e.g. `--no_warnings` has the same effect as
    `--no-warnings`. #23020
  * Added bash completion for the `node` binary. To generate a bash
    completion script, run `node --completion-bash`. The output can be
    saved to a file which can be sourced to enable completion.
    #20713
* crypto
  * Added support for PEM-level encryption.
    #23151
  * Added an API asymmetric key pair generation. The new methods
    `crypto.generateKeyPair` and `crypto.generateKeyPairSync` can be
    used to generate public and private key pairs. The API supports
    RSA, DSA and EC and a variety of key encodings (both PEM and DER).
    #22660
* fs
  * Added a `recursive` option to `fs.mkdir` and `fs.mkdirSync`. If
    this option is set to true, non-existing parent folders will be
    automatically created. #21875
* http2
  * Added a `'ping'` event to `Http2Session` that is emitted whenever a
    non-ack `PING` is received.
    #23009
  * Added support for the `ORIGIN` frame.
    #22956
* module
  * Added `module.createRequireFromPath(filename)`. This new method can
    be used to create a custom require function that will resolve
    modules relative to the filename path.
    #19360
* process
  * Added a `'multipleResolves'` process event that is emitted whenever
    a `Promise` is attempted to be resolved multiple times, e.g. if the
    `resolve` and `reject` functions are both called in a `Promise`
    executor. #22218
* **url**
  * Added `url.fileURLToPath(url)` and `url.pathToFileURL(path)`. These
    methods can be used to correctly convert between file: URLs and
    absolute paths. #22506
* **util**
  * Added the `sorted` option to `util.inspect()`. If set to `true`,
    all properties of an object and Set and Map entries will be sorted
    in the returned string. If set to a function, it is used as a
    compare function. #22788
  * The `util.instpect.custom` symbol is now defined in the global
    symbol registry as `Symbol.for('nodejs.util.inspect.custom')`.
    #20857
* **Windows**
  * The Windows msi installer now provides an option to automatically
    install the tools required to build native modules.
    #22645
* **Added new collaborators**:
  * digitalinfinity - Hitesh Kanwathirtha

@targos targos referenced this pull request Oct 7, 2018

Merged

Release proposal: v10.12.0 #23313

targos added a commit that referenced this pull request Oct 7, 2018

2018-10-XX, Version 10.12.0 (Current)
Notable changes:

* assert
  * The diff output is now a tiny bit improved by sorting object
    properties when inspecting the values that are compared with each
    other. #22788
* cli
  * The options parser now normalizes `_` to `-` in all multi-word
    command-line flags, e.g. `--no_warnings` has the same effect as
    `--no-warnings`. #23020
  * Added bash completion for the `node` binary. To generate a bash
    completion script, run `node --completion-bash`. The output can be
    saved to a file which can be sourced to enable completion.
    #20713
* crypto
  * Added support for PEM-level encryption.
    #23151
  * Added an API asymmetric key pair generation. The new methods
    `crypto.generateKeyPair` and `crypto.generateKeyPairSync` can be
    used to generate public and private key pairs. The API supports
    RSA, DSA and EC and a variety of key encodings (both PEM and DER).
    #22660
* fs
  * Added a `recursive` option to `fs.mkdir` and `fs.mkdirSync`. If
    this option is set to true, non-existing parent folders will be
    automatically created. #21875
* http2
  * Added a `'ping'` event to `Http2Session` that is emitted whenever a
    non-ack `PING` is received.
    #23009
  * Added support for the `ORIGIN` frame.
    #22956
* module
  * Added `module.createRequireFromPath(filename)`. This new method can
    be used to create a custom require function that will resolve
    modules relative to the filename path.
    #19360
* process
  * Added a `'multipleResolves'` process event that is emitted whenever
    a `Promise` is attempted to be resolved multiple times, e.g. if the
    `resolve` and `reject` functions are both called in a `Promise`
    executor. #22218
* **url**
  * Added `url.fileURLToPath(url)` and `url.pathToFileURL(path)`. These
    methods can be used to correctly convert between file: URLs and
    absolute paths. #22506
* **util**
  * Added the `sorted` option to `util.inspect()`. If set to `true`,
    all properties of an object and Set and Map entries will be sorted
    in the returned string. If set to a function, it is used as a
    compare function. #22788
  * The `util.instpect.custom` symbol is now defined in the global
    symbol registry as `Symbol.for('nodejs.util.inspect.custom')`.
    #20857
* **Windows**
  * The Windows msi installer now provides an option to automatically
    install the tools required to build native modules.
    #22645
* **Added new collaborators**:
  * digitalinfinity - Hitesh Kanwathirtha

PR-URL: #23313

targos added a commit that referenced this pull request Oct 10, 2018

2018-10-10, Version 10.12.0 (Current)
Notable changes:

* assert
  * The diff output is now a tiny bit improved by sorting object
    properties when inspecting the values that are compared with each
    other. #22788
* cli
  * The options parser now normalizes `_` to `-` in all multi-word
    command-line flags, e.g. `--no_warnings` has the same effect as
    `--no-warnings`. #23020
  * Added bash completion for the `node` binary. To generate a bash
    completion script, run `node --completion-bash`. The output can be
    saved to a file which can be sourced to enable completion.
    #20713
* crypto
  * Added support for PEM-level encryption.
    #23151
  * Added an API asymmetric key pair generation. The new methods
    `crypto.generateKeyPair` and `crypto.generateKeyPairSync` can be
    used to generate public and private key pairs. The API supports
    RSA, DSA and EC and a variety of key encodings (both PEM and DER).
    #22660
* fs
  * Added a `recursive` option to `fs.mkdir` and `fs.mkdirSync`. If
    this option is set to true, non-existing parent folders will be
    automatically created. #21875
* http2
  * Added a `'ping'` event to `Http2Session` that is emitted whenever a
    non-ack `PING` is received.
    #23009
  * Added support for the `ORIGIN` frame.
    #22956
  * Updated nghttp2 to 1.34.0. This adds RFC 8441 extended connect
    protocol support to allow use of WebSockets over HTTP/2.
    #23284
* module
  * Added `module.createRequireFromPath(filename)`. This new method can
    be used to create a custom require function that will resolve
    modules relative to the filename path.
    #19360
* process
  * Added a `'multipleResolves'` process event that is emitted whenever
    a `Promise` is attempted to be resolved multiple times, e.g. if the
    `resolve` and `reject` functions are both called in a `Promise`
    executor. #22218
* url
  * Added `url.fileURLToPath(url)` and `url.pathToFileURL(path)`. These
    methods can be used to correctly convert between file: URLs and
    absolute paths. #22506
* util
  * Added the `sorted` option to `util.inspect()`. If set to `true`,
    all properties of an object and Set and Map entries will be sorted
    in the returned string. If set to a function, it is used as a
    compare function. #22788
  * The `util.instpect.custom` symbol is now defined in the global
    symbol registry as `Symbol.for('nodejs.util.inspect.custom')`.
    #20857
  * Added support for `BigInt` numbers in `util.format()`.
    #22097
* V8 API
  * A number of V8 C++ APIs have been marked as deprecated since they
    have been removed in the upstream repository. Replacement APIs
    are added where necessary. #23159
* Windows
  * The Windows msi installer now provides an option to automatically
    install the tools required to build native modules.
    #22645
* Workers
  * Debugging support for Workers using the DevTools protocol has been
    implemented. #21364
  * The public `inspector` module is now enabled in Workers.
    #22769
* Added new collaborators:
  * digitalinfinity - Hitesh Kanwathirtha

PR-URL: #23313

targos added a commit that referenced this pull request Oct 10, 2018

2018-10-10, Version 10.12.0 (Current)
Notable changes:

* assert
  * The diff output is now a tiny bit improved by sorting object
    properties when inspecting the values that are compared with each
    other. #22788
* cli
  * The options parser now normalizes `_` to `-` in all multi-word
    command-line flags, e.g. `--no_warnings` has the same effect as
    `--no-warnings`. #23020
  * Added bash completion for the `node` binary. To generate a bash
    completion script, run `node --completion-bash`. The output can be
    saved to a file which can be sourced to enable completion.
    #20713
* crypto
  * Added support for PEM-level encryption.
    #23151
  * Added an API asymmetric key pair generation. The new methods
    `crypto.generateKeyPair` and `crypto.generateKeyPairSync` can be
    used to generate public and private key pairs. The API supports
    RSA, DSA and EC and a variety of key encodings (both PEM and DER).
    #22660
* fs
  * Added a `recursive` option to `fs.mkdir` and `fs.mkdirSync`. If
    this option is set to true, non-existing parent folders will be
    automatically created. #21875
* http2
  * Added a `'ping'` event to `Http2Session` that is emitted whenever a
    non-ack `PING` is received.
    #23009
  * Added support for the `ORIGIN` frame.
    #22956
  * Updated nghttp2 to 1.34.0. This adds RFC 8441 extended connect
    protocol support to allow use of WebSockets over HTTP/2.
    #23284
* module
  * Added `module.createRequireFromPath(filename)`. This new method can
    be used to create a custom require function that will resolve
    modules relative to the filename path.
    #19360
* process
  * Added a `'multipleResolves'` process event that is emitted whenever
    a `Promise` is attempted to be resolved multiple times, e.g. if the
    `resolve` and `reject` functions are both called in a `Promise`
    executor. #22218
* url
  * Added `url.fileURLToPath(url)` and `url.pathToFileURL(path)`. These
    methods can be used to correctly convert between file: URLs and
    absolute paths. #22506
* util
  * Added the `sorted` option to `util.inspect()`. If set to `true`,
    all properties of an object and Set and Map entries will be sorted
    in the returned string. If set to a function, it is used as a
    compare function. #22788
  * The `util.instpect.custom` symbol is now defined in the global
    symbol registry as `Symbol.for('nodejs.util.inspect.custom')`.
    #20857
  * Added support for `BigInt` numbers in `util.format()`.
    #22097
* V8 API
  * A number of V8 C++ APIs have been marked as deprecated since they
    have been removed in the upstream repository. Replacement APIs
    are added where necessary. #23159
* Windows
  * The Windows msi installer now provides an option to automatically
    install the tools required to build native modules.
    #22645
* Workers
  * Debugging support for Workers using the DevTools protocol has been
    implemented. #21364
  * The public `inspector` module is now enabled in Workers.
    #22769
* Added new collaborators:
  * digitalinfinity - Hitesh Kanwathirtha

PR-URL: #23313

targos added a commit that referenced this pull request Oct 10, 2018

2018-10-10, Version 10.12.0 (Current)
Notable changes:

* assert
  * The diff output is now a tiny bit improved by sorting object
    properties when inspecting the values that are compared with each
    other. #22788
* cli
  * The options parser now normalizes `_` to `-` in all multi-word
    command-line flags, e.g. `--no_warnings` has the same effect as
    `--no-warnings`. #23020
  * Added bash completion for the `node` binary. To generate a bash
    completion script, run `node --completion-bash`. The output can be
    saved to a file which can be sourced to enable completion.
    #20713
* crypto
  * Added support for PEM-level encryption.
    #23151
  * Added an API asymmetric key pair generation. The new methods
    `crypto.generateKeyPair` and `crypto.generateKeyPairSync` can be
    used to generate public and private key pairs. The API supports
    RSA, DSA and EC and a variety of key encodings (both PEM and DER).
    #22660
* fs
  * Added a `recursive` option to `fs.mkdir` and `fs.mkdirSync`. If
    this option is set to true, non-existing parent folders will be
    automatically created. #21875
* http2
  * Added a `'ping'` event to `Http2Session` that is emitted whenever a
    non-ack `PING` is received.
    #23009
  * Added support for the `ORIGIN` frame.
    #22956
  * Updated nghttp2 to 1.34.0. This adds RFC 8441 extended connect
    protocol support to allow use of WebSockets over HTTP/2.
    #23284
* module
  * Added `module.createRequireFromPath(filename)`. This new method can
    be used to create a custom require function that will resolve
    modules relative to the filename path.
    #19360
* process
  * Added a `'multipleResolves'` process event that is emitted whenever
    a `Promise` is attempted to be resolved multiple times, e.g. if the
    `resolve` and `reject` functions are both called in a `Promise`
    executor. #22218
* url
  * Added `url.fileURLToPath(url)` and `url.pathToFileURL(path)`. These
    methods can be used to correctly convert between file: URLs and
    absolute paths. #22506
* util
  * Added the `sorted` option to `util.inspect()`. If set to `true`,
    all properties of an object and Set and Map entries will be sorted
    in the returned string. If set to a function, it is used as a
    compare function. #22788
  * The `util.instpect.custom` symbol is now defined in the global
    symbol registry as `Symbol.for('nodejs.util.inspect.custom')`.
    #20857
  * Added support for `BigInt` numbers in `util.format()`.
    #22097
* V8 API
  * A number of V8 C++ APIs have been marked as deprecated since they
    have been removed in the upstream repository. Replacement APIs
    are added where necessary. #23159
* Windows
  * The Windows msi installer now provides an option to automatically
    install the tools required to build native modules.
    #22645
* Workers
  * Debugging support for Workers using the DevTools protocol has been
    implemented. #21364
  * The public `inspector` module is now enabled in Workers.
    #22769
* Added new collaborators:
  * digitalinfinity - Hitesh Kanwathirtha

PR-URL: #23313
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment