Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove tldts dependency and allow to plug any implementation instead #81

Merged
merged 1 commit into from
Jan 8, 2019

Conversation

remusao
Copy link
Collaborator

@remusao remusao commented Jan 8, 2019

  • Adblocker does not include tldts by default anymore
  • API now expect either already constructed Request as argument of both
    hostname and domain when needed (e.g.: getCosmeticsFilters)
  • A makeRequest helper is provided to construct Request objects
  • [BREAKING] engine.match expects a Request as argument
  • [BREAKING] engine.matchAll expects a Request as argument
  • [BREAKING] engine.getCSPDirectives expects a Request as argument
  • [BREAKING] engine.getCosmeticsFilter expects a new domain argument
  • [BREAKING] Request's constructor does not apply default value anymore and expects all arguments to be provided and initialized. You can now use makeRequest to reproduce the previous behavior of new Request.

This will allow two things:

  1. The bundle is much smaller
  2. This does not impose any particular URL parsing library upon the user of the adblocker (which will allow us to use different implementations on different platforms, for efficiency purposes).

@zhonghao-cliqz @chrmod

* Adblocker does not include tldts by default anymore
* API now expect either already constructed Request as argument of both
  hostname and domain when needed (e.g.: getCosmeticsFilters)
* A makeRequest helper is provided to construct Request objects
* [BREAKING] engine.match expects a `Request` as argument
* [BREAKING] engine.matchAll expects a `Request` as argument
* [BREAKING] engine.getCSPDirectives expects a `Request` as argument
* [BREAKING] engine.getCosmeticsFilter expects a new `domain` argument
* [BREAKING] `Request`'s constructor does not apply default value
  anymore and expects all arguments to be provided and initialized. You
  can now use `makeRequest` to reproduce the previous behavior of `new
  Request`.
@remusao remusao merged commit 34f0ae6 into ghostery:master Jan 8, 2019
@remusao remusao mentioned this pull request Jan 8, 2019
@remusao remusao deleted the remove-tldts-dependency branch September 5, 2019 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants