<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/node-new.git/lib/internal/assert/assertion_error.js, branch Ninja.py-StringIO</title>
<subtitle>github.com: nodejs/node.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/'/>
<entry>
<title>assert: avoid potentially misleading reference to object identity</title>
<updated>2019-07-26T05:36:29+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-07-23T18:38:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=64e4b0c0ac5073e6606b1ccd79a464f2c5925741'/>
<id>64e4b0c0ac5073e6606b1ccd79a464f2c5925741</id>
<content type='text'>
Often, the word “identical” when referring to JS objects will
be read as referring to having the same object identity (which is
called “reference equality” here), but what the error message is
trying to say here is that the objects are different but yield the
same `util.inspect()` output.

Since `util.inspect()` output represents the structure rather than
the identity of objects, (hopefully) clarify the error message to
reflect that.

PR-URL: https://github.com/nodejs/node/pull/28824
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Trivikram Kamat &lt;trivikr.dev@gmail.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Often, the word “identical” when referring to JS objects will
be read as referring to having the same object identity (which is
called “reference equality” here), but what the error message is
trying to say here is that the objects are different but yield the
same `util.inspect()` output.

Since `util.inspect()` output represents the structure rather than
the identity of objects, (hopefully) clarify the error message to
reflect that.

PR-URL: https://github.com/nodejs/node/pull/28824
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Trivikram Kamat &lt;trivikr.dev@gmail.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>assert: print more lines in the error diff</title>
<updated>2019-06-13T02:50:03+00:00</updated>
<author>
<name>Ruben Bridgewater</name>
<email>ruben@bridgewater.de</email>
</author>
<published>2019-06-03T14:05:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=81496567e76006a7d07a8552215fc6333c183480'/>
<id>81496567e76006a7d07a8552215fc6333c183480</id>
<content type='text'>
So far consequitive identical lines were collapsed if there were at
least three. Now they are only collapsed from five identical lines on.

This also simplifies the implementation a tiny bit by abstracting some
logic.

PR-URL: https://github.com/nodejs/node/pull/28058
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
So far consequitive identical lines were collapsed if there were at
least three. Now they are only collapsed from five identical lines on.

This also simplifies the implementation a tiny bit by abstracting some
logic.

PR-URL: https://github.com/nodejs/node/pull/28058
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>assert: fix error diff</title>
<updated>2019-06-13T02:49:59+00:00</updated>
<author>
<name>Ruben Bridgewater</name>
<email>ruben@bridgewater.de</email>
</author>
<published>2019-06-03T13:34:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=e4ec4f2656f14d3992da154c46f6c0c44025f30d'/>
<id>e4ec4f2656f14d3992da154c46f6c0c44025f30d</id>
<content type='text'>
In some edge cases an identical line could be printed twice. This is
now fixed by changing the algorithm a bit. It will now verify how
many lines were identical before the current one.

PR-URL: https://github.com/nodejs/node/pull/28058
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In some edge cases an identical line could be printed twice. This is
now fixed by changing the algorithm a bit. It will now verify how
many lines were identical before the current one.

PR-URL: https://github.com/nodejs/node/pull/28058
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>assert: limit string inspection when logging assertion errors</title>
<updated>2019-06-13T02:48:24+00:00</updated>
<author>
<name>Ruben Bridgewater</name>
<email>ruben@bridgewater.de</email>
</author>
<published>2019-06-02T15:36:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=a3ea54f5abd48decb1526c58fafd4cd757dbb02b'/>
<id>a3ea54f5abd48decb1526c58fafd4cd757dbb02b</id>
<content type='text'>
This makes sure long strings as `actual` or `expected` values on an
`AssertionError` won't be logged completely. This is important as
the actual value is somewhat redundant in combination with the error
message which already logs the difference between the input values.

PR-URL: https://github.com/nodejs/node/pull/28058
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes sure long strings as `actual` or `expected` values on an
`AssertionError` won't be logged completely. This is important as
the actual value is somewhat redundant in combination with the error
message which already logs the difference between the input values.

PR-URL: https://github.com/nodejs/node/pull/28058
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>assert: remove unreachable code</title>
<updated>2019-05-25T17:59:30+00:00</updated>
<author>
<name>Rich Trott</name>
<email>rtrott@gmail.com</email>
</author>
<published>2019-05-23T17:32:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=58fc172bfa9bd962fa3c614d7cbf94327af22c1e'/>
<id>58fc172bfa9bd962fa3c614d7cbf94327af22c1e</id>
<content type='text'>
There is only one entry in `kReadableOperator` that ends in `Unequal`.
So the value assigned on line 392 can only be truthy if `operator` is
`notDeepEqual`. Therefore, the ternary condition on line 394 is always
true. Remove the ternary. Coverage reports confirm that the removed code
is unused.

PR-URL: https://github.com/nodejs/node/pull/27840
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Beth Griggs &lt;Bethany.Griggs@uk.ibm.com&gt;
Reviewed-By: Ouyang Yadong &lt;oyydoibh@gmail.com&gt;
Reviewed-By: Trivikram Kamat &lt;trivikr.dev@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is only one entry in `kReadableOperator` that ends in `Unequal`.
So the value assigned on line 392 can only be truthy if `operator` is
`notDeepEqual`. Therefore, the ternary condition on line 394 is always
true. Remove the ternary. Coverage reports confirm that the removed code
is unused.

PR-URL: https://github.com/nodejs/node/pull/27840
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Beth Griggs &lt;Bethany.Griggs@uk.ibm.com&gt;
Reviewed-By: Ouyang Yadong &lt;oyydoibh@gmail.com&gt;
Reviewed-By: Trivikram Kamat &lt;trivikr.dev@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>assert: remove unreachable code</title>
<updated>2019-05-23T17:23:15+00:00</updated>
<author>
<name>Rich Trott</name>
<email>rtrott@gmail.com</email>
</author>
<published>2019-05-20T23:27:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=99268b1e996d13a0aeda7aa112796484fe4e4238'/>
<id>99268b1e996d13a0aeda7aa112796484fe4e4238</id>
<content type='text'>
In lib/internal/assert/assertion_error.js, line 391 assures that
`operator` is 'deepEqual' so there is no need to check the value of
`operator` in a ternary on the next line (line 392). Remove the ternary.

PR-URL: https://github.com/nodejs/node/pull/27786
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Yongsheng Zhang &lt;zyszys98@gmail.com&gt;
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Trivikram Kamat &lt;trivikr.dev@gmail.com&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In lib/internal/assert/assertion_error.js, line 391 assures that
`operator` is 'deepEqual' so there is no need to check the value of
`operator` in a ternary on the next line (line 392). Remove the ternary.

PR-URL: https://github.com/nodejs/node/pull/27786
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Yongsheng Zhang &lt;zyszys98@gmail.com&gt;
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Trivikram Kamat &lt;trivikr.dev@gmail.com&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>assert: remove unused code</title>
<updated>2019-05-16T10:58:38+00:00</updated>
<author>
<name>Ruben Bridgewater</name>
<email>ruben@bridgewater.de</email>
</author>
<published>2019-05-13T13:14:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=35fc1b4e9668b2e085e06e3a97afd97c825db2c0'/>
<id>35fc1b4e9668b2e085e06e3a97afd97c825db2c0</id>
<content type='text'>
Those two operators are not used.

PR-URL: https://github.com/nodejs/node/pull/27676
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Yongsheng Zhang &lt;zyszys98@gmail.com&gt;
Reviewed-By: Trivikram Kamat &lt;trivikr.dev@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Those two operators are not used.

PR-URL: https://github.com/nodejs/node/pull/27676
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Yongsheng Zhang &lt;zyszys98@gmail.com&gt;
Reviewed-By: Trivikram Kamat &lt;trivikr.dev@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>assert: add compatibility for older Node.js versions</title>
<updated>2019-05-16T10:52:49+00:00</updated>
<author>
<name>Ruben Bridgewater</name>
<email>ruben@bridgewater.de</email>
</author>
<published>2019-05-13T12:17:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=e632b1b7eeb0900472c710ae7269111d985de018'/>
<id>e632b1b7eeb0900472c710ae7269111d985de018</id>
<content type='text'>
This makes sure the `AssertionError` still accepts the
`stackStartFunction` option as alternative to the `stackStartFn`.

PR-URL: https://github.com/nodejs/node/pull/27672
Fixes: https://github.com/nodejs/node/issues/27671
Reviewed-By: Yongsheng Zhang &lt;zyszys98@gmail.com&gt;
Reviewed-By: Anto Aravinth &lt;anto.aravinth.cse@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
Reviewed-By: Trivikram Kamat &lt;trivikr.dev@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes sure the `AssertionError` still accepts the
`stackStartFunction` option as alternative to the `stackStartFn`.

PR-URL: https://github.com/nodejs/node/pull/27672
Fixes: https://github.com/nodejs/node/issues/27671
Reviewed-By: Yongsheng Zhang &lt;zyszys98@gmail.com&gt;
Reviewed-By: Anto Aravinth &lt;anto.aravinth.cse@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
Reviewed-By: Trivikram Kamat &lt;trivikr.dev@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>assert: refine assertion message</title>
<updated>2019-05-05T21:44:19+00:00</updated>
<author>
<name>Ruben Bridgewater</name>
<email>ruben@bridgewater.de</email>
</author>
<published>2019-05-01T21:52:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=0cd602879c5e3f6a77adc2453f98b331421b2dbb'/>
<id>0cd602879c5e3f6a77adc2453f98b331421b2dbb</id>
<content type='text'>
This makes sure that the error message is more appropriate than
before by checking closer what operator is used and which is not.

It also increases the total number of lines printed to the user.

PR-URL: https://github.com/nodejs/node/pull/27525
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Michaël Zasso &lt;targos@protonmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes sure that the error message is more appropriate than
before by checking closer what operator is used and which is not.

It also increases the total number of lines printed to the user.

PR-URL: https://github.com/nodejs/node/pull/27525
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Michaël Zasso &lt;targos@protonmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: enforce the use of Object from primordials</title>
<updated>2019-04-12T03:38:45+00:00</updated>
<author>
<name>Michaël Zasso</name>
<email>targos@protonmail.com</email>
</author>
<published>2019-04-09T07:55:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=908292cf1f551c614a733d858528ffb13fb3a524'/>
<id>908292cf1f551c614a733d858528ffb13fb3a524</id>
<content type='text'>
PR-URL: https://github.com/nodejs/node/pull/27146
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR-URL: https://github.com/nodejs/node/pull/27146
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
</pre>
</div>
</content>
</entry>
</feed>
