Skip to content

Commit 2c50115

Browse files
chore: replace most wrangler.toml files in monorepo with wrangler.jsonc ones (#9033)
* chore: replace all existing `wrangler.toml` files to `wrangler.jsonc` * run prettify * update asset workers paths * update dist asset worker file * update `configPath`s * remote trailing commas from wrangler.jsonc files * revert pyproject.toml incorrectly converted * add back trailing commas * bump versions of vitest-pool-workers deps this is needed so that users of vitest-pool-workers get an up to date version of wrangler that supports wrangler.jsonc files with trailing commas * downgrade the workers-shared vitest-pool-workers dep * update toml path reference * fix additional-modules fixture * adjust various paths * fix paths * fix get-platform-proxy tests * fix interactive-dev-tests fixture * update configPath * fix vitest-pool-workers-examples * revert toml->jsonc change to remix c3 template * remove skip committed by mistake * Update fixtures/d1-read-replication-app/wrangler.jsonc Co-authored-by: Somhairle MacLeòid <[email protected]> * Update packages/workers-shared/router-worker/wrangler.jsonc Co-authored-by: Somhairle MacLeòid <[email protected]> * revert c3 allowTrailingComma option change * revert unintentional changelog change * add changesets * run pnpm prettify --------- Co-authored-by: Somhairle MacLeòid <[email protected]>
1 parent 5ffa202 commit 2c50115

File tree

203 files changed

+1360
-1127
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

203 files changed

+1360
-1127
lines changed

.changeset/seven-humans-scream.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
"edge-preview-authenticated-proxy": patch
3+
"@cloudflare/prerelease-registry": patch
4+
"devprod-status-bot": patch
5+
"create-cloudflare": patch
6+
"@cloudflare/workflows-shared": patch
7+
"@cloudflare/workers-shared": patch
8+
"format-errors": patch
9+
"@cloudflare/pages-shared": patch
10+
"workers.new": patch
11+
"miniflare": patch
12+
---
13+
14+
chore: convert wrangler.toml files into wrangler.jsonc ones

fixtures/additional-modules/test/index.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ describe("find_additional_modules dev", () => {
3434
{ recursive: true }
3535
);
3636
await fs.cp(
37-
path.resolve(__dirname, "..", "wrangler.toml"),
38-
path.join(tmpDir, "wrangler.toml")
37+
path.resolve(__dirname, "..", "wrangler.jsonc"),
38+
path.join(tmpDir, "wrangler.jsonc")
3939
);
4040

4141
worker = await unstable_startWorker({
42-
config: path.join(tmpDir, "wrangler.toml"),
42+
config: path.join(tmpDir, "wrangler.jsonc"),
4343
});
4444
});
4545
afterAll(async () => {
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "additional-modules",
3+
"main": "src/index.ts",
4+
"compatibility_date": "2023-08-01",
5+
"find_additional_modules": true,
6+
"rules": [
7+
{
8+
"type": "CommonJS",
9+
"globs": ["**/*.cjs"],
10+
},
11+
{
12+
"type": "ESModule",
13+
"globs": ["**/*.js"],
14+
},
15+
],
16+
}

fixtures/additional-modules/wrangler.toml

Lines changed: 0 additions & 9 deletions
This file was deleted.

fixtures/ai-app/wrangler.jsonc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "ai-app",
3+
"compatibility_date": "2023-11-21",
4+
"main": "src/index.js",
5+
"ai": {
6+
"binding": "AI",
7+
},
8+
}

fixtures/ai-app/wrangler.toml

Lines changed: 0 additions & 7 deletions
This file was deleted.

fixtures/asset-config/vitest.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default defineWorkersConfig({
1919
workers: {
2020
wrangler: {
2121
configPath:
22-
"../../packages/workers-shared/asset-worker/wrangler.toml",
22+
"../../packages/workers-shared/asset-worker/wrangler.jsonc",
2323
},
2424
},
2525
},
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "d1-read-replication-app",
3+
"main": "src/index.ts",
4+
"compatibility_date": "2025-03-11",
5+
"compatibility_flags": [
6+
"nodejs_compat",
7+
"experimental",
8+
"enable_d1_with_sessions_api",
9+
],
10+
"d1_databases": [
11+
{
12+
"binding": "DB01", // i.e. available in your Worker on env.DB01
13+
"database_name": "UPDATE_THIS_FOR_REMOTE_USE",
14+
"preview_database_id": "UPDATE_THIS_FOR_REMOTE_USE",
15+
"database_id": "UPDATE_THIS_FOR_REMOTE_USE",
16+
},
17+
],
18+
}

fixtures/d1-read-replication-app/wrangler.toml

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "worker-app",
3+
"main": "src/index.js",
4+
"compatibility_date": "2022-03-31",
5+
"d1_databases": [
6+
{
7+
"binding": "DB", // i.e. available in your Worker on env.DB
8+
"database_name": "UPDATE_THIS_FOR_REMOTE_USE",
9+
"preview_database_id": "UPDATE_THIS_FOR_REMOTE_USE",
10+
"database_id": "UPDATE_THIS_FOR_REMOTE_USE",
11+
},
12+
],
13+
"migrations": [
14+
{
15+
"tag": "v1", // Should be unique for each entry
16+
"new_classes": ["DurableObjectExample"], // Array of new classes
17+
},
18+
],
19+
"durable_objects": {
20+
"bindings": [
21+
{
22+
// Binding to our DurableObjectExample class
23+
"name": "EXAMPLE_CLASS",
24+
"class_name": "DurableObjectExample",
25+
},
26+
],
27+
},
28+
}

0 commit comments

Comments
 (0)