Skip to content

Commit

Permalink
Normalize more dependencies. (#6046)
Browse files Browse the repository at this point in the history
Follow up toi #6029, this normalizes some more dependencies : `get-port`, `chalk`, `yargs`, `toucan-js`, `@typescript-eslint/parser`, `@typescript-eslint/eslint-plugin`, `esbuild-register`, `hono`, `glob-to-regexp, `@cloudflare/workers-types``
  • Loading branch information
threepointone authored Jun 15, 2024
1 parent 5e0f3d0 commit c643a81
Show file tree
Hide file tree
Showing 38 changed files with 213 additions and 475 deletions.
13 changes: 13 additions & 0 deletions .changeset/moody-bees-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"edge-preview-authenticated-proxy": patch
"playground-preview-worker": patch
"workers-playground": patch
"create-cloudflare": patch
"turbo-r2-archive": patch
"format-errors": patch
"wrangler": patch
---

Normalize more dependencies.

Follow up to https://github.com/cloudflare/workers-sdk/pull/6029, this normalizes some more dependencies : `get-port`, `chalk`, `yargs`, `toucan-js`, `@typescript-eslint/parser`, `@typescript-eslint/eslint-plugin`, `esbuild-register`, `hono`, `glob-to-regexp`, `@cloudflare/workers-types`

This comment has been minimized.

Copy link
@Operatorship777

Operatorship777 Jun 15, 2024

Assist

4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ packages/create-cloudflare/templates/hello-world/**/worker-configuration.d.ts

vscode.d.ts
vscode.*.d.ts

.e2e-logs
templates/*/build
templates/*/dist
2 changes: 1 addition & 1 deletion fixtures/no-bundle-import/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"test:watch": "vitest"
},
"devDependencies": {
"get-port": "^6.1.2",
"get-port": "^7.0.0",
"wrangler": "workspace:*"
},
"volta": {
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
},
"patchedDependencies": {
"[email protected]": "patches/[email protected]",
"[email protected]": "patches/[email protected]",
"@cloudflare/[email protected]": "patches/@[email protected]",
"[email protected]": "patches/[email protected]",
"[email protected]": "patches/[email protected]"
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
"@clack/prompts": "^0.6.3",
"@cloudflare/eslint-config-worker": "workspace:*",
"@cloudflare/workers-tsconfig": "workspace:*",
"@typescript-eslint/eslint-plugin": "^5.55.0",
"@typescript-eslint/parser": "^5.55.0",
"chalk": "^2.4.2",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"chalk": "^5.2.0",
"esbuild": "0.17.19",
"log-update": "^5.0.1",
"undici": "^5.28.4"
Expand Down
6 changes: 3 additions & 3 deletions packages/create-cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
"@types/semver": "^7.5.1",
"@types/which-pm-runs": "^1.0.0",
"@types/yargs": "^17.0.22",
"@typescript-eslint/eslint-plugin": "^5.55.0",
"@typescript-eslint/parser": "^5.55.0",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"chalk": "^5.2.0",
"command-exists": "^1.2.9",
"cross-spawn": "^7.0.3",
Expand All @@ -84,7 +84,7 @@
"which-pm-runs": "^1.1.0",
"wrangler": "workspace:*",
"wrap-ansi": "^9.0.0",
"yargs": "^17.7.1"
"yargs": "^17.7.2"
},
"engines": {
"node": ">=18.14.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/edge-preview-authenticated-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@types/cookie": "^0.6.0",
"cookie": "^0.6.0",
"promjs": "^0.4.2",
"toucan-js": "^3.1.0",
"toucan-js": "^3.3.1",
"wrangler": "workspace:*"
},
"volta": {
Expand Down
7 changes: 7 additions & 0 deletions packages/edge-preview-authenticated-proxy/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ class InvalidURL extends HttpError {
}

function assertValidURL(maybeUrl: string) {
// @ts-expect-error This actually does exist in workers,
// but the types don't seem to have them. Following up in
// https://github.com/cloudflare/workerd/issues/2273
if (!URL.canParse(maybeUrl)) {
throw new InvalidURL(maybeUrl);
}
Expand Down Expand Up @@ -238,6 +241,10 @@ async function handleRawHttp(request: Request, url: URL) {

// The client needs the raw headers from the worker
// Prefix them with `cf-ew-raw-`, so that response headers from _this_ worker don't interfere

// @ts-expect-error This actually does exist in workers,
// but the types don't seem to have them. Following up in
// https://github.com/cloudflare/workerd/issues/2273
const setCookieHeader = responseHeaders.getSetCookie();
for (const setCookie of setCookieHeader) {
rawHeaders.append("cf-ew-raw-set-cookie", setCookie);
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "ESLint config for workers-sdk",
"main": "index.js",
"dependencies": {
"@typescript-eslint/parser": "^6.7.2",
"@typescript-eslint/parser": "^6.9.0",
"eslint": "^8.49.0",
"eslint-config-turbo": "latest",
"eslint-plugin-import": "2.26.x",
Expand All @@ -15,7 +15,7 @@
"eslint-plugin-unused-imports": "^3.0.0"
},
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "^6.7.2"
"@typescript-eslint/eslint-plugin": "^6.9.0"
},
"volta": {
"extends": "../../package.json"
Expand Down
2 changes: 1 addition & 1 deletion packages/format-errors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@cloudflare/workers-types": "^4.20240605.0",
"mustache": "^4.2.0",
"promjs": "^0.4.2",
"toucan-js": "^3.2.3",
"toucan-js": "^3.3.1",
"tsconfig": "*",
"wrangler": "workspace:*",
"zod": "^3.22.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/playground-preview-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"cookie": "^0.5.0",
"itty-router": "^4.0.13",
"promjs": "^0.4.2",
"toucan-js": "^3.2.2",
"toucan-js": "^3.3.1",
"undici": "^5.28.4",
"wrangler": "workspace:*"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/quick-edit-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@cloudflare/workers-tsconfig": "workspace:^",
"@cloudflare/workers-types": "^4.20240605.0",
"esbuild": "0.17.19",
"esbuild-register": "^3.4.2"
"esbuild-register": "^3.5.0"
},
"engines": {
"vscode": "^1.76.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/turbo-r2-archive/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"dependencies": {
"@hono/zod-validator": "^0.1.8",
"hono": "^3.5.6",
"hono": "^3.12.11",
"zod": "^3.22.3"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/workers-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"csstype": "^3.1.2",
"es-module-lexer": "^1.3.0",
"glob-to-regexp": "^0.4.1",
"hono": "^3.3.2",
"hono": "^3.12.11",
"lz-string": "^1.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand All @@ -53,8 +53,8 @@
"@types/react-dom": "^18.2.7",
"@types/react-tabs": "^2.3.4",
"@types/uuid": "^9.0.2",
"@typescript-eslint/eslint-plugin": "^5.61.0",
"@typescript-eslint/parser": "^5.61.0",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"@vitejs/plugin-react": "^4.0.1",
"eslint": "^8.49.0",
"eslint-plugin-react-hooks": "^4.6.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/wrangler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"@types/body-parser": "^1.19.2",
"@types/command-exists": "^1.2.0",
"@types/express": "^4.17.13",
"@types/glob-to-regexp": "0.4.1",
"@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",
Expand All @@ -118,7 +118,7 @@
"@vitest/ui": "^1.6.0",
"@webcontainer/env": "^1.1.0",
"body-parser": "^1.20.0",
"chalk": "^2.4.2",
"chalk": "^5.2.0",
"cli-table3": "^0.6.3",
"clipboardy": "^3.0.0",
"cmd-shim": "^4.1.0",
Expand All @@ -130,8 +130,8 @@
"execa": "^6.1.0",
"express": "^4.18.1",
"find-up": "^6.3.0",
"get-port": "^6.1.2",
"glob-to-regexp": "0.4.1",
"get-port": "^7.0.0",
"glob-to-regexp": "^0.4.1",
"http-terminator": "^3.2.0",
"https-proxy-agent": "7.0.2",
"ignore": "^5.2.0",
Expand Down
18 changes: 0 additions & 18 deletions patches/[email protected]

This file was deleted.

Loading

0 comments on commit c643a81

Please sign in to comment.