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

v12.7.0 release proposal #28816

Closed
wants to merge 161 commits into from
Closed

v12.7.0 release proposal #28816

wants to merge 161 commits into from

Conversation

targos
Copy link
Member

@targos targos commented Jul 23, 2019

2019-07-23, Version 12.7.0 (Current), @targos

Notable changes

  • deps:
    • Updated nghttp2 to 1.39.1 (gengjiawen) #28448.
    • Updated npm to 6.10.0 (isaacs) #28525.
  • esm:
    • Implemented experimental "pkg-exports" proposal. A new "exports" field can
      be added to a module's package.json file to provide custom subpath
      aliasing. See proposal-pkg-exports
      for more information (Guy Bedford) #28568.
  • http:
    • Added response.writableFinished (Robert Nagy) #28681.
    • Exposed headers, rawHeaders and other fields on an http.ClientRequest
      "information" event (Austin Wright) #28459.
  • inspector:
    • Added inspector.waitForDebugger() (Aleksei Koziatinskii) #28453.
  • policy:
    • Added --policy-integrity=sri CLI option to mitigate policy tampering. If a
      policy integrity is specified and the policy does not have that integrity,
      Node.js will error prior to running any code (Bradley Farias) #28734.
  • readline,tty:
    • Exposed stream API from various methods which write characters (cjihrig) #28674,
      #28721.
  • src:
    • Use cgroups to get memory limits. This improves the way we set the memory ceiling for a Node.js process. Previously
      we would use the physical memory size (from libuv) to estimate the necessary V8 heap sizes. The physical memory size
      is not necessarily the correct limit, e.g. if the process is running inside a docker container or is otherwise
      constrained. This change adds the ability to get a memory limit set by linux cgroups, which is used by
      docker containers to set resource constraints
      (Kelvin Jin) #27508.

Commits

gengjiawen and others added 30 commits July 20, 2019 11:05
PR-URL: #28189
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
PR-URL: #28189
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
The closing paren was missing. Move to using commas instead.

PR-URL: #28483
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
If a top level module is listed as Stable, there is no need to
call out individual components of that module as Stable. The
extra text is just distracting.

PR-URL: #28485
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
PR-URL: #28481
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
PR-URL: #28504
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
The pointer used to hold an incoming dynamically loaded module's
`node::node_module` structure needs to be thread-local. So far this was
done with `uv_key_set()` and `uv_key_get()`. The language now supports
the `thread_local` keyword which makes implementing this a lot cleaner.

PR-URL: #28456
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
This commit adds an assertion checking the exact field names
returned by process.resourceUsage(). This ensures that no new
fields accidentally slip into the returned object in the future.

PR-URL: #28498
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
This change adds the ability to set the memory ceiling for a Node.js
process according to a memory limit set by cgroups (via
uv_get_constrained_memory), which is used by docker containers to set
resource constraints. Previously we would use the physical memory size
to estimate the necessary V8 heap sizes, but the physical memory size is
not necessarily the correct limit, e.g. if the process is running inside
a docker container or is otherwise constrained.

Non-Linux systems shouldn't be affected.

PR-URL: #27508
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ali Ijaz Sheikh <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Сковорода Никита Андреевич <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
The implementation of _getDisplayPos, used to compute the cursor
position and to find out how many lines to clear up when re-rendering
the readline output, was counting each line (except the last one) from
the input as one row, even if they were wraping.  This caused some
rendering issues when the 'prompt' have at least one wide line ending
with a newline char, duplicating the lines at the top of the prompt when
calling _refreshLine (ex: when the user hits backspace).

This patch fixes the issue by computing the real rows count for each new
line in the input string.

PR-URL: #28272
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
PR-URL: #28395
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
PR-URL: #28383
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Provided a small example along its output using fs.stat() to check the
stats on two different paths, one a directory and the other a txt file.

PR-URL: #28381
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
PR-URL: #28365
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
PR-URL: #28356
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: James M Snell <[email protected]>
This commit removes the now obsolete option.

PR-URL: #28446
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Add SKIP status for more tests in stringbytes-external-exceed-max that
are failing on AIX.

PR-URL: #28516
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
See: nodejs/build#1820

PR-URL: #28541
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Merge options list with its description to reduce redundancy
(some possible typos were also fixed and some periods added).

PR-URL: #28499
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
The test has not failed on FreeBSD in the last 100 runs and appears to
perhaps not be an issue anymore.

Closes: #23089
test-gc-http-client-onerror: PASS,FLAKY

PR-URL: #28429
Fixes: #23089
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
This test currently fails if run as root:
npm ERR! makeDirectory homeless?
npm WARN install-dir No description
npm WARN install-dir No repository field.
npm WARN install-dir No license field.

npm ERR! path /root/node/test/.tmp.0/npm-sandbox/home
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall stat
npm ERR! enoent ENOENT:
no such file or directory,
  stat '/root/node/test/.tmp.0/npm-sandbox/home'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

assert.js:89
  throw new AssertionError(obj);
  ^

AssertionError [ERR_ASSERTION]: npm install got error code 254
    at handleExit (/root/node/test/parallel/test-npm-install.js:60:10)
    at /root/node/test/common/index.js:371:15
    at ChildProcess.exithandler (child_process.js:304:5)
    at ChildProcess.emit (events.js:203:13)
    at maybeClose (internal/child_process.js:1028:16)
    at Process.ChildProcess._handle.onexit
      (internal/child_process.js:283:5) {
       generatedMessage: false,
       code: 'ERR_ASSERTION',
       actual: 254,
       expected: 0,
       operator: 'strictEqual'
    }

The home directory will be created as expected by npm in the npmSandbox
when run as non-root, but when run as root this directory has to exist.

This commit creates the home directory to allow the test to pass also
when run as the root user.

Refs:https://github.com/npm/cli/blob/
31718e72cb5a03cee7127fc36843e4b55c868d93/
lib/utils/correct-mkdir.js#L82-L105

PR-URL: #28510
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
PR-URL: #28506
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
`crypto.fips` was deprecated in commit 6e7992e ("crypto: docs-only
deprecate crypto.fips, replace") but its usage in `common.hasFipsCrypto`
seems to have been overlooked.

PR-URL: #28509
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
PR-URL: #28521
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Include the library-provided reason in the Error’s `message`.

Fixes: #28468

PR-URL: #28487
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Fedor Indutny <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
My node distribution uses a shared openssl library with some ciphers
disabled, including RC2.

These tests (which use `rsa_cert.pfx`) fail with `unknown cipher`:
 - parallel/test-crypto-binary-default
 - parallel/test-https-pfx
 - parallel/test-crypto

The other fixture .pfx's use the `-descert` option, I don't know if
rsa_cert.pfx was generated without `-descert` intentionally or not but
none of the tests reference RC2, and the tests pass with a des cert.

I'm not an ssl/crypto expert, so I would appreciate any insight.

Old key:
```
openssl pkcs12 -info -in test/fixtures/keys/rsa_cert.pfx -noout -passin
pass:sample
MAC Iteration 2048
MAC verified OK
PKCS7 Encrypted data: pbeWithSHA1And40BitRC2-CBC, Iteration 2048
Certificate bag
PKCS7 Data
Shrouded Keybag: pbeWithSHA1And3-KeyTripleDES-CBC, Iteration 2048
```

New
```
openssl pkcs12 -info -in test/fixtures/keys/rsa_cert.pfx -noout -passin
pass:sample
MAC Iteration 2048
MAC verified OK
PKCS7 Encrypted data: pbeWithSHA1And3-KeyTripleDES-CBC, Iteration 2048
Certificate bag
PKCS7 Data
Shrouded Keybag: pbeWithSHA1And3-KeyTripleDES-CBC, Iteration 2048
```

PR-URL: #28471
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
PR-URL: #28433
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
PR-URL: #28433
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
PR-URL: #28433
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
PR-URL: #28372
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
GauthamBanasandra and others added 17 commits July 22, 2019 21:20
As KVStore has derived classes, it is essential to
declare a public virtual destructor in the base
KVStore class. Otherwise, deleting derived class
instances using base class pointers would
potentially cause undefined behaviour.

Additionally, since we are implementing a non-default
destructor, the special member functions have also
been implemented in order to abide by the rule of five.

PR-URL: #28737
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
PR-URL: #28627
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
This method blocks current node process until a client sends
Runtime.runifWaitingForDebugger.

It can be useful when we need to report inspector.url() before
waiting for connection:
```
inspector.open(0, undefined, false);
fs.writeFileSync(someFileName, inspector.url());
inspector.waitForDebugger();
```

PR-URL: #28453
Reviewed-By: Eugene Ostroukhov <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
when the readable side of a transform ends any for await
loop on that transform stream should also complete. This
fix prevents for await loop on a transform stream
from hanging indefinitely.

PR-URL: #28566
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
PR-URL: #28474
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
As node requires a tracing controller to be initialized embedders need
access to the TraceEventHelper so that we can actually set the tracing
controller.

Refs: https://github.com/electron/electron/commit/0e5b6f93000e4718c9e35332ddbd0f6b76cdd585/#diff-89b287b2edd0a02dddae60cb26157f47

PR-URL: #28724
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
PR-URL: #28448
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
This commit fixes the following warning:

warning: missing field 'exports' initializer

PR-URL: #28764
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
PR-URL: #28776
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
The pkgsrc Makefile target was removed in 2015

Refs: #1938

PR-URL: #28783
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
PR-URL: #28774
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Original commit message:

    [api] Get ScriptOrModule from CompileFunctionInContext

    Adds a new out param which allows accessing the ScriptOrModule
    of a function, which allows an embedder such as Node.js to use
    the function's i::Script lifetime.

    Refs: nodejs/node-v8#111
    Change-Id: I34346d94d76e8f9b8377c97d948673f4b95eb9d5
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1699698
    Reviewed-by: Yang Guo <[email protected]>
    Commit-Queue: Yang Guo <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#62830}

Refs: v8/v8@b33af60

Backport-PR-URL: #28779
PR-URL: #28671
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
Backport-PR-URL: #28779
PR-URL: #28671
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
In particular:

- Move the class definition to the relevant header file,
  i.e. `node_contextify.h`.
- Make sure that class instances are destroyed on
  `Environment` teardown.
- Make instances of the key object traceable in heap dumps. This is
  particularly relevant here because our C++ script → map key mapping
  could introduce memory leaks when the import function metadata refers
  back to the script in some way.

Refs: #28671

PR-URL: #28782
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Heap dumps can be taken either through the inspector or the public API
for it during an async_hooks init() hook, but at that point the
AsyncWrap in question is not done initializing yet and virtual methods
cannot be called on it.

Address this issue (somewhat hackily) by excluding `AsyncWrap`
instances which have not yet executed their `init()` hook fully
from heap dumps.

Fixes: #28786

PR-URL: #28789
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Update ESLint to 6.1.0

PR-URL: #28793
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Fixes: #28790

PR-URL: #28792
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. doc Issues and PRs related to the documentations. http2 Issues or PRs related to the http2 subsystem. meta Issues and PRs related to the general management of the project. npm Issues and PRs related to the npm client dependency or the npm registry. v12.x labels Jul 23, 2019
@targos targos closed this Jul 23, 2019
@targos targos added release Issues and PRs related to Node.js releases. and removed build Issues and PRs related to build files or the CI. doc Issues and PRs related to the documentations. http2 Issues or PRs related to the http2 subsystem. meta Issues and PRs related to the general management of the project. npm Issues and PRs related to the npm client dependency or the npm registry. labels Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release Issues and PRs related to Node.js releases.
Projects
None yet
Development

Successfully merging this pull request may close these issues.