playwright/packages
Andrey Lushnikov 9ca9b08d90
fix: better formatting for sparse arrays (#20379)
Right now arrays preview yields all array elements. In case
of a sparse array with a single element on index 10000000,
this results in a large string that OOM Node.js.

This patch changes pretty-printing. For example:

```ts
// Given this array
const a = [];
a[10] = 1;
// Before this patch, pretty printing will yield:
"[,,,,,,,,1]"
// With this patch, pretty printing yields:
"[empty x 9, 1]"
```

The new array pretty-printing is equal to what Chrome DevTools
do to render sparse arrays.

Fixes #20347
2023-01-27 05:07:55 -08:00
..
html-reporter chore: do not use docker for "Web Components" tests (#20339) 2023-01-24 14:00:10 -08:00
playwright chore: mark 1.31-next (#20268) 2023-01-20 19:29:14 -08:00
playwright-chromium chore: mark 1.31-next (#20268) 2023-01-20 19:29:14 -08:00
playwright-core fix: better formatting for sparse arrays (#20379) 2023-01-27 05:07:55 -08:00
playwright-ct-react chore: mark 1.31-next (#20268) 2023-01-20 19:29:14 -08:00
playwright-ct-solid chore: mark 1.31-next (#20268) 2023-01-20 19:29:14 -08:00
playwright-ct-svelte chore: mark 1.31-next (#20268) 2023-01-20 19:29:14 -08:00
playwright-ct-vue chore: mark 1.31-next (#20268) 2023-01-20 19:29:14 -08:00
playwright-ct-vue2 chore: mark 1.31-next (#20268) 2023-01-20 19:29:14 -08:00
playwright-firefox chore: mark 1.31-next (#20268) 2023-01-20 19:29:14 -08:00
playwright-test chore: group test runner files by process (#20425) 2023-01-26 17:26:47 -08:00
playwright-webkit chore: mark 1.31-next (#20268) 2023-01-20 19:29:14 -08:00
protocol/src chore: drop locator.viewportRatio() method (#20131) 2023-01-19 08:46:45 -08:00
recorder chore: recorder button styling (#19231) 2022-12-15 18:35:24 +01:00
trace/src chore: render typed locators in the trace viewer (#18166) 2022-10-18 19:23:40 -07:00
trace-viewer chore: fix racy emptyOutDir in trace-viewer build (#20090) 2023-01-13 06:42:56 -08:00
web chore: introduce defineConfig for easier JS typing (#20061) 2023-01-12 13:12:02 -08:00
.eslintrc.js chore: don't write into stdout from the test runner, use reporters instead (#11367) 2022-01-12 19:52:40 -08:00