Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Remove unused deps and update public suffix list #13236

Merged
merged 1 commit into from
Mar 1, 2018
Merged

Conversation

diracdeltas
Copy link
Member

@diracdeltas diracdeltas commented Feb 21, 2018

Fix #12620

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.
  • Request a security/privacy review as needed. (Ask a Brave employee to help if you cannot access this document.)

Test Plan:

Reviewer Checklist:

  • Request a security/privacy review as needed if one was not already requested.

Tests

  • Adequate test coverage exists to prevent regressions
  • Tests should be independent and work correctly when run individually or as a suite ref
  • New files have MPL2 license header

@diracdeltas diracdeltas added this to the 0.23.x (Nightly Channel) milestone Feb 21, 2018
@diracdeltas diracdeltas self-assigned this Feb 21, 2018
@diracdeltas
Copy link
Member Author

btw - i just noticed we should probably be running npm install --save tldjs --tldjs-update-rules and npm run update-psl every so often for builds, in order to update the public suffix lists.

we should probably also consolidate js/lib/psl and the tldjs node module. the browser-laptop filtering functions use js/lib/psl via getBaseDomain instead of tldjs because it was much faster last time i checked, and performance is important for a function that gets run in a blocking manner for every browser request.

Copy link
Member

@mrose17 mrose17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am always concerned when a package bumps its major version number. usually that indicates an incompatibility. for example, when hapi went from 16.x to 17.x, many things broke. was any research done to verify that tldjs 2.x is backwards compatible with 1.x?

@mrose17
Copy link
Member

mrose17 commented Feb 23, 2018

where are we calling tldjs in a blocking manner? one of the reasons that the ledger middleware is so "full-figured" is because it goes to a lot of effort to be non-blocking!

@diracdeltas
Copy link
Member Author

diracdeltas commented Feb 23, 2018

@mrose17

  1. yes i checked and the API functions you're using from tldjs have not changed
  2. it's blocking in filtering.js, not ledger. it needs to block because we can't "block" a tracker after already letting a request go through to it. (also filtering uses my psl module, not tldjs)

@mrose17
Copy link
Member

mrose17 commented Feb 23, 2018

@diracdeltas - great!

  1. thanks for checking that.
  2. understood. i'm not sure if we can actually merge the two databases, so perhaps the current dichotomy is best.

Copy link
Contributor

@cezaraugusto cezaraugusto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@diracdeltas diracdeltas merged commit b7b07fc into master Mar 1, 2018
@diracdeltas
Copy link
Member Author

0.23.x / 0.24.x: b7b07fc

@bsclifton bsclifton deleted the fix/old-deps branch March 1, 2018 20:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants