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

chore: update adblocker and use pre-built engine from CDN #134

Merged
merged 2 commits into from Jan 17, 2020

Conversation

remusao
Copy link
Collaborator

@remusao remusao commented Jan 17, 2020

Closes #133

  • Fix fetch abstraction on top of 'got'
  • Update 'got' to latest to get 'text', 'json', and 'buffer' helpers
  • Make use of prebuilt engine from CDN whenever possible

* Fix fetch abstraction on top of 'got'
* Update 'got' to latest to get 'text', 'json', and 'buffer' helpers
* Make use of prebuilt engine from CDN whenever possible
@coveralls
Copy link

coveralls commented Jan 17, 2020

Coverage Status

Coverage increased (+11.6%) to 79.07% when pulling 829bda9 on remusao:update-adblocker into 4eaced9 on microlinkhq:master.

@Kikobeats
Copy link
Member

@remusao this is awesome! so much appreciated 🙏

However, I need to keep got@9.6.0 until puppeteer releases a new version; a shared dependency there is mutating the global Node.js agent, you can see puppeteer/puppeteer#5243 for know more

@remusao
Copy link
Collaborator Author

remusao commented Jan 17, 2020

However, I need to keep got@9.6.0 until puppeteer releases a new version; a shared dependency there is mutating the global Node.js agent, you can see puppeteer/puppeteer#5243 for know more

Ok, then we need to revert this change, but the arrayBuffer method was broken before. I am not sure how to implement it properly. We need to tell got that we need a buffer and not a string as a body. This is very easy with the new version 10 but I did not find how to do it before that. Could you maybe have a look @Kikobeats?

@Kikobeats
Copy link
Member

passing { encoding: null } to get a buffer of the data feteched

@remusao
Copy link
Collaborator Author

remusao commented Jan 17, 2020

@Kikobeats I pushed an update.

@Kikobeats Kikobeats merged commit ba14926 into microlinkhq:master Jan 17, 2020
@Kikobeats
Copy link
Member

Thanks for that! 🎉

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

3 participants