adriancooney / puppeteer-heap-snapshot

API and CLI tool to fetch and query Chome DevTools heap snapshots.
MIT License
1.35k stars 68 forks source link

feat: add options to set depth and to skip unwanted node names #5

Open Nedgeva opened 2 years ago

Nedgeva commented 2 years ago

This PR brings following changes:

  1. extends options object that can be passed to query (both from CLI and as direct dependency) with depth value (to have ability explicitly limit recursions) (CLI: depth / prop: maxDepth) and unwanted node names list^ (CLI: exclude / prop: unwantedNodeNames);
  2. enables stricter ts rules;
  3. rest of little minor changes.

^ These changes can help to overcome situations like one that described in #1.

Example of usage: npx puppeteer-heap-snapshot.js query -u https://polypane.app/css-specificity-calculator/ -p href -e Location,HTMLAnchorElement,URL,HTMLLinkElement,SVGGradientElement,SVGFilterElement -d 1.