Skip to content

Commit

Permalink
Merge branch 'main' into lduarte/workflows-get-status-binding-local-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisDuarte1 authored Dec 19, 2024
2 parents da64cb4 + 8757579 commit f165792
Show file tree
Hide file tree
Showing 85 changed files with 2,972 additions and 889 deletions.
7 changes: 0 additions & 7 deletions .changeset/early-baboons-fly.md

This file was deleted.

7 changes: 7 additions & 0 deletions .changeset/lovely-rats-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"wrangler": patch
---

feat: add experimental_patchConfig()

`experimental_patchConfig()` can add to a user's config file. It preserves comments if its a `wrangler.jsonc`. However, it is not suitable for `wrangler.toml` with comments as we cannot preserve comments on write.
12 changes: 12 additions & 0 deletions .changeset/quick-wombats-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"wrangler": minor
---

feat: Make DX improvements in `wrangler dev --remote`

Workers + Assets projects have, in certain situations, a relatively degraded `wrangler dev --remote` developer experience, as opposed to Workers proper projects. This is due to the fact that, for Workers + Assets, we need to make extra API calls to:

1. check for asset files changes
2. upload the changed assets, if any

This commit improves the `wrangler dev --remote` DX for Workers + Assets, for use cases when the User Worker/assets change while the API calls for previous changes are still in flight. For such use cases, we have put an exit early strategy in place, that drops the event handler execution of the previous changes, in favour of the handler triggered by the new changes.
8 changes: 0 additions & 8 deletions .changeset/selfish-yaks-hope.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/strange-tips-lick.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/swift-zebras-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wrangler": minor
---

Provide validation around assets.experimental_serve_directly
5 changes: 0 additions & 5 deletions .changeset/thirty-windows-prove.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/warm-squids-visit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"cloudflare-workers-bindings-extension": patch
---

Introduce a bindings view that lists all the KV, D1 and R2 bindings on the wrangler config (e.g. `wrangler.toml`, `wrangler.jsonc`)
2 changes: 2 additions & 0 deletions fixtures/additional-modules/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20241205.0",
"typescript": "catalog:default",
"undici": "catalog:default",
"vitest": "catalog:default",
"wrangler": "workspace:*"
},
"volta": {
Expand Down
2 changes: 2 additions & 0 deletions fixtures/ai-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:^",
"typescript": "catalog:default",
"undici": "catalog:default",
"vitest": "catalog:default",
"wrangler": "workspace:*"
},
"volta": {
Expand Down
3 changes: 2 additions & 1 deletion fixtures/asset-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "workers-assets-config-test",
"private": true,
"scripts": {
"dev": "npx wrangler dev",
"dev": "wrangler dev",
"test:ci": "run-script-os",
"test:ci:default": "true",
"test:ci:nix": "vitest run",
Expand All @@ -14,6 +14,7 @@
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20241205.0",
"run-script-os": "^1.1.6",
"typescript": "catalog:default",
"undici": "catalog:default",
"vitest": "catalog:default",
"wrangler": "workspace:*"
Expand Down
7 changes: 4 additions & 3 deletions fixtures/durable-objects-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
"main": "src/index.js",
"scripts": {
"dev": "wrangler deploy --dry-run",
"test": "npx vitest run",
"test:ci": "npx vitest run",
"test:watch": "npx vitest"
"test": "vitest run",
"test:ci": "vitest run",
"test:watch": "vitest"
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:^",
"undici": "catalog:default",
"vitest": "catalog:default",
"wrangler": "workspace:*"
},
"volta": {
Expand Down
1 change: 1 addition & 0 deletions fixtures/entrypoints-rpc-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"@cloudflare/workers-tsconfig": "workspace:*",
"ts-dedent": "^2.2.0",
"undici": "catalog:default",
"vitest": "catalog:default",
"wrangler": "workspace:*"
},
"volta": {
Expand Down
2 changes: 2 additions & 0 deletions fixtures/get-platform-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20241205.0",
"typescript": "catalog:default",
"undici": "catalog:default",
"vitest": "catalog:default",
"wrangler": "workspace:*"
},
"volta": {
Expand Down
2 changes: 2 additions & 0 deletions fixtures/import-wasm-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:^",
"typescript": "catalog:default",
"undici": "catalog:default",
"vitest": "catalog:default",
"wrangler": "workspace:*"
},
"volta": {
Expand Down
3 changes: 2 additions & 1 deletion fixtures/interactive-dev-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"devDependencies": {
"fixtures-shared": "workspace:*",
"strip-ansi": "^7.1.0",
"undici": "catalog:default"
"undici": "catalog:default",
"vitest": "catalog:default"
},
"optionalDependencies": {
"@cdktf/node-pty-prebuilt-multiarch": "0.10.1-pre.11"
Expand Down
2 changes: 2 additions & 0 deletions fixtures/local-mode-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"@cloudflare/workers-types": "^4.20241205.0",
"@types/node": "catalog:default",
"buffer": "^6.0.3",
"typescript": "catalog:default",
"vitest": "catalog:default",
"wrangler": "workspace:*"
},
"volta": {
Expand Down
1 change: 1 addition & 0 deletions fixtures/no-bundle-import/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
},
"devDependencies": {
"get-port": "^7.0.0",
"vitest": "catalog:default",
"wrangler": "workspace:*"
},
"volta": {
Expand Down
4 changes: 3 additions & 1 deletion fixtures/node-app-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "dist/worker.js",
"scripts": {
"check:type": "tsc",
"dev": "npx wrangler pages dev public --port 12345 --node-compat",
"dev": "wrangler pages dev public --port 12345 --node-compat",
"test:ci": "vitest run",
"test:watch": "vitest",
"type:tests": "tsc -p ./tests/tsconfig.json"
Expand All @@ -16,7 +16,9 @@
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20241205.0",
"typescript": "catalog:default",
"undici": "catalog:default",
"vitest": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
1 change: 1 addition & 0 deletions fixtures/nodejs-als-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20241205.0",
"undici": "catalog:default",
"vitest": "catalog:default",
"wrangler": "workspace:*"
}
}
1 change: 1 addition & 0 deletions fixtures/nodejs-hybrid-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"pg": "8.11.3",
"pg-cloudflare": "^1.1.1",
"undici": "catalog:default",
"vitest": "catalog:default",
"wrangler": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion fixtures/nodejs-hybrid-app/tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe("nodejs compat", () => {
}
});

test("require unenv aliased packages", async ({ expect }) => {
test("import unenv aliased packages", async ({ expect }) => {
const { ip, port, stop } = await runWranglerDev(
resolve(__dirname, "../src"),
["--port=0", "--inspector-port=0"]
Expand Down
4 changes: 3 additions & 1 deletion fixtures/pages-d1-shim/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
"sideEffects": false,
"scripts": {
"check:type": "tsc",
"dev": "npx wrangler pages dev ./public --d1 foobar --port 8777",
"dev": "wrangler pages dev ./public --d1 foobar --port 8777",
"test:ci": "vitest run",
"test:watch": "vitest",
"type:tests": "tsc -p ./tests/tsconfig.json"
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"typescript": "catalog:default",
"undici": "catalog:default",
"vitest": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
4 changes: 3 additions & 1 deletion fixtures/pages-dev-proxy-with-script/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
"private": true,
"sideEffects": false,
"scripts": {
"dev": "npx wrangler pages dev public",
"dev": "wrangler pages dev public",
"test:ci": "vitest run",
"test:watch": "vitest",
"type:tests": "tsc -p ./tests/tsconfig.json"
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20241205.0",
"typescript": "catalog:default",
"undici": "catalog:default",
"vitest": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
2 changes: 2 additions & 0 deletions fixtures/pages-functions-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20241205.0",
"pages-plugin-example": "workspace:*",
"typescript": "catalog:default",
"undici": "catalog:default",
"vitest": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
6 changes: 4 additions & 2 deletions fixtures/pages-functions-wasm-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
"sideEffects": false,
"scripts": {
"check:type": "tsc",
"dev": "npx wrangler pages dev public --port 8776",
"publish": "npx wrangler pages deploy public",
"dev": "wrangler pages dev public --port 8776",
"publish": "wrangler pages deploy public",
"test:ci": "vitest run",
"test:watch": "vitest",
"type:tests": "tsc -p ./tests/tsconfig.json"
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"typescript": "catalog:default",
"undici": "catalog:default",
"vitest": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
4 changes: 3 additions & 1 deletion fixtures/pages-functions-with-config-file-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
"sideEffects": false,
"scripts": {
"check:type": "tsc",
"dev": "npx wrangler pages dev",
"dev": "wrangler pages dev",
"test:ci": "vitest run",
"test:watch": "vitest",
"type:tests": "tsc -p ./tests/tsconfig.json"
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"typescript": "catalog:default",
"undici": "catalog:default",
"vitest": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
4 changes: 3 additions & 1 deletion fixtures/pages-functions-with-routes-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
"sideEffects": false,
"scripts": {
"check:type": "tsc",
"dev": "npx wrangler pages dev public --port 8776",
"dev": "wrangler pages dev public --port 8776",
"test:ci": "vitest run",
"test:watch": "vitest",
"type:tests": "tsc -p ./tests/tsconfig.json"
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20241205.0",
"typescript": "catalog:default",
"undici": "catalog:default",
"vitest": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
8 changes: 5 additions & 3 deletions fixtures/pages-nodejs-v2-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@
"sideEffects": false,
"scripts": {
"check:type": "tsc",
"dev:functions-app": "npx wrangler pages dev ./apps/functions --port 8792",
"dev:workerjs-directory": "npx wrangler pages dev ./apps/workerjs-directory --port 8792",
"dev:workerjs-file": "npx wrangler pages dev ./apps/workerjs-file --port 8792",
"dev:functions-app": "wrangler pages dev ./apps/functions --port 8792",
"dev:workerjs-directory": "wrangler pages dev ./apps/workerjs-directory --port 8792",
"dev:workerjs-file": "wrangler pages dev ./apps/workerjs-file --port 8792",
"test:ci": "vitest run",
"test:watch": "vitest",
"type:tests": "tsc -p ./tests/tsconfig.json"
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:^",
"typescript": "catalog:default",
"undici": "catalog:default",
"vitest": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
2 changes: 2 additions & 0 deletions fixtures/pages-plugin-mounted-on-root-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20241205.0",
"pages-plugin-example": "workspace:*",
"typescript": "catalog:default",
"undici": "catalog:default",
"vitest": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
4 changes: 3 additions & 1 deletion fixtures/pages-proxy-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"build": "esbuild --bundle --platform=node server/index.ts --outfile=dist/index.js",
"check:type": "tsc",
"dev": "npx wrangler pages dev --compatibility-date=2024-01-17 --port 8790 --proxy 8791 -- pnpm run server",
"dev": "wrangler pages dev --compatibility-date=2024-01-17 --port 8790 --proxy 8791 -- pnpm run server",
"server": "node dist/index.js",
"test:ci": "vitest run",
"test:watch": "vitest",
Expand All @@ -15,7 +15,9 @@
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"miniflare": "workspace:*",
"typescript": "catalog:default",
"undici": "catalog:default",
"vitest": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
4 changes: 3 additions & 1 deletion fixtures/pages-simple-assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@
"main": "dist/worker.js",
"scripts": {
"check:type": "tsc",
"dev": "npx wrangler pages dev public",
"dev": "wrangler pages dev public",
"test:ci": "vitest run",
"test:watch": "vitest",
"type:tests": "tsc -p ./tests/tsconfig.json"
},
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:*",
"@cloudflare/workers-types": "^4.20241205.0",
"typescript": "catalog:default",
"undici": "catalog:default",
"vitest": "catalog:default",
"wrangler": "workspace:*"
},
"engines": {
Expand Down
Loading

0 comments on commit f165792

Please sign in to comment.