Skip to content

Commit

Permalink
Switch to new @gorhill/ubo-core package (#2100)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjethani authored Aug 2, 2021
1 parent b5a8cf8 commit 48f96e7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions packages/adblocker-benchmarks/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: all clean deps run ubo-snfe adblockpluscore adblock-rs brave cliqz cliqz-compression ublock adblockplus tldts url min
.PHONY: all clean deps run ubo-core adblockpluscore adblock-rs brave cliqz cliqz-compression ublock adblockplus tldts url min

all: deps run

Expand All @@ -8,11 +8,11 @@ requests.json:
./blockers/ublock/.git:
git submodule update --recursive --depth 1 --init blockers/ublock

./node_modules/ubo-snfe:
./node_modules/@gorhill/ubo-core:
make -C ./blockers/ublock install-nodejs clean
npx rollup ./node_modules/ubo-snfe/main.js --file ./node_modules/ubo-snfe/bundle.min.cjs --format cjs --context global --plugin terser
npx rollup ./node_modules/@gorhill/ubo-core/index.js --file ./node_modules/@gorhill/ubo-core/bundle.min.cjs --format cjs --context global --plugin terser

ubo-snfe: ./blockers/ublock/.git ./node_modules/ubo-snfe
ubo-core: ./blockers/ublock/.git ./node_modules/@gorhill/ubo-core

./blockers/adblockpluscore/.git:
git submodule update --recursive --depth 1 --init blockers/adblockpluscore
Expand Down Expand Up @@ -58,5 +58,5 @@ run: deps url tldts cliqz ublock adblockplus brave adblockfast

clean:
rm -f requests.json
npm uninstall ubo-snfe adblock-rs
npm uninstall ubo-core adblock-rs
git submodule deinit --all
2 changes: 1 addition & 1 deletion packages/adblocker-benchmarks/blockers/ublock.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

const { FilteringContext, pslInit, restart } = require('ubo-snfe/bundle.min.cjs');
const { FilteringContext, pslInit, restart } = require('@gorhill/ubo-core/bundle.min.cjs');

class MockStorage {
constructor(serialized) {
Expand Down
2 changes: 1 addition & 1 deletion packages/adblocker-benchmarks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"scripts": {
"download-requests": "make requests.json",
"download-ubo": "make ubo-snfe",
"download-ubo": "make ubo-core",
"download-abp": "make adblockpluscore",
"download-brave": "make adblock-rs",
"prepare": "yarn download-requests && yarn download-ubo && yarn download-abp && yarn download-brave"
Expand Down

0 comments on commit 48f96e7

Please sign in to comment.