Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

Latest commit

 

History

History
380 lines (177 loc) · 15.5 KB

Breaking-changes-between-v6-and-v7.md

File metadata and controls

380 lines (177 loc) · 15.5 KB

Breaking changes between v6 and v7

When editing this page please be as detailed as possible.

For older breaking changes, please see our v5 to v6 page.

62 commits were tagged semver-major.

Note to readers: # is synonymous with .prototype., and indicates the property is available on instances of that class. Example: Object#toString() is equivalent to Object.prototype.toString().

By Subsystem

buffer

[Docs]

child_process

[Docs]

cluster

[Docs]

crypto

[Docs]

  • The ECDH ’hybrid’ format option has been undocumented.
    • (Hybrid keys are illegal in X.509 certificates.)
    • Refs: [f4aa2c2c93], #4956

debugger

[Docs]

  • The debugger now once again listens on 127.0.0.1 by default.
    • Faulty behaviour causing the debugger to listen on 0.0.0.0 had been introduced in 0.11.13.
    • Refs: [8e7cbe2546], #8106

dgram

[Docs]

  • All internal checks in dgram now use strict equality (type validation).
    • Most of these were checks for constants of some form.
    • Refs: [e9b6fbbf17], #8011
  • The remaining one-line trace of unix_dgram has been removed.

domain

[Docs]

events

[Docs]

fs

[Docs]

  • Support for re-evaluating the fs module has now been dropped entirely.
    • This is a necessary step in improving the maintainability of Node.js core.
    • (The graceful-fs module will need to be updated to v4.x in all dependency trees.)
    • Refs: [49ef3ae90a], #6413
  • fs._stringToFlags() has been removed and moved to lib/internal.
  • Options object processing has been refactored for any fs methods that use options objects.
    • The error message for when an options argument is not an object has changed slightly.
    • Refs: [169f485289], #7165

Previously: "options" argument must be a string or an object

Now: "options" must be a string or an object

  • The ’stop’ event emitted from fs.FSWatcher is now asynchronously emitted.
    • This prevents a potential infinite loop if stop is called synchronously after a listener is added.
    • Refs: [21124ba23a], #8524
  • Calling async fs methods without a callback is now deprecated.
  • File Descriptors are now validated more strictly.

http

[Docs]

Previously: The header content contains invalid characters

Now: The trailer content contains invalid characters

inspector

  • --inspect now attaches to process.debugPort by default.

intl

module

[Docs]

  • The previously deprecated legacy module.requireRepl() function has been removed.

net

[Docs]

os

[Docs]

  • os.tmpDir() has been deprecated in favor of os.tmpdir(), which was added as a replacement 3 years ago.

process

[Docs]

  • The previously deprecated process.EventEmitter has been removed.
  • The unhandledRejection process event default handler now emits warnings for unhandled Promise rejections.
    • This can be overridden by listening to the ’unhandledRejection’ process event.
    • In the future as noted by the deprecation, unhandled Promises will terminate the node process with a non-zero exit code. (Likely on garbage collection.)
    • Refs: [ecf474ceba], #8217, [07dbf7313d], #8217

punycode

[Docs]

  • The punycode module is now deprecated in the docs, it’s functionality being replaced internally by ICU.

readline

[Docs]

  • Readline completions now autocompletes as much as possible on TAB, only showing the list of results when necessary.
  • The following deprecated readline functions have been removed:
    • codePointAt(), getStringWidth(), isFullWidthCodePoint(), stripVTControlCharacters().
    • These were previously undocumented, and then deprecated in v6.0.0.
    • Refs: [8a87b29034], #6423

repl

[Docs]

  • The internally unused function REPL#convertToContext() has been runtime-deprecated.

stream

[Docs]

Previously: not implemented

Now: _read() is not implemented, _transform() is not implemented, _write() is not implemented

  • TransformStream#_flush() now accepts a second data argument: _flush(err, data).
    • This now maintains consistency with other Transform Stream methods as hinted at in the docs.
    • Refs: [0cd0118334], #3708

url

[Docs]

zlib

[Docs]

  • zlib constants have been moved to zlib.constants.
    • The constants are still available directly off of the zlib object, but are now docs-deprecated.
    • Refs: [197a465280], #7203

Native Modules (Addons)

  • The Native Module version mismatch error has been updated to be far more clear.

Previously:

Module version mismatch. Expected 51, got 48.

Now:

The module '<module>'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 48. This version of Node.js requires
NODE_MODULE_VERSION 51. Please try re-compiling or Re-installing
the module (for instance, using `npm rebuild` or `npm install`).

General Node

  • Benchmarking has been completely overhauled.
    • Anything previously relying on /benchmarks/ will probably no longer work.
    • Refs: #7094

--

  • libc++ is now always necessary for building on macOS.

--

  • The Windows exit code for OS version mismatch is now the appropriate ERROR_EXE_MACHINE_TYPE_MISMATCH.

Dependencies