profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/BridgeAR/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Ruben Bridgewater BridgeAR MaibornWolff GmbH Frankfurt, Germany https://twitter.com/BridgeAR @nodejs Technical Steering Committee member. Principle Software Architect @MaibornWolff. Conference Speaker. Open Source enthusiast.

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/apollo-server 0

🌍 GraphQL server for Express, Connect, Hapi, Koa and more

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

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

issue commentnodejs/node

Pasting long json in REPL is slow

The following two entries are the main entries.

    588   14.0%   62.6%  LazyCompile: *Interface._getDisplayPos readline.js:842:46
    312    7.4%   33.2%  RegExp: [\u001B\u009B][[\]()#;?]*(?:(?:(?:[a-zA-Z\d]*(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)|(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-ntqry=><~]))

It would be possible to use a special getDisplayPos() function that would only count the row characters as that's required most frequently. In there, we could limit the string that is passed to stripVTControlCharacters() to e.g., a multiple of the current characters visible per line. The regular expression is also used triggered too frequently in _getDisplayPos(). It would only have to be called once up front with stripVTControlCharacters(). getStringWidth() should be called with the second argument being false.

septatrix

comment created time in 21 hours

issue commentnodejs/node

Pasting long json in REPL is slow

@septatrix node --prof -e 'require("repl").start()'

Without checking closer: it would probably be useful to use a debounce time to trigger the preview.

septatrix

comment created time in a day

PullRequestReviewEvent

Pull request review commentnodejs/node

performance: fix timerify bug

 const { const { InternalPerformanceEntry } = require('internal/perf/performance_entry'); const { now } = require('internal/perf/utils'); -const {-  validateFunction,-  validateObject,-} = require('internal/validators');+const { validateFunction, validateObject } = require('internal/validators');

Seems like a formatter ran for this code? This makes it more difficult to read the diff. Would you be so kind and keep the formatting as it was before? :-)

iam-frankqiu

comment created time in a day

issue commentnodejs/node

Pasting long json in REPL is slow

The input is analyzed as @mscdex already outlined. Doing that for a big input could indeed be costly. Having a flamegraph for the specific situation (having a simple perf output would also be fine) would allow us to identify the specific part that is slow. If everything fails, we could limit the input evaluation only to be run for input up to a specific size.

septatrix

comment created time in a day

issue commentnodejs/TSC

Node.js Technical Steering Committee (TSC) Meeting 2021-10-27

I am unable to attend today as well. I would like to postpone the voting on primordials for another week where we discuss all possibilities again.

mhdawson

comment created time in a day

pull request commentnodejs/node

doc: add primordials guidelines

@GeoffreyBooth we are currently deciding on a new general direction when it comes to primordials. Thus, I believe it's something that we can not document before it's actually decided upon. We currently have a timeline of a few more weeks for it.

@aduh95 yes, I would like the TSC to vote upon the general direction of primordials before landing this.

aduh95

comment created time in 4 days

issue openedtermstandard/colors

General purpose command to query for color support programatically

I would like to discuss a similar command as DECRQSS that would be recommended to be implemented by commonly used terminals across different OS.

That way there would be a reliable way to detect actual color support. For now it's not reliable at all by checking for environment variables.

I did not yet think of an ideal solution and would first like to know if there's interest in drafting such command.

created time in 4 days

issue openedtermstandard/colors

Stronger collaboration

@XVilka are you open for others to join the termstandard organization to drive this further in collaboration? :-)

created time in 4 days

issue commenttermstandard/colors

A fork of Termbox does support True Color

This is documented by now and this issue should probably be closed? @XVilka

kiedtl

comment created time in 4 days

pull request commentMaibornWolff/codecharta

Refactor/2318/migrate map tree view

@ce-bo I am fine both ways.

shaman-apprentice

comment created time in 8 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentMaibornWolff/codecharta

What's new section includes last opened version

 describe("DialogChangelogController", () => { 	}  	describe("constructor", () => {-		it("should extract the changes from changelog since last time visited", () => {-			Storage.prototype.getItem = jest.fn(() => "1.70.0")+		it("should extract the changes from changelog only for the last version", () => {+			Storage.prototype.getItem = jest.fn(() => "1.76.0")+			packageJson.version = "1.77.0" 			rebuildController() 			expect(dialogChangelogController["_viewModel"].changes).not.toBeNull()-			expect(dialogChangelogController["_viewModel"].changes["Added 🚀"]).not.toBeNull()-			expect(dialogChangelogController["_viewModel"].changes["Fixed 🐞"]).not.toBeNull()+			expect(dialogChangelogController["_viewModel"].changes["Added 🚀"]).toBeUndefined()+			expect(dialogChangelogController["_viewModel"].changes["Fixed 🐞"]).toBe(+				'<li>3 (<a href="">#3</a>)</li>\n' + '<li>4 (<a href="">#4</a>)</li>\n' + '<li>5 (<a href="">#5</a>)</li>'+			) 			expect(dialogChangelogController["_viewModel"].changes["Removed 🗑"]).toBeUndefined()+			expect(dialogChangelogController["_viewModel"].changes["Changed"]).toBeUndefined()+			expect(dialogChangelogController["_viewModel"].changes["Chore 👨‍💻 👩‍💻"]).toBe('<li>6 (<a href="">#6</a>)</li>')+		})+		it("should extract the changes from changelog for 2 versions", () => {+			packageJson.version = "1.77.0"+			Storage.prototype.getItem = jest.fn(() => "1.75.0")+			rebuildController()+			expect(dialogChangelogController["_viewModel"].changes).not.toBeNull()+			expect(dialogChangelogController["_viewModel"].changes["Added 🚀"]).toBe(+				'<li>7 (<a href="">#7</a>)</li>\n' + '<li>8 (<a href="">#8</a>)</li>'+			)+			expect(dialogChangelogController["_viewModel"].changes["Fixed 🐞"]).toBe(+				'<li>3 (<a href="">#3</a>)</li>\n' + '<li>4 (<a href="">#4</a>)</li>\n' + '<li>5 (<a href="">#5</a>)</li>'+			)+			expect(dialogChangelogController["_viewModel"].changes["Chore 👨‍💻 👩‍💻"]).toBe('<li>6 (<a href="">#6</a>)</li>')+			expect(dialogChangelogController["_viewModel"].changes["Changed"]).toBe(+				"<li>\n" ++					'<p>9 (<a href="">#9</a>)</p>\n' ++					"</li>\n" ++					"<li>\n" ++					'<p>10 (<a href="">#10</a>)</p>\n' ++					"<ul>\n" ++					"<li>10.1</li>\n" ++					"<li>10.2</li>\n" ++					"</ul>\n" ++					"</li>"+			)+			expect(dialogChangelogController["_viewModel"].changes["Removed 🗑"]).toBeUndefined()+		})+	})++	describe("find version line", () => {+		it("should find the first version line", () => {+			const versionLine = dialogChangelogController.findVersionLine(+				["</ul>", "<h2>[1.77.0] - 2021-07-30</h2>", "<h3>Fixed 🐞</h3>", "<h2>[1.76.0] - 2021-06-30</h2>"],+				"1.77.0"+			)++			expect(versionLine).toBe(1)+		})+	})++	describe("find changes end line", () => {+		it("should find the end line of the given changes before another change list ", () => {+			const versionLine = dialogChangelogController.findEndChangesLine(+				["<ul>", '<a href="">#7</a>)</li>\n', '<li>8 (<a href="">#8</a>)</li>', "</ul>", "<h3>Fixed 🐞</h3>"],+				0+			)++			expect(versionLine).toBe(3)+		})+		it("should find the end line of the given changes before a new version ", () => {+			const versionLine = dialogChangelogController.findEndChangesLine(+				["<ul>", '<a href="">#7</a>)</li>\n', '<li>8 (<a href="">#8</a>)</li>', "</ul>", "<h2>[1.76.0] - 2021-06-30</h2>"],+				0+			)++			expect(versionLine).toBe(3)+		})+	})++	describe("get all indexes", () => {+		it("should find the indexes of every occurrence of the pattern", () => {+			const indexes = dialogChangelogController.getAllIndexes(

I recommend to change the tests to only use the "publi" API. In this case that's only the DialogChangelogController class constructor. You would only test input and output.

The benefit is that you can a) rely upon the behavior how the internals of the class work together and b) refactor internal behavior without having to change the tests. Thus, that provides faster code changes and better test safety.

Exposing something private just for testing already indicates that it's not a good thing to do.

IhsenBouallegue

comment created time in 8 days

PullRequestReviewEvent

Pull request review commentMaibornWolff/codecharta

Fix/2397/unfocus button has no text

 export class NodeContextMenuController 		markingColors: string[] 		nodePath: string 		lastPartOfNodePath: string+		isNodeFocused: boolean+		isParentFocused: boolean

Using two boolean values is IMO not ideal. Only one value may be true at a time and as such, it's just a question of which one is active. I would use a single variable instead.

I know that this feedback is too late for the PR but if you come around to it again, that would be good to refactor.

IhsenBouallegue

comment created time in 9 days

issue closedBridgeAR/safe-stable-stringify

Please add ECMAScript module

CommonJS modules cannot be optimized with webpack, for example.

As of Angular 10, a warning is emitted when building an app that imports safe-stable-stringify.

closed time in 9 days

jfai

issue commentBridgeAR/safe-stable-stringify

Please add ECMAScript module

@jfai thank you for the fast response!

jfai

comment created time in 9 days

release BridgeAR/safe-stable-stringify

v2.1.0

released time in 9 days

created tagBridgeAR/safe-stable-stringify

tagv2.1.0

Safe, deterministic and fast serialization alternative to JSON.stringify.

created time in 9 days

issue commentBridgeAR/safe-stable-stringify

Please add ECMAScript module

@jfai please give v2.1.0 another try. I updated the typescript definition file in a way that it should work by now.

jfai

comment created time in 9 days

push eventBridgeAR/safe-stable-stringify

Ruben Bridgewater

commit sha d9d4db57c9be45419ae24068bc54f35054d61f9b

v2.1.0

view details

push time in 9 days

PR merged BridgeAR/safe-stable-stringify

Adds maxDepth and maxBreadth options

Adds two options to the main() function

  • maxDepth stops the serialization if the object is too nested
  • maxBreadth stops the serialization on an object after the specified number of keys

Both values are disabled by default and need to be set when calling .configure()

A couple of tests have been added as well.

I put this as draft as we would like to integrate this library in pino but I'd like to discuss if this approach is ok with the maintainer and things like that.

+209 -6

5 comments

3 changed files

leorossi

pr closed time in 9 days

push eventBridgeAR/safe-stable-stringify

Leonardo Rossi

commit sha d92ddf85122b33d1df2892b142636c8d621e3334

work in progress

view details

Leonardo Rossi

commit sha 8b7589e8e0d28777b8eb9dc766c861b220dcc59c

adds MAX_BREADTH feature

view details

Leonardo Rossi

commit sha 3d38a9426ffeb088ced406ca451009468d2c1ce0

adds maxDepth and maxBreadth options

view details

Leonardo Rossi

commit sha d56ad3c39321dfe7b3b6b52b10256e0f7a882002

adds maxDepth and maxBreadth options

view details

Leonardo Rossi

commit sha 910536c9fe8616bcd873a21587e906cf7beb43f8

removes stable.js file

view details

Leonardo Rossi

commit sha 987ed2e5fa717540e0e04709273582bdcde53952

renamed maxDepth and maxBreadth variable names

view details

Leonardo Rossi

commit sha 72ecf624fb6df80cbcbb8824232e8afc55e9acde

use [Object] as placeholder

view details

Leonardo Rossi

commit sha 3092fa1b122b29224383f4bbade049dd2c0de154

Validate maxmiumBreadth and maximumDepth options

view details

Leonardo Rossi

commit sha d51529ecd1598ea80fa29d26d90208aa0b1f0baf

Adds debug element when max breadth is reached

view details

Leonardo Rossi

commit sha 63319d3c938a022111e9c4369a4fd9c06984b7a5

adds depth check to other serialize functions

view details

Leonardo Rossi

commit sha 68ff3ffc952d4942df593774710b58ed6e9b7d63

limit number of keys in array

view details

Leonardo Rossi

commit sha e7d498fdbfb255768b3406c272538adc9abfbfdf

support maximumBreadth in typed arrays

view details

Leonardo Rossi

commit sha 8d6218c414927c8ab5ddc2e9d92058a27df3e25f

updates readme

view details

Jiří Špác

commit sha a452b47137375fa56624bbefa42990fcbeef491a

test: add tests to bump code coverage to 100%

view details

Ruben Bridgewater

commit sha 6304d6d2cb1dcd9b297b4f7536ab559c99041200

Merge branch 'main' into feature/add-depth-option

view details

Ruben Bridgewater

commit sha 8701e4799e8932834fa49dd1325740d6178c91c8

feature: finish implementing maximumBreadth & maximumDepth options This fully implements the maximumBreadth & maximumDepth options and adds more tests to verify it is fully functional.

view details

Ruben Bridgewater

commit sha 997e82cf81cbac64b0da6b4926339e21a20686d7

fix: deduplicate array replacer values This fixes serializing duplicated array replacer values. Those are now only serialized once.

view details

Ruben Bridgewater

commit sha 3953023dc4c607f49ce7916843b30043f896b558

chore: rename internal functions for clarity

view details

Ruben Bridgewater

commit sha ab556783a1282ca8ced233196d4b351ad4a145ad

chore: validate files with typescript

view details

Ruben Bridgewater

commit sha a1b24d63c946f3546f08f545e5bf74512c609f54

fix: mark Node.js 10 as supported

view details

push time in 9 days

delete branch BridgeAR/safe-stable-stringify

delete branch : test-new-options

delete time in 9 days

push eventBridgeAR/safe-stable-stringify

Ruben Bridgewater

commit sha 6e295ff6f9e037da83977a05a19df63f3ed2974a

feature: implement well formed JSON.stringify behavior Unicode code points in the inclusive range 0xD800 to 0xDFFF are from now on escaped as defined by the spec. This was not considered a breaking change in the proposal and as such it's neither considered a breaking change here.

view details

push time in 9 days