Skip to content

Commit 16bd137

Browse files
authored
Revert "Version Packages (#7766)"
This reverts commit cc4af98.
1 parent cc4af98 commit 16bd137

20 files changed

+133
-134
lines changed

.changeset/chilly-kings-retire.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"create-cloudflare": patch
3+
---
4+
5+
Fix regression in C3's `next` template
6+
7+
[#7676](https://github.com/cloudflare/workers-sdk/pull/7676) switched C3 templates to default to `wrangler.json` instead of `wrangler.toml`. Unfortunately, this unintendedly broke the `next` template, which was still attempting to read `wrangler.toml` specifically. This commit fixes the regression.
8+
9+
Fixes #7770

.changeset/cuddly-pets-smell.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"wrangler": patch
3+
---
4+
5+
chore(wrangler): use the unenv preset from `@cloudflare/unenv-preset`

.changeset/fifty-flies-visit.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"wrangler": patch
3+
---
4+
5+
chore: update unenv dependency version

.changeset/honest-spies-prove.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"wrangler": patch
3+
---
4+
5+
Unwrap the error cause when available to send to Sentry

.changeset/lovely-years-wash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cloudflare/workers-shared": patch
3+
---
4+
5+
fix: on a 404 from KV, we do not want the asset to stay in cache for the normal 1 year TTL. Instead we want to re-insert with a 60s TTL to revalidate and prevent a bad 404 from persisting.

.changeset/odd-news-invent.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"workers-playground": patch
3+
---
4+
5+
fix: sends raw request method through the X-CF-HTTP-Method header

.changeset/proud-forks-build.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
"wrangler": patch
3+
---
4+
5+
fix: widen multi-env `vars` types in `wrangler types`
6+
7+
Currently, the type generated for `vars` is a string literal consisting of the value of the variable in the top level environment. If multiple environments
8+
are specified this wrongly restricts the type, since the variable could contain any of the values from each of the environments.
9+
10+
For example, given a `wrangler.toml` containing the following:
11+
12+
```
13+
[vars]
14+
MY_VAR = "dev value"
15+
16+
[env.production.vars]
17+
MY_VAR = "prod value"
18+
```
19+
20+
running `wrangler types` would generate:
21+
22+
```ts
23+
interface Env {
24+
MY_VAR: "dev value";
25+
}
26+
```
27+
28+
making typescript incorrectly assume that `MY_VAR` is always going to be `"dev value"`
29+
30+
after these changes, the generated interface would instead be:
31+
32+
```ts
33+
interface Env {
34+
MY_VAR: "dev value" | "prod value";
35+
}
36+
```

.changeset/smart-lions-suffer.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"wrangler": patch
3+
---
4+
5+
feat: pull resource names for provisioning from config if provided
6+
7+
Uses `database_name` and `bucket_name` for provisioning if specified. For R2, this only happens if there is not a bucket with that name already. Also respects R2 `jurisdiction` if provided.

.changeset/tough-walls-poke.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cloudflare/workers-shared": minor
3+
---
4+
5+
Adds jaeger tracing for asset-worker.

.changeset/unlucky-timers-sort.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
"wrangler": minor
3+
---
4+
5+
add `--strict-vars` option to `wrangler types`
6+
7+
add a new `--strict-vars` option to `wrangler types` that developers can (by setting the
8+
flag to `false`) use to disable the default strict/literal types generation for their variables
9+
10+
opting out of strict variables can be useful when developers change often their `vars` values,
11+
even more so when multiple environments are involved
12+
13+
## Example
14+
15+
With a toml containing:
16+
17+
```toml
18+
[vars]
19+
MY_VARIABLE = "production_value"
20+
MY_NUMBERS = [1, 2, 3]
21+
22+
[env.staging.vars]
23+
MY_VARIABLE = "staging_value"
24+
MY_NUMBERS = [7, 8, 9]
25+
```
26+
27+
the `wrangler types` command would generate the following interface:
28+
29+
```
30+
interface Env {
31+
MY_VARIABLE: "production_value" | "staging_value";
32+
MY_NUMBERS: [1,2,3] | [7,8,9];
33+
}
34+
```
35+
36+
while `wrangler types --strict-vars=false` would instead generate:
37+
38+
```
39+
interface Env {
40+
MY_VARIABLE: string;
41+
MY_NUMBERS: number[];
42+
}
43+
```
44+
45+
(allowing the developer to easily change their toml variables without the
46+
risk of breaking typescript types)

0 commit comments

Comments
 (0)