From b0124e22f750ec23fafd3b41a819e730ae542757 Mon Sep 17 00:00:00 2001
From: SukkaW
Date: Tue, 21 Jan 2025 14:05:25 +0800
Subject: [PATCH] Chore: minor changes
---
Build/constants/reject-data-source.ts | 1 +
Build/lib/process-line.bench.ts | 12 ++++++++++++
Build/lib/process-line.test.ts | 2 +-
README.md | 3 ---
Source/domainset/reject_sukka.conf | 3 ++-
package.json | 1 +
pnpm-lock.yaml | 8 ++++++++
7 files changed, 25 insertions(+), 5 deletions(-)
create mode 100644 Build/lib/process-line.bench.ts
diff --git a/Build/constants/reject-data-source.ts b/Build/constants/reject-data-source.ts
index aa13cb75..9ea1e093 100644
--- a/Build/constants/reject-data-source.ts
+++ b/Build/constants/reject-data-source.ts
@@ -450,6 +450,7 @@ export const PREDEFINED_WHITELIST = [
'.lon.llnw.net', // There is no point in adding these, many subdomains are dead anyway
'.lcy.llnw.net', // There is no point in adding these, many subdomains are dead anyway
'repo.huaweicloud.com', // urlhaus
+ '.hubspotlinks.com', // Peter Lowe Hosts
// Expired domains
'.expobarrio.com',
diff --git a/Build/lib/process-line.bench.ts b/Build/lib/process-line.bench.ts
new file mode 100644
index 00000000..d0fbd78b
--- /dev/null
+++ b/Build/lib/process-line.bench.ts
@@ -0,0 +1,12 @@
+import { fetchRemoteTextByLine } from './fetch-text-by-line';
+import { processLine } from './process-line';
+
+import { bench, run } from 'mitata';
+
+(async () => {
+ const data = await Array.fromAsync(await fetchRemoteTextByLine('https://filters.adtidy.org/extension/ublock/filters/3_optimized.txt', false));
+
+ bench('processLine', () => data.forEach(processLine));
+
+ run();
+})();
diff --git a/Build/lib/process-line.test.ts b/Build/lib/process-line.test.ts
index 9a0619f9..4048af32 100644
--- a/Build/lib/process-line.test.ts
+++ b/Build/lib/process-line.test.ts
@@ -1,7 +1,7 @@
import { describe, it } from 'mocha';
import { processLine } from './process-line';
-import expect from 'expect';
+import { expect } from 'expect';
describe('processLine', () => {
([
diff --git a/README.md b/README.md
index 526653c7..e4f44509 100644
--- a/README.md
+++ b/README.md
@@ -799,6 +799,3 @@ The `List/ip/china_ip.conf` file is licensed under [CC BY-SA 2.0](https://creati
-
-
-
diff --git a/Source/domainset/reject_sukka.conf b/Source/domainset/reject_sukka.conf
index 01367b3a..96c786ce 100644
--- a/Source/domainset/reject_sukka.conf
+++ b/Source/domainset/reject_sukka.conf
@@ -821,7 +821,8 @@ comments.gazo.space
.plausible.io
.statfox.io
.trackjs.com
-api.openpanel.dev
+.openpanel.dev
+openpanel.follow.is
plausible.astexplorer.net
simple.cloudsmith.com
.mktg.tags.f5.com
diff --git a/package.json b/package.json
index a7e6e11e..a3351a31 100644
--- a/package.json
+++ b/package.json
@@ -22,6 +22,7 @@
"dependencies": {
"@ghostery/adblocker": "^2.3.1",
"@henrygd/queue": "^1.0.7",
+ "@mitata/counters": "^0.0.8",
"async-retry": "^1.3.3",
"better-sqlite3": "^11.8.1",
"cacache": "^19.0.1",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index ccbf4360..ede50c55 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -25,6 +25,9 @@ importers:
'@henrygd/queue':
specifier: ^1.0.7
version: 1.0.7
+ '@mitata/counters':
+ specifier: ^0.0.8
+ version: 0.0.8
async-retry:
specifier: ^1.3.3
version: 1.3.3
@@ -286,6 +289,9 @@ packages:
resolution: {integrity: sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
+ '@mitata/counters@0.0.8':
+ resolution: {integrity: sha512-f11w0Y1ETFlarDP7CePj8Z+y8Gv5Ax4gMxWsEwrqh0kH/YIY030Ezx5SUJeQg0YPTZ2OHKGcLG1oGJbIqHzaJA==}
+
'@napi-rs/wasm-runtime@0.2.5':
resolution: {integrity: sha512-kwUxR7J9WLutBbulqg1dfOrMTwhMdXLdcGUhcbCcGwnPLt3gz19uHVdwH1syKVDbE022ZS2vZxOWflFLS0YTjw==}
@@ -2004,6 +2010,8 @@ snapshots:
'@types/yargs': 17.0.33
chalk: 4.1.2
+ '@mitata/counters@0.0.8': {}
+
'@napi-rs/wasm-runtime@0.2.5':
dependencies:
'@emnapi/core': 1.3.1