profile
viewpoint

addaleax/actual-crash 3

Node.js native addon that just crashes

addaleax/angular-events-calendar 2

Calendar in the style of GitHub contributions

addaleax/argon2-ffi 1

Node.js bindings for argon2, the winner of the Password Hashing Competition (PHC)

addaleax/builtin-modules 1

List of the Node.js builtin modules

addaleax/checkref 1

Check your HTML and Markdown for invalid local links & anchors

addaleax/0x 0

🔥 single-command flamegraph profiling 🔥

addaleax/7z-stream 0

7z-stream is a streaming 7z parser.

addaleax/admin 0

Facilitating joint collaboration amongst the TSC and CommComm

addaleax/angular-gettext 0

Gettext support for Angular.js

Pull request review commentnodejs/node

async_hooks: improve resource stack performance

 const emitPromiseResolveNative =     emitHookFactory(promise_resolve_symbol, 'emitPromiseResolveNative');  const topLevelResource = {};+// Contains a [stack height] -> [resource] map for things pushed onto the+// async resource stack from JS.+const jsResourceStack = new SafeMap();+// Contains either a single key (null) or nothing. If the key is present,+// this points to the current async resource.+const cachedResourceHolder = new SafeMap();

Alternatively, yes, this could be a single variable slot, but that might become an issue with memory retention in some weird edge cases.

addaleax

comment created time in 3 hours

Pull request review commentnodejs/node

async_hooks: improve resource stack performance

 const emitPromiseResolveNative =     emitHookFactory(promise_resolve_symbol, 'emitPromiseResolveNative');  const topLevelResource = {};+// Contains a [stack height] -> [resource] map for things pushed onto the+// async resource stack from JS.+const jsResourceStack = new SafeMap();+// Contains either a single key (null) or nothing. If the key is present,+// this points to the current async resource.+const cachedResourceHolder = new SafeMap();

The problem is that it needs to be some sort of object that can be easily modified from C++ as well (at least until we have weak references in JS without a flag)… I picked a map because clearing it from C++ never throws exceptions, but it could also be a single-entry Array or object.

addaleax

comment created time in 3 hours

pull request commentnodejs/node

async_hooks: improve resource stack performance

28e6626ce7020b490438e3ee8a8188a59c5f856f (https://github.com/nodejs/node/pull/33131) is what breaks the benchmarks for me. /cc @ronag

It looks like the async-resource-vs-destroy benchmark has a slow-down when using executionAsyncResource():

$ ./node benchmark/compare.js --new ./node --old ./node-master --runs 10 --filter async-resource-vs-destroy async_hooks | Rscript benchmark/compare.R
[00:11:09|% 100| 1/1 files | 20/20 runs | 6/6 configs]: Done
                                                                                                                                                                     confidence improvement accuracy (*)
 async_hooks/async-resource-vs-destroy.js n=1000000 duration=5 connections=500 path='/' asyncMethod='async' type='async-local-storage' benchmarker='autocannon'            ***    -15.17 %       ±4.56%
 async_hooks/async-resource-vs-destroy.js n=1000000 duration=5 connections=500 path='/' asyncMethod='async' type='async-resource' benchmarker='autocannon'                 ***    -11.15 %       ±4.71%
 async_hooks/async-resource-vs-destroy.js n=1000000 duration=5 connections=500 path='/' asyncMethod='async' type='destroy' benchmarker='autocannon'                                -1.74 %       ±3.87%
 async_hooks/async-resource-vs-destroy.js n=1000000 duration=5 connections=500 path='/' asyncMethod='callbacks' type='async-local-storage' benchmarker='autocannon'        ***    -15.19 %       ±4.46%
 async_hooks/async-resource-vs-destroy.js n=1000000 duration=5 connections=500 path='/' asyncMethod='callbacks' type='async-resource' benchmarker='autocannon'             ***     -9.60 %       ±4.65%
 async_hooks/async-resource-vs-destroy.js n=1000000 duration=5 connections=500 path='/' asyncMethod='callbacks' type='destroy' benchmarker='autocannon'                            -1.01 %       ±7.32%

So I guess this PR makes a tradeoff, but I think I would generally accept a +18 % speedup without async_hooks at the cost of a -15 % perf drop when they are enabled? /cc @qard

addaleax

comment created time in 12 hours

PR opened nodejs/node

async_hooks: improve resource stack performance

Removes some of the performance overhead that came with executionAsyncResource() by storing async resources that are managed by JS and those managed by C++ separately, and instead caching the result of executionAsyncResource() with low overhead to avoid multiple calls into C++.

This particularly improves performance when async hooks are not being used.

$ ./node benchmark/compare.js --new ./node --old ./node-master --runs 30 --filter messageport worker | Rscript benchmark/compare.R
[00:04:41|% 100| 1/1 files | 60/60 runs | 2/2 configs]: Done
                                                   confidence improvement accuracy (*)    (**)   (***)
 worker/messageport.js n=1000000 payload='object'          *      8.85 %       ±7.40%  ±9.85% ±12.83%
 worker/messageport.js n=1000000 payload='string'        ***     18.56 %       ±8.37% ±11.13% ±14.49%

(I’ll also try to run the async_hooks benchmarks, but they are failing locally for me on master – hence only the ones for MessagePorts as another measure.)

<!-- Thank you for your pull request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests and possibly benchmarks.

Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md -->

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] commit message follows commit guidelines

<!-- Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. -->

+141 -39

0 comment

5 changed files

pr created time in 12 hours

create barnchaddaleax/node

branch : async-resource-improvements

created branch time in 12 hours

Pull request review commentpiscinajs/piscina

Use once listener for abort event

 const cpuCount : number = (() => {   } })(); +interface AbortSignalEventTargetAddOptions {+  once : boolean;+};+ interface AbortSignalEventTarget {-  addEventListener : (name : 'abort', listener : () => void) => void;+  addEventListener : (+    name : 'abort',+    listener : () => void,+    options? : AbortSignalEventTargetAddOptions) => void;   aborted? : boolean; } interface AbortSignalEventEmitter {   on : (name : 'abort', listener : () => void) => void;
jasnell

comment created time in 17 hours

Pull request review commentnodejs/node

n-api: remove `napi_env::CallIntoModuleThrow`

 struct napi_env__ {     return v8::Just(true);   } -  template <typename T, typename U>-  void CallIntoModule(T&& call, U&& handle_exception) {+  static inline void+  HandleThrow(napi_env env, v8::Local<v8::Value> value) {+    env->isolate->ThrowException(value);+  }+  using ThrowHandler = std::function<void(napi_env, v8::Local<v8::Value>)>;++  template <typename T>+  inline void CallIntoModule(T&& call,+                             ThrowHandler handle_exception = HandleThrow) {

@gabrielschulhof This seems to work for me:

diff --git a/src/js_native_api_v8.h b/src/js_native_api_v8.h
index 29c341c6d3f1..b2f0889f0f61 100644
--- a/src/js_native_api_v8.h
+++ b/src/js_native_api_v8.h
@@ -86,11 +86,10 @@ struct napi_env__ {
   HandleThrow(napi_env env, v8::Local<v8::Value> value) {
     env->isolate->ThrowException(value);
   }
-  using ThrowHandler = std::function<void(napi_env, v8::Local<v8::Value>)>;
 
-  template <typename T>
+  template <typename T, typename U = decltype(HandleThrow)>
   inline void CallIntoModule(T&& call,
-                             ThrowHandler handle_exception = HandleThrow) {
+                             U&& handle_exception = HandleThrow) {
     int open_handle_scopes_before = open_handle_scopes;
     int open_callback_scopes_before = open_callback_scopes;
     napi_clear_last_error(this);
gabrielschulhof

comment created time in 18 hours

Pull request review commentnodejs/node

Allow passing KeyObjects via postMessage

+'use strict';+const common = require('../common');+if (!common.hasCrypto)+  common.skip('missing crypto');++const assert = require('assert');+const { createSecretKey, generateKeyPairSync } = require('crypto');+const { createContext } = require('vm');+const { MessageChannel, moveMessagePortToContext } = require('worker_threads');++const secretKey = createSecretKey(Buffer.alloc(32));+const { publicKey, privateKey } = generateKeyPairSync('rsa', {+  modulusLength: 1024+});++function keyToString(key) {+  if (key.type === 'secret') {+    return key.export().toString('hex');+  } else {+    return key.export({ type: 'pkcs1', format: 'pem' });+  }+}++// Get immutable representations of all keys.+const keys = [secretKey, publicKey, privateKey]+             .map((key) => [key, keyToString(key)]);++for (const [key, repr] of keys) {+  {+    const { port1, port2 } = new MessageChannel();++    port1.postMessage({ key });+    assert.strictEqual(keyToString(key), repr);++    port2.once('message', common.mustCall(({ key }) => {+      assert.strictEqual(keyToString(key), repr);+    }));+  }++  {+    // Test 3: Clone a dummy object to a message port in another context.+    const { port1, port2 } = new MessageChannel();+    const context = createContext();+    const port2Moved = moveMessagePortToContext(port2, context);+    assert(!(port2Moved instanceof Object));++    port2Moved.onmessage = common.mustCall(({ data: { key } }) => {+      assert.strictEqual(keyToString(key), repr);

Hm – Deserialize() would be the right place, yes. Maybe adding

  TryCatchScope try_catch(env());
  try_catch.SetVerbose(true);

after the Context::Scope context_scope(context); line in MessagePort::OnMessage() helps? It would still result in an uncaught exception, I think, but I’m not really sure what the alternative would be… there is onmessageerror on the Web MessagePort, but we’re not currently implementing that.

(I think even just discarding the message would also be fine as a step for now – really anything that does not result in an object being created in the wrong Context.)

tniessen

comment created time in 18 hours

Pull request review commentnodejs/node

n-api: remove `napi_env::CallIntoModuleThrow`

 struct napi_env__ {     return v8::Just(true);   } -  template <typename T, typename U>-  void CallIntoModule(T&& call, U&& handle_exception) {+  static inline void+  HandleThrow(napi_env env, v8::Local<v8::Value> value) {+    env->isolate->ThrowException(value);+  }+  using ThrowHandler = std::function<void(napi_env, v8::Local<v8::Value>)>;++  template <typename T>+  inline void CallIntoModule(T&& call,+                             ThrowHandler handle_exception = HandleThrow) {

Is there any reason that handle_exception is no longer a second template argument? std::function incurs both memory and CPU overheads, and even though they are probably small, I would try to avoid that.

(If you must use std::function for some reason, it would be nice not to wrap HandleThrow as the default argument each time.)

gabrielschulhof

comment created time in 18 hours

issue commentnodejs/node

async_hooks.triggerAsyncId() don't return the expected value in context of the connection callback of net.Server

@kibertoad Well, basically what @apapirovski said … I can see the validity of either point of view. I think what this issue is waiting for is for somebody to have a strong enough opinion to either change the docs or change the behavior here, but yeah, a documentation change would definitely suffice.

tingshao

comment created time in 20 hours

issue commentnodejs/node

Enable hooks in fs.statWatchers

Doesn’t this happen with fs.watch() only? The stat watchers shouldn’t count towards a global limit?

Yes, it do is the global limit, but sometimes we need to monitor which module reach the limit.

I don’t really understand how this relates to the difference between fs.watch() and fs.watchFile()? fs.watchFile() does not take up OS resources, as I understand it.

Doesn’t it suffice to override/wrap fs.watch() and fs.unwatch() if this is what you’re looking for?

I noticed that we already have fs. statWatchers using Map, to memory the stats. What about we enhance it to the EventEmitter or anything else, not just a third part module to achieve this.

I guess to be more explicit, what is the advantage of using an EventEmitter here, as opposed to keeping the API surface as it is?

Himself65

comment created time in 20 hours

pull request commentnodejs/node

n-api: ensure scope present for finalization

@gabrielschulhof Just to be explicit here, CallbackScope is for asynchronous operations – Finalizers could definitely fall under that, yes.

mhdawson

comment created time in 20 hours

issue commentnodejs/node

Enable hooks in fs.statWatchers

If we enable users to add hooks in fs.statWatchers, they could track the codes that which module call fs.watchFile many times

Two questions:

  • Doesn’t this happen with fs.watch() only? The stat watchers shouldn’t count towards a global limit?
  • Doesn’t it suffice to override/wrap fs.watch() and fs.unwatch() if this is what you’re looking for?
Himself65

comment created time in 20 hours

Pull request review commentnodejs/node

Allow passing KeyObjects via postMessage

+'use strict';+const common = require('../common');+if (!common.hasCrypto)+  common.skip('missing crypto');++const assert = require('assert');+const { createSecretKey, generateKeyPairSync } = require('crypto');+const { createContext } = require('vm');+const { MessageChannel, moveMessagePortToContext } = require('worker_threads');++const secretKey = createSecretKey(Buffer.alloc(32));+const { publicKey, privateKey } = generateKeyPairSync('rsa', {+  modulusLength: 1024+});++function keyToString(key) {+  if (key.type === 'secret') {+    return key.export().toString('hex');+  } else {+    return key.export({ type: 'pkcs1', format: 'pem' });+  }+}++// Get immutable representations of all keys.+const keys = [secretKey, publicKey, privateKey]+             .map((key) => [key, keyToString(key)]);++for (const [key, repr] of keys) {+  {+    const { port1, port2 } = new MessageChannel();++    port1.postMessage({ key });+    assert.strictEqual(keyToString(key), repr);++    port2.once('message', common.mustCall(({ key }) => {+      assert.strictEqual(keyToString(key), repr);+    }));+  }++  {+    // Test 3: Clone a dummy object to a message port in another context.+    const { port1, port2 } = new MessageChannel();+    const context = createContext();+    const port2Moved = moveMessagePortToContext(port2, context);+    assert(!(port2Moved instanceof Object));++    port2Moved.onmessage = common.mustCall(({ data: { key } }) => {+      assert.strictEqual(keyToString(key), repr);

Ah right, it’s not … I guess that means that you’ll have to throw an exception here if the contexts mismatch

(The alternative would be giving node_crypto multi-context support, but we’re not really quite there yet I’d say … and in any case, that would be a lot more work than this PR)

tniessen

comment created time in 21 hours

issue commentnode-ffi-napi/node-ffi-napi

aarch64 binary release

@odidev I’m guessing all that’s strictly necessary would be a CI service that supports aarch64, that we could use in a similar fashion like we currently use Travis/Appveyor? Not really more than that.

We might also be able to cross-compile, but without CI runs that doesn’t seem like it’s really something to be called “supported”, so I’d be careful about that.

Also, I guess it’s relevant which OSes you’re looking for?

odidev

comment created time in a day

pull request commentnodejs/node

repl: simplify internal repl

Yeah idk, I’ve seen this PR but I don’t really know how to feel about it? The commit message says what this PR does, but not why, and that might be helpful here.

To be honest, I think that’s mostly because I don’t know if this would be more helpful to – the probably very low number of – external REPL module users or not. For other modules I would consider relying on environment variables for config an antipattern, but given that the REPL is probably more often used as the main application than as part of a larger application, it might make sense here?

BridgeAR

comment created time in a day

pull request commentnodejs/node

v12.17.0 release proposal

@targos I’m assuming the test is failing always? Or is it failing permanently?

targos

comment created time in a day

pull request commentnodejs/node

v12.17.0 release proposal

@targos I can’t do it tonight because it’s a bit late for that, but would it be worth for somebody to take an AIX CI machine and bisect on that to see where it’s coming from? I don’t know what other path forward there is

targos

comment created time in 2 days

Pull request review commentnodejs/node

events: initial implementation of experimental EventTarget

+'use strict';++const {+  ArrayFrom,+  Object,+  Map,+  SafeWeakMap,+  Set,+  SymbolFor,+} = primordials;++const {+  codes: {+    ERR_INVALID_ARG_TYPE,+    ERR_INVALID_THIS,+    ERR_EVENT_RECURSION,+  }+} = require('internal/errors');+const kRejection = SymbolFor('nodejs.rejection');++const perf_hooks = require('perf_hooks');+const { customInspectSymbol } = require('internal/util');+const { inspect } = require('util');++const events = new SafeWeakMap();+const targets = new SafeWeakMap();

Right – we can use private properties now, maybe we should?

(I’m personally still a fan of plain symbols but I feel like I’m not in the majority there.)

jasnell

comment created time in 2 days

pull request commentnodejs/node

src: use const in constant args.Length()

:+1: to fast-track as a straightforward change?

Himself65

comment created time in 2 days

delete branch addaleax/libuv

delete branch : fix-1633

delete time in 2 days

PR closed libuv/libuv

win: work around QueryPerformanceCounter() turning backwards

This is not a great solution to the referenced bug, but it seems fair as libuv is intended to be a platform abstraction library that (also) deals with OS bugs.

Adding a regression test does not seem feasible.

Fixes: https://github.com/libuv/libuv/issues/1633

+8 -2

16 comments

1 changed file

addaleax

pr closed time in 2 days

pull request commentlibuv/libuv

win: work around QueryPerformanceCounter() turning backwards

Closing in favour of https://github.com/libuv/libuv/pull/2866

addaleax

comment created time in 2 days

Pull request review commentnodejs/node

fs: add mkstemp functions

 static void Mkdtemp(const FunctionCallbackInfo<Value>& args) {   } } +static void Mkstemp(const FunctionCallbackInfo<Value>& args) {+  Environment* env = Environment::GetCurrent(args);+  Isolate* isolate = env->isolate();++  const int argc = args.Length();+  CHECK_GE(argc, 2);++  BufferValue tmpl(isolate, args[0]);+  CHECK_NOT_NULL(*tmpl);++  const enum encoding encoding = ParseEncoding(isolate, args[1], UTF8);++  FSReqBase* req_wrap_async = GetReqWrap(args, 2);+  if (req_wrap_async != nullptr) {  // mkstemp(tmpl, encoding, req)+    AsyncCall(env,+              req_wrap_async,+              args,+              "mkstemp",+              encoding,+              AfterMkstemp,+              uv_fs_mkstemp,+              *tmpl);+  } else {  // mkstemp(tmpl, encoding, undefined, ctx)+    CHECK_EQ(argc, 4);+    FSReqWrapSync req_wrap_sync;+    FS_SYNC_TRACE_BEGIN(mkstemp);+    SyncCall(env, args[3], &req_wrap_sync, "mkstemp", uv_fs_mkstemp, *tmpl);+    FS_SYNC_TRACE_END(mkstemp);+    const char* path = req_wrap_sync.req.path;+    int fd = req_wrap_sync.req.result;++    Local<Value> error;+    MaybeLocal<Value> rc = StringBytes::Encode(isolate, path, encoding, &error);+    if (rc.IsEmpty()) {+      Local<Object> ctx = args[3].As<Object>();+      ctx->Set(env->context(), env->error_string(), error).Check();+      return;+    }++    Local<Object> result = Object::New(isolate);+    result->Set(env->context(), env->path_string(), rc.ToLocalChecked())+        .Check();+    result->Set(env->context(), env->fd_string(), Integer::New(isolate, fd))+        .Check();+    args.GetReturnValue().Set(result);

Yes, exactly, although I’m guessing you want to update these lines here (where this comment points to) as well? :)

targos

comment created time in 2 days

Pull request review commentnodejs/node

fs: add mkstemp functions

 static void Mkdtemp(const FunctionCallbackInfo<Value>& args) {   } } +static void Mkstemp(const FunctionCallbackInfo<Value>& args) {+  Environment* env = Environment::GetCurrent(args);+  Isolate* isolate = env->isolate();++  const int argc = args.Length();+  CHECK_GE(argc, 2);++  BufferValue tmpl(isolate, args[0]);+  CHECK_NOT_NULL(*tmpl);++  const enum encoding encoding = ParseEncoding(isolate, args[1], UTF8);++  FSReqBase* req_wrap_async = GetReqWrap(args, 2);+  if (req_wrap_async != nullptr) {  // mkstemp(tmpl, encoding, req)+    AsyncCall(env,+              req_wrap_async,+              args,+              "mkstemp",+              encoding,+              AfterMkstemp,+              uv_fs_mkstemp,+              *tmpl);+  } else {  // mkstemp(tmpl, encoding, undefined, ctx)+    CHECK_EQ(argc, 4);+    FSReqWrapSync req_wrap_sync;+    FS_SYNC_TRACE_BEGIN(mkstemp);+    SyncCall(env, args[3], &req_wrap_sync, "mkstemp", uv_fs_mkstemp, *tmpl);+    FS_SYNC_TRACE_END(mkstemp);+    const char* path = req_wrap_sync.req.path;+    int fd = req_wrap_sync.req.result;++    Local<Value> error;+    MaybeLocal<Value> rc = StringBytes::Encode(isolate, path, encoding, &error);+    if (rc.IsEmpty()) {+      Local<Object> ctx = args[3].As<Object>();+      ctx->Set(env->context(), env->error_string(), error).Check();+      return;+    }++    Local<Object> result = Object::New(isolate);+    result->Set(env->context(), env->path_string(), rc.ToLocalChecked())+        .Check();+    result->Set(env->context(), env->fd_string(), Integer::New(isolate, fd))+        .Check();+    args.GetReturnValue().Set(result);

Similar to https://github.com/nodejs/node/pull/33229#discussion_r427089014, I’d probably recommend passing these values as an array. Alternatively, it would be nice to not use .Check() here and elsewhere, since these Set() calls can fail.

targos

comment created time in 2 days

issue commentnodejs/node

Pushed a branch to nodejs/node by mistake

git push upstream :instrument-libuv should do the trick :)

(or if your remote isn’t named upstream, replace that with whichever one you use for the main repo)

bzoz

comment created time in 2 days

issue commentnodejs/node

console.group() emits duplicate CDP messages

@Pratik-ahirrao I don’t really know where to start here, tbh. It’s probably not hard to fix but I don’t know what the actual underlying cause is here, otherwise I would have looked into this when it was opened.

connor4312

comment created time in 3 days

issue commentnodejs/node

AbortController - Reaffirming promise reject & AbortError semantics

  • We don't have DOMException in node, so we need to make it instanceof Error

Small correction: We do have DOMException in Node.js:

> new worker_threads.MessageChannel().port1.postMessage(process)
Uncaught:
DOMException [DataCloneError]: function _rawDebug(...args) {
    binding._rawDebug(format.apply(null, args));
  } could not be cloned.

It’s not exposed as a global, but we could change that of course.

Bnaya

comment created time in 3 days

issue commentnodejs/node

console.group() emits duplicate CDP messages

@Pratik-ahirrao There’s nobody actively working on this, as far as I know.

connor4312

comment created time in 3 days

issue commentnodejs/help

Microsoft.AspNetCore.SpaServices[0] An unhandled exception occurred: Invalid or unexpected token

Can you share your Node.js/npm version, your package.json (in particular the version of bluebird in your node_modules folder, etc.)?

Teomazivila

comment created time in 3 days

Pull request review commentnodejs/node

src: always enable idle notifier

 const rawMethods = internalBinding('process_methods'); // TODO(joyeecheung): deprecate and remove these underscore methods process._debugProcess = rawMethods._debugProcess; process._debugEnd = rawMethods._debugEnd;-process._startProfilerIdleNotifier = rawMethods._startProfilerIdleNotifier;-process._stopProfilerIdleNotifier = rawMethods._stopProfilerIdleNotifier;++// Stubs for legacy methods.+process._startProfilerIdleNotifier = () => {};+process._stopProfilerIdleNotifier = () => {};

If a user wanted to disable it, it would be a changed behavior?

Only in terms of diagnostic output, not program behavior. Practically speaking, this is not something that’s used in end-user code but in diagnostic platforms.

If we want to prevent usage of an API we should definitely let the user know about it. Just silently doing nothing seems pretty bad to me.

I don’t want to prevent usage of this API, hence the lack of a deprecation.

A deprecation notice is IMO also not be invasive. If a user does not want to get notified, it's possible to opt-out of those.

I mean, you know I disagree strongly here.

addaleax

comment created time in 4 days

Pull request review commentnodejs/node

src: always enable idle notifier

 const rawMethods = internalBinding('process_methods'); // TODO(joyeecheung): deprecate and remove these underscore methods process._debugProcess = rawMethods._debugProcess; process._debugEnd = rawMethods._debugEnd;-process._startProfilerIdleNotifier = rawMethods._startProfilerIdleNotifier;-process._stopProfilerIdleNotifier = rawMethods._stopProfilerIdleNotifier;++// Stubs for legacy methods.+process._startProfilerIdleNotifier = () => {};+process._stopProfilerIdleNotifier = () => {};

@BridgeAR … this PR turns the functionality always-on rather than using these methods to enable or disable it. This isn’t even a breaking change, and in fact adding a runtime deprecation (--pending-deprecation or not) would be far more invasive, so I can’t really agree here at all.

(That being said, I’ll probably not update the PR until I have looked into Ben’s concerns anyway.)

addaleax

comment created time in 4 days

create barnchaddaleax/node

branch : atomic-queue

created branch time in 4 days

issue commentnodejs/diagnostics

Async hooks and cancellation

IIUC there is nothing that is cancellable or should change in the async_hooks module but I wanted to make sure that cancellation semantics wouldn't require particular changes to async_hooks.

I think that’s accurate. :+1:

benjamingr

comment created time in 4 days

issue commentnodejs/node

[feature req] add `maxHeaderSize` to `http2`

@himself65 I don’t see any issues with adding an alias for parity between HTTP/1 and HTTP/2. Having that will make things easier for users, and I think that’s worth the (very small) increase in option complexity.

rexagod

comment created time in 4 days

pull request commentnodejs/node

[v14.x] deps: update V8 to 8.3

/cc @addaleax do you think we're good ABI-wise?

Yes, looks all good to me :+1:

targos

comment created time in 4 days

pull request commentnodejs/node

process: Add --unhandled-rejections=throw and =warn-with-error

@dfabulich No need to rebase – the relevant CI for merging this is the one that is posted by @nodejs-github-bot. The Github Actions ones are merely informative. So all that rebasing will do is making it harder to figure out what changes have been made since the last review/CI run/etc. :)

dfabulich

comment created time in 5 days

issue closedaddaleax/lzma-native

LZMA().decompress returns null

There is a old software that reads 2 files and decompresses them using LZMA (not LZMA2). It's written in Adobe AIR, using buildin utils to work on ByteArray. Here is a function that uses uncompress method.

        public function decode(bytes:ByteArray):ThingData
        {
            if (!bytes)
                throw new NullArgumentError("bytes");

            bytes.position = 0;
            bytes.endian = Endian.LITTLE_ENDIAN;
            bytes.uncompress(CompressionAlgorithm.LZMA);

            var version:uint = bytes.readUnsignedShort();
            if (version == OBDVersions.OBD_VERSION_2)
                return decodeV2(bytes);
            else if (version >= 710) // OBD version 1: client version in the first two bytes.
                return decodeV1(bytes);
            else
                throw new Error(StringUtil.format("Invalid OBD version {0}", version));
        }

I'm loading same files using File System and LZMA().decompress to "uncompress" them, however returned data is always null.

const express = require('express')
const fs = require('fs')
const lzma = require('lzma-native')

const app = express()
const port = 3000

app.listen(port, () => {
    fs.readFile("First.dat", null, (err, data) => {
        lzma.LZMA().decompress(data.buffer, (decompressedResult) => {
            console.log(decompressedResult) // null
        });
    })
})

I'm attaching one of the files (2nd is around 170MB). First.zip

closed time in 5 days

Oen44

issue commentaddaleax/lzma-native

LZMA().decompress returns null

@Oen44 It’s literally not my job, in any way, to figure out how your code works.

Oen44

comment created time in 5 days

issue commentaddaleax/lzma-native

LZMA().decompress returns null

@Oen44 I don’t know. Whatever First.dat is, it is not an LZMA file, so no, lzma-native won’t be able to decompress it.

Looking at the file directly, it seems like there are lots of strings and null bytes in there, which are good indications that it’s just an uncompressed raw data file.

Oen44

comment created time in 5 days

issue commentaddaleax/lzma-native

LZMA().decompress returns null

@Oen44 So … multiple things here:

  • The decompress() function here takes a second argument that provides the error, if one occurred. In this case, that is LZMA_FORMAT_ERROR: File format not recognized.
  • If I unpack First.zip as attached by you here and run lzma --lzma1 -d < First.dat on the command line, that fails similarly.
  • You should not be using data.buffer here – data is the right thing to use. A Node.js Buffer does not need to have a 1:1 correspondence to the underlying ArrayBuffer.
Oen44

comment created time in 5 days

push eventpiscinajs/piscina

Anna Henningsen

commit sha eb386dba4162118a45bbf1ca1d066fa6f36baf3b

Add niceIncrement option on Linux The OS restriction is due to the fact that macOS does not provide per-thread priority values.

view details

push time in 5 days

delete branch piscinajs/piscina

delete branch : niceness

delete time in 5 days

PR merged piscinajs/piscina

Add niceIncrement option on Linux semver-minor

The OS restriction is due to the fact that macOS does not provide per-thread priority values.

+72 -6

1 comment

7 changed files

addaleax

pr closed time in 5 days

issue commentnodejs/help

Periodic performance loss

@felipebalbi You may be able to use node --trace-gc to look into when garbage collection happens and how long it takes.

felipebalbi

comment created time in 5 days

push eventpiscinajs/piscina

Anna Henningsen

commit sha 19c34eabe739f700932bc179238b0f2990856185

Add niceIncrement option on Linux The OS restriction is due to the fact that macOS does not provide per-thread priority values.

view details

push time in 5 days

push eventpiscinajs/piscina

Anna Henningsen

commit sha 4ad1d00328961900f11ee73c696579ee757e0325

fixup! Add niceIncrement option on Linux Co-authored-by: James M Snell <jasnell@gmail.com>

view details

push time in 5 days

push eventpiscinajs/piscina

Anna Henningsen

commit sha 90bb03b7c7afe5190355eec8b1ad933627d662ee

fixup! Add niceIncrement option on Linux

view details

push time in 5 days

push eventpiscinajs/piscina

Anna Henningsen

commit sha ca8c3c8fc3a5a01e4185f4e1066ce379979e4ab0

fixup! Add niceIncrement option on Linux

view details

push time in 5 days

PR opened piscinajs/piscina

Add niceIncrement option on Linux

The OS restriction is due to the fact that macOS does not provide per-thread priority values.

+68 -6

0 comment

7 changed files

pr created time in 5 days

create barnchpiscinajs/piscina

branch : niceness

created branch time in 5 days

push eventaddaleax/nice-napi

Anna Henningsen

commit sha 4e1a448503544c2ba9f1a7eaa3fad2eaad3e350e

Exclude Windows in package.json

view details

push time in 5 days

created tagaddaleax/nice-napi

tagv1.0.2

nice(2) bindings for Node.js

created time in 5 days

delete tag addaleax/nice-napi

delete tag : v1.0.2

delete time in 5 days

push eventaddaleax/nice-napi

Anna Henningsen

commit sha ef877df57198284f5bd1d3e4d70ae75036be6268

Exclude Windows in package.json

view details

push time in 5 days

created tagaddaleax/nice-napi

tagv1.0.2

nice(2) bindings for Node.js

created time in 5 days

push eventaddaleax/nice-napi

Anna Henningsen

commit sha d2ee89d41a04c019d59b9bd4aa8137f6d6b6efc7

Add worker test

view details

push time in 5 days

delete branch addaleax/nice-napi

delete branch : maybe-macos

delete time in 5 days

push eventaddaleax/nice-napi

Anna Henningsen

commit sha ffdb8aa76dd1efdc1866da43d67143ed0f0e24fe

Add worker test

view details

push time in 5 days

create barnchaddaleax/nice-napi

branch : maybe-macos

created branch time in 5 days

created tagaddaleax/nice-napi

tagv1.0.1

nice(2) bindings for Node.js

created time in 5 days

push eventaddaleax/nice-napi

Anna Henningsen

commit sha c48b0e4ba81033d0cdf35e356a32b4607b217d90

Fix prebuildify script name

view details

push time in 5 days

created tagaddaleax/nice-napi

tagv1.0.0

nice(2) bindings for Node.js

created time in 5 days

push eventaddaleax/nice-napi

Anna Henningsen

commit sha 4c919780f476de0fda5944cef47e6d7fc07bfd5d

Initial commit

view details

push time in 5 days

push eventaddaleax/nice-napi

Anna Henningsen

commit sha 76f9d5438858fb57322f73d8c3cb76da93ff597a

Initial commit

view details

push time in 5 days

push eventaddaleax/nice-napi

Anna Henningsen

commit sha 90ae058c742593975437ce1b73d2fbe46b964a34

Initial commit

view details

push time in 5 days

push eventaddaleax/nice-napi

Anna Henningsen

commit sha 43881c58958572cc74a1826ac64b926a7e58a9bb

Initial commit

view details

push time in 5 days

push eventaddaleax/nice-napi

Anna Henningsen

commit sha 15b0b3c2302495c91e1e51f3da35df2280190865

Initial commit

view details

push time in 5 days

push eventaddaleax/nice-napi

Anna Henningsen

commit sha bbc487551a5ed6c915be641937fa0e3737df50d8

Initial commit

view details

push time in 5 days

create barnchaddaleax/nice-napi

branch : master

created branch time in 5 days

MemberEvent

created repositoryaddaleax/nice-napi

nice(2) bindings for Node.js

created time in 5 days

pull request commentnodejs/node

lib: do not show warning on timeout overflow

@BridgeAR I’m kind of surprised to hear that – I don’t see anything in the code that would enforce that limit.

yashLadha

comment created time in 5 days

Pull request review commentnodejs/node

src: use symbol to store `AsyncWrap` resource

 class AsyncWrap : public BaseObject {   static void EmitAfter(Environment* env, double async_id);   static void EmitPromiseResolve(Environment* env, double async_id); -  void EmitDestroy();+  void EmitDestroy(bool from_gc = false);

I generally agree with that but here there’s effectively only one call site where passing true ever makes sense, so I don’t think this really falls under “boolean trap”.

addaleax

comment created time in 5 days

pull request commentnodejs/node

lib: do not show warning on timeout overflow

@yashLadha Since you requested review from me – my position still stands, we should drop the warnings but also fix the behavior to work for values outside of the the 32-bit range, because there’s nothing speaking against that.

yashLadha

comment created time in 5 days

Pull request review commentnodejs/node

[WIP] src,lib: policy permissions

+#ifndef SRC_POLICY_POLICY_INL_H_+#define SRC_POLICY_POLICY_INL_H_++#include "policy/policy.h"+#include "node_errors.h"+#include "env-inl.h"++#include <array>+#include <string>+#include <vector>++namespace node {+namespace policy {++Policy* Policy::GetCurrent(Environment* env) {+  return GetCurrent(env->context());+}++Policy* Policy::GetCurrent(v8::Isolate* isolate) {+  return GetCurrent(isolate->GetCurrentContext());+}++Policy* Policy::GetCurrent(v8::Local<v8::Context> context) {+  if (UNLIKELY(context.IsEmpty())) {+    return nullptr;+  }+  if (UNLIKELY(context->GetNumberOfEmbedderDataFields() <=+               ContextEmbedderIndex::kPolicyIndex)) {+    return nullptr;+  }+  Policy* policy = static_cast<Policy*>(+      context->GetAlignedPointerFromEmbedderData(+          ContextEmbedderIndex::kPolicyIndex));+  return policy;+}++bool Policy::test(Permissions permission) const {+  return !permissions_.test(static_cast<size_t>(permission));+}++#define V(name, _, parent)                                                     \+  if (permission == Permissions::k##parent)                                    \+    SetRecursively(Permissions::k##name, value);+void Policy::SetRecursively(Permissions permission, bool value) {+  if (permission != Permissions::kPermissionsRoot)+    permissions_[static_cast<size_t>(permission)] = value;+  PERMISSIONS(V)+}+#undef V++template <typename...P>+bool Policy::granted(P...permissions) const {+  std::array<Permissions, sizeof...(permissions)> perms {+    std::forward<P>(permissions)...+  };+  for (Permissions permission : perms) {+    if (UNLIKELY(!test(permission)))+      return false;+  }+  return true;+}++template <typename...P>+void Policy::grant(P... permissions) {+  if (locked_) return;+  std::array<Permissions, sizeof...(permissions)> perms {+    std::forward<P>(permissions)...+  };+  for (Permissions permission : perms)+    SetRecursively(permission, false);+}++template <typename...P>+void Policy::deny(P... permissions) {+  std::array<Permissions, sizeof...(permissions)> perms {+    std::forward<P>(permissions)...+  };+  for (Permissions permission : perms)+    SetRecursively(permission, true);+}++#define V(Name, label, _)                                                      \+  if (strcmp(name.c_str(), label) == 0) return Permissions::k##Name;+Permissions Policy::PermissionFromName(const std::string& name) {+  if (strcmp(name.c_str(), "*") == 0) return Permissions::kPermissionsRoot;+  PERMISSIONS(V)+  return Permissions::kPermissionsCount;+}+#undef V++template <typename...P>+bool Policy::grantedByName(P...permissions) const {+  std::array<std::string, sizeof...(permissions)> perms {+    std::forward<P>(permissions)...+  };+  for (std::string& name : perms) {+    Permissions permission = PermissionFromName(name);+    if (permission == Permissions::kPermissionsCount || !granted(permission))+      return false;+  }+  return true;+}++template <typename...P>+void Policy::grantByName(P... permissions) {+  if (locked_) return;+  std::array<std::string, sizeof...(permissions)> perms {+    std::forward<P>(permissions)...+  };+  for (std::string& name : perms) {+    Permissions permission = PermissionFromName(name);+    if (permission != Permissions::kPermissionsCount)+      grant(permission);+  }+}++template <typename...P>+void Policy::denyByName(P... permissions) {+  if (locked_) return;+  std::array<std::string, sizeof...(permissions)> perms {+    std::forward<P>(permissions)...+  };+  for (std::string& name : perms) {+    Permissions permission = PermissionFromName(name);+    if (permission != Permissions::kPermissionsCount)+      deny(permission);+  }+}++std::vector<Permissions> Policy::Parse(+    const std::string& permissions,+    std::vector<std::string>* errors) {+  std::vector<Permissions> perms;+  std::string::size_type pos = 0;+  std::string::size_type index = 0;+  Permissions perm;+  std::string name;++  while ((index = permissions.find_first_of(",", pos)) != std::string::npos) {

We have SplitString in util.h, maybe that’s a bit nicer to work with?

(I also feel like this could go into the .cc file, it’s not really very inline-able)

jasnell

comment created time in 6 days

Pull request review commentnodejs/node

[WIP] src,lib: policy permissions

+#ifndef SRC_POLICY_POLICY_H_+#define SRC_POLICY_POLICY_H_++#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS++#include "v8.h"++#include <bitset>+#include <string>+#include <vector>++namespace node {++class Environment;++namespace policy {++#define PERMISSIONS(V)                                                         \+  V(Special, "special", PermissionsRoot)                                       \+  V(SpecialInspector, "special.inspector", Special)                            \+  V(SpecialAddons, "special.addons", Special)                                  \+  V(SpecialChildProcess, "special.child_process", Special)                     \+  V(Workers, "workers", PermissionsRoot)                                       \

We should make sure that Workers start out with the same policy as the spawning context, not just the ones passed to Environment in the initial setup through execArgv – I think #22112 did that.

jasnell

comment created time in 6 days

Pull request review commentnodejs/node

[WIP] src,lib: policy permissions

 inline void Environment::AssignToContext(v8::Local<v8::Context> context,   // Used to retrieve bindings   context->SetAlignedPointerInEmbedderData(       ContextEmbedderIndex::kBindingListIndex, &(this->bindings_));+  context->SetAlignedPointerInEmbedderData(+      ContextEmbedderIndex::kPolicyIndex, this->policy_.get());

Can you leave a TODO comment here that indicates that it would be nice to group all the per-Context data in a C++ struct? I feel like that would make lifetime management for these a lot easier

jasnell

comment created time in 6 days

Pull request review commentnodejs/node

[WIP] src,lib: policy permissions

+#ifndef SRC_POLICY_POLICY_INL_H_+#define SRC_POLICY_POLICY_INL_H_++#include "policy/policy.h"+#include "node_errors.h"+#include "env-inl.h"++#include <array>+#include <string>+#include <vector>++namespace node {+namespace policy {++Policy* Policy::GetCurrent(Environment* env) {+  return GetCurrent(env->context());+}++Policy* Policy::GetCurrent(v8::Isolate* isolate) {+  return GetCurrent(isolate->GetCurrentContext());+}++Policy* Policy::GetCurrent(v8::Local<v8::Context> context) {+  if (UNLIKELY(context.IsEmpty())) {+    return nullptr;+  }+  if (UNLIKELY(context->GetNumberOfEmbedderDataFields() <=+               ContextEmbedderIndex::kPolicyIndex)) {+    return nullptr;+  }+  Policy* policy = static_cast<Policy*>(+      context->GetAlignedPointerFromEmbedderData(+          ContextEmbedderIndex::kPolicyIndex));+  return policy;+}++bool Policy::test(Permissions permission) const {+  return !permissions_.test(static_cast<size_t>(permission));+}++#define V(name, _, parent)                                                     \+  if (permission == Permissions::k##parent)                                    \+    SetRecursively(Permissions::k##name, value);+void Policy::SetRecursively(Permissions permission, bool value) {+  if (permission != Permissions::kPermissionsRoot)+    permissions_[static_cast<size_t>(permission)] = value;+  PERMISSIONS(V)+}+#undef V++template <typename...P>+bool Policy::granted(P...permissions) const {+  std::array<Permissions, sizeof...(permissions)> perms {+    std::forward<P>(permissions)...+  };+  for (Permissions permission : perms) {+    if (UNLIKELY(!test(permission)))+      return false;+  }+  return true;+}

Some compilers seem to instantiate the std::array + roll up the loop when permissions large-ish (> 3 elements) … I don’t know if it matters to you, but I think we want to keep perf impact as minimal as possible, and I think it makes sense to address that? The classical approach to that would be recursion, i.e.

bool Policy::granted() const { return true; }

template <typename...P>
bool Policy::granted(Permission p, P...permissions) const {
  return LIKELY(test(p)) && granted(permissions...);
}

(and it might also make sense to move the (UN)LIKELY() into test() itself, I think the compiler should be clever enough to understand that)

jasnell

comment created time in 6 days

Pull request review commentnodejs/node

[WIP] src,lib: policy permissions

+#ifndef SRC_POLICY_POLICY_INL_H_+#define SRC_POLICY_POLICY_INL_H_++#include "policy/policy.h"+#include "node_errors.h"+#include "env-inl.h"++#include <array>+#include <string>+#include <vector>++namespace node {+namespace policy {++Policy* Policy::GetCurrent(Environment* env) {+  return GetCurrent(env->context());+}++Policy* Policy::GetCurrent(v8::Isolate* isolate) {+  return GetCurrent(isolate->GetCurrentContext());+}++Policy* Policy::GetCurrent(v8::Local<v8::Context> context) {+  if (UNLIKELY(context.IsEmpty())) {+    return nullptr;+  }+  if (UNLIKELY(context->GetNumberOfEmbedderDataFields() <=+               ContextEmbedderIndex::kPolicyIndex)) {

Ideally, we’d check that this is Node.js context using Environment::GetCurrent() != nullptr – in an embedding situation, a context could have more than kPolicyIndex fields, but the field might have a completely different meaning there

jasnell

comment created time in 6 days

issue openedlnug/speakers

11 years of Node: Let’s have an honest conversation

Node.js has been around for a long time now, and it’s worth looking at what went great, what went well, what didn’t go so well, and where we’ll go from here. Having been a core contributor for a long time now, I’ll reflect on the processes around Node.js and the results we’re getting out of them, and try to have an honest conversation on where the community stands and how fresh new projects like deno will change the landscape of JS outside of the browser.


Over the last 4 years, Anna has been one of the most active contributors to Node.js core. She is fueled by a passion for Node.js and its community.

https://twitter.com/addaleax, working at NearForm

  • [x] I confirm that I will abide by the Code of Conduct
  • [x] I confirm my talk is 20 mins long in total.

created time in 6 days

pull request commentaddaleax/gen-esm-wrapper

test: add test when no target

Thanks for the PR! :blue_heart:

ZYSzys

comment created time in 6 days

push eventaddaleax/gen-esm-wrapper

zhangyongsheng

commit sha 75e3cdca410c19e5c0cc3ce6c922796dd8ad3bf0

test: add test when no target

view details

push time in 6 days

PR merged addaleax/gen-esm-wrapper

test: add test when no target

When no target provided, target would be '-', always be type of string.

And add test when no target provided.

+19 -1

0 comment

2 changed files

ZYSzys

pr closed time in 6 days

pull request commentnodejs/node

fs: Replace checkPosition with validateInteger

@rickyes This still needs to be rebased using git rebasegit merge doesn’t work for our CI.

Let me know if you’d prefer that somebody else does that, that’s no problem.

rickyes

comment created time in 6 days

issue commentnodejs/node

Check failed: result.second

Except for the race condition, so, with node 14.x (also the 14.3 that implements the fix), it's no (more?) correct to have multiple create_node_buffer pointing at the same c buffer?

Yes – it’s unfortunate but it’s what it is.

I have to keep a reference to the node buffers mapped to the frame data?

Well, that’s what I ended up doing – it’s not great, but it works. You’ll want to make sure that frames is accessed correctly and persisted for the duration of the addon (depending on your addon that might mean using a) napi_set_instance_data()/napi_get_instance_data() to store it in some struct that contains that map, or, if it is possible that the same Buffer base pointers end up being used across multiple threads, b) use a global for the map + mutexes for locking) and you’ll want to add a finalizer callback to Buffer::New() that removes the entry from the map to avoid memory leaks.

richardlau

comment created time in 6 days

push eventnodejs/node

Ruben Bridgewater

commit sha da7be6979e3cb097a75f8cf93895deb0f1002002

doc: fix readline key binding documentation The documentation for two key bindings was not correct. Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> PR-URL: https://github.com/nodejs/node/pull/33361 Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>

view details

Ruben Bridgewater

commit sha 9de08f773ec4efda54ca8c9e3bc4041bade7f46f

lib: update TODO comments This removes one TODO comment and adds another that indicates that readline is currently not able to trigger specific escape sequences. Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> PR-URL: https://github.com/nodejs/node/pull/33361 Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>

view details

push time in 7 days

PR closed nodejs/node

doc: update readline key-bindings and TODO comments author ready readline

doc: fix readline key binding documentation

The documentation for two key bindings was not correct.

lib: update TODO comments

This removes one TODO comment and adds another that indicates that readline is currently not able to trigger specific escape sequences.

@nodejs/streams @nodejs/libuv does anyone know why the stream emits \b in case <ctrl><backspace> or <ctrl><shift><backspace> is used? I would expect it to be a different escape code and I tried to find documentation about it but I failed.

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] tests and/or benchmarks are included
  • [x] documentation is changed or added
  • [x] commit message follows commit guidelines

<!-- Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. -->

+7 -5

5 comments

3 changed files

BridgeAR

pr closed time in 7 days

pull request commentnodejs/node

doc: update readline key-bindings and TODO comments

Landed in 4c4c22635927...9de08f773ec4

BridgeAR

comment created time in 7 days

issue commentnodejs/TSC

npm currency on Node v12

@mcollina Are your Node.js versions off by 2? i.e. delay to v15 vs do it before v14 goes LTS?

mcollina

comment created time in 7 days

push eventnodejs/node

Shelley Vohr

commit sha 81216a349d902dfef94878de75a6fe7ed1c90d1c

doc: claim ABI version 85 for Electron 11 PR-URL: https://github.com/nodejs/node/pull/33375 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

view details

push time in 7 days

PR closed nodejs/node

docs: claim ABI version 85 for Electron 11 doc

Claiming our next ABI number :)

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] commit message follows commit guidelines

<!-- Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. -->

+2 -1

1 comment

1 changed file

codebytere

pr closed time in 7 days

pull request commentnodejs/node

docs: claim ABI version 85 for Electron 11

Landed in 81216a349d902dfef94878de75a6fe7ed1c90d1c

codebytere

comment created time in 7 days

pull request commentnodejs/node

fs: Replace checkPosition with validateInteger

@rickyes Could you rebase this against master?

rickyes

comment created time in 7 days

delete branch addaleax/node

delete branch : worker-writev

delete time in 7 days

PR closed nodejs/node

worker: use _writev in internal communication author ready worker

<!-- Thank you for your pull request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests and possibly benchmarks.

Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md -->

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] commit message follows commit guidelines

<!-- Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. -->

+11 -8

4 comments

3 changed files

addaleax

pr closed time in 7 days

push eventnodejs/node

Anna Henningsen

commit sha d2a6f06dce724d24b0aa3c7a2821e4757002bffc

worker: use _writev in internal communication PR-URL: https://github.com/nodejs/node/pull/33454 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

view details

push time in 7 days

pull request commentnodejs/node

worker: use _writev in internal communication

Landed in d2a6f06dce724d24b0aa3c7a2821e4757002bffc

addaleax

comment created time in 7 days

PR closed nodejs/node

deps: update node-inspect to v2.0.0 author ready debugger dont-land-on-v10.x inspector

Highlights:

  • Remove use of process.binding on modern node (@addaleax)
  • Increase timeout for port checking (@yilmazdurmaz)
  • Auto-resume on start when NODE_INSPECT_RESUME_ON_START is set (@dolsem)

Compare: https://github.com/nodejs/node-inspect/compare/v1.11.6...v2.0.0

Generated via:

rm -rf deps/node-inspect && curl -sSL "https://github.com/nodejs/node-inspect/archive/v1.11.6.tar.gz" | tar -xzvf - && mv node-inspect-* deps/node-inspect

The version number increase is somewhat arbitrary this time around. It's a CLI so "major version" is ill defined. Main reason for picking 2.0.0 was that the tool is no longer tested on node <12.

<!-- Thank you for your pull request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests and possibly benchmarks.

Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md -->

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] make test-node-inspect passes
  • [x] tests and/or benchmarks are included
  • [x] commit message follows commit guidelines

<!-- Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. -->

+166 -29

4 comments

8 changed files

jkrems

pr closed time in 7 days

pull request commentnodejs/node

deps: update node-inspect to v2.0.0

Landed in 6961c7f804cad26b471d5f7c4c92b0861ba19f12

jkrems

comment created time in 7 days

more