Commit 940b44d
[wrangler] feat: generate wrangler.jsonc in init --from-dash instead of wrangler.toml (#10911)
* feat: generate wrangler.jsonc in init --from-dash instead of wrangler.toml
- Remove TOML import from init.ts (no longer needed)
- Change init.ts to write wrangler.jsonc using JSON.stringify
- Update all tests to expect wrangler.jsonc instead of wrangler.toml
- Convert test snapshots from TOML to JSON format
- Add changeset for minor version bump
Fixes #8270
Co-Authored-By: smacleod@cloudflare.com <smacleod@cloudflare.com>
* revert: remove unnecessary changes to unrelated test files
Address PR feedback from @penalosa to revert changes to test files
that don't test the init --from-dash functionality:
- get-entry.test.ts
- index.test.ts
- deployments.status.test.ts
These files now reference wrangler.toml again since they test
functionality unrelated to the init command's config generation.
Co-Authored-By: smacleod@cloudflare.com <smacleod@cloudflare.com>
* fix: update C3 test to expect wrangler.jsonc from init --from-dash
Update the --existing-script test expectations to check for wrangler.jsonc
with JSON content instead of wrangler.toml with TOML content, since
wrangler init --from-dash now generates JSON config files.
Co-Authored-By: smacleod@cloudflare.com <smacleod@cloudflare.com>
* fix: update C3 pre-existing template to copy wrangler.jsonc
The --existing-script flow runs wrangler init --from-dash which now
generates wrangler.jsonc instead of wrangler.toml. Update the file copy
logic to check for and copy wrangler.jsonc, wrangler.json, or wrangler.toml
(in that preference order) to support both new and legacy workers.
Co-Authored-By: smacleod@cloudflare.com <smacleod@cloudflare.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: smacleod@cloudflare.com <smacleod@cloudflare.com>1 parent a5f7904 commit 940b44d
File tree
5 files changed
+245
-167
lines changed- .changeset
- packages
- create-cloudflare
- e2e/tests/cli
- templates/pre-existing
- wrangler/src
- __tests__
5 files changed
+245
-167
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
445 | | - | |
| 445 | + | |
446 | 446 | | |
| 447 | + | |
447 | 448 | | |
448 | | - | |
449 | | - | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
450 | 453 | | |
451 | 454 | | |
452 | 455 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
65 | 79 | | |
66 | 80 | | |
67 | 81 | | |
| |||
0 commit comments