Skip to content

Commit

Permalink
Update & consolidate some repo dependencies (#7090)
Browse files Browse the repository at this point in the history
* undici -> catalog

* TS -> catalog

* upgrade ws

* absolutely pin @types/node

* fix types

* fix warnings

* fix some tests

* pin msw

* fix some tests
  • Loading branch information
penalosa authored Oct 25, 2024
1 parent a034aa1 commit 0a38bba
Show file tree
Hide file tree
Showing 63 changed files with 818 additions and 643 deletions.
2 changes: 1 addition & 1 deletion fixtures/additional-modules/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20241022.0",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"volta": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/ai-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:^",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"volta": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/asset-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20241022.0",
"run-script-os": "^1.1.6",
"undici": "^5.28.4",
"undici": "catalog:default",
"vitest": "catalog:default",
"wrangler": "workspace:*"
},
Expand Down
2 changes: 1 addition & 1 deletion fixtures/durable-objects-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:^",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"volta": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/entrypoints-rpc-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"ts-dedent": "^2.2.0",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"volta": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/get-platform-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20241022.0",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"volta": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/import-wasm-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:^",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"volta": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/interactive-dev-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"devDependencies": {
"fixtures-shared": "workspace:*",
"strip-ansi": "^7.1.0",
"undici": "^5.28.4"
"undici": "catalog:default"
},
"optionalDependencies": {
"@cdktf/node-pty-prebuilt-multiarch": "0.10.1-pre.11"
Expand Down
2 changes: 1 addition & 1 deletion fixtures/local-mode-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20241022.0",
"@types/node": "20.8.3",
"@types/node": "catalog:default",
"buffer": "^6.0.3",
"wrangler": "workspace:*"
},
Expand Down
7 changes: 0 additions & 7 deletions fixtures/node-app-pages/functions/stripe.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import path from "path";
import Stripe from "stripe";
// `@cloudflare/workers-types` conflicts with `@types/node`, so we can't include
// it in the `tsconfig.json` `types` array
import type { Response as WorkerResponse } from "@cloudflare/workers-types";

declare global {
const Response: typeof WorkerResponse;
}

export const onRequest = () => {
// make sure path actually works
Expand Down
2 changes: 1 addition & 1 deletion fixtures/node-app-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20241022.0",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
3 changes: 2 additions & 1 deletion fixtures/node-app-pages/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
"target": "ES2020",
"module": "CommonJS",
"lib": ["ES2020"],
"types": [],
"types": ["@cloudflare/workers-types/experimental"],
"moduleResolution": "node",
"skipLibCheck": true,
"esModuleInterop": true,
"noEmit": true
}
Expand Down
2 changes: 1 addition & 1 deletion fixtures/nodejs-als-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20241022.0",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion fixtures/nodejs-hybrid-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@types/pg": "^8.11.2",
"pg": "8.11.3",
"pg-cloudflare": "^1.1.1",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion fixtures/pages-d1-shim/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/pages-dev-proxy-with-script/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20241022.0",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/pages-functions-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20241022.0",
"pages-plugin-example": "workspace:*",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/pages-functions-wasm-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/pages-functions-with-config-file-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/pages-functions-with-routes-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20241022.0",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/pages-nodejs-v2-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:^",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/pages-plugin-mounted-on-root-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20241022.0",
"pages-plugin-example": "workspace:*",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/pages-proxy-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"miniflare": "workspace:*",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/pages-simple-assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20241022.0",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/pages-workerjs-and-functions-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/pages-workerjs-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:^",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/pages-workerjs-directory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/pages-workerjs-wasm-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/pages-workerjs-with-config-file-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/pages-workerjs-with-routes-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/pages-ws-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@cloudflare/workers-tsconfig": "workspace:*",
"miniflare": "workspace:*",
"wrangler": "workspace:*",
"ws": "^8.17.1"
"ws": "^8.18.0"
},
"engines": {
"node": ">=14"
Expand Down
2 changes: 1 addition & 1 deletion fixtures/ratelimit-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:^",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"volta": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/service-bindings-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"concurrently": "^8.2.2",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"volta": {
Expand Down
4 changes: 2 additions & 2 deletions fixtures/vitest-pool-workers-examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
"devDependencies": {
"@cloudflare/vitest-pool-workers": "workspace:*",
"@cloudflare/workers-types": "^4.20241022.0",
"@types/node": "20.8.3",
"@types/node": "catalog:default",
"ext-dep": "file:./internal-module-resolution/vendor/ext-dep",
"jose": "^5.2.2",
"miniflare": "workspace:*",
"run-script-os": "^1.1.6",
"toucan-js": "^3.3.1",
"typescript": "^5.5.2",
"typescript": "catalog:default",
"vitest": "catalog:default",
"wrangler": "workspace:*"
},
Expand Down
2 changes: 1 addition & 1 deletion fixtures/worker-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:^",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"volta": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/workers-with-assets-only/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20241022.0",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"volta": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/workers-with-assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20241022.0",
"undici": "^5.28.4",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"volta": {
Expand Down
2 changes: 1 addition & 1 deletion fixtures/workflow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20241022.0",
"undici": "^6.20.1",
"undici": "catalog:default",
"wrangler": "workspace:*"
},
"volta": {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@ianvs/prettier-plugin-sort-imports": "4.2.1",
"@manypkg/cli": "^0.21.4",
"@turbo/gen": "^1.10.13",
"@types/node": "20.8.3",
"@types/node": "catalog:default",
"@vue/compiler-sfc": "^3.3.4",
"cross-env": "^7.0.3",
"dotenv-cli": "^7.3.0",
Expand All @@ -49,7 +49,7 @@
"rimraf": "^5.0.1",
"tree-kill": "^1.2.2",
"turbo": "^2.2.3",
"typescript": "^5.5.2",
"typescript": "catalog:default",
"vite": "^5.0.12",
"vitest": "catalog:default"
},
Expand Down Expand Up @@ -77,7 +77,7 @@
"@types/react-transition-group>@types/react": "^18",
"@cloudflare/elements>@types/react": "^18",
"capnpc-ts>typescript": "4.2.4",
"vitest>@types/node": "$@types/node"
"@types/node": "$@types/node"
},
"patchedDependencies": {
"[email protected]": "patches/[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"chalk": "^5.2.0",
"esbuild": "0.17.19",
"log-update": "^5.0.1",
"undici": "^5.28.4"
"undici": "catalog:default"
},
"volta": {
"extends": "../../package.json"
Expand Down
Loading

0 comments on commit 0a38bba

Please sign in to comment.