Skip to content

v5.2.0

Compare
Choose a tag to compare
@jackfranklin jackfranklin released this 17 Jul 12:36
· 2792 commits to main since this release
028f144

Feature changes

The experimental API for registering custom query handlers is slightly changed such that one registers query handlers containing two strategies: one for querying a single element and one for querying all matching elements.

The API for custom query handlers is unchanged:

__experimental_registerCustomQueryHandler(name: string, queryHandler: QueryHandler): void;
__experimental_unregisterCustomQueryHandler(name: string): void;
__experimental_customQueryHandlers(): Map<string, QueryHandler>;
__experimental_clearQueryHandlers(): void;

but QueryHandler is now defined as:

export interface QueryHandler {
  queryOne?: (element: Element | Document, selector: string) => Element | null;
  queryAll?: (element: Element | Document, selector: string) => Element[] | NodeListOf<Element>;
}

Bug fixes and improvements

  • The ESM build now includes file extensions in its import statements to match the ESM spec. Note that the ESM build is still considered experimental and should not be relied on.
  • The docs on running Firefox Nightly are now much clearer.
  • We now vendor in common dependencies such as Mitt so they can be used more easily outside of the Node module resolution ecosystem.

Raw notes

028f144 - chore: mark v5.2.0 (#6238)
313774c - feat: change QueryHandler to contain QueryOne and QueryAll methods (#6218)
82645e8 - docs: better describe how to install Firefox Nightly with Puppeteer (#6226)
f1a6b8d - chore: vendor Mitt & update project structure (#6209)
fb80610 - docs(troubleshooting): drops obsolete dependencies (#5354)
3effcaf - chore: generate docs for the protocol (#6213)
ffec247 - chore: enforce file extensions on imports (#6202)
8d6e0d8 - chore: mark version to v5.1.0-post (#6208)