Refactor: make Node.js run compatible

This commit is contained in:
SukkaW
2024-07-23 17:42:10 +08:00
parent 1f42c27afe
commit 553dd62eb1
32 changed files with 163 additions and 136 deletions

View File

@@ -9,7 +9,7 @@
},
"scripts": {
"build": "bun ./Build/index.ts",
"build-node": "ENABLE_TEXT_LINE_STREAM=true node -r @swc-node/register ./Build/index.ts",
"build-node": "SWCRC=true ENABLE_TEXT_LINE_STREAM=true node -r @swc-node/register ./Build/index.ts",
"build-stream": "ENABLE_TEXT_LINE_STREAM=true bun ./Build/index.ts",
"lint": "eslint --format=sukka ."
},
@@ -20,6 +20,7 @@
"@gorhill/publicsuffixlist": "3.0.1",
"async-retry": "^1.3.3",
"async-sema": "^3.1.1",
"better-sqlite3": "^11.1.2",
"ci-info": "^4.0.0",
"csv-parse": "^5.5.6",
"fast-cidr-tools": "^0.2.5",
@@ -38,8 +39,11 @@
"devDependencies": {
"@eslint-sukka/node": "^6.1.6",
"@swc-node/register": "^1.10.9",
"@swc/core": "^1.7.0",
"@types/async-retry": "^1.4.8",
"@types/better-sqlite3": "^7.6.11",
"@types/bun": "^1.1.6",
"@types/punycode": "^2.1.4",
"@types/tar-stream": "^3.1.3",
"bun-types": "^1.1.20",
"eslint": "^9.7.0",