Repository navigation
Expand file tree
/
Copy pathtsconfig.worker.json
More file actions
29 lines (29 loc) · 1.85 KB
/
Copy pathtsconfig.worker.json
File metadata and controls
29 lines (29 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// The Worker program of `npm run typecheck`: the code that runs in workerd,
// checked against the Workers runtime's types and without Node's, so an import
// of a `node:` module fails here as it fails a deploy without nodejs_compat.
// Tests are excluded: they run in Node and tsconfig.json checks them. The test
// Worker entries (probes/*/test/*-entry.ts, packages/*/test/*-worker.ts) run in
// workerd, so they are checked here as well, by a pattern, so that a package's
// new entry is checked without a line here.
// Every packages/*/src is here as well as in tsconfig.json, so a new shared
// package is checked as Worker code unless it is named below as Node-only:
// packages/testkit/src the harness that drives workerd through Miniflare
// scripts/check-config.test.mjs holds this list to the packages that exist.
// The types are @cloudflare/workers-types 5.20261013.1, which matches the
// harness date 2026-10-13 (packages/testkit COMPATIBILITY_DATE, the newest the
// pinned workerd runs), which probes/worker/wrangler.toml deploys with too: the
// code is checked against the compatibility date its tests run with and that it
// deploys with. Cloudflare runs its own workerd build, which nothing here pins.
// ⚠ @cloudflare/workers-types declares `Buffer` and `process` as `any`, so this
// program does not catch a use of those two globals. Under no_nodejs_compat
// they are undefined in workerd, so only a harness test (packages/testkit) that
// reaches the line catches it.
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "./tsconfig.base.json",
"compilerOptions": {
"types": ["@cloudflare/workers-types"]
},
"include": ["apps/*/src", "probes/*/src", "probes/*/test/*-entry.ts", "packages/*/src", "packages/*/test/*-worker.ts"],
"exclude": ["packages/testkit/src", "**/*.test.ts", "**/*.test.mts", "**/*.test.cts", "**/node_modules"]
}