profile
viewpoint
Ruben Bridgewater BridgeAR Frankfurt, Germany https://twitter.com/BridgeAR Open-Sourcer and @nodejs core collaborator. I work as a software architect consultant.

bcoe/optional-dev-dependency 4

:sunglasses: try to install an optional development dependency, YOLO if you can't.

BridgeAR/arana 1

with great power comes great responsibility

BridgeAR/0x 0

🔥 single-command flamegraph profiling 🔥

BridgeAR/acmeair 0

A Java implementation of the Acme Air Sample Application.

BridgeAR/adm-zip 0

A Javascript implementation of zip for nodejs. Allows user to create or extract zip files both in memory or to/from disk

BridgeAR/admin 0

Facilitating joint collaboration amongst the TSC and CommComm

BridgeAR/asn1.js 0

ASN.1 Decoder/Encoder/DSL

BridgeAR/assertions 0

loads of useful assertion functions

BridgeAR/async-hook-domain 0

An implementation of Domain-like error handling, built on async_hooks

BridgeAR/bitcore-lib 0

A pure and powerful JavaScript Bitcoin library

issue commentnodejs/node

repl: respect util.inspect.defaultOptions

This is working as expected. The defaultOptions are used while startingthe REPL instance. There is another option that may be modified to change the repl writer settings during execution (util.inspect.replOptions). These will only work in the standalone repl.

I do plan on adding a configuration file for the REPL that allows to set the defaults up front.

bnoordhuis

comment created time in a day

Pull request review commentnodejs/node

repl: eager-evaluate input in parens

 async function tests(options) {      '\x1B[36m[Function: koo]\x1B[39m',      '\x1B[1G\x1B[0Jrepl > \x1B[8G'],     ['a', [1, 2], undefined],+    ["{ b: 1 }['b'] === 1", [2, 6], '\x1B[33mtrue\x1B[39m',

Yes. It should not have the same result. It should be false.

codebytere

comment created time in a day

Pull request review commentnodejs/node

repl: eager-evaluate input in parens

 function REPLServer(prompt,     let awaitPromise = false;     const input = code; -    if (/^\s*{/.test(code) && /}\s*$/.test(code)) {-      // It's confusing for `{ a : 1 }` to be interpreted as a block-      // statement rather than an object literal.  So, we first try-      // to wrap it in parentheses, so that it will be interpreted as-      // an expression.  Note that if the above condition changes,-      // lib/internal/repl/utils.js needs to be changed to match.-      code = `(${code.trim()})\n`;+    // It's confusing for `{ a : 1 }` to be interpreted as a block+    // statement rather than an object literal.  So, we first try+    // to wrap it in parentheses, so that it will be interpreted as+    // an expression.  Note that if the above condition changes,+    // lib/internal/repl/utils.js needs to be changed to match.+    if (code.startsWith('{') && !code.endsWith(';')) {

The preview input is already trimmed on both sides. This code does that afterwards.

codebytere

comment created time in a day

pull request commentnodejs/node

util: fix inspecting document.all

@devsnek I tried to play around with and to me it seems like IsObject() does not count %GetUndetectable() as object.

devsnek

comment created time in a day

Pull request review commentnodejs/node

repl: eager-evaluate input in parens

 function REPLServer(prompt,     let awaitPromise = false;     const input = code; -    if (/^\s*{/.test(code) && /}\s*$/.test(code)) {-      // It's confusing for `{ a : 1 }` to be interpreted as a block-      // statement rather than an object literal.  So, we first try-      // to wrap it in parentheses, so that it will be interpreted as-      // an expression.  Note that if the above condition changes,-      // lib/internal/repl/utils.js needs to be changed to match.-      code = `(${code.trim()})\n`;+    // It's confusing for `{ a : 1 }` to be interpreted as a block+    // statement rather than an object literal.  So, we first try+    // to wrap it in parentheses, so that it will be interpreted as+    // an expression.  Note that if the above condition changes,+    // lib/internal/repl/utils.js needs to be changed to match.+    if (code.startsWith('{') && !code.endsWith(';')) {

We should likely keep the regular expression. Otherwise it's not aligned anymore with the preview in case there's whitespace at the front or the end of the input.

codebytere

comment created time in a day

Pull request review commentnodejs/node

repl: eager-evaluate input in parens

 async function tests(options) {      '\x1B[36m[Function: koo]\x1B[39m',      '\x1B[1G\x1B[0Jrepl > \x1B[8G'],     ['a', [1, 2], undefined],+    ["{ b: 1 }['b'] === 1", [2, 6], '\x1B[33mtrue\x1B[39m',

Maybe add a whitespace at the beginning and also add another test for "{ b: 1 }['b'] === 1;"?

codebytere

comment created time in a day

pull request commentMaibornWolff/codecharta

Tech/rewrite plop in typescript

import usage is opt-in. Depending on the Node.js version used you might either pass through a command line flag to use esm modules or you can set a property inside the package json to indicate that the files use esm modules.

alschmut

comment created time in a day

pull request commentMaibornWolff/codecharta

Tech/remove dependencies

I just checked for angular-messages and could not find any usage either. It should therefore be fine to remove it. I did not check typedoc. It's just a dev dependency, so it's not urgent to remove it.

What might as well be removed are the following modules:

  • path: it is a direct copy of the Node.js path module. Is it not possible to use the core one instead?
  • rimraf: Node.js core has this functionality built-in in versions >= 12.x (fs.rmdir with the recursive option).
  • es6-shim: is it required to support old browsers? I would expect this not to be required.
  • Maybe some babel related dependencies? We might at least re-evaluate some of the settings similar to the es6 shim.
alschmut

comment created time in a day

issue commentMaibornWolff/codecharta

Search performance is super slow

@NearW would you be so kind and open a PR with the recent minimal change in complexity (array -> set)? That would already be worth publishing as new version patch version :-)

BridgeAR

comment created time in 2 days

issue commentMaibornWolff/codecharta

Big data is not loaded properly

Since the recent loading improvements there's a new behavior: loading the file ends up with the message that the file is corrupt (empty).

BridgeAR

comment created time in 2 days

pull request commentMaibornWolff/codecharta

Tech/rewrite file validation

This needs a rebase with master.

alschmut

comment created time in 7 days

Pull request review commentMaibornWolff/codecharta

Tech/rewrite file validation

 export class DialogService {  		return this.$mdDialog.show(prompt) 	}++	private getWrappedDialog(content: string) {+		return (+			'<md-dialog class="import-error-dialog">' ++			"<md-toolbar>" ++			'<h2 class="md-toolbar-tools">JSON Schema Error</h2>' ++			"</md-toolbar>" ++			'<md-dialog-content class="md-dialog-content">' ++			content ++			"</md-dialog-content>" ++			"<md-dialog-actions>" ++			'<md-button class="md-primary">Ok</md-button>' ++			"</md-dialog-actions>" ++			"</md-dialog>"+		)+	}++	private createDialogContent(errors: ErrorObject[]) {+		let html = ""+		errors.forEach((error: ErrorObject, index: number) => {+			const key = _.keys(error.params)[0]+			const object = " " + JSON.stringify(error.params[key])++			html += "<p><b>Error #" + (index + 1) + "</b> " + key + " <i>" + object + "</i></p>"+			html += '<p><i class="fa fa-comment-o" title="Message"></i> ' + _.lowerCase(error.message) + "</p>"

How come the error message should be lower cased?

alschmut

comment created time in 7 days

Pull request review commentMaibornWolff/codecharta

Tech/rewrite file validation

 export class DialogService {  		return this.$mdDialog.show(prompt) 	}++	private getWrappedDialog(content: string) {+		return (+			'<md-dialog class="import-error-dialog">' ++			"<md-toolbar>" ++			'<h2 class="md-toolbar-tools">JSON Schema Error</h2>' ++			"</md-toolbar>" ++			'<md-dialog-content class="md-dialog-content">' ++			content ++			"</md-dialog-content>" ++			"<md-dialog-actions>" ++			'<md-button class="md-primary">Ok</md-button>' ++			"</md-dialog-actions>" ++			"</md-dialog>"+		)+	}++	private createDialogContent(errors: ErrorObject[]) {+		let html = ""+		errors.forEach((error: ErrorObject, index: number) => {+			const key = _.keys(error.params)[0]+			const object = " " + JSON.stringify(error.params[key])++			html += "<p><b>Error #" + (index + 1) + "</b> " + key + " <i>" + object + "</i></p>"

Is the error index useful for anyone? I suggest to remove that.

The error objects seem somewhat uncommon though. How and where are these errors generated?

alschmut

comment created time in 7 days

Pull request review commentMaibornWolff/codecharta

Tech/rewrite file validation

 describe("codeChartaService", () => {  	describe("loadFiles", () => { 		const expected: CCFile = {-			fileMeta: { apiVersion: "1.1", fileName: "noFileName", projectName: "Sample Map" },+			fileMeta: { apiVersion: "1.1", fileName: fileName, projectName: "Sample Map" },
			fileMeta: { apiVersion: "1.1", fileName, projectName: "Sample Map" },

It might be good to use a linting rule to automatically use the shorthand notation. It is nicer to read and to grasp the code that way.

alschmut

comment created time in 7 days

Pull request review commentMaibornWolff/codecharta

Tech/rewrite file validation

 CodeCharta is a beautiful tool to help you visualize and understand code. It can combine code metrics from multiple sources and visualize them using 3D tree maps. CodeCharta's two major parts are:  - [analysis](https://maibornwolff.github.io/codecharta/docs/analysis/): Command-Line-Tool for generating visualization data in the form of `.cc.json` files. It includes some pre-defined importers for e.g. SonarQube, SourceMonitor, SCM log information, generic csv data, as well as a command to validate and merge multiple data files.-- [visualization](https://maibornwolff.github.io/codecharta/docs/visualization/): GUI for visualizing the code metrics inside the `.cc.json` files. The file schema is located [here](/visualization/app/codeCharta/util/schema.json) and we are using the [json-schema v4](https://tools.ietf.org/html/draft-zyp-json-schema-04) format.+- [visualization](https://maibornwolff.github.io/codecharta/docs/visualization/): GUI for visualizing the code metrics inside the `.cc.json` files. Imported files are validated with the [generatedSchema.json](/visualization/app/codeCharta/util/generatedSchema.json), which is generated using the tool [typescript-json-schema](https://github.com/YousefED/typescript-json-schema).
- [visualization](https://maibornwolff.github.io/codecharta/docs/visualization/): GUI to visualize code metrics from `.cc.json` files. Imported files are validated using JSON Schema as defined in [generatedSchema.json](/visualization/app/codeCharta/util/generatedSchema.json).
alschmut

comment created time in 7 days

pull request commentMaibornWolff/codecharta

Tech/move filestates to redux

This needs a rebase with master (git fetch && git rebase -i origin/master --autostash && git push --force-with-lease).

The PR itself is pretty huge and very difficult to review due to that. Is it possible to split the PR into multiple smaller chunks that can be reviewed independently from each other?

NearW

comment created time in 7 days

Pull request review commentMaibornWolff/codecharta

Bug/798/marked packages not imported

 legend-panel-component { 			.set-left-margin { 				margin-left: 18px; 			}++			.marked-package {+				overflow: hidden;+				vertical-align: middle;

Is this required?

alexhunziker

comment created time in 7 days

Pull request review commentMaibornWolff/codecharta

Bug/798/marked packages not imported

 legend-panel-component { 			.set-left-margin { 				margin-left: 18px; 			}++			.marked-package {+				overflow: hidden;+				vertical-align: middle;+				direction: rtl;

The direction should probably not be changed. This is normally only necessary for languages that are read right to left instead of left to right. This should not be the case here.

https://developer.mozilla.org/en-US/docs/Web/CSS/direction

alexhunziker

comment created time in 7 days

push eventMaibornWolff/codecharta

Alexander Schmutz

commit sha e8165733b033ae59d9cdd60e2c82b3cbdef728eb

Extract CodeMapNode.type as NodeType enum and replace all occurrences (#864)

view details

push time in 7 days

PR merged MaibornWolff/codecharta

Tech/node type as enum tech

Tech/node type as enum

Description

  • Use enum NodeType (File or Folder) for CodeMapNode.type instead of a string
  • Replace all occurrences within the code

After #860 is merged, we should regenerate the generatedSchema.json with npm run schema:generate in order to validate the type correctly as well.

Definition of Done

A task/pull request will not be considered to be complete until all these items can be checked off.

  • [ ] All requirements mentioned in the issue are implemented
  • [ ] Does match the Code of Conduct and the Contribution file
  • [ ] Task has its own GitHub issue (something it is solving)
    • [ ] Issue number is included in the commit messages for traceability
  • [ ] Update the README.md with any changes/additions made
  • [ ] Update the CHANGELOG.md with any changes/additions made
  • [ ] Enough test coverage to ensure that uncovered changes do not break functionality
  • [ ] All tests pass
  • [ ] Descriptive pull request text, answering:
    • What problem/issue are you fixing?
    • What does this PR implement and how?
  • [ ] Assign your PR to someone for a code review
    • This person will be contacted first if a bug is introduced into master
  • [ ] Manual testing did not fail
+185 -151

0 comment

19 changed files

alschmut

pr closed time in 7 days

startednode-frankfurt/proposals

started time in 7 days

issue commentnodejs/node

Same second parameter type on assert.throws and asserts.doesNotThrow

The functionality is very different between throws and doesNotThrow. I do not think these should be aligned, especially since it is already discouraged to use doesNotThrow in general.

Himself65

comment created time in 7 days

Pull request review commentnodejs/node

lib: refactor isLegalPort, move to validators

 function validateEncoding(data, encoding) {   } } +// Check that the port number is not NaN when coerced to a number,+// is an integer and that it falls within the legal range of port numbers.+function validatePort(port, name = 'Port', { allowZero = true } = {}) {

Using the destructuring with default values is an overhead that each function call has to go through. I am not a fan of having magical boolean values but that would have less overhead.

jasnell

comment created time in 7 days

Pull request review commentnodejs/node

lib: refactor isLegalPort, move to validators

 Socket.prototype.bind = function(port_, address_ /* , callback */) {   return this; }; --function validatePort(port) {-  const legal = isLegalPort(port);-  if (legal)-    port = port | 0;

This seems to change the behavior? Zero was prohibited before.

jasnell

comment created time in 8 days

pull request commentnodejs/node

test: increase test timeout to prevent flakiness

A large value would be a bad user experience in case they run the test alone and this will most likely be triggered when working onthe test or when working on repl code. I guess a value up to 1000ms would still be fine and 1500 if necessary. It only came up rarely as being flaky so doubling the timeout should be very safe.

BridgeAR

comment created time in 12 days

pull request commentnodejs/build

ansible: metrics server (WIP) & removal of Cloudflare cache bypass

Is there any update here? Getting back the metrics would be really great!

rvagg

comment created time in 12 days

issue commentnodejs/node

Clear the internal require `statCache` on an unsuccessful module load?

That approach sounds fine to me. It would hurt the loading percormance of all following calls though. I'll check if it is possible to isolate the failed modules stats to only clear those.

benjamingr

comment created time in 12 days

pull request commentnodejs/node

util: add coverage for util.inspect.colors alias setter

TIL: It's possible to review closed PRs ;-)

Trott

comment created time in 12 days

issue commentnodejs/node

flaky: test-net-connect-options-port

Just checking if this is still flaky: https://ci.nodejs.org/job/node-stress-single-test/61/

refack

comment created time in 12 days

push eventnode-frankfurt/proposals

Ruben Bridgewater

commit sha b3b1728fd0bda74cbff2a4f142719945f8a2639b

Create CODE_OF_CONDUCT.md

view details

push time in 12 days

push eventnode-frankfurt/proposals

Ruben Bridgewater

commit sha b6bf14eb77abb4e4bd13ab63ad6cdcb8bac6c6b6

Update README.md

view details

push time in 13 days

pull request commentnodejs/node

test: increase test timeout to prevent flakiness

@addaleax the test was written in a way that it expects output that is triggered due to the input. That is received as event. If input does not provide any output, the test will hang. As such the timeout stops the test early to inform the user about the last input.

BridgeAR

comment created time in 13 days

pull request commentnodejs/node

benchmark: reland test refactoring

Benchmark CI https://ci.nodejs.org/job/node-test-commit-custom-suites-freestyle/12185/

BridgeAR

comment created time in 13 days

push eventBridgeAR/node

Ruben Bridgewater

commit sha 5b12cbc43b235864061d6085217855db8cab2b7e

fixup: address comment

view details

push time in 13 days

issue commentNodeRedis/node-redis

ReplyError: Ready check failed: NOAUTH Authentication required.

@mariothedev @akshaykumar12527 please provide some further information, such as debug output. It is difficult to know what happened otherwise. Please use a temporary password or remove the credentials from the log output.

akshaykumar12527

comment created time in 13 days

issue commentnodejs/Release

Node.js Foundation Release WorkGroup Meeting 2020-02-13

I am also fine with cancelling.

mhdawson

comment created time in 13 days

push eventBridgeAR/node

Ruben Bridgewater

commit sha 007494232820180639f03218695889a9b79c581a

fixup: "benchmark: add `test` and `all` options and improve errors"

view details

push time in 14 days

PR opened nodejs/node

Reviewers
benchmark: reland test refactoring

#31396 was reverted in #31722. The issue was that WRK is not able to handle decimal times (and the minimum possible time is one second) and the threads must not be higher than the number of connections.

I just reverted the revert and added a fixup commit to fix the actual issue. The commit message might be changed during landing?

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. -->

+494 -743

0 comment

107 changed files

pr created time in 14 days

push eventBridgeAR/node

Ruben Bridgewater

commit sha 06adf1ef946c905be1462fba461f3efb760f8928

Revert "Revert "benchmark: remove special test entries"" This reverts commit 7cfbc9f90f3109feaeb9db5df9d4d692a62178ef.

view details

Ruben Bridgewater

commit sha 4bbf411e7fafe88332545024fedf3bcdbc782978

fixup: "benchmark: add `test` and `all` options and improve errors"

view details

push time in 14 days

push eventBridgeAR/node

Ruben Bridgewater

commit sha b970908621e3167fdf41b48fb8e96ca2f31b74f5

fixup: "benchmark: add `test` and `all` options and improve errors"

view details

push time in 14 days

create barnchBridgeAR/node

branch : 2020-02-12-reland-benchmark-test-refactoring

created branch time in 14 days

issue commentMaibornWolff/codecharta

Performance improvements for loading and delta

I did outline a couple of things that seem to have a high ROI and I am happy to discuss required changes.

BridgeAR

comment created time in 14 days

issue commentMaibornWolff/codecharta

Performance improvements for loading and delta

Thanks a lot for starting to improve the performance. Is it possible to increase the priority for further performance optimizations some time soon? It would be great to actually use codecharta for big projects. This is still laborious since it mostly requires to split the data into smaller chunks.

BridgeAR

comment created time in 14 days

pull request commentnodejs/node

revert: benchmark: test refactoring

There might be more ongoing though. I'll have a look at it later on again.

addaleax

comment created time in 15 days

pull request commentnodejs/node

revert: benchmark: test refactoring

I just had a look at this. It's due to setting the duration environment variable which is used in TestDoubleBenchmarker. The env was spread into the envs together with duration set when using wrk. That way the string value from the env replaced the original duration set by the options and the benchmark failed.

A fix for this is pretty straight forward by only setting the env value in TestDoubleBenchmarker.

addaleax

comment created time in 15 days

Pull request review commentnodejs/node

util: add coverage for util.inspect.colors alias setter

 assert.strictEqual(       '\x1B[2mdef: \x1B[33m5\x1B[39m\x1B[22m }'   ); }++// Test changing util.inspect.colors colors and aliases. Since this might have+// side effects, we do it last.+{

I suggest to clone the original value and to reset it at the end.

Trott

comment created time in 15 days

Pull request review commentNodeRedis/node-redis

tests: setup GitHub Actions to replace Travis

 describe("The 'zadd' method", function () {                 client.zrange('infinity', 0, -1, 'WITHSCORES', function (err, res) {                     assert.equal(res[5], 'inf');                     assert.equal(res[1], '-inf');-                    assert.equal(res[3], '9.9999999999999992e+22');+                    if (process.platform !== 'win32') {+                        assert.equal(res[3], '9.9999999999999992e+22');+                    } else {+                        assert.equal(res[3], '9.9999999999999992e+022');

@Salakar I guess this is an issue with Redis itself on Windows?

Salakar

comment created time in 16 days

Pull request review commentnodejs/node

fs: validate the input data before opening file

 const throwNextTick = (e) => { process.nextTick(() => { throw e; }); };     .catch(throwNextTick); } -// Test that appendFile does not accept numbers (callback API).+// Test that appendFile does not accept invalid data type (callback API). [false, 5, {}, [], null, undefined].forEach((data) => {   const errObj = {     code: 'ERR_INVALID_ARG_TYPE',     message: /"data"|"buffer"/   };+  const filename = join(tmpdir.path, 'append-invalid-data.txt');++  assert.throws(+    () => fs.appendFile(filename, data, common.mustNotCall()),+    errObj+  );+   assert.throws(-    () => fs.appendFile('foobar', data, common.mustNotCall()),+    () => fs.appendFileSync(filename, data),+    errObj+  );++  assert.rejects(+    fs.promises.appendFile(filename, data).finally(() => {

Instead of using finally here, I suggest to await assert.rejects and to verify that the file does not exist afterwards.

ZYSzys

comment created time in 16 days

PR opened nodejs/node

test: increase test timeout to prevent flakiness

This increases the waiting time for each event from 500 to 750 ms. The former timeout could be hit on very slow machines with high load.

See e.g. https://ci.nodejs.org/job/node-test-commit-linux-containered/17948/nodes=ubuntu1804_sharedlibs_zlib_x64/testReport/junit/(root)/test/parallel_test_repl/

<!-- 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] 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. -->

+1 -1

0 comment

1 changed file

pr created time in 17 days

create barnchBridgeAR/node

branch : 2020-02-10-harden-repl-test

created branch time in 17 days

push eventBridgeAR/node

Ruben Bridgewater

commit sha a3314e2cefa3b8a44b6135857c451e24198ffbab

fixup: address comment

view details

push time in 17 days

PR opened nodejs/node

test: fix flaky parallel/test-repl-history-navigation test

Two scenarios should be tested:

  1. The completion is triggered and the result is printed before the next invocation.
  2. The completion is triggered multiple times right after each other without waiting for the result. In that case only the last result should be printed.

The first scenario did not need a timeout while the latter did not need a timeout for the second invocation.

Fixes: #31094

<!-- 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] 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. -->

+13 -13

0 comment

1 changed file

pr created time in 18 days

create barnchBridgeAR/node

branch : 2020-02-09-fix-repl-history-navigation-test

created branch time in 18 days

issue commentnodejs/node

Flaky parallel/test-repl-history-navigation

@addaleax we never specified if a custom completion function may be async or not. Right now async is accepted and if someone types fast the completion could be triggered multiple times. In that case only the very last triggered completion should be accepted. We could pause the stream during the completion instead of using a counter but it's not possible to keep on typing while the completion is running in that case.

BridgeAR

comment created time in 18 days

push eventnodejs/node

Ruben Bridgewater

commit sha 36f328e21fe19f9767e1bc04481bdd921ab49615

assert: align character indicators properly This makes sure color codes are not taken into account in case util.inspect's default value was changed. PR-URL: https://github.com/nodejs/node/pull/31429 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Ruben Bridgewater

commit sha 0f6fed4f070391563c40a6c88d25deb734785274

test: stricter assert color test Make sure the assertion is actually triggered by using `assert.throws()` instead of `try/catch`. PR-URL: https://github.com/nodejs/node/pull/31429 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Ruben Bridgewater

commit sha 63f10b9f0da0539b499a076f2951526ecae8260a

tty: do not end in an infinite warning recursion It was possible that this warning ends up in an infinite recursion. The reason is that printing the warning triggered a color check and that triggered another warning. Limiting it to a single warning prevents this. PR-URL: https://github.com/nodejs/node/pull/31429 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

push time in 18 days

push eventBridgeAR/node

Ruben Bridgewater

commit sha 36f328e21fe19f9767e1bc04481bdd921ab49615

assert: align character indicators properly This makes sure color codes are not taken into account in case util.inspect's default value was changed. PR-URL: https://github.com/nodejs/node/pull/31429 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Ruben Bridgewater

commit sha 0f6fed4f070391563c40a6c88d25deb734785274

test: stricter assert color test Make sure the assertion is actually triggered by using `assert.throws()` instead of `try/catch`. PR-URL: https://github.com/nodejs/node/pull/31429 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Ruben Bridgewater

commit sha 63f10b9f0da0539b499a076f2951526ecae8260a

tty: do not end in an infinite warning recursion It was possible that this warning ends up in an infinite recursion. The reason is that printing the warning triggered a color check and that triggered another warning. Limiting it to a single warning prevents this. PR-URL: https://github.com/nodejs/node/pull/31429 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

push time in 18 days

PR closed nodejs/node

Reviewers
assert,tty: fix indicator and warning assert tty

Please have a look at the commit messages. I can split this into two PRs but I stumbled upon both things at the same time and they seemed small enough that individual commits might suffice.

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. -->

+62 -21

5 comments

9 changed files

BridgeAR

pr closed time in 18 days

pull request commentnodejs/node

assert,tty: fix indicator and warning

Landed in 1450ea7bf608a54640863e5ba23c6f0ce430e14f...63f10b9f0da0539b499a076f2951526ecae8260a :tada:

BridgeAR

comment created time in 18 days

push eventBridgeAR/node

Ruben Bridgewater

commit sha 1450ea7bf608a54640863e5ba23c6f0ce430e14f

test: improve logged errors To indicate which lines are test lines and which from Node.js core, it's good to rely on `util.inspect()` while inspecting errors. The stack was accessed directly instead in multiple cases and logging that does not provide as much information as using `util.inspect()`. PR-URL: https://github.com/nodejs/node/pull/31425 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yihong Wang <yh.wang@ibm.com>

view details

push time in 18 days

PR closed nodejs/node

test: improve logged errors test

To indicate which lines are test lines and which are from Node.js core, it's good to rely upon util.inspect() while inspecting errors. Using it also logs error properties and provides more informations about the error.

<!-- 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] 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. -->

+35 -30

6 comments

14 changed files

BridgeAR

pr closed time in 18 days

pull request commentnodejs/node

test: improve logged errors

Landed in 1450ea7bf608a54640863e5ba23c6f0ce430e14f :tada:

BridgeAR

comment created time in 18 days

push eventnodejs/node

Ruben Bridgewater

commit sha 1450ea7bf608a54640863e5ba23c6f0ce430e14f

test: improve logged errors To indicate which lines are test lines and which from Node.js core, it's good to rely on `util.inspect()` while inspecting errors. The stack was accessed directly instead in multiple cases and logging that does not provide as much information as using `util.inspect()`. PR-URL: https://github.com/nodejs/node/pull/31425 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yihong Wang <yh.wang@ibm.com>

view details

push time in 18 days

PR closed nodejs/node

benchmark: test refactoring assert async_hooks author ready benchmark buffer crypto fs http http2 net

I went ahead and refactored all our benchmark tests. The benchmark suite itself now has a test functionality built-in (using test). It is also possible to run all benchmark suites by using all. The tests are now run independent from benchmark changes and should always keep on working.

The fixtures directory is now skipped and in case there's a typo for the benchmark, the error message is now more informative.

I removed warnings from benchmark files in case they occurred.

Some tests require special options as a minimum. Those may now be passed through using the test option. These values will be used in case the benchmark test is run.

It is now possible to pass through individual configurations instead of having to use an array.

Fixes: https://github.com/nodejs/node/issues/31083

I did not yet find time to clean up the commits.

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. -->

+481 -731

8 comments

106 changed files

BridgeAR

pr closed time in 18 days

pull request commentnodejs/node

benchmark: test refactoring

Landed in 74291e4a7ba6185c1b78a110538ed3db3bc6b244...357230f4b7174380467edfb0a65a00b65b0af66c :tada:

BridgeAR

comment created time in 18 days

push eventBridgeAR/node

Anna Henningsen

commit sha 6a6279ef2a38c17a761cc15366e615c620328587

doc: add AsyncResource + Worker pool example Use Worker thread pools as an example of how `AsyncResource` can be used to track async state across callbacks. PR-URL: https://github.com/nodejs/node/pull/31601 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>

view details

Robert Nagy

commit sha 234de6f1fd90ece1edc1a12d989ab0f15a1f19b8

stream: fix finished w/ 'close' before 'finish' Emitting 'close' before 'finish' on a Writable should result in a premature close error. PR-URL: https://github.com/nodejs/node/pull/31534 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Anna Henningsen

commit sha c1da4e4aa4583c14f87c8d230ce7580f3b157ff0

src: fix inspecting `MessagePort` from `init` async hook During the `init()` async hook, the C++ object is not finished creating yet (i.e. it is an `AsyncWrap`, but not yet a `HandleWrap` or `MessagePort`). Accessing the `handle_` field is not valid in that case. However, the custom inspect function for `MessagePort`s calls `HasRef()` on the object, which would crash when the object is not fully constructed. Fix that by guarding the access of the libuv handle on that condition. PR-URL: https://github.com/nodejs/node/pull/31600 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

view details

Conor ONeill

commit sha 7e911d8b03a838e5ac6bb06c5b313533e89673ef

doc: add example to fs.promises.readdir PR-URL: https://github.com/nodejs/node/pull/31552 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

James M Snell

commit sha 907c07fa850e128c695482cd47554b5bce5e4b0c

stream: move _writableState.buffer to EOL API was deprecated back in the 0.11 days. PR-URL: https://github.com/nodejs/node/pull/31165 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com>

view details

James M Snell

commit sha bffa5044c576003198ccfee5a751c23036d0744f

crypto: move pbkdf2 without digest to EOL API has been being incrementally deprecated since 6.0.0 PR-URL: https://github.com/nodejs/node/pull/31166 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

view details

James M Snell

commit sha ec0dd6fa1cfa03b3983419acedb27ef95d297c82

lib: move GLOBAL and root aliases to EOL GLOBAL and root have been long deprecated. PR-URL: https://github.com/nodejs/node/pull/31167 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

view details

James M Snell

commit sha ab4115f17cf2859f336b3c0588d2bf9eca0e65b8

os: move tmpDir() to EOL The tmpDir alias was deprecated in 7.0.0 PR-URL: https://github.com/nodejs/node/pull/31169 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

view details

Joyee Cheung

commit sha 0effc9845f74e7351487644cbd1691196000b93e

doc: ask more questions in the bug report template Inspired by the defect report template of the V8 issue tracker PR-URL: https://github.com/nodejs/node/pull/31611 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>

view details

Beth Griggs

commit sha f0f2583c912d4c7abf6fb5a9ccd380976f1ab092

2020-02-06, Version 13.8.0 (Current) This is a security release. Vulnerabilities fixed: * **CVE-2019-15606**: HTTP header values do not have trailing OWS trimmed. * **CVE-2019-15605**: HTTP request smuggling using malformed Transfer-Encoding header. * **CVE-2019-15604**: Remotely trigger an assertion on a TLS server with a malformed certificate string. Also, HTTP parsing is more strict to be more secure. Since this may cause problems in interoperability with some non-conformant HTTP implementations, it is possible to disable the strict checks with the `--insecure-http-parser` command line flag, or the `insecureHTTPParser` http option. Using the insecure HTTP parser should be avoided. PR-URL: https://github.com/nodejs-private/node-private/pull/196

view details

Beth Griggs

commit sha e65ae4278578e51761bf9253a7c68ade0f9b897c

2020-02-06, Version 12.15.0 'Erbium' (LTS) This is a security release. Vulnerabilities fixed: * **CVE-2019-15606**: HTTP header values do not have trailing OWS trimmed. * **CVE-2019-15605**: HTTP request smuggling using malformed Transfer-Encoding header. * **CVE-2019-15604**: Remotely trigger an assertion on a TLS server with a malformed certificate string. Also, HTTP parsing is more strict to be more secure. Since this may cause problems in interoperability with some non-conformant HTTP implementations, it is possible to disable the strict checks with the `--insecure-http-parser` command line flag, or the `insecureHTTPParser` http option. Using the insecure HTTP parser should be avoided. PR-URL: https://github.com/nodejs-private/node-private/pull/197

view details

Beth Griggs

commit sha d602e586bf2baf5889586bde8e072e556db2b273

2020-02-06, Version 10.19.0 'Dubnium' (LTS) This is a security release. Vulnerabilities fixed: * **CVE-2019-15606**: HTTP header values do not have trailing OWS trimmed. * **CVE-2019-15605**: HTTP request smuggling using malformed Transfer-Encoding header. * **CVE-2019-15604**: Remotely trigger an assertion on a TLS server with a malformed certificate string. Also, HTTP parsing is more strict to be more secure. Since this may cause problems in interoperability with some non-conformant HTTP implementations, it is possible to disable the strict checks with the `--insecure-http-parser` command line flag, or the `insecureHTTPParser` http option. Using the insecure HTTP parser should be avoided. PR-URL: https://github.com/nodejs-private/node-private/pull/198

view details

James M Snell

commit sha e001710219906b45bb5ac94d7e9cb4b56a83c134

meta: fix collaborator list errors in README.md Add missing `-` characters in the list. PR-URL: https://github.com/nodejs/node/pull/31655 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

view details

Anna Henningsen

commit sha 06a43d4dcacc0c39506b8a3a1bb77411add6d9d7

test: fix flaky test-http2-stream-destroy-event-order Alternative to https://github.com/nodejs/node/pull/31590. It appears that the issue here is that the test falsely assumed that closing the client (which also currently destroys the socket rather than gracefully shutting down the connection) would still leave enough time for the server side to receive the stream error. Address that by explicitly waiting for the server side to receive the stream error before closing the client and the connection with it. Refs: https://github.com/nodejs/node/pull/31590 Refs: https://github.com/nodejs/node/issues/20750 PR-URL: https://github.com/nodejs/node/pull/31610 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Sam Roberts

commit sha f8e75512951b5060409b0c80e246ffc81ee9e72e

benchmark: support optional headers with wrk wrk did not support sending optional headers, they were silently ignored. This appears to be an oversight, they were supported for autocannon. PR-URL: https://github.com/nodejs-private/node-private/pull/189 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Sam Roberts

commit sha fe3975783cc4fdba47c2e25442ca891aab31e805

http: strip trailing OWS from header values HTTP header values can have trailing OWS, but it should be stripped. It is not semantically part of the header's value, and if treated as part of the value, it can cause spurious inequality between expected and actual header values. Note that a single SPC of leading OWS is common before the field-value, and it is already handled by the HTTP parser by stripping all leading OWS. It is only the trailing OWS that must be stripped by the parser user. header-field = field-name ":" OWS field-value OWS ; https://tools.ietf.org/html/rfc7230#section-3.2 OWS = *( SP / HTAB ) ; https://tools.ietf.org/html/rfc7230#section-3.2.3 Fixes: https://hackerone.com/reports/730779 PR-URL: https://github.com/nodejs-private/node-private/pull/189 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Fedor Indutny

commit sha 861d3f7a61f543c253337cfc1a967fa84f96c653

crypto: fix assertion caused by unsupported ext `X509V3_EXT_print` can return value different from `1` if the X509 extension does not support printing to a buffer. Instead of failing with an unrecoverable assertion - replace the relevant value in the hashmap with a JS null value. Fixes: https://hackerone.com/reports/746733 PR-URL: https://github.com/nodejs-private/node-private/pull/175 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

view details

Beth Griggs

commit sha 4c5b8dd7d80b6010c4d3e914f7e8c61cc297a1ad

deps: update llhttp to 2.0.4 PR-URL: https://github.com/nodejs-private/node-private/pull/199 Reviewed-By: Sam Roberts <vieuxtech@gmail.com>

view details

Sam Roberts

commit sha efd5a6b2eda54dd846d2bdf34f64d34701411d0e

test: using TE to smuggle reqs is not possible See: https://hackerone.com/reports/735748 PR-URL: https://github.com/nodejs-private/node-private/pull/199 Reviewed-By: Sam Roberts <vieuxtech@gmail.com>

view details

Rich Trott

commit sha a9e26268f5b464f508a033129c1ffaa694e5d361

doc,assert: rename "mode" to "assertion mode" Rename "strict mode" in the assert module to "strict assertion mode". This is to avoid confusion with the more typical meaning of "strict mode" in ECMAScript. This necessitates a corresponding change of "legacy mode" to "legacy assertion mode". PR-URL: https://github.com/nodejs/node/pull/31635 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

view details

push time in 18 days

push eventnodejs/node

Ruben Bridgewater

commit sha b70741ea438b4df01cca416949a22e9350b58258

benchmark: refactor helper into a class This is the basis to refactor the helper to use modern class language features such as private fields. It also refactors the exports to use module.exports. That way it's immediately clear what parts are exported. PR-URL: https://github.com/nodejs/node/pull/31396 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Ruben Bridgewater

commit sha dac579516ca662e731ac502c15e75009a2b9a8c9

benchmark: add `test` and `all` options and improve errors This adds a new `test` option. Using it automatically uses a single minimal option matrix to verify the benchmark works as expected. Using the new `all` option makes sure all test suites are run. On top of that the benchmarks will from now on report properly what category might have a typo, if any. The http duration was also refactored to use a option instead of relying on a configuration setting. The fixture folder is ignored as test suite from now on. PR-URL: https://github.com/nodejs/node/pull/31396 Fixes: https://github.com/nodejs/node/issues/31083 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Ruben Bridgewater

commit sha 78aa348f4e0c504cf949aea73a8e1bdcedc7f8b0

test: refactor all benchmark tests to use the new test option PR-URL: https://github.com/nodejs/node/pull/31396 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Ruben Bridgewater

commit sha 357230f4b7174380467edfb0a65a00b65b0af66c

benchmark: remove special test entries It was necessary to have fallbacks to run the original tests. This is obsolete with the new test mode. PR-URL: https://github.com/nodejs/node/pull/31396 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

push time in 18 days

issue closednodejs/node

Benchmarks should expose their options

Our benchmark files currently have no way to print the return the possible options to the user. If we'd implement such feature, we would not have to worry about our benchmark tests anymore that they might fail due to changes in any benchmark options. We could just go ahead and read the benchmarks specific options first and then run the test with the specific subset of options that are suitable.

I opened this issue as a kind of feature request in case someone else would like to open a PR to implement this and also to get feedback from others about it.

// cc @Trott I guess you might be interested in something like this.

closed time in 18 days

BridgeAR

push eventBridgeAR/node

Rich Trott

commit sha 93c4c1a273736027439d087b0a52aa33df6a2b13

doc: consolidate introductory text PR-URL: https://github.com/nodejs/node/pull/31667 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

view details

Brian White

commit sha b862a0c6d69bac6e7deaf7c53802a5d3bc05099e

benchmark: check for and fix multiple end() PR-URL: https://github.com/nodejs/node/pull/31624 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

view details

Brian White

commit sha 43783b5b3fa0a0d477ae34aeb0405956fb534dc4

stream: improve writable.write() performance PR-URL: https://github.com/nodejs/node/pull/31624 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

view details

Brian White

commit sha 74291e4a7ba6185c1b78a110538ed3db3bc6b244

buffer: improve from() performance PR-URL: https://github.com/nodejs/node/pull/31615 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Ruben Bridgewater

commit sha 1e172574cbc126dceedfb56645264487b1059f65

benchmark: refactor helper into a class This is the basis to refactor the helper to use modern class language features such as private fields. It also refactors the exports to use module.exports. That way it's immediately clear what parts are exported.

view details

Ruben Bridgewater

commit sha 14054435b5d8398e622526b159f8881e312438cd

benchmark: add `test` and `all` options and improve errors This adds a new `test` option. Using it automatically uses a single minimal option matrix to verify the benchmark works as expected. Using the new `all` option makes sure all test suites are run. On top of that the benchmarks will from now on report properly what category might have a typo, if any. The http duration was also refactored to use a option instead of relying on a configuration setting. The fixture folder is ignored as test suite from now on.

view details

Ruben Bridgewater

commit sha 8b62bce4c6d7b0a8f75603445b9c468c418ce7ed

test: refactor all benchmark tests to use the new test option

view details

Ruben Bridgewater

commit sha 72a81bc04fcfa8059d21c88a198bd7d32350fc14

benchmark: remove special test entries It was necessary to have fallbacks to run the original tests. This is obsolete with the new test mode.

view details

push time in 18 days

Pull request review commentnodejs/node

test,dns: add coverage for dns exception

+// Flags: --expose-internals+'use strict';+require('../common');+const assert = require('assert');+const { internalBinding } = require('internal/test/binding');+const cares = internalBinding('cares_wrap');+const { UV_EPERM } = internalBinding('uv');+const dnsPromises = require('dns').promises;++// Stub cares to force an error so we can test DNS error code path.+cares.ChannelWrap.prototype.queryA = () => UV_EPERM;++assert.rejects(+  () => dnsPromises.resolve('example.org'),
  dnsPromises.resolve('example.org'),
Trott

comment created time in 18 days

pull request commentnodejs/node

readline: remove intermediate variable

@lpinca it's an indirection and IMO true and false are similar to magic numbers: ideally they are not used.

cjihrig

comment created time in 18 days

Pull request review commentnodejs/node

fs: fix valid id range on chown, lchown, fchown

 const validateUint32 = hideStackFrames((value, name, positive) => {   } }); +const validateUint32OrNegative1 = hideStackFrames((value, name) => {+  if (!isUint32(value) && value !== -1) {+    if (typeof value !== 'number') {+      throw new ERR_INVALID_ARG_TYPE(name, 'number', value);+    }+    if (!NumberIsInteger(value)) {+      throw new ERR_OUT_OF_RANGE(name, 'an integer', value);+    }+    // 2 ** 32 === 4294967296+    throw new ERR_OUT_OF_RANGE(name, '>= -1 && < 4294967296', value);+  }+});

Instead of using a completely new validation function, I would just change the positive argument in validateUint32 to become minimum. That way the function is able to handle all kinds of minimums, not only zero and one.

Himself65

comment created time in 18 days

pull request commentnodejs/node

assert,tty: fix indicator and warning

This could use another review. @nodejs/assert @nodejs/testing @nodejs/tty PTAL

BridgeAR

comment created time in 18 days

pull request commentnodejs/node

benchmark: test refactoring

CI https://ci.nodejs.org/job/node-test-commit-custom-suites-freestyle/12097/

BridgeAR

comment created time in 18 days

push eventBridgeAR/node

Rich Trott

commit sha a9e26268f5b464f508a033129c1ffaa694e5d361

doc,assert: rename "mode" to "assertion mode" Rename "strict mode" in the assert module to "strict assertion mode". This is to avoid confusion with the more typical meaning of "strict mode" in ECMAScript. This necessitates a corresponding change of "legacy mode" to "legacy assertion mode". PR-URL: https://github.com/nodejs/node/pull/31635 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

view details

Gabriel Schulhof

commit sha 884e287199901853a30781a0b398e6c3e4a07eb1

n-api: free instance data as reference Instance data associated with a `napi_env` is no longer stored on the env itself but is instead rendered as a reference. Since `v8impl::Reference` is tied to a JS object, this modification factors out the `v8impl::Reference` refcounting and the deletion process into a base class for `v8impl::Reference`, called `v8impl::RefBase`. The instance data is then stored as a `v8impl::RefBase`, along with other references, preventing a segfault that arises from the fact that, up until now, upon `napi_env` destruction, the instance data was freed after all references had already been forcefully freed. If the addon freed a reference during the `napi_set_instance_data` finalizer callback, such a reference had already been freed during environment teardown, causing a double free. Re: https://github.com/nodejs/node-addon-api/pull/663 PR-URL: https://github.com/nodejs/node/pull/31638 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com>

view details

Richard Lau

commit sha d213f21c72f77da6f66f2723b300da27740a0a90

tools: unify make-v8.sh for ppc64le and s390x Refactor `tools/make-v8.sh` to minimise differences between the `ppc64le` and `s390x` paths to allow us to enable `ccache` on the `ppc64le` machines in the CI. PR-URL: https://github.com/nodejs/node/pull/31628 Refs: https://github.com/nodejs/build/pull/1927 Refs: https://github.com/nodejs/build/issues/1940 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>

view details

Rich Trott

commit sha 1d369a2031700d0b4ac94a6233ab51846ca59b80

test: add test-dns-promises-lookupService This adds covereage for the onlookupservice() callback in lib/internal/dns/promises.js. Because of stubbing in other tests, it is not currently covered. This test works on my local development machine with the network turned off, so I'm putting it in parallel. If CI proves more challenging, it can be moved to the internet directory instead. PR-URL: https://github.com/nodejs/node/pull/31640 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com>

view details

tsabolov

commit sha 10d378e947565d4aa786f9f5bd69f55c208faf0f

doc: correct getting an ArrayBuffer's length `ArrayBuffer` instances do not have `.length` property. Instead they have `.byteLength` property. Fixed that in the description of `new Buffer(arrayBuffer[, byteOffset[, length]])` and `Buffer.from(arrayBuffer[, byteOffset[, length]])`. PR-URL: https://github.com/nodejs/node/pull/31632 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

view details

Ruben Bridgewater

commit sha f9a27ea510c6b89f8d4791b2eb51e359297ac193

readline: make tab size configurable This adds the `tabSize` option to readline to allow different tab sizes. PR-URL: https://github.com/nodejs/node/pull/31318 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Swagat Konchada

commit sha a733c18e2854eac4afbb3d82e451b0ddac871d15

doc: add note in BUILDING.md about running `make distclean` Fixes: https://github.com/nodejs/node/issues/28675 PR-URL: https://github.com/nodejs/node/pull/31542 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Joyee Cheung

commit sha e2a3a87060af4c48b2551d20dfede33183b1931d

doc: remove .github/ISSUE_TEMPLATE.md in favor of the template folder This removes the obsolete issue template file since we already have the issue template folder which is the one currently in effect. PR-URL: https://github.com/nodejs/node/pull/31656 Refs: https://github.com/nodejs/node/pull/31611 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

view details

Anna Henningsen

commit sha a555be2e45b283a201de21350c0115680a7d4e7c

worker: improve MessagePort performance Use a JS function as the single entry point for emitting `.onmessage()` calls, avoiding the overhead of manually constructing each message event object in C++. confidence improvement accuracy (*) (**) (***) worker/echo.js n=100000 sendsPerBroadcast=1 payload='object' workers=1 *** 16.34 % ±1.16% ±1.54% ±1.99% worker/echo.js n=100000 sendsPerBroadcast=1 payload='string' workers=1 *** 24.41 % ±1.50% ±1.99% ±2.58% worker/echo.js n=100000 sendsPerBroadcast=10 payload='object' workers=1 *** 26.66 % ±1.54% ±2.05% ±2.65% worker/echo.js n=100000 sendsPerBroadcast=10 payload='string' workers=1 *** 32.72 % ±1.60% ±2.11% ±2.73% worker/messageport.js n=1000000 payload='object' *** 40.28 % ±1.48% ±1.95% ±2.52% worker/messageport.js n=1000000 payload='string' *** 76.95 % ±2.19% ±2.90% ±3.75% Also fix handling exceptions returned from `MessagePort::New`. PR-URL: https://github.com/nodejs/node/pull/31605 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Tobias Nießen

commit sha 2db1c8df25db40a909a8ada75ae6da4caa34ed46

doc: update TSC name in "Release Process" PR-URL: https://github.com/nodejs/node/pull/31652 Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

view details

James M Snell

commit sha aee3e2bc4ca40538c9f470cbf67fed20de9f6dc0

src: various minor improvements to node_url Went hunting for possible performance improvements. Didn't find anything significant but did manage to make a number of style improvements that bring more in line with style guidelines and good pratice. PR-URL: https://github.com/nodejs/node/pull/31651 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

view details

Anna Henningsen

commit sha 7df429808ca336b6aa868a9ae1ceb6117c68e7c4

doc: clarify Worker exit/message event ordering Motivated by the fact that getting this wrong has led to flaky tests in our test suite. Refs: https://github.com/nodejs/node/pull/31637 PR-URL: https://github.com/nodejs/node/pull/31642 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Ben Noordhuis

commit sha d394dd78de600e89ceea02b3582435e50f249aa4

src: fix OOB reads in process.title getter The getter passed a stack-allocated, fixed-size buffer to uv_get_process_title() but neglected to check the return value. When the total length of the command line arguments exceeds the size of the buffer, libuv returns UV_ENOBUFS and doesn't modify the contents of the buffer. The getter then proceeded to return whatever garbage was on the stack at the time of the call, quite possibly reading beyond the end of the buffer. Add a GetProcessTitle() helper that reads the process title into a dynamically allocated buffer that is resized when necessary. Fixes: https://github.com/nodejs/node/issues/31631 PR-URL: https://github.com/nodejs/node/pull/31633 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Ben Noordhuis

commit sha 3271c40ab102841735aa55f6489fe9df2cd47fcc

src: remove fixed-size GetHumanReadableProcessName Remove the version of GetHumanReadableProcessName() that operates on a fixed-size buffer. The only remaining caller is Assert() which might get called in contexts where dynamically allocating memory isn't possible but as Assert() calls printf(), which also allocates memory when necessary, this commit is unlikely to make matters much worse. PR-URL: https://github.com/nodejs/node/pull/31633 Fixes: https://github.com/nodejs/node/issues/31631 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Anna Henningsen

commit sha f3682102dca1d24959e93de918fbb583f19ee688

src: give Http2Session JS fields their own backing store It looks like it’s virtually impossible at this point to create “fake” backing stores for objects that don’t fully own their memory allocations, like the sub-field `js_fields_` of `Http2Session`. In particular, it turns out that an `ArrayBuffer` cannot always be easily separated from its backing store in that situation through by detaching it. This commit gives the JS-exposed parts of the class its own memory allocation and its own backing store, simplifying the code a bit and fixing flakiness coming from it, at the cost of one additional layer of indirection when accessing the data. Refs: https://github.com/nodejs/node/pull/30782 Fixes: https://github.com/nodejs/node/issues/31107 PR-URL: https://github.com/nodejs/node/pull/31648 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com>

view details

Rich Trott

commit sha 8c18e91c8afc0629a097ecb193e41eab058d02bb

process: remove undocumented `now` argument from emitWarning() process.emitWarning() "now" option is undocumented and a Boolean trap. Remove it before people start adopting it. We only need it in one place internally. Replace it with an internal-only emitWarningSync() function. PR-URL: https://github.com/nodejs/node/pull/31643 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Myles Borins <myles.borins@gmail.com>

view details

Anna Henningsen

commit sha 0279c2f28bedae92a7be3e1c67794e66432cf4b7

test: fix flaky test-inspector-connect-main-thread Previously, the test waited for a (any) message from the workers, and then attached another event listener to a specific kind of message. However, it was possible that the second listener was attached after the Worker had already exited, thus never receiving the message it was supposed to receive. (This is the race condition here – usually, the Worker thread would exit *after* the second listener was attached.) Solve this by keeping a single `'message'` event listener attached to the worker instance during its entire lifetime. Fixes: https://github.com/nodejs/node/issues/31226 PR-URL: https://github.com/nodejs/node/pull/31637 Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Rich Trott

commit sha 8a14884babdcfaaf0571c95830b3e7478c18afdb

test: fix test-benchmark-http fe3975783cc4fdba47c2e25442ca891aab31e805 added a setting to a benchmark which needs to be reflected in the test. PR-URL: https://github.com/nodejs/node/pull/31686 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com>

view details

Anna Henningsen

commit sha 9111e02360a4bda5c5323aa3f64d36f17f692d3a

worker: reset `Isolate` stack limit after entering `Locker` It turns out that using `v8::Locker` undoes the effects of passing an explicit stack limit as part of the `Isolate`’s resource constraints. Therefore, reset the stack limit manually after entering a Locker. Refs: https://github.com/nodejs/node/pull/26049#issuecomment-580668530 PR-URL: https://github.com/nodejs/node/pull/31593 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Gerhard Stoebich

commit sha 7a63d76a54b03884de25a1d561ab76386ff31f7a

src: remove dead code in InternalMakeCallback Remove unneeded condition as the first line in function already ensures that recv can't be empty. PR-URL: https://github.com/nodejs/node/pull/31622 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yihong Wang <yh.wang@ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

view details

push time in 18 days

Pull request review commentNodeRedis/node_redis

[WIP] CI/Tests fixes

 describe('publish/subscribe', function () {                         sub.stream.once('data', function () {                             assert.strictEqual(sub.message_buffers, false);                             assert.strictEqual(sub.shouldBuffer, false);-                            sub.on('pmessageBuffer', function (pattern, channel, message) {-                                if (parser !== 'javascript' && typeof pattern === 'string') {+                            sub.on('pmessageBuffer', function (pattern, channel) {+                                if (typeof pattern === 'string') {                                     pattern = new Buffer(pattern);                                     channel = new Buffer(channel);                                 }                                 assert.strictEqual(pattern.inspect(), new Buffer('*').inspect());                                 assert.strictEqual(channel.inspect(), new Buffer('/foo').inspect());                                 sub.quit(end);                             });-                            if (parser === 'javascript') {-                                assert.notStrictEqual(sub.message_buffers, sub.buffers);

Should this assertion not be kept?

Salakar

comment created time in 20 days

Pull request review commentNodeRedis/node_redis

[WIP] CI/Tests fixes

 coverage stunnel.conf stunnel.pid *.out+package-lock.json++# IntelliJ IDEs+.idea++# VisualStudioCode IDEs+.vscode/*+!.vscode/settings.json+!.vscode/tasks.json+!.vscode/launch.json+!.vscode/extensions.json

Nit: adding all IDE parts is not possible. Thus, it's normally ideal to let users ignore these globally on their local machine.

Salakar

comment created time in 20 days

push eventBridgeAR/node

Anna Henningsen

commit sha 6a6279ef2a38c17a761cc15366e615c620328587

doc: add AsyncResource + Worker pool example Use Worker thread pools as an example of how `AsyncResource` can be used to track async state across callbacks. PR-URL: https://github.com/nodejs/node/pull/31601 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>

view details

Robert Nagy

commit sha 234de6f1fd90ece1edc1a12d989ab0f15a1f19b8

stream: fix finished w/ 'close' before 'finish' Emitting 'close' before 'finish' on a Writable should result in a premature close error. PR-URL: https://github.com/nodejs/node/pull/31534 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Anna Henningsen

commit sha c1da4e4aa4583c14f87c8d230ce7580f3b157ff0

src: fix inspecting `MessagePort` from `init` async hook During the `init()` async hook, the C++ object is not finished creating yet (i.e. it is an `AsyncWrap`, but not yet a `HandleWrap` or `MessagePort`). Accessing the `handle_` field is not valid in that case. However, the custom inspect function for `MessagePort`s calls `HasRef()` on the object, which would crash when the object is not fully constructed. Fix that by guarding the access of the libuv handle on that condition. PR-URL: https://github.com/nodejs/node/pull/31600 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

view details

Conor ONeill

commit sha 7e911d8b03a838e5ac6bb06c5b313533e89673ef

doc: add example to fs.promises.readdir PR-URL: https://github.com/nodejs/node/pull/31552 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

James M Snell

commit sha 907c07fa850e128c695482cd47554b5bce5e4b0c

stream: move _writableState.buffer to EOL API was deprecated back in the 0.11 days. PR-URL: https://github.com/nodejs/node/pull/31165 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com>

view details

James M Snell

commit sha bffa5044c576003198ccfee5a751c23036d0744f

crypto: move pbkdf2 without digest to EOL API has been being incrementally deprecated since 6.0.0 PR-URL: https://github.com/nodejs/node/pull/31166 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

view details

James M Snell

commit sha ec0dd6fa1cfa03b3983419acedb27ef95d297c82

lib: move GLOBAL and root aliases to EOL GLOBAL and root have been long deprecated. PR-URL: https://github.com/nodejs/node/pull/31167 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

view details

James M Snell

commit sha ab4115f17cf2859f336b3c0588d2bf9eca0e65b8

os: move tmpDir() to EOL The tmpDir alias was deprecated in 7.0.0 PR-URL: https://github.com/nodejs/node/pull/31169 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

view details

Joyee Cheung

commit sha 0effc9845f74e7351487644cbd1691196000b93e

doc: ask more questions in the bug report template Inspired by the defect report template of the V8 issue tracker PR-URL: https://github.com/nodejs/node/pull/31611 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>

view details

Beth Griggs

commit sha f0f2583c912d4c7abf6fb5a9ccd380976f1ab092

2020-02-06, Version 13.8.0 (Current) This is a security release. Vulnerabilities fixed: * **CVE-2019-15606**: HTTP header values do not have trailing OWS trimmed. * **CVE-2019-15605**: HTTP request smuggling using malformed Transfer-Encoding header. * **CVE-2019-15604**: Remotely trigger an assertion on a TLS server with a malformed certificate string. Also, HTTP parsing is more strict to be more secure. Since this may cause problems in interoperability with some non-conformant HTTP implementations, it is possible to disable the strict checks with the `--insecure-http-parser` command line flag, or the `insecureHTTPParser` http option. Using the insecure HTTP parser should be avoided. PR-URL: https://github.com/nodejs-private/node-private/pull/196

view details

Beth Griggs

commit sha e65ae4278578e51761bf9253a7c68ade0f9b897c

2020-02-06, Version 12.15.0 'Erbium' (LTS) This is a security release. Vulnerabilities fixed: * **CVE-2019-15606**: HTTP header values do not have trailing OWS trimmed. * **CVE-2019-15605**: HTTP request smuggling using malformed Transfer-Encoding header. * **CVE-2019-15604**: Remotely trigger an assertion on a TLS server with a malformed certificate string. Also, HTTP parsing is more strict to be more secure. Since this may cause problems in interoperability with some non-conformant HTTP implementations, it is possible to disable the strict checks with the `--insecure-http-parser` command line flag, or the `insecureHTTPParser` http option. Using the insecure HTTP parser should be avoided. PR-URL: https://github.com/nodejs-private/node-private/pull/197

view details

Beth Griggs

commit sha d602e586bf2baf5889586bde8e072e556db2b273

2020-02-06, Version 10.19.0 'Dubnium' (LTS) This is a security release. Vulnerabilities fixed: * **CVE-2019-15606**: HTTP header values do not have trailing OWS trimmed. * **CVE-2019-15605**: HTTP request smuggling using malformed Transfer-Encoding header. * **CVE-2019-15604**: Remotely trigger an assertion on a TLS server with a malformed certificate string. Also, HTTP parsing is more strict to be more secure. Since this may cause problems in interoperability with some non-conformant HTTP implementations, it is possible to disable the strict checks with the `--insecure-http-parser` command line flag, or the `insecureHTTPParser` http option. Using the insecure HTTP parser should be avoided. PR-URL: https://github.com/nodejs-private/node-private/pull/198

view details

James M Snell

commit sha e001710219906b45bb5ac94d7e9cb4b56a83c134

meta: fix collaborator list errors in README.md Add missing `-` characters in the list. PR-URL: https://github.com/nodejs/node/pull/31655 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

view details

Anna Henningsen

commit sha 06a43d4dcacc0c39506b8a3a1bb77411add6d9d7

test: fix flaky test-http2-stream-destroy-event-order Alternative to https://github.com/nodejs/node/pull/31590. It appears that the issue here is that the test falsely assumed that closing the client (which also currently destroys the socket rather than gracefully shutting down the connection) would still leave enough time for the server side to receive the stream error. Address that by explicitly waiting for the server side to receive the stream error before closing the client and the connection with it. Refs: https://github.com/nodejs/node/pull/31590 Refs: https://github.com/nodejs/node/issues/20750 PR-URL: https://github.com/nodejs/node/pull/31610 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Sam Roberts

commit sha f8e75512951b5060409b0c80e246ffc81ee9e72e

benchmark: support optional headers with wrk wrk did not support sending optional headers, they were silently ignored. This appears to be an oversight, they were supported for autocannon. PR-URL: https://github.com/nodejs-private/node-private/pull/189 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Sam Roberts

commit sha fe3975783cc4fdba47c2e25442ca891aab31e805

http: strip trailing OWS from header values HTTP header values can have trailing OWS, but it should be stripped. It is not semantically part of the header's value, and if treated as part of the value, it can cause spurious inequality between expected and actual header values. Note that a single SPC of leading OWS is common before the field-value, and it is already handled by the HTTP parser by stripping all leading OWS. It is only the trailing OWS that must be stripped by the parser user. header-field = field-name ":" OWS field-value OWS ; https://tools.ietf.org/html/rfc7230#section-3.2 OWS = *( SP / HTAB ) ; https://tools.ietf.org/html/rfc7230#section-3.2.3 Fixes: https://hackerone.com/reports/730779 PR-URL: https://github.com/nodejs-private/node-private/pull/189 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Fedor Indutny

commit sha 861d3f7a61f543c253337cfc1a967fa84f96c653

crypto: fix assertion caused by unsupported ext `X509V3_EXT_print` can return value different from `1` if the X509 extension does not support printing to a buffer. Instead of failing with an unrecoverable assertion - replace the relevant value in the hashmap with a JS null value. Fixes: https://hackerone.com/reports/746733 PR-URL: https://github.com/nodejs-private/node-private/pull/175 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

view details

Beth Griggs

commit sha 4c5b8dd7d80b6010c4d3e914f7e8c61cc297a1ad

deps: update llhttp to 2.0.4 PR-URL: https://github.com/nodejs-private/node-private/pull/199 Reviewed-By: Sam Roberts <vieuxtech@gmail.com>

view details

Sam Roberts

commit sha efd5a6b2eda54dd846d2bdf34f64d34701411d0e

test: using TE to smuggle reqs is not possible See: https://hackerone.com/reports/735748 PR-URL: https://github.com/nodejs-private/node-private/pull/199 Reviewed-By: Sam Roberts <vieuxtech@gmail.com>

view details

Ruben Bridgewater

commit sha ec8cfb5aa1984aa66c9564ac75133cdf27afadf0

benchmark: refactor helper into a class This is the basis to refactor the helper to use modern class language features such as private fields. It also refactors the exports to use module.exports. That way it's immediately clear what parts are exported.

view details

push time in 20 days

push eventBridgeAR/node

Ruben Bridgewater

commit sha c7571e205577d569b0195a22992dfb2fee5c652d

readline: make tab size configurable This adds the `tabSize` option to readline to allow different tab sizes.

view details

push time in 20 days

push eventBridgeAR/node

Anna Henningsen

commit sha 104681687581f49f1d3d90bf098e33984200d090

worker: move JoinThread() back into exit callback de2c68c7dd17a217a818ea881e433034006fdb4b moved this call to the destructor, under the assumption that that would essentially be equivalent to running it as part of the callback since the worker would be destroyed along with the callback. However, the actual code in `Environment::RunAndClearNativeImmediates()` comes with the subtlety that testing whether a JS exception has been thrown happens between the invocation of the callback and its destruction, leaving a possible exception from `JoinThread()` potentially unhandled (and unintentionally silenced through the `TryCatch`). This affected exceptions thrown from the `'exit'` event of the Worker, and made the `parallel/test-worker-message-type-unknown` test flaky, as the invalid message was sometimes only received during the Worker thread’s exit handler. Fix this by moving the `JoinThread()` call back to where it was before. Refs: https://github.com/nodejs/node/pull/31386 PR-URL: https://github.com/nodejs/node/pull/31468 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>

view details

Anna Henningsen

commit sha 31b31a3c52376a62bb1cd706dfc116c881fea12c

src: harden running native `SetImmediate()`s slightly Prevent mistakes like the one fixed by the previous commit by destroying the callback immediately after it has been called. PR-URL: https://github.com/nodejs/node/pull/31468 Refs: https://github.com/nodejs/node/pull/31386 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>

view details

Yakov Litvin

commit sha 4e3dee48c8e932041e3af9a489cbe3fcb9e9bd72

doc: add explanatory to path.resolve description Fixes: https://github.com/nodejs/node/issues/25542 PR-URL: https://github.com/nodejs/node/pull/31430 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Tobias Nießen

commit sha b4f745ec5ae515c35aa57c576b997bb1d7f96437

doc: fix syntax in N-API documentation PR-URL: https://github.com/nodejs/node/pull/31466 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>

view details

Tobias Nießen

commit sha 9f22fda6466e835f4fb56552c4d3a9d98eb1c1d7

errors: make use of "cannot" consistent PR-URL: https://github.com/nodejs/node/pull/31420 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

view details

Rich Trott

commit sha dc90f925fbf46d1d81940f3b07f7b71af9d83be3

test: remove bluebird remnants from test fixture The test fixture in test/fixtures/bluebird was largely copied from bluebird, where a regression in Node.js was discovered. Simplify the test by removing a lot of things that aren't necessary to replicate the problem. Change name from bluebird to something less likely to cause someone to believe that we are actually loading bluebird (as we are not). PR-URL: https://github.com/nodejs/node/pull/31435 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: David Carlier <devnexen@gmail.com>

view details

Geoffrey Booth

commit sha 04d07ed3ab95c973bfc4c549d2f4996cfc90046e

module: revert #31021 reverses baa3621bb1479e85a057a0d0df5b9c84ac4eb755 PR-URL: https://github.com/nodejs/node/pull/31415 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Geoffrey Booth

commit sha 811aa5c71f12b7f5f1f07a60d6757e87eb49ae33

module: correct docs about when extensionless files are supported PR-URL: https://github.com/nodejs/node/pull/31415 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Geoffrey Booth

commit sha c692568a092312e161a6926f8daf52f9fa4f2b78

module: drop support for extensionless main entry points in esm PR-URL: https://github.com/nodejs/node/pull/31415 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

cjihrig

commit sha 8b606d3e264f1157e5f5da7ced7983a347cda8e8

deps: update to uvwasi 0.0.5 This version improves file descriptor renumbering, and as a result fixes uvwasi_fd_renumber(). PR-URL: https://github.com/nodejs/node/pull/31432 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

view details

cjihrig

commit sha 28bee2444e4d30b762a031958855a601aec27fe1

deps: uvwasi: cherry-pick ea73af5 Original commit message: unlock all fd mutexes in reverse order Some functions acquire mutexes for multiple file descriptors. This commit ensures that the mutexes are released in the reverse order that they are aquired. PR-URL: https://github.com/nodejs/node/pull/31432 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

view details

cjihrig

commit sha c150f9da7e52701d48aa12c2c1930b490c097a7b

deps: uvwasi: cherry-pick c3bef8e Original commit message: prevent locking fd table while holding a mutex uvwasi_path_rename(), uvwasi_path_link(), uvwasi_path_open(), and uvwasi_fd_renumber() operate on multiple file descriptors. uvwasi_fd_renumber() has been updated prior to this commit, and is not relevant here. The other three functions would perform the following locking operations: - lock the file table - acquire a file descriptor mutex - unlock the file table - unlock the file table again - acquire another file descriptor mutex - unlock the file table - unlock the two mutexes Attempting to acquire the second mutex introduced the possibility of deadlock because another thread could attempt to acquire the first mutex while holding the file table lock. This commit ensures that multiple mutexes are either: - acquired in a single lock of the file table - or, only acquired after releasing previously held mutexes Fixes: https://github.com/cjihrig/uvwasi/issues/89 PR-URL: https://github.com/nodejs/node/pull/31432 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

view details

cjihrig

commit sha 30173c608749d973db6eae9930b7a10bcd80b2d3

deps: uvwasi: cherry-pick eea4508 Original commit message: prevent race conditions with uvwasi_fd_close() uvwasi_fd_close() performed the following operations: - lock the file descriptor mutex - close the file - release the file descriptor mutex - call the file table's remove() function Once the fd's mutex is released, another thread could acquire it before the fd is removed from the file table. If this happens, remove() could destroy a held mutex. This commit updates uvwasi_fd_close() to perform the entire sequence while holding the file table's lock, preventing new acquisitions of the fd's mutex. Fixes: https://github.com/cjihrig/uvwasi/issues/88 PR-URL: https://github.com/nodejs/node/pull/31432 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

view details

cjihrig

commit sha 96058f33a9c72796930a77c97018fda2cbb5ed03

test: add wasi test for freopen() This test provides missing coverage for __wasi_fd_renumber(). PR-URL: https://github.com/nodejs/node/pull/31432 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

view details

Tobias Nießen

commit sha ab6ab9c271ac7c77e03c81f21428739ba4e7f2f6

tls: simplify errors using ThrowCryptoError PR-URL: https://github.com/nodejs/node/pull/31436 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Rich Trott

commit sha 085a5c7638d7783afd706889dbc2b57976d5061f

benchmark: fix getStringWidth() benchmark 8fb5fe28a45cc884567cd39e3b2f6b4272917af broke the benchmark for getStringWidth(). This fixes it up by updating the argument to `require()` to retrieve `getStringWidth()` from the new internal module location. PR-URL: https://github.com/nodejs/node/pull/31476 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

view details

Tobias Nießen

commit sha 8c313ceedfcc337f05022ffaabf2e42ef26d0cdf

crypto: assign and use ERR_CRYPTO_UNKNOWN_CIPHER PR-URL: https://github.com/nodejs/node/pull/31437 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Tobias Nießen

commit sha f6c6236d956be763ffe8eb1420e19eaab2962e8d

crypto: improve errors in DiffieHellmanGroup 1. The DiffieHellmanGroup class is only instantiated from within Node.js, which always passes exactly one argument. 2. Use the existing ERR_CRYPTO_UNKNOWN_DH_GROUP error code for the existing "Unknown group" error. The message has not been changed to prevent breaking existing applications. PR-URL: https://github.com/nodejs/node/pull/31445 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Anna Henningsen

commit sha 9cc747bfcea131797fbf0fcc805f1d7fa244b7da

src: add C++-style sprintf utility Add an utility that handles C++-style strings and objects well. PR-URL: https://github.com/nodejs/node/pull/31446 Fixes: https://github.com/nodejs/node/issues/28761 Fixes: https://github.com/nodejs/node/issues/31218 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Anna Henningsen

commit sha 32e7e813e93ec3d0625d315658288769e448dd99

src: use custom fprintf alike to write errors to stderr This allows printing errors that contain nul characters, for example. Fixes: https://github.com/nodejs/node/issues/28761 Fixes: https://github.com/nodejs/node/issues/31218 PR-URL: https://github.com/nodejs/node/pull/31446 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

push time in 20 days

issue commentantirez/RESP3

Attribute type

@AngusP that would work but it does not sound like a good solution to me. In most cases the data type would be the plain response, so wrapping the return type requires more memory, slows down the parser due to creating more objects and requires the to check for the attribute property for all returned values.

@antirez it would be great if you could have a look at this. Is there a real need for the attribute type? It seems very difficult to implement this in a useful way.

BridgeAR

comment created time in 20 days

issue openedantirez/RESP3

Nested streamed aggregated data types

The spec does not specify if the newly added streamed aggregated data types may be nested or not. It is of course possible to implement this in a parser but it complicates the logic for "event based languages" such as JavaScript since it's required to keep lots of state around to keep the parser fast. Limiting the streamed aggregated data type to only be allowed in the top level would simplify that.

created time in 20 days

create barnchNodeRedis/node_redis

branch : v3

created branch time in 20 days

pull request commentnodejs/node

benchmark: test refactoring

CI https://ci.nodejs.org/job/node-test-commit-custom-suites-freestyle/12025/

BridgeAR

comment created time in 20 days

push eventBridgeAR/node

Anna Henningsen

commit sha 278d37d90d8cd208ee9cd402c3f256b192460f09

test: fix test-heapdump-worker This test was broken by de2c68c7dd17a217a818ea881e433034006fdb4b. Refs: https://github.com/nodejs/node/pull/31386 PR-URL: https://github.com/nodejs/node/pull/31494 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Denys Otrishko

commit sha 08f57265b5c58c16af9e93510cda39462ecf2713

src: reduce code duplication in BootstrapNode PR-URL: https://github.com/nodejs/node/pull/31465 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Alexander Smarus

commit sha 3188afebf472976460f54559e205b6e18af0343f

src: define noreturn attribute for windows PR-URL: https://github.com/nodejs/node/pull/31467 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

cjihrig

commit sha 05d350a3605299b2394f346cecc2d02b644698c5

deps: upgrade to libuv 1.34.2 Notable changes: - SetApplicationDaemon() is no longer called on macOS. - uv_interface_addresses() is implemented on IBMi. - The return value of uv__open_cloexec() is now handled properly. - A race condition in fsevents has been fixed. Fixes: https://github.com/nodejs/node/issues/31328 Fixes: https://github.com/nodejs/help/issues/2099 PR-URL: https://github.com/nodejs/node/pull/31477 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Denys Otrishko

commit sha f2d5173b9deb7980b6f90d68c4d7a7b132422070

doc: clean up and streamline vm.md examples PR-URL: https://github.com/nodejs/node/pull/31474 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Daniel Bevenius

commit sha 3ff2aeceba88928f1aa33fe3ff1cc9bf84da739b

src: ignore GCC -Wcast-function-type for v8.h This commit suggests that cast-function-type warnings be ignored from v8.h. Currently, GCC reports a number of warnings like this: In file included from ../src/util.h:27, from ../src/aliased_buffer.h:7, from ../src/memory_tracker.h:5, from ../src/base_object.h:27, from ../src/async_wrap.h:27, from ../src/req_wrap.h:6, from ../src/req_wrap-inl.h:6, from ../src/connect_wrap.h:6, from ../src/connect_wrap.cc:1: ../deps/v8/include/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak( P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::BaseObject; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::BaseObject>&)]’: ../src/base_object-inl.h:123:42: required from here ../deps/v8/include/v8.h:10374:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::BaseObject>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::BaseObject>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type] reinterpret_cast<Callback>(callback), type); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The motivation for doing this that it makes it difficult to spot other warnings that might be important. Since it is v8 that performs this cast I was not able to find a way around it. PR-URL: https://github.com/nodejs/node/pull/31475 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Gabriel Schulhof

commit sha 42995a3a116fd40e54b7f594ea60dd60163ae0c4

test: cover property n-api null cases Add test coverage for passing `NULL` to each parameter of `napi.*(propert|element)` and `napi_set_prototype`. In the case of `napi_define_properties` also test setting various initializer fields to `NULL`. PR-URL: https://github.com/nodejs/node/pull/31488 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Rich Trott

commit sha 97ac66130294aa112e587c86d2cd28a94bbe4ecd

doc: enable visual code indication in headers This enables the grey background for inline code in headers. Refs: https://github.com/nodejs/node/pull/31460#issuecomment-577154740 PR-URL: https://github.com/nodejs/node/pull/31493 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

view details

Robert Nagy

commit sha 90e6e18f33d1f0f9e4d9775ee283b9a5f2642959

stream: add async iterator support for v1 streams PR-URL: https://github.com/nodejs/node/pull/31316 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>

view details

Robert Nagy

commit sha a6d63c44a2b3273d4e09576c52011e3197d6a4b3

stream: normalize async iterator stream destroy PR-URL: https://github.com/nodejs/node/pull/31316 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>

view details

Robert Nagy

commit sha 2c54459378039199d8362b3109908a0dd29aa2b3

stream: implement throw for async iterator PR-URL: https://github.com/nodejs/node/pull/31316 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>

view details

Robert Nagy

commit sha c6bf9539cc1645fe768bff6ce2eee85636d341a7

stream: simplify pipeline PR-URL: https://github.com/nodejs/node/pull/31316 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>

view details

Robert Nagy

commit sha 07915db233dcb03ea9586086cc4f599b96fa9000

stream: re-use legacy destroyer PR-URL: https://github.com/nodejs/node/pull/31316 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>

view details

cjihrig

commit sha a2f9ccd3d2bffc6f72f02acf7fc4813c670a64ed

deps: uvwasi: cherry-pick 7b5b6f9 Original commit message: allow windows to detect tty types uv_fs_fstat() fails on TTYs on Windows. This commit updates uvwasi__get_filetype_by_fd() to detect this case and map the fd to the WASI character device type. Refs: https://github.com/nodejs/node/issues/31461 Fixes: https://github.com/nodejs/node/issues/31461 PR-URL: https://github.com/nodejs/node/pull/31495 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Brian White

commit sha 886965963ac55825e91887e973226ef010f8fc64

deps: switch to chromium's zlib implementation This implementation provides optimizations not included upstream. PR-URL: https://github.com/nodejs/node/pull/31201 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>

view details

Brian White

commit sha 59cba9a5c20c4a9fee34a3f6601025666aa6f9f6

buffer: improve fill(number) performance PR-URL: https://github.com/nodejs/node/pull/31489 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

view details

Justin Ridgewell

commit sha 0214b90308404b18efd60ce07cb89014073ee161

process: fix two overflow cases in SourceMap VLQ decoding These both have to do with extremely large numbers, so it's unlikely to cause a problem in practice. Still, correctness. First, encoding `-2147483648` in VLQ returns the value `"B"`. When decoding, we get the value `1` after reading the base64. We then check if the first bit is set (it is) to see if we should negate it, then we shift all bits right once. Now, `value` will be `0` and `negate` will be `true`. So, we'd return `-0`. Which is a bug! `-0` isn't `-2147483648`, and we've broken a round trip. Second, encoding any number with the 31st bit set, we'd return the opposite sign. Let's use `1073741824`. Encoding, we get `"ggggggC"`. When decoding, we get the value `-2147483648` after reading the base64. Notice, it's already negative (the 32nd bit is set, because the 31st was set and we shifted everything left once). We'd then check the first bit (it's not) and shift right. But we used `>>`, which does not shift the sign bit. We actually wanted `>>>`, which will. Because of that bug, we get back `-1073741824` instead of the positive `1073741824`. It's even worse if the 32nd and 31st bits are set, `-1610612736` becomes `536870912` after a round trip. I recently fixed the same two bugs in Closure Compiler: https://github.com/google/closure-compiler/commit/584418eb PR-URL: https://github.com/nodejs/node/pull/31490 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Coe <bencoe@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>

view details

Richard Lau

commit sha 8e245cd4e31628def8e886302619b3f033f2f636

build: build docs in GitHub Actions CI workflow PR-URL: https://github.com/nodejs/node/pull/31504 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

bcoe

commit sha f2842904c2b6ea2e770f9b3d38115c958fa55c22

fs: bail on permission error in recursive directory creation When creating directories recursively, the logic should bail immediately on UV_EACCES and bubble the error to the user. PR-URL: https://github.com/nodejs/node/pull/31505 Fixes: https://github.com/nodejs/node/issues/31481 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Anna Henningsen

commit sha a5d4a397d63871dee3bfd5f174b64e41bc878be0

test: make test-http2-buffersize more correct Previously, this code could have closed the server before the connection was actually received by the server, as the `'close'` event on the client side can be emitted before the connection is established. The following commit exacerbates this problem, so fix the test first. PR-URL: https://github.com/nodejs/node/pull/31502 Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>

view details

push time in 22 days

PR closed nodejs/node

test: refactor readline interface test author ready test

This refactoring is mainly there to improve the readability of the tests and to reduce code lines.

Multiple tests where misplaced and this is now corrected as well. The misplacement makes the diff not that easy to read but functionality wise it's 100% identical as before.

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. -->

+730 -1096

6 comments

1 changed file

BridgeAR

pr closed time in 22 days

pull request commentnodejs/node

test: refactor readline interface test

Landed in f295ba5d2ce13c2a53f405d5915ad920431331be, 1fb4bd1fc4b970c5154159ad6734bc722052af3b :tada:

BridgeAR

comment created time in 22 days

push eventBridgeAR/node

Ruben Bridgewater

commit sha f295ba5d2ce13c2a53f405d5915ad920431331be

test: refactor test-readline-interface.js This reduces the code lines required to run the tests by abstracting the constructor call. It also moves tests out of a for loop that where miss placed. PR-URL: https://github.com/nodejs/node/pull/31423 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Ruben Bridgewater

commit sha 1fb4bd1fc4b970c5154159ad6734bc722052af3b

test: abstract common assertions in readline-interface test PR-URL: https://github.com/nodejs/node/pull/31423 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

push time in 22 days

push eventnodejs/node

Ruben Bridgewater

commit sha f295ba5d2ce13c2a53f405d5915ad920431331be

test: refactor test-readline-interface.js This reduces the code lines required to run the tests by abstracting the constructor call. It also moves tests out of a for loop that where miss placed. PR-URL: https://github.com/nodejs/node/pull/31423 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Ruben Bridgewater

commit sha 1fb4bd1fc4b970c5154159ad6734bc722052af3b

test: abstract common assertions in readline-interface test PR-URL: https://github.com/nodejs/node/pull/31423 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

push time in 22 days

Pull request review commentnodejs/node

test: improve logged errors

 if (process.env.NODE_TEST_WITH_ASYNC_HOOKS) {       process._rawDebug();       throw new Error(`same id added to destroy list twice (${id})`);     }-    destroyListList[id] = new Error().stack;+    destroyListList[id] = util.inspect(new Error());

Node.js core frames are visualized in grey. It makes it easier to distinguish the test code from core code.

BridgeAR

comment created time in 22 days

push eventBridgeAR/node

Anna Henningsen

commit sha 104681687581f49f1d3d90bf098e33984200d090

worker: move JoinThread() back into exit callback de2c68c7dd17a217a818ea881e433034006fdb4b moved this call to the destructor, under the assumption that that would essentially be equivalent to running it as part of the callback since the worker would be destroyed along with the callback. However, the actual code in `Environment::RunAndClearNativeImmediates()` comes with the subtlety that testing whether a JS exception has been thrown happens between the invocation of the callback and its destruction, leaving a possible exception from `JoinThread()` potentially unhandled (and unintentionally silenced through the `TryCatch`). This affected exceptions thrown from the `'exit'` event of the Worker, and made the `parallel/test-worker-message-type-unknown` test flaky, as the invalid message was sometimes only received during the Worker thread’s exit handler. Fix this by moving the `JoinThread()` call back to where it was before. Refs: https://github.com/nodejs/node/pull/31386 PR-URL: https://github.com/nodejs/node/pull/31468 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>

view details

Anna Henningsen

commit sha 31b31a3c52376a62bb1cd706dfc116c881fea12c

src: harden running native `SetImmediate()`s slightly Prevent mistakes like the one fixed by the previous commit by destroying the callback immediately after it has been called. PR-URL: https://github.com/nodejs/node/pull/31468 Refs: https://github.com/nodejs/node/pull/31386 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>

view details

Yakov Litvin

commit sha 4e3dee48c8e932041e3af9a489cbe3fcb9e9bd72

doc: add explanatory to path.resolve description Fixes: https://github.com/nodejs/node/issues/25542 PR-URL: https://github.com/nodejs/node/pull/31430 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Tobias Nießen

commit sha b4f745ec5ae515c35aa57c576b997bb1d7f96437

doc: fix syntax in N-API documentation PR-URL: https://github.com/nodejs/node/pull/31466 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Bryan English <bryan@bryanenglish.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>

view details

Tobias Nießen

commit sha 9f22fda6466e835f4fb56552c4d3a9d98eb1c1d7

errors: make use of "cannot" consistent PR-URL: https://github.com/nodejs/node/pull/31420 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

view details

Rich Trott

commit sha dc90f925fbf46d1d81940f3b07f7b71af9d83be3

test: remove bluebird remnants from test fixture The test fixture in test/fixtures/bluebird was largely copied from bluebird, where a regression in Node.js was discovered. Simplify the test by removing a lot of things that aren't necessary to replicate the problem. Change name from bluebird to something less likely to cause someone to believe that we are actually loading bluebird (as we are not). PR-URL: https://github.com/nodejs/node/pull/31435 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: David Carlier <devnexen@gmail.com>

view details

Geoffrey Booth

commit sha 04d07ed3ab95c973bfc4c549d2f4996cfc90046e

module: revert #31021 reverses baa3621bb1479e85a057a0d0df5b9c84ac4eb755 PR-URL: https://github.com/nodejs/node/pull/31415 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Geoffrey Booth

commit sha 811aa5c71f12b7f5f1f07a60d6757e87eb49ae33

module: correct docs about when extensionless files are supported PR-URL: https://github.com/nodejs/node/pull/31415 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Geoffrey Booth

commit sha c692568a092312e161a6926f8daf52f9fa4f2b78

module: drop support for extensionless main entry points in esm PR-URL: https://github.com/nodejs/node/pull/31415 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

cjihrig

commit sha 8b606d3e264f1157e5f5da7ced7983a347cda8e8

deps: update to uvwasi 0.0.5 This version improves file descriptor renumbering, and as a result fixes uvwasi_fd_renumber(). PR-URL: https://github.com/nodejs/node/pull/31432 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

view details

cjihrig

commit sha 28bee2444e4d30b762a031958855a601aec27fe1

deps: uvwasi: cherry-pick ea73af5 Original commit message: unlock all fd mutexes in reverse order Some functions acquire mutexes for multiple file descriptors. This commit ensures that the mutexes are released in the reverse order that they are aquired. PR-URL: https://github.com/nodejs/node/pull/31432 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

view details

cjihrig

commit sha c150f9da7e52701d48aa12c2c1930b490c097a7b

deps: uvwasi: cherry-pick c3bef8e Original commit message: prevent locking fd table while holding a mutex uvwasi_path_rename(), uvwasi_path_link(), uvwasi_path_open(), and uvwasi_fd_renumber() operate on multiple file descriptors. uvwasi_fd_renumber() has been updated prior to this commit, and is not relevant here. The other three functions would perform the following locking operations: - lock the file table - acquire a file descriptor mutex - unlock the file table - unlock the file table again - acquire another file descriptor mutex - unlock the file table - unlock the two mutexes Attempting to acquire the second mutex introduced the possibility of deadlock because another thread could attempt to acquire the first mutex while holding the file table lock. This commit ensures that multiple mutexes are either: - acquired in a single lock of the file table - or, only acquired after releasing previously held mutexes Fixes: https://github.com/cjihrig/uvwasi/issues/89 PR-URL: https://github.com/nodejs/node/pull/31432 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

view details

cjihrig

commit sha 30173c608749d973db6eae9930b7a10bcd80b2d3

deps: uvwasi: cherry-pick eea4508 Original commit message: prevent race conditions with uvwasi_fd_close() uvwasi_fd_close() performed the following operations: - lock the file descriptor mutex - close the file - release the file descriptor mutex - call the file table's remove() function Once the fd's mutex is released, another thread could acquire it before the fd is removed from the file table. If this happens, remove() could destroy a held mutex. This commit updates uvwasi_fd_close() to perform the entire sequence while holding the file table's lock, preventing new acquisitions of the fd's mutex. Fixes: https://github.com/cjihrig/uvwasi/issues/88 PR-URL: https://github.com/nodejs/node/pull/31432 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

view details

cjihrig

commit sha 96058f33a9c72796930a77c97018fda2cbb5ed03

test: add wasi test for freopen() This test provides missing coverage for __wasi_fd_renumber(). PR-URL: https://github.com/nodejs/node/pull/31432 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>

view details

Tobias Nießen

commit sha ab6ab9c271ac7c77e03c81f21428739ba4e7f2f6

tls: simplify errors using ThrowCryptoError PR-URL: https://github.com/nodejs/node/pull/31436 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Rich Trott

commit sha 085a5c7638d7783afd706889dbc2b57976d5061f

benchmark: fix getStringWidth() benchmark 8fb5fe28a45cc884567cd39e3b2f6b4272917af broke the benchmark for getStringWidth(). This fixes it up by updating the argument to `require()` to retrieve `getStringWidth()` from the new internal module location. PR-URL: https://github.com/nodejs/node/pull/31476 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

view details

Tobias Nießen

commit sha 8c313ceedfcc337f05022ffaabf2e42ef26d0cdf

crypto: assign and use ERR_CRYPTO_UNKNOWN_CIPHER PR-URL: https://github.com/nodejs/node/pull/31437 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Tobias Nießen

commit sha f6c6236d956be763ffe8eb1420e19eaab2962e8d

crypto: improve errors in DiffieHellmanGroup 1. The DiffieHellmanGroup class is only instantiated from within Node.js, which always passes exactly one argument. 2. Use the existing ERR_CRYPTO_UNKNOWN_DH_GROUP error code for the existing "Unknown group" error. The message has not been changed to prevent breaking existing applications. PR-URL: https://github.com/nodejs/node/pull/31445 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Anna Henningsen

commit sha 9cc747bfcea131797fbf0fcc805f1d7fa244b7da

src: add C++-style sprintf utility Add an utility that handles C++-style strings and objects well. PR-URL: https://github.com/nodejs/node/pull/31446 Fixes: https://github.com/nodejs/node/issues/28761 Fixes: https://github.com/nodejs/node/issues/31218 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

Anna Henningsen

commit sha 32e7e813e93ec3d0625d315658288769e448dd99

src: use custom fprintf alike to write errors to stderr This allows printing errors that contain nul characters, for example. Fixes: https://github.com/nodejs/node/issues/28761 Fixes: https://github.com/nodejs/node/issues/31218 PR-URL: https://github.com/nodejs/node/pull/31446 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>

view details

push time in 22 days

PR closed nodejs/node

fs: validate the input data to be of expected types author ready fs notable-change semver-major

The input was not validated so far and that caused unwanted side effects. E.g., undefined became the string 'undefined'. It was expected to fail or to end up as empty string. Now all input is validated to be either some type of array buffer view or a string. That way it's always clear what the user intents.

Fixes: https://github.com/nodejs/node/issues/31025

<!-- 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] 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. -->

+150 -152

32 comments

12 changed files

BridgeAR

pr closed time in 22 days

push eventnodejs/node

Ruben Bridgewater

commit sha fb6df3bfac8ca38a7012eabf0563d7a799ce1acc

fs: validate the input data to be of expected types The input was not validated so far and that caused unwanted side effects. E.g., `undefined` became the string `'undefined'`. It was expected to fail or to end up as empty string. Now all input is validated to be either some type of array buffer view or a string. That way it's always clear what the user intents. PR-URL: https://github.com/nodejs/node/pull/31030 Fixes: https://github.com/nodejs/node/issues/31025 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>

view details

Juan José Arboleda

commit sha afe353061b3c0543ebaa40668f27c12384e6c5d6

doc: fs.write is not longer coercing strings PR-URL: https://github.com/nodejs/node/pull/31030 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>

view details

push time in 22 days

issue closednodejs/node

fs.writeFileSync(path) literaly writes "undefined" to the file

  • Version: v13.3.0
  • Platform: Linux pc 5.3.15-1-MANJARO #1 SMP PREEMPT Thu Dec 5 11:01:29 UTC 2019 x86_64 GNU/Linux
  • Subsystem: fs

When executing:

require('fs').writeFileSync('/tmp/empty-file');

It creates a file containing "undefined" string:

% hexdump -C /tmp/empty-file
00000000  75 6e 64 65 66 69 6e 65  64                       |undefined|
00000009

This is unexpected behavior as I just wanted to create an empty file. I expect it to either write an empty file or throw but in no case have "undefined" written as the file content.

closed time in 22 days

aalexgabi

pull request commentnodejs/node

fs: validate the input data to be of expected types

Landed in fb6df3bfac8ca38a7012eabf0563d7a799ce1acc, afe353061b3c0543ebaa40668f27c12384e6c5d6 :tada:

BridgeAR

comment created time in 22 days

issue closedNodeRedis/node_redis

how to calculate nearest X,Y coordinate using from user Joy using redis .I have used node-redis .

{ status: 'closed', 'users:5d7f3917bfc9c320eae14baf:id': '5d7f3917bfc9c320eae14baf', 'users:5d7f3917bfc9c320eae14baf:name': 'Joy', 'users:5d7f3917bfc9c320eae14baf:position:X': '406.9941482694788', 'users:5d7f3917bfc9c320eae14baf:position:Y': '647.8162975185139', 'users:5d7f3917bfc9c320eae14baf:playerScale:X': '0.1', 'users:5d7f3917bfc9c320eae14baf:playerScale:Y': '0.1', 'users:5d7f3917bfc9c320eae14baf:texture': '0', 'users:5d7f3917bfc9c320eae14baf:playerAngle': '0', 'users:5d7f3917bfc9c320eae14baf:playerSpeed': '100', 'users:5d7f3917bfc9c320eae14baf:type': 'USER', 'users:5d7f3917bfc9c320eae14baf:totalUserKill': '0', 'users:krzbm41hpw47jy42:id': 'krzbm41hpw47jy42', 'users:krzbm41hpw47jy42:name': 'DUXMIF', 'users:krzbm41hpw47jy42:position:X': '297.9611648827057', 'users:krzbm41hpw47jy42:position:Y': '563.8852984680458', 'users:krzbm41hpw47jy42:playerScale:X': '0.1', 'users:krzbm41hpw47jy42:playerScale:Y': '0.1', 'users:krzbm41hpw47jy42:texture': '1', 'users:krzbm41hpw47jy42:playerAngle': '127.99640517059484', 'users:krzbm41hpw47jy42:playerSpeed': '100', 'users:krzbm41hpw47jy42:type': 'AI', 'users:krzbm41hpw47jy42:totalUserKill': '0', 'users:dg42ekr7x6mf2ckt:id': 'dg42ekr7x6mf2ckt', 'users:dg42ekr7x6mf2ckt:name': '5Q2IBX', 'users:dg42ekr7x6mf2ckt:position:X': '513.94114776204', 'users:dg42ekr7x6mf2ckt:position:Y': '661.162340155979', 'users:dg42ekr7x6mf2ckt:playerScale:X': '0.1', 'users:dg42ekr7x6mf2ckt:playerScale:Y': '0.1', 'users:dg42ekr7x6mf2ckt:texture': '1', 'users:dg42ekr7x6mf2ckt:playerAngle': '98.5896738842123', 'users:dg42ekr7x6mf2ckt:playerSpeed': '100', 'users:dg42ekr7x6mf2ckt:type': 'AI', 'users:dg42ekr7x6mf2ckt:totalUserKill': '0', 'users:ho2bekwy2llh65mt:id': 'ho2bekwy2llh65mt', 'users:ho2bekwy2llh65mt:name': 'D8I5CA', 'users:ho2bekwy2llh65mt:position:X': '513.94114776204', 'users:ho2bekwy2llh65mt:position:Y': '661.162340155979', 'users:ho2bekwy2llh65mt:playerScale:X': '0.1', 'users:ho2bekwy2llh65mt:playerScale:Y': '0.1', 'users:ho2bekwy2llh65mt:texture': '1', 'users:ho2bekwy2llh65mt:playerAngle': '114.86708867842093', 'users:ho2bekwy2llh65mt:playerSpeed': '100', 'users:ho2bekwy2llh65mt:type': 'AI', 'users:ho2bekwy2llh65mt:totalUserKill': '0' }

closed time in 22 days

Runa-Redapple

issue commentNodeRedis/node_redis

how to calculate nearest X,Y coordinate using from user Joy using redis .I have used node-redis .

@Runa-Redapple as suggested, please open an issue on StackOverflow. I suggest not to post anything about your user data and to use a generic example code to ask the question.

Runa-Redapple

comment created time in 22 days

issue closedNodeRedis/node_redis

Reply error when using the PUB/SUB system and bluebird promissifyAll

  • Version: node_redis: 2.88.0, redis: 2.4.5 (64bit)
  • Platform: Node 10.16.0
  • Description: I'm having an issue while using the promissified version of node_redis by bluebird. The issue occurs when I call both client.setAsync and client.subscribeAsync from a Promise.all. The code follows along:
import redis from 'redis';
import { promisifyAll } from 'bluebird';
promisifyAll(redis);

client = redis.createClient();

Promise.all([
  client.setAsync("key","value"),
  client.subscribeAsync("channel_name"),
])
  .then( () => {
    console.log("All operations are done");
  }).catch( error =>{
    console.log("An error has ocurred");
  })

And I receive the error message:

ReplyError: ERR only (P)SUBSCRIBE / (P)UNSUBSCRIBE / QUIT allowed in this context
      at parseError (node_modules\redis-parser\lib\parser.js:193:12)
      at parseType (node_modules\redis-parser\lib\parser.js:303:14)

closed time in 22 days

lsmenicucci

issue commentNodeRedis/node_redis

Reply error when using the PUB/SUB system and bluebird promissifyAll

@alastaircoote is indeed correct.

lsmenicucci

comment created time in 22 days

issue commentNodeRedis/node_redis

db options does not fire select db on createClient when url (with specified db number) is provided

It is indeed a good idea to throw an error in such case / to at least log something for now.

The main issue is that it applies to multiple options and not only the db option.

darkash

comment created time in 22 days

issue closedNodeRedis/node_redis

Cannot connect to Redis server on .local domain

  • Version: Redis version: 3.0.504 Node Redis: 2.8.0
  • Platform: NodeJS v10.15.2 on WSL 2(Ubuntu 19.10 on Windows 10 x86_64 / 4.19.43-microsoft-standard) Redis on Windows 10 (Microsoft Windows [Version 10.0.18936.1000])
  • Description: If I connect to the redis server on Windows 10 from node redis on WSL using the IP (WSL Interface) of the host, everything works fine. Also, it works if I connect from WSL 1 to the server using the domain(.local is not needed here) or when I connect to the redis server running on WSL2(without .local/see Note). But, if I connect to the redis server using the hostname(<hostname of the (real) machine>.local), I get the following error:
Error: Redis connection to <hostname of the (real) machine>.local:6379 failed - getaddrinfo ENOTFOUND <hostname of the (real) machine>.l
ocal <hostname of the (real) machine>.local:6379
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:57:26)
Emitted 'error' event at:
    at RedisClient.on_error (/home/dan/daydream/node_modules/redis/index.js:406:14)
    at Socket.<anonymous> (/home/dan/daydream/node_modules/redis/index.js:279:14)
    at Socket.emit (events.js:189:13)
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

[Notes]: If you do not include the .local in WSL2, the hostname will resolve to the WSL2 VM and not the host. I can also connect to the redis server and enter commands using the Command telnet <hostname of the (real) machine>.local 6379.

closed time in 22 days

danthe1st
more