From bf393eacaeb473e8bf88da0749a28bf383a2468e Mon Sep 17 00:00:00 2001 From: Dmytro Stanchiev Date: Tue, 28 Apr 2026 19:37:18 -0400 Subject: [PATCH] chore: setup typecheck scripts for each package Signed-off-by: Dmytro Stanchiev --- bun.lock | 23 +++++++++++++++++++++-- packages/api-server/package.json | 6 ++++-- packages/api-server/tsconfig.json | 29 +++++++++++++++++++++++++---- packages/core/package.json | 4 ++++ packages/core/tsconfig.json | 29 +++++++++++++++++++++++++---- packages/mcp-server/package.json | 6 ++++-- packages/mcp-server/tsconfig.json | 29 +++++++++++++++++++++++++---- 7 files changed, 108 insertions(+), 18 deletions(-) diff --git a/bun.lock b/bun.lock index bdc3639..0fb3767 100644 --- a/bun.lock +++ b/bun.lock @@ -13,6 +13,7 @@ "version": "1.0.0", "dependencies": { "@marketplace-scrapers/core": "workspace:*", + "@typescript/native-preview": "^7.0.0-dev.20260428.1", }, "devDependencies": { "@types/bun": "latest", @@ -25,6 +26,7 @@ "name": "@marketplace-scrapers/core", "version": "1.0.0", "dependencies": { + "@typescript/native-preview": "^7.0.0-dev.20260428.1", "cli-progress": "^3.12.0", "linkedom": "^0.18.12", "unidecode": "^1.1.0", @@ -43,6 +45,7 @@ "version": "1.0.0", "dependencies": { "@marketplace-scrapers/core": "workspace:*", + "@typescript/native-preview": "^7.0.0-dev.20260428.1", }, "devDependencies": { "@types/bun": "latest", @@ -77,7 +80,7 @@ "@marketplace-scrapers/mcp-server": ["@marketplace-scrapers/mcp-server@workspace:packages/mcp-server"], - "@types/bun": ["@types/bun@1.3.4", "", { "dependencies": { "bun-types": "1.3.4" } }, "sha512-EEPTKXHP+zKGPkhRLv+HI0UEX8/o+65hqARxLy8Ov5rIxMBPNTjeZww00CIihrIQGEQBYg+0roO5qOnS/7boGA=="], + "@types/bun": ["@types/bun@1.3.13", "", { "dependencies": { "bun-types": "1.3.13" } }, "sha512-9fqXWk5YIHGGnUau9TEi+qdlTYDAnOj+xLCmSTwXfAIqXr2x4tytJb43E9uCvt09zJURKXwAtkoH4nLQfzeTXw=="], "@types/cli-progress": ["@types/cli-progress@3.11.6", "", { "dependencies": { "@types/node": "*" } }, "sha512-cE3+jb9WRlu+uOSAugewNpITJDt1VF8dHOopPO4IABFc3SXYL5WE/+PTz/FCdZRRfIujiWW3n3aMbv1eIGVRWA=="], @@ -85,11 +88,27 @@ "@types/unidecode": ["@types/unidecode@1.1.0", "", {}, "sha512-NTIsFsTe9WRek39/8DDj7KiQ0nU33DHMrKwNHcD1rKlUvn4N0Rc4Di8q/Xavs8bsDZmBa4MMtQA8+HNgwfxC/A=="], + "@typescript/native-preview": ["@typescript/native-preview@7.0.0-dev.20260428.1", "", { "optionalDependencies": { "@typescript/native-preview-darwin-arm64": "7.0.0-dev.20260428.1", "@typescript/native-preview-darwin-x64": "7.0.0-dev.20260428.1", "@typescript/native-preview-linux-arm": "7.0.0-dev.20260428.1", "@typescript/native-preview-linux-arm64": "7.0.0-dev.20260428.1", "@typescript/native-preview-linux-x64": "7.0.0-dev.20260428.1", "@typescript/native-preview-win32-arm64": "7.0.0-dev.20260428.1", "@typescript/native-preview-win32-x64": "7.0.0-dev.20260428.1" }, "bin": { "tsgo": "bin/tsgo.js" } }, "sha512-JiM4PYWDGs57TT0mV2KArmaW7BnTkk3XRid79NdG17tfvDbRyg4hBCpKI7vARiQPtxjKrHlxyzxOGDpv5W5T7Q=="], + + "@typescript/native-preview-darwin-arm64": ["@typescript/native-preview-darwin-arm64@7.0.0-dev.20260428.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Lll6WmXfgTEj1G3QBIoHlabQwUtJiyhlRgSLksa06QFL5BoA7V+Lu1waa9PtPNZbGsXLDMHodtk/bRQABKuPiw=="], + + "@typescript/native-preview-darwin-x64": ["@typescript/native-preview-darwin-x64@7.0.0-dev.20260428.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-WbsBNSHlo+4sGrTxDWdmI7r8x48tCtSCuKdmK62FvVOq58UWAs6sL13Z4Rev4ohLcGHdXC5E/8AIdpLPqDYQpw=="], + + "@typescript/native-preview-linux-arm": ["@typescript/native-preview-linux-arm@7.0.0-dev.20260428.1", "", { "os": "linux", "cpu": "arm" }, "sha512-/d/NnZFvEJU67L5mHh+cO3gsfwNCvJ9HGtxGq1KGz1VwTabOIcwLdpTpfsAR39WXzzfh9GJHL28n6GSGZInPow=="], + + "@typescript/native-preview-linux-arm64": ["@typescript/native-preview-linux-arm64@7.0.0-dev.20260428.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-cgcBX/ZBMdepkamLT8g8jQdHe7DZS/s6zTZRof6mvcrnJHlMeUnKoC9UO8/c22IrUMV3n0XPh7R8FYjUP0ll+Q=="], + + "@typescript/native-preview-linux-x64": ["@typescript/native-preview-linux-x64@7.0.0-dev.20260428.1", "", { "os": "linux", "cpu": "x64" }, "sha512-4gJCE7wzenx1BH2Vtx2uKWUo8rFxnhGkxNEH1zxbYy/6ASwo+PnOPYmKHAzNE1C3yB5lzw71/vR5p5zyO57Y4A=="], + + "@typescript/native-preview-win32-arm64": ["@typescript/native-preview-win32-arm64@7.0.0-dev.20260428.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-yn6Rzbn62L4QTWrp0QgG8al6l/VG7PCPRdbE0vuGDSlKhInlC+Flo4QSc1qA8KHTbpHgl+nEsq9DymiitI4G4g=="], + + "@typescript/native-preview-win32-x64": ["@typescript/native-preview-win32-x64@7.0.0-dev.20260428.1", "", { "os": "win32", "cpu": "x64" }, "sha512-T9z13mcMowXmwGjprA2FIR2EEdYZxgqH8+qk7dFZVBlo5vfk41AN/qJfAdN7IsAhEb640MJ8cMN/aiczweZKmA=="], + "ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], "boolbase": ["boolbase@1.0.0", "", {}, "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww=="], - "bun-types": ["bun-types@1.3.4", "", { "dependencies": { "@types/node": "*" } }, "sha512-5ua817+BZPZOlNaRgGBpZJOSAQ9RQ17pkwPD0yR7CfJg+r8DgIILByFifDTa+IPDDxzf5VNhtNlcKqFzDgJvlQ=="], + "bun-types": ["bun-types@1.3.13", "", { "dependencies": { "@types/node": "*" } }, "sha512-QXKeHLlOLqQX9LgYaHJfzdBaV21T63HhFJnvuRCcjZiaUDpbs5ED1MgxbMra71CsryN/1dAoXuJJJwIv/2drVA=="], "cli-progress": ["cli-progress@3.12.0", "", { "dependencies": { "string-width": "^4.2.3" } }, "sha512-tRkV3HJ1ASwm19THiiLIXLO7Im7wlTuKnvkYaTkyoAPefqjNg7W7DHKUlGRxy9vxDvbyCYQkQozvptuMkGCg8A=="], diff --git a/packages/api-server/package.json b/packages/api-server/package.json index f0e0ba3..0a7bc49 100644 --- a/packages/api-server/package.json +++ b/packages/api-server/package.json @@ -7,10 +7,12 @@ "scripts": { "start": "bun ./src/index.ts", "dev": "bun --watch ./src/index.ts", - "build": "bun build ./src/index.ts --target=bun --outdir=../../dist/api" + "build": "bun build ./src/index.ts --target=bun --outdir=../../dist/api", + "type:check": "bun tsgo" }, "dependencies": { - "@marketplace-scrapers/core": "workspace:*" + "@marketplace-scrapers/core": "workspace:*", + "@typescript/native-preview": "^7.0.0-dev.20260428.1" }, "devDependencies": { "@types/bun": "latest" diff --git a/packages/api-server/tsconfig.json b/packages/api-server/tsconfig.json index 06ee5b2..247cbc1 100644 --- a/packages/api-server/tsconfig.json +++ b/packages/api-server/tsconfig.json @@ -1,13 +1,34 @@ { "compilerOptions": { - "lib": ["dom"], + "lib": ["dom", "ESNext"], "target": "ESNext", - "module": "ESNext", + "module": "preserve", "moduleResolution": "bundler", "paths": { "@/*": ["./src/*"] }, "strict": true, - "noEmit": true - } + "noEmit": true, + + // Environment setup & latest features + "moduleDetection": "force", + "jsx": "react-jsx", + "allowJs": true, + + // Bundler mode + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + + // Best practices + "skipLibCheck": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedIndexedAccess": true, + "noImplicitOverride": true, + + // Some stricter flags (disabled by default) + "noUnusedLocals": false, + "noUnusedParameters": false, + "noPropertyAccessFromIndexSignature": false + }, + "include": ["./src", "./test"] } diff --git a/packages/core/package.json b/packages/core/package.json index a453cbb..1e8cec4 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -4,8 +4,12 @@ "type": "module", "main": "./src/index.ts", "module": "./src/index.ts", + "scripts": { + "type:check": "bun tsgo" + }, "private": true, "dependencies": { + "@typescript/native-preview": "^7.0.0-dev.20260428.1", "cli-progress": "^3.12.0", "linkedom": "^0.18.12", "unidecode": "^1.1.0" diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index 06ee5b2..247cbc1 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -1,13 +1,34 @@ { "compilerOptions": { - "lib": ["dom"], + "lib": ["dom", "ESNext"], "target": "ESNext", - "module": "ESNext", + "module": "preserve", "moduleResolution": "bundler", "paths": { "@/*": ["./src/*"] }, "strict": true, - "noEmit": true - } + "noEmit": true, + + // Environment setup & latest features + "moduleDetection": "force", + "jsx": "react-jsx", + "allowJs": true, + + // Bundler mode + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + + // Best practices + "skipLibCheck": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedIndexedAccess": true, + "noImplicitOverride": true, + + // Some stricter flags (disabled by default) + "noUnusedLocals": false, + "noUnusedParameters": false, + "noPropertyAccessFromIndexSignature": false + }, + "include": ["./src", "./test"] } diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index 06841c3..11130f8 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -7,10 +7,12 @@ "scripts": { "start": "bun ./src/index.ts", "dev": "bun --watch ./src/index.ts", - "build": "bun build ./src/index.ts --target=bun --outdir=../../dist/mcp" + "build": "bun build ./src/index.ts --target=bun --outdir=../../dist/mcp", + "type:check": "bun tsgo" }, "dependencies": { - "@marketplace-scrapers/core": "workspace:*" + "@marketplace-scrapers/core": "workspace:*", + "@typescript/native-preview": "^7.0.0-dev.20260428.1" }, "devDependencies": { "@types/bun": "latest" diff --git a/packages/mcp-server/tsconfig.json b/packages/mcp-server/tsconfig.json index 06ee5b2..247cbc1 100644 --- a/packages/mcp-server/tsconfig.json +++ b/packages/mcp-server/tsconfig.json @@ -1,13 +1,34 @@ { "compilerOptions": { - "lib": ["dom"], + "lib": ["dom", "ESNext"], "target": "ESNext", - "module": "ESNext", + "module": "preserve", "moduleResolution": "bundler", "paths": { "@/*": ["./src/*"] }, "strict": true, - "noEmit": true - } + "noEmit": true, + + // Environment setup & latest features + "moduleDetection": "force", + "jsx": "react-jsx", + "allowJs": true, + + // Bundler mode + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + + // Best practices + "skipLibCheck": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedIndexedAccess": true, + "noImplicitOverride": true, + + // Some stricter flags (disabled by default) + "noUnusedLocals": false, + "noUnusedParameters": false, + "noPropertyAccessFromIndexSignature": false + }, + "include": ["./src", "./test"] }