From 37509ee49c976d8b3f7a9c727f2da687b9d660df Mon Sep 17 00:00:00 2001 From: meyer Date: Sat, 30 Nov 2024 12:46:04 -0500 Subject: [PATCH] Add mentions of `wrangler.jsonc` --- CONTRIBUTING.md | 2 +- src/content/docs/workers/wrangler/api.mdx | 2 +- src/content/docs/workers/wrangler/configuration.mdx | 4 ++-- .../partials/workers/wrangler-commands/global-flags.mdx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6122a660c7e851..f7005b6c7fbe28 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,7 +35,7 @@ If we require more information to address your pull request, the `more-informati ## Wrangler config -If you're adding a code snippet to the docs that represents a Wrangler config file (`wrangler.toml` or `wrangler.json`) make sure you wrap it with the `` component, which ensure it's rendered as both JSON and TOML e.g. +If you're adding a code snippet to the docs that represents a Wrangler config file (`wrangler.toml`, `wrangler.json`, or `wrangler.jsonc`) make sure you wrap it with the `` component, which ensure it's rendered as both JSON and TOML e.g. ```` diff --git a/src/content/docs/workers/wrangler/api.mdx b/src/content/docs/workers/wrangler/api.mdx index bb4757980db9f9..01301b456f990b 100644 --- a/src/content/docs/workers/wrangler/api.mdx +++ b/src/content/docs/workers/wrangler/api.mdx @@ -258,7 +258,7 @@ const platform = await getPlatformProxy(options); - `experimentalJsonConfig` boolean - If `true`, allows the utility to read a JSON config file (for example, `wrangler.json`). + If `true`, allows the utility to read a JSON config file (for example, `wrangler.json` or `wrangler.jsonc`). - `persist` boolean | `{ path: string }` diff --git a/src/content/docs/workers/wrangler/configuration.mdx b/src/content/docs/workers/wrangler/configuration.mdx index c604993c15861e..a9e29a8da12fff 100644 --- a/src/content/docs/workers/wrangler/configuration.mdx +++ b/src/content/docs/workers/wrangler/configuration.mdx @@ -11,11 +11,11 @@ description: Use a configuration file to customize the import { Render, Type, MetaInfo } from "~/components"; -Wrangler optionally uses a `wrangler.json`/`wrangler.toml` file to customize the development and deployment setup for a Worker. +Wrangler optionally uses a `wrangler.json`/`wrangler.jsonc`/`wrangler.toml` file to customize the development and deployment setup for a Worker. :::note -As of Wrangler v3.91.0 Wrangler supports both JSON (`wrangler.json`) and TOML (`wrangler.toml`) for it's configuration file. Prior to that version, only `wrangler.toml` was supported. The format of Wrangler's configuration file is exactly the same across both languages, except that the syntax is `JSON` rather than `TOML`. Throughout this page and the rest of Cloudflare's documentation config snippets are provided as both JSON and TOML. +As of Wrangler v3.91.0 Wrangler supports both JSON (`wrangler.json` or `wrangler.jsonc`) and TOML (`wrangler.toml`) for its configuration file. Prior to that version, only `wrangler.toml` was supported. The format of Wrangler's configuration file is exactly the same across both languages, except that the syntax is `JSON` rather than `TOML`. Throughout this page and the rest of Cloudflare's documentation config snippets are provided as both JSON and TOML. ::: diff --git a/src/content/partials/workers/wrangler-commands/global-flags.mdx b/src/content/partials/workers/wrangler-commands/global-flags.mdx index f33a99d9117be4..d4a51446cae082 100644 --- a/src/content/partials/workers/wrangler-commands/global-flags.mdx +++ b/src/content/partials/workers/wrangler-commands/global-flags.mdx @@ -13,4 +13,4 @@ The following global flags work on every command: - `--config` (not supported by Pages) - Path to `.toml` configuration file. - `--experimental-json-config` (not supported by Pages) - - ⚠️ This is an experimental command. Read configuration from a `wrangler.json` file, instead of `wrangler.toml`. `wrangler.json` is a [JSONC](https://code.visualstudio.com/docs/languages/json#_json-with-comments) file. + - ⚠️ This is an experimental command. Read configuration from a `wrangler.json` or `wrangler.jsonc` file, instead of `wrangler.toml`. In this case the config file is parsed as [JSONC](https://code.visualstudio.com/docs/languages/json#_json-with-comments).