@drill4j/js-parser v0.4.0
AST-parser (drill4js-cli utility)
Production build
Set
"sourceMap": false,
in tsconfig.jsonTODO: add separate build config
Run
npm run build
Release
To release a new package version:
- Bump version in
package.json
manually - Run commands from Production build section
Run
npm publish --dry-run
:ensure that only necessary files are listed in package preview
ensure that
npm-shrinkwrap.json
does not include development dependencies
Run
npm publish
ornpm publish --tag beta
Development build & debug
Install development dependencies
rm -rf node_modules npm i
Set
"sourceMap": true,
in tsconfig.jsonRun webpack development server
npm run dev
Attach debugger to the process started with
npm run dev
VScode:
- Run
Debug on fixtures
launch configuration - Edit configuration to debug on different files
Other IDEs:
- Attach debugger of your choice to the running process, use .vscode/launch.json
Debug on fixtures
configuration as the example
- Run
What is WASM module in `src/third-party/chromehash"
This modules provides algorithm that V8 uses internally to uniquely identify each script
brief explanation:
js-parser
utilizes it to get hash for each bundle fileHere, terms script and bundle file are used interchangeably. Both indicate the javascript files executed in browser.
V8 attaches the exact same hash for each script in Debugger.scriptParsed event
js-agent
matches hashes provided by V8 with hashes calculated byjs-parser
to map coverage to the correct bundle fileThen bundle coverage is mapped to original sources (e.g. TypeScript files). For further details see
js-agent
repository
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago