mirror of
https://github.com/SukkaW/Surge.git
synced 2026-01-28 17:41:54 +08:00
Housekeeping & Make ESLint Happy
This commit is contained in:
@@ -190,7 +190,7 @@ export const buildSpeedtestDomainSet = task(import.meta.main, import.meta.path)(
|
||||
.then(setAddFromArrayCurried(domains))
|
||||
);
|
||||
|
||||
await new Promise<void>((resolve) => {
|
||||
await new Promise<void>((resolve, reject) => {
|
||||
const pMap = ([
|
||||
'Hong Kong',
|
||||
'Taiwan',
|
||||
@@ -244,8 +244,8 @@ export const buildSpeedtestDomainSet = task(import.meta.main, import.meta.path)(
|
||||
|
||||
Promise.all(Object.values(pMap)).then(() => {
|
||||
clearTimeout(timer);
|
||||
resolve();
|
||||
});
|
||||
return resolve();
|
||||
}).catch(() => reject);
|
||||
});
|
||||
|
||||
const deduped = span.traceChildSync('sort result', () => sortDomains(domainDeduper(Array.from(domains))));
|
||||
|
||||
@@ -35,14 +35,12 @@ import { getGorhillPublicSuffixPromise } from './get-gorhill-publicsuffix';
|
||||
|
||||
bench('tldts', () => {
|
||||
for (let i = 0, len = data.length; i < len; i++) {
|
||||
// eslint-disable-next-line import-x/namespace -- safe
|
||||
tldts[methodName](data[i], tldtsOpt);
|
||||
}
|
||||
});
|
||||
|
||||
bench('tldts-experimental', () => {
|
||||
for (let i = 0, len = data.length; i < len; i++) {
|
||||
// eslint-disable-next-line import-x/namespace -- safe
|
||||
tldtsExperimental[methodName](data[i], tldtsOpt);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -61,9 +61,9 @@ export const parseDomesticList = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
await Promise.all([
|
||||
runAgainstRuleset(path.resolve(import.meta.dir, '../List/non_ip/domestic.conf'))
|
||||
]);
|
||||
// await Promise.all([
|
||||
await runAgainstRuleset(path.resolve(import.meta.dir, '../List/non_ip/domestic.conf'));
|
||||
// ]);
|
||||
|
||||
console.log(notIncludedDomestic.size, notIncludedDomestic);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user