spec-prod
spec-prod copied to clipboard
Investigate alternatives for Puppeteer usage
Follow-up from the discussion on #146.
It would be good to know for what exactly Puppeteer is needed and if it could be replaced with something else that doesn't have a strict requirement for a given browser.
@sidvishnoi maybe you could please explain? I'm happy to help on this issue.
@whimboo what's the use case? We could use puppeteer with WebDriver BiDi + Firefox if you need basic JS evaluation to a basic type.
Puppeteer is used in following cases presently:
- Getting processed shortname from ReSpec document (after JS evaluation): https://github.com/w3c/spec-prod/blob/bc93d69901e2c76b0e5147c12263acf6099506d3/src/prepare-build.ts#L188-L193
- Extracting bikeshed metadata
pre.metadatato get shortname: https://github.com/w3c/spec-prod/blob/bc93d69901e2c76b0e5147c12263acf6099506d3/src/prepare-build.ts#L218-L237 - Some query selector processing to extract metadata from published pages: https://github.com/w3c/spec-prod/blob/bc93d69901e2c76b0e5147c12263acf6099506d3/src/prepare-build.ts#L263-L266
- Full page content parsing, JS/CSS evaluation with subresources to extract all directly and indirectly referenced assets from a page that need to be copied for deployment: https://github.com/w3c/spec-prod/blob/bc93d69901e2c76b0e5147c12263acf6099506d3/src/build.ts#L169