Aalex Gabi

Results 18 comments of Aalex Gabi

After crashes in production and a long investigation I found that the flatten() does not detect circular references and generates a infinite recursion. This is a big problem because as...

It seems that bunyan-gelf has the same problem: https://github.com/hughsk/flat/issues/24#issuecomment-273439342

@pixelshaded Can you please change the title to something like "Crashes process when serializing objects with circular references: process out of memory" to be more precise?

@dfleury I do not observe the same behaviour: ```shell % cat test/t.spec.js describe('main', () => { beforeAll(async () => new Promise((resolve, reject) => { // Never resolves })); test('test case',...

TL;DR The default behavior of got library should balance security and pragmatism and should be configurable by the user @szmarczak @sindresorhus I'm very happy to hear that error.options will become...

@callumlocke @sindresorhus It looks like this implementation requires users to add the properties to errors themselves. This requires making sure that no developer forgets to add this to every request....

@szmarczak What about something like this: ``` Object.defineProperty(this, 'options', { // This fails because of TS 3.7.2 useDefineForClassFields // Ref: https://github.com/microsoft/TypeScript/issues/34972 enumerable: true, value: _.omit(options, ['options.headers.Authorization']) }); ``` In https://github.com/sindresorhus/got/blob/1d012a513a2263f0f51d327e7b509d9d3bd8ffc5/source/errors.ts#L20

> One possible solution would be to create a stacktrace before making the request and create another one when erroring and then merge these two. @szmarczak This approach works. Our...

I have been able to do it this way using [deepdash](https://github.com/YuriGor/deepdash): ```js console.log('tree', tree); const restoredNode = mapDeep(tree, (value, key, object, info) => { if (info.afterIterate) { return math.reviver(key, value);...

@josdejong I receive JSON messages from an MQ broker. The MQ library automatically de-serializes messages and passes them to a handler function. Somewhere deep inside the handler function math.js is...