Skip to content

Commit

Permalink
Normalize more deps (#6050)
Browse files Browse the repository at this point in the history
This is the last of the patches that normalize dependencies across the codebase. In this batch: `ws`, `vitest`, `zod` , `rimraf`, `@types/rimraf`, `ava`, `source-map`, `glob`, `cookie`, `@types/cookie`, `@microsoft/api-extractor`, `@types/mime`, `@types/yargs`, `devtools-protocol`, `@vitest/ui`, `execa`, `strip-ansi`

This patch also sorts dependencies in every `package.json`
  • Loading branch information
threepointone authored Jun 18, 2024
1 parent 178e783 commit a0c3327
Show file tree
Hide file tree
Showing 26 changed files with 131 additions and 335 deletions.
12 changes: 12 additions & 0 deletions .changeset/fifty-waves-fry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@cloudflare/vitest-pool-workers": patch
"@cloudflare/pages-shared": patch
"miniflare": patch
"wrangler": patch
---

Normalize more deps

This is the last of the patches that normalize dependencies across the codebase. In this batch: `ws`, `vitest`, `zod` , `rimraf`, `@types/rimraf`, `ava`, `source-map`, `glob`, `cookie`, `@types/cookie`, `@microsoft/api-extractor`, `@types/mime`, `@types/yargs`, `devtools-protocol`, `@vitest/ui`, `execa`, `strip-ansi`

This patch also sorts dependencies in every `package.json`
4 changes: 2 additions & 2 deletions fixtures/ai-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"type:tests": "tsc -p ./tests/tsconfig.json"
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:^",
"undici": "^5.28.4",
"wrangler": "workspace:*",
"@cloudflare/workers-tsconfig": "workspace:^"
"wrangler": "workspace:*"
},
"volta": {
"extends": "../../package.json"
Expand Down
2 changes: 1 addition & 1 deletion fixtures/dev-env/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"type:tests": "tsc -p ./tests/tsconfig.json"
},
"devDependencies": {
"@types/ws": "^8.5.7",
"@cloudflare/workers-tsconfig": "workspace:^",
"@types/ws": "^8.5.7",
"get-port": "^7.0.0",
"miniflare": "workspace:*",
"undici": "^5.28.4",
Expand Down
4 changes: 2 additions & 2 deletions fixtures/entrypoints-rpc-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"wrangler": "workspace:*",
"ts-dedent": "^2.2.0",
"undici": "^5.28.4"
"undici": "^5.28.4",
"wrangler": "workspace:*"
},
"volta": {
"extends": "../../package.json"
Expand Down
2 changes: 1 addition & 1 deletion fixtures/external-durable-objects-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"type:tests": "tsc -p ./tests/tsconfig.json"
},
"devDependencies": {
"undici": "^5.28.4",
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20240605.0",
"undici": "^5.28.4",
"wrangler": "workspace:*"
},
"volta": {
Expand Down
4 changes: 2 additions & 2 deletions fixtures/external-service-bindings-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"type:tests": "tsc --noEmit"
},
"devDependencies": {
"undici": "^5.28.4",
"concurrently": "^8.2.2",
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20240605.0",
"concurrently": "^8.2.2",
"undici": "^5.28.4",
"wrangler": "workspace:*"
},
"volta": {
Expand Down
4 changes: 2 additions & 2 deletions fixtures/get-bindings-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20240605.0",
"wrangler": "workspace:*",
"undici": "^5.28.4"
"undici": "^5.28.4",
"wrangler": "workspace:*"
},
"volta": {
"extends": "../../package.json"
Expand Down
4 changes: 2 additions & 2 deletions fixtures/get-platform-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20240605.0",
"wrangler": "workspace:*",
"undici": "^5.28.4"
"undici": "^5.28.4",
"wrangler": "workspace:*"
},
"volta": {
"extends": "../../package.json"
Expand Down
4 changes: 2 additions & 2 deletions fixtures/import-wasm-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"type:tests": "tsc -p ./tests/tsconfig.json"
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:^",
"undici": "^5.28.4",
"wrangler": "workspace:*",
"@cloudflare/workers-tsconfig": "workspace:^"
"wrangler": "workspace:*"
},
"dependencies": {
"import-wasm-static": "workspace:^"
Expand Down
4 changes: 2 additions & 2 deletions fixtures/pages-functions-wasm-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"type:tests": "tsc -p ./tests/tsconfig.json"
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"undici": "^5.28.4",
"wrangler": "workspace:*",
"@cloudflare/workers-tsconfig": "workspace:*"
"wrangler": "workspace:*"
},
"engines": {
"node": ">=16.13"
Expand Down
4 changes: 2 additions & 2 deletions fixtures/pages-workerjs-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"type:tests": "tsc -p ./tests/tsconfig.json"
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:^",
"undici": "^5.28.4",
"wrangler": "workspace:*",
"@cloudflare/workers-tsconfig": "workspace:^"
"wrangler": "workspace:*"
},
"engines": {
"node": ">=16.13"
Expand Down
4 changes: 2 additions & 2 deletions fixtures/pages-workerjs-directory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"type:tests": "tsc -p ./tests/tsconfig.json"
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"undici": "^5.28.4",
"wrangler": "workspace:*",
"@cloudflare/workers-tsconfig": "workspace:*"
"wrangler": "workspace:*"
},
"engines": {
"node": ">=16.13"
Expand Down
4 changes: 2 additions & 2 deletions fixtures/pages-workerjs-wasm-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"type:tests": "tsc -p ./tests/tsconfig.json"
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"undici": "^5.28.4",
"wrangler": "workspace:*",
"@cloudflare/workers-tsconfig": "workspace:*"
"wrangler": "workspace:*"
},
"engines": {
"node": ">=16.13"
Expand Down
4 changes: 2 additions & 2 deletions fixtures/pages-workerjs-with-config-file-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"type:tests": "tsc -p ./tests/tsconfig.json"
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"undici": "^5.28.4",
"wrangler": "workspace:*",
"@cloudflare/workers-tsconfig": "workspace:*"
"wrangler": "workspace:*"
},
"engines": {
"node": ">=16.13"
Expand Down
4 changes: 2 additions & 2 deletions fixtures/pages-workerjs-with-routes-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"type:tests": "tsc -p ./tests/tsconfig.json"
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"undici": "^5.28.4",
"wrangler": "workspace:*",
"@cloudflare/workers-tsconfig": "workspace:*"
"wrangler": "workspace:*"
},
"engines": {
"node": ">=16.13"
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.8.0"
"ws": "^8.14.2"
},
"engines": {
"node": ">=14"
Expand Down
4 changes: 2 additions & 2 deletions fixtures/ratelimit-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"type:tests": "tsc -p ./tests/tsconfig.json"
},
"devDependencies": {
"wrangler": "workspace:*",
"@cloudflare/workers-tsconfig": "workspace:^",
"undici": "^5.28.4",
"@cloudflare/workers-tsconfig": "workspace:^"
"wrangler": "workspace:*"
},
"volta": {
"extends": "../../package.json"
Expand Down
3 changes: 3 additions & 0 deletions packages/eslint-config-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@
},
"volta": {
"extends": "../../package.json"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.9.0"
}
}
14 changes: 7 additions & 7 deletions packages/miniflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@
"stoppable": "^1.1.0",
"undici": "^5.28.4",
"workerd": "1.20240610.1",
"ws": "^8.11.0",
"ws": "^8.14.2",
"youch": "^3.2.2",
"zod": "^3.20.6"
"zod": "^3.22.3"
},
"devDependencies": {
"@ava/typescript": "^4.0.0",
"@ava/typescript": "^4.1.0",
"@cloudflare/kv-asset-handler": "workspace:*",
"@cloudflare/workers-types": "^4.20240605.0",
"@microsoft/api-extractor": "^7.47.0",
Expand All @@ -64,13 +64,13 @@
"@types/glob-to-regexp": "^0.4.1",
"@types/http-cache-semantics": "^4.0.1",
"@types/node": "20.8.3",
"@types/rimraf": "^3.0.2",
"@types/rimraf": "^4.0.5",
"@types/stoppable": "^1.1.1",
"@types/which": "^2.0.1",
"@types/ws": "^8.5.7",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"ava": "^5.2.0",
"ava": "^6.0.1",
"capnpc-ts": "^0.7.0",
"concurrently": "^8.2.2",
"devalue": "^4.3.0",
Expand All @@ -84,8 +84,8 @@
"expect-type": "^0.15.0",
"http-cache-semantics": "^4.1.0",
"kleur": "^4.1.5",
"rimraf": "^3.0.2",
"source-map": "^0.6.0",
"rimraf": "^5.0.1",
"source-map": "^0.6.1",
"which": "^2.0.2"
},
"engines": {
Expand Down
9 changes: 9 additions & 0 deletions packages/miniflare/test/setup.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Module from "node:module";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { registerCompletionHandler } from "ava";
import {
_enableControlEndpoints,
_initialiseInstanceRegistry,
Expand Down Expand Up @@ -42,3 +43,11 @@ process.on("exit", () => {
);
throw new Error(message);
});

// https://github.com/avajs/ava/discussions/3259
// https://github.com/avajs/ava/blob/main/docs/08-common-pitfalls.md#timeouts-because-a-file-failed-to-exit

// tl;dr - ava 6 doesn't automatically exit on tests completing, so we give it a nudge
registerCompletionHandler(() => {
process.exit();
});
4 changes: 2 additions & 2 deletions packages/pages-shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"@miniflare/storage-memory": "^2.14.2",
"@cloudflare/workers-types": "^4.20240605.0",
"@miniflare/cache": "^2.14.2",
"@miniflare/core": "^2.14.2",
"@miniflare/html-rewriter": "^2.14.2",
"@miniflare/storage-memory": "^2.14.2",
"concurrently": "^8.2.2",
"glob": "^8.0.3"
"glob": "^10.3.3"
},
"workers-sdk": {
"prerelease": true
Expand Down
4 changes: 2 additions & 2 deletions packages/playground-preview-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"devDependencies": {
"@cloudflare/eslint-config-worker": "workspace:*",
"@cloudflare/workers-types": "^4.20240605.0",
"@types/cookie": "^0.5.1",
"cookie": "^0.5.0",
"@types/cookie": "^0.6.0",
"cookie": "^0.6.0",
"itty-router": "^4.0.13",
"promjs": "^0.4.2",
"toucan-js": "^3.3.1",
Expand Down
7 changes: 5 additions & 2 deletions packages/vitest-pool-workers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,14 @@
"@cloudflare/workers-types": "^4.20240605.0",
"@types/node": "20.8.3",
"@types/semver": "^7.5.1",
"@vitest/runner": "1.3.x - 1.5.x",
"@vitest/snapshot": "1.3.x - 1.5.x",
"capnp-ts": "^0.7.0",
"capnpc-ts": "^0.7.0",
"ts-dedent": "^2.2.0",
"typescript": "^5.4.5",
"undici": "^5.28.4"
"undici": "^5.28.4",
"vitest": "1.5.0"
},
"dependencies": {
"birpc": "0.2.14",
Expand All @@ -71,7 +74,7 @@
"miniflare": "workspace:*",
"semver": "^7.5.1",
"wrangler": "workspace:*",
"zod": "^3.20.6"
"zod": "^3.22.3"
},
"peerDependencies": {
"@vitest/runner": "1.3.x - 1.5.x",
Expand Down
12 changes: 6 additions & 6 deletions packages/wrangler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"resolve": "^1.22.8",
"resolve.exports": "^2.0.2",
"selfsigned": "^2.0.1",
"source-map": "0.6.1",
"source-map": "^0.6.1",
"unenv": "npm:unenv-nightly@1.10.0-1717606461.a117952",
"xxhash-wasm": "^1.0.1"
},
Expand All @@ -104,7 +104,7 @@
"@types/glob-to-regexp": "^0.4.1",
"@types/is-ci": "^3.0.0",
"@types/javascript-time-ago": "^2.0.3",
"@types/mime": "^2.0.3",
"@types/mime": "^3.0.4",
"@types/minimatch": "^5.1.2",
"@types/prompts": "^2.0.14",
"@types/react": "^18.2.21",
Expand All @@ -114,7 +114,7 @@
"@types/signal-exit": "^3.0.1",
"@types/supports-color": "^8.1.1",
"@types/ws": "^8.5.7",
"@types/yargs": "^17.0.10",
"@types/yargs": "^17.0.22",
"@vitest/ui": "^1.6.0",
"@webcontainer/env": "^1.1.0",
"body-parser": "^1.20.0",
Expand All @@ -124,7 +124,7 @@
"cmd-shim": "^4.1.0",
"command-exists": "^1.2.9",
"concurrently": "^8.2.2",
"devtools-protocol": "^0.0.955664",
"devtools-protocol": "^0.0.1182435",
"dotenv": "^16.0.0",
"es-module-lexer": "^1.3.0",
"execa": "^6.1.0",
Expand Down Expand Up @@ -159,7 +159,7 @@
"shell-quote": "^1.8.1",
"shellac": "^0.8.0",
"signal-exit": "^3.0.7",
"strip-ansi": "^7.0.1",
"strip-ansi": "^7.1.0",
"supports-color": "^9.2.2",
"timeago.js": "^4.0.2",
"ts-dedent": "^2.2.0",
Expand All @@ -168,7 +168,7 @@
"update-check": "^1.5.4",
"vitest": "^1.6.0",
"vitest-websocket-mock": "^0.3.0",
"ws": "^8.5.0",
"ws": "^8.14.2",
"xdg-app-paths": "^8.3.0",
"yargs": "^17.7.2",
"yoga-layout": "file:../../vendor/yoga-layout-2.0.0-beta.1.tgz"
Expand Down
Loading

0 comments on commit a0c3327

Please sign in to comment.