diff --git a/diigo-cache/package.json b/diigo-cache/package.json index eb9b8fb..fa69e9a 100644 --- a/diigo-cache/package.json +++ b/diigo-cache/package.json @@ -5,11 +5,12 @@ "scripts": { "dev": "wrangler dev -c wrangler.jsonc -c ../webapp/wrangler.jsonc", "types": "wrangler types", - "lint": "wrangler types --check && tsc -p tsconfig.json && tsc -p tests/tsconfig.json", + "lint": "wrangler types --check && tsc -p tsconfig.json && tsc -p tests/tsconfig.json && tsc -p scripts/tsconfig.json", "test": "vitest run" }, "devDependencies": { "@cloudflare/vitest-plugin": "1.3.6", + "@types/node": "^22", "typescript": "^5.9.0", "vitest": "4.1.11", "wrangler": "^4.148.0" diff --git a/diigo-cache/scripts/tsconfig.json b/diigo-cache/scripts/tsconfig.json new file mode 100644 index 0000000..ce831f8 --- /dev/null +++ b/diigo-cache/scripts/tsconfig.json @@ -0,0 +1,11 @@ +{ + // program scripts run under node (type stripping), so they get node's + // types; the worker's own tsconfig keeps them out + "extends": "../tsconfig.json", + "compilerOptions": { + "types": ["node"], + "lib": ["ES2022", "ESNext.Disposable"], + "allowImportingTsExtensions": true + }, + "include": ["./**/*.ts", "../src/rss.ts", "../src/items.ts"] +}