From ba96c3f4612c31704b3d488b47f6882b566abc9d Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Tue, 12 Nov 2024 10:21:39 +0100 Subject: [PATCH] Rename Compatibility Dates to Compatibility Flags Rename: - Component: CompatibilityDates -> CompatibilityFlags - Files - Collection: compatibility-dates -> compatibility-flags - Schema: CompatibilityDatesSchema -> CompatibilityFlagsSchema Update: - CODEOWNERS - Redirect: https://developers.cloudflare.com/workers/platform/compatibility-dates.json -> compatibility-flags.json --- .github/CODEOWNERS | 2 +- public/_redirects | 1 + ...ibilityDates.astro => CompatibilityFlags.astro} | 2 +- src/components/index.ts | 2 +- .../allow-custom-ports.md | 0 .../blob-standard-mime-type.md | 0 .../brotli-content-encoding.md | 0 .../cache-no-store.md | 0 ...monjs-modules-dont-export-a-module-namespace.md | 0 .../crypto-preserve-public-exponent.md | 0 .../dont-substitute-null-on-type-error.md | 0 .../dont-throw-from-async-functions.md | 0 ...-origin-trust-store-for-external-subrequests.md | 0 ...urable-object-stub-fetch-requires-a-full-url.md | 0 .../dynamic-dispatch-tunnel-exceptions.md | 0 ...roperly-interprets-unknown-protocols-as-http.md | 0 .../fetch-standard-url.md | 0 .../fetcher-no-get-put-delete.md | 0 .../formdata-parsing-supports-file.md | 0 .../global-navigator.md | 0 .../htmlrewriter-handling-of-esi-include.md | 0 .../http_headers_getsetcookie.md | 0 .../internal_stream_byob_return_view.md | 0 .../minimal-subrequests.md | 0 .../new-url-parser-implementation.md | 0 .../no-cfbotmanagement-default.md | 0 .../no-importscripts.md | 0 .../nodejs-als.md | 0 .../nodejs-compat.md | 0 .../python-workers.md | 0 .../queues-json-messages.md | 0 .../r2-list-honor-includes.md | 0 .../rpc.md | 0 .../setters-getters-on-api-object-prototypes.md | 0 .../spec-compliant-response-redirect.md | 0 .../streams-byob-reader-detaches-buffer.md | 0 .../streams-constructors.md | 0 .../strict-compression.md | 0 .../strict-crypto.md | 0 .../transformstream-standard-constructor.md | 0 .../unwrap-custom-thenables.md | 0 .../urlsearchparams-deletehasvalue.md | 0 .../vectorize-query-metadata-optional.md | 0 .../web-socket-compression.md | 0 src/content/config.ts | 6 +++--- .../workers/configuration/compatibility-dates.mdx | 2 +- .../workers/configuration/compatibility-flags.mdx | 14 +++++++------- ...y-dates.json.ts => compatibility-flags.json.ts} | 2 +- ...mpatibility-dates.ts => compatibility-flags.ts} | 4 ++-- src/schemas/index.ts | 2 +- 50 files changed, 19 insertions(+), 18 deletions(-) rename src/components/{CompatibilityDates.astro => CompatibilityFlags.astro} (95%) rename src/content/{compatibility-dates => compatibility-flags}/allow-custom-ports.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/blob-standard-mime-type.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/brotli-content-encoding.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/cache-no-store.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/commonjs-modules-dont-export-a-module-namespace.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/crypto-preserve-public-exponent.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/dont-substitute-null-on-type-error.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/dont-throw-from-async-functions.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/dont-use-the-custom-origin-trust-store-for-external-subrequests.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/durable-object-stub-fetch-requires-a-full-url.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/dynamic-dispatch-tunnel-exceptions.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/fetch-improperly-interprets-unknown-protocols-as-http.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/fetch-standard-url.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/fetcher-no-get-put-delete.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/formdata-parsing-supports-file.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/global-navigator.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/htmlrewriter-handling-of-esi-include.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/http_headers_getsetcookie.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/internal_stream_byob_return_view.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/minimal-subrequests.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/new-url-parser-implementation.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/no-cfbotmanagement-default.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/no-importscripts.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/nodejs-als.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/nodejs-compat.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/python-workers.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/queues-json-messages.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/r2-list-honor-includes.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/rpc.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/setters-getters-on-api-object-prototypes.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/spec-compliant-response-redirect.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/streams-byob-reader-detaches-buffer.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/streams-constructors.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/strict-compression.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/strict-crypto.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/transformstream-standard-constructor.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/unwrap-custom-thenables.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/urlsearchparams-deletehasvalue.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/vectorize-query-metadata-optional.md (100%) rename src/content/{compatibility-dates => compatibility-flags}/web-socket-compression.md (100%) rename src/pages/workers/platform/{compatibility-dates.json.ts => compatibility-flags.json.ts} (90%) rename src/schemas/{compatibility-dates.ts => compatibility-flags.ts} (65%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5023d100a0de5c..60b73920970403 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -127,7 +127,7 @@ /src/content/docs/workers/reference/migrate-to-module-workers/ @irvinebroque @GregBrimble @cloudflare/deploy-config @cloudflare/pcx-technical-writing /src/content/docs/workers/reference/security-model/ @irvinebroque @GregBrimble @cloudflare/pcx-technical-writing -/src/content/compatibility-dates/ @irvinebroque @kflansburg @mikenomitch @GregBrimble @cloudflare/pcx-technical-writing +/src/content/compatibility-flags/ @irvinebroque @kflansburg @mikenomitch @GregBrimble @cloudflare/pcx-technical-writing /src/content/docs/workers/wrangler/ @penalosa @petebacondarwin @dario-piotrowicz @irvinebroque @GregBrimble @cloudflare/pcx-technical-writing /src/content/docs/workers/frameworks/ @igorminar @dario-piotrowicz @jculvey @aninibread @GregBrimble @cloudflare/pcx-technical-writing /src/content/docs/pages/framework-guides/ @igorminar @dario-piotrowicz @jculvey @aninibread @GregBrimble @tanushree-sharma @cloudflare/pcx-technical-writing diff --git a/public/_redirects b/public/_redirects index 7cbc4b09f58fca..c458547e26a362 100644 --- a/public/_redirects +++ b/public/_redirects @@ -1448,6 +1448,7 @@ /workers/platform/triggers/cron-triggers/ /workers/configuration/cron-triggers/ 301 /workers/platform/cron-triggers/ /workers/configuration/cron-triggers/ 301 /workers/platform/compatibility-dates/ /workers/configuration/compatibility-dates/ 301 +/workers/platform/compatibility-dates.json /workers/platform/compatibility-flags.json 301 /workers/learning/integrations/ /workers/configuration/integrations/ 301 /workers/learning/integrations/apis/ /workers/configuration/integrations/apis/ 301 /workers/learning/integrations/external-services/ /workers/configuration/integrations/external-services/ 301 diff --git a/src/components/CompatibilityDates.astro b/src/components/CompatibilityFlags.astro similarity index 95% rename from src/components/CompatibilityDates.astro rename to src/components/CompatibilityFlags.astro index e2989d84e68e69..0cb70507dfdb53 100644 --- a/src/components/CompatibilityDates.astro +++ b/src/components/CompatibilityFlags.astro @@ -11,7 +11,7 @@ const props = z.object({ const { experimental } = props.parse(Astro.props); -let flags = await getCollection("compatibility-dates"); +let flags = await getCollection("compatibility-flags"); if (experimental) { flags = flags.filter((x) => x.data.experimental); diff --git a/src/components/index.ts b/src/components/index.ts index 6af42ac464dbf2..d8b5f688224a24 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -7,7 +7,7 @@ export { Icon as AstroIcon } from "astro-icon/components"; // Custom components export { default as AnchorHeading } from "./AnchorHeading.astro"; export { default as AvailableNotifications } from "./AvailableNotifications.astro"; -export { default as CompatibilityDates } from "./CompatibilityDates.astro"; +export { default as CompatibilityFlags } from "./CompatibilityFlags.astro"; export { default as Description } from "./Description.astro"; export { default as Details } from "./Details.astro"; export { default as DirectoryListing } from "./DirectoryListing.astro"; diff --git a/src/content/compatibility-dates/allow-custom-ports.md b/src/content/compatibility-flags/allow-custom-ports.md similarity index 100% rename from src/content/compatibility-dates/allow-custom-ports.md rename to src/content/compatibility-flags/allow-custom-ports.md diff --git a/src/content/compatibility-dates/blob-standard-mime-type.md b/src/content/compatibility-flags/blob-standard-mime-type.md similarity index 100% rename from src/content/compatibility-dates/blob-standard-mime-type.md rename to src/content/compatibility-flags/blob-standard-mime-type.md diff --git a/src/content/compatibility-dates/brotli-content-encoding.md b/src/content/compatibility-flags/brotli-content-encoding.md similarity index 100% rename from src/content/compatibility-dates/brotli-content-encoding.md rename to src/content/compatibility-flags/brotli-content-encoding.md diff --git a/src/content/compatibility-dates/cache-no-store.md b/src/content/compatibility-flags/cache-no-store.md similarity index 100% rename from src/content/compatibility-dates/cache-no-store.md rename to src/content/compatibility-flags/cache-no-store.md diff --git a/src/content/compatibility-dates/commonjs-modules-dont-export-a-module-namespace.md b/src/content/compatibility-flags/commonjs-modules-dont-export-a-module-namespace.md similarity index 100% rename from src/content/compatibility-dates/commonjs-modules-dont-export-a-module-namespace.md rename to src/content/compatibility-flags/commonjs-modules-dont-export-a-module-namespace.md diff --git a/src/content/compatibility-dates/crypto-preserve-public-exponent.md b/src/content/compatibility-flags/crypto-preserve-public-exponent.md similarity index 100% rename from src/content/compatibility-dates/crypto-preserve-public-exponent.md rename to src/content/compatibility-flags/crypto-preserve-public-exponent.md diff --git a/src/content/compatibility-dates/dont-substitute-null-on-type-error.md b/src/content/compatibility-flags/dont-substitute-null-on-type-error.md similarity index 100% rename from src/content/compatibility-dates/dont-substitute-null-on-type-error.md rename to src/content/compatibility-flags/dont-substitute-null-on-type-error.md diff --git a/src/content/compatibility-dates/dont-throw-from-async-functions.md b/src/content/compatibility-flags/dont-throw-from-async-functions.md similarity index 100% rename from src/content/compatibility-dates/dont-throw-from-async-functions.md rename to src/content/compatibility-flags/dont-throw-from-async-functions.md diff --git a/src/content/compatibility-dates/dont-use-the-custom-origin-trust-store-for-external-subrequests.md b/src/content/compatibility-flags/dont-use-the-custom-origin-trust-store-for-external-subrequests.md similarity index 100% rename from src/content/compatibility-dates/dont-use-the-custom-origin-trust-store-for-external-subrequests.md rename to src/content/compatibility-flags/dont-use-the-custom-origin-trust-store-for-external-subrequests.md diff --git a/src/content/compatibility-dates/durable-object-stub-fetch-requires-a-full-url.md b/src/content/compatibility-flags/durable-object-stub-fetch-requires-a-full-url.md similarity index 100% rename from src/content/compatibility-dates/durable-object-stub-fetch-requires-a-full-url.md rename to src/content/compatibility-flags/durable-object-stub-fetch-requires-a-full-url.md diff --git a/src/content/compatibility-dates/dynamic-dispatch-tunnel-exceptions.md b/src/content/compatibility-flags/dynamic-dispatch-tunnel-exceptions.md similarity index 100% rename from src/content/compatibility-dates/dynamic-dispatch-tunnel-exceptions.md rename to src/content/compatibility-flags/dynamic-dispatch-tunnel-exceptions.md diff --git a/src/content/compatibility-dates/fetch-improperly-interprets-unknown-protocols-as-http.md b/src/content/compatibility-flags/fetch-improperly-interprets-unknown-protocols-as-http.md similarity index 100% rename from src/content/compatibility-dates/fetch-improperly-interprets-unknown-protocols-as-http.md rename to src/content/compatibility-flags/fetch-improperly-interprets-unknown-protocols-as-http.md diff --git a/src/content/compatibility-dates/fetch-standard-url.md b/src/content/compatibility-flags/fetch-standard-url.md similarity index 100% rename from src/content/compatibility-dates/fetch-standard-url.md rename to src/content/compatibility-flags/fetch-standard-url.md diff --git a/src/content/compatibility-dates/fetcher-no-get-put-delete.md b/src/content/compatibility-flags/fetcher-no-get-put-delete.md similarity index 100% rename from src/content/compatibility-dates/fetcher-no-get-put-delete.md rename to src/content/compatibility-flags/fetcher-no-get-put-delete.md diff --git a/src/content/compatibility-dates/formdata-parsing-supports-file.md b/src/content/compatibility-flags/formdata-parsing-supports-file.md similarity index 100% rename from src/content/compatibility-dates/formdata-parsing-supports-file.md rename to src/content/compatibility-flags/formdata-parsing-supports-file.md diff --git a/src/content/compatibility-dates/global-navigator.md b/src/content/compatibility-flags/global-navigator.md similarity index 100% rename from src/content/compatibility-dates/global-navigator.md rename to src/content/compatibility-flags/global-navigator.md diff --git a/src/content/compatibility-dates/htmlrewriter-handling-of-esi-include.md b/src/content/compatibility-flags/htmlrewriter-handling-of-esi-include.md similarity index 100% rename from src/content/compatibility-dates/htmlrewriter-handling-of-esi-include.md rename to src/content/compatibility-flags/htmlrewriter-handling-of-esi-include.md diff --git a/src/content/compatibility-dates/http_headers_getsetcookie.md b/src/content/compatibility-flags/http_headers_getsetcookie.md similarity index 100% rename from src/content/compatibility-dates/http_headers_getsetcookie.md rename to src/content/compatibility-flags/http_headers_getsetcookie.md diff --git a/src/content/compatibility-dates/internal_stream_byob_return_view.md b/src/content/compatibility-flags/internal_stream_byob_return_view.md similarity index 100% rename from src/content/compatibility-dates/internal_stream_byob_return_view.md rename to src/content/compatibility-flags/internal_stream_byob_return_view.md diff --git a/src/content/compatibility-dates/minimal-subrequests.md b/src/content/compatibility-flags/minimal-subrequests.md similarity index 100% rename from src/content/compatibility-dates/minimal-subrequests.md rename to src/content/compatibility-flags/minimal-subrequests.md diff --git a/src/content/compatibility-dates/new-url-parser-implementation.md b/src/content/compatibility-flags/new-url-parser-implementation.md similarity index 100% rename from src/content/compatibility-dates/new-url-parser-implementation.md rename to src/content/compatibility-flags/new-url-parser-implementation.md diff --git a/src/content/compatibility-dates/no-cfbotmanagement-default.md b/src/content/compatibility-flags/no-cfbotmanagement-default.md similarity index 100% rename from src/content/compatibility-dates/no-cfbotmanagement-default.md rename to src/content/compatibility-flags/no-cfbotmanagement-default.md diff --git a/src/content/compatibility-dates/no-importscripts.md b/src/content/compatibility-flags/no-importscripts.md similarity index 100% rename from src/content/compatibility-dates/no-importscripts.md rename to src/content/compatibility-flags/no-importscripts.md diff --git a/src/content/compatibility-dates/nodejs-als.md b/src/content/compatibility-flags/nodejs-als.md similarity index 100% rename from src/content/compatibility-dates/nodejs-als.md rename to src/content/compatibility-flags/nodejs-als.md diff --git a/src/content/compatibility-dates/nodejs-compat.md b/src/content/compatibility-flags/nodejs-compat.md similarity index 100% rename from src/content/compatibility-dates/nodejs-compat.md rename to src/content/compatibility-flags/nodejs-compat.md diff --git a/src/content/compatibility-dates/python-workers.md b/src/content/compatibility-flags/python-workers.md similarity index 100% rename from src/content/compatibility-dates/python-workers.md rename to src/content/compatibility-flags/python-workers.md diff --git a/src/content/compatibility-dates/queues-json-messages.md b/src/content/compatibility-flags/queues-json-messages.md similarity index 100% rename from src/content/compatibility-dates/queues-json-messages.md rename to src/content/compatibility-flags/queues-json-messages.md diff --git a/src/content/compatibility-dates/r2-list-honor-includes.md b/src/content/compatibility-flags/r2-list-honor-includes.md similarity index 100% rename from src/content/compatibility-dates/r2-list-honor-includes.md rename to src/content/compatibility-flags/r2-list-honor-includes.md diff --git a/src/content/compatibility-dates/rpc.md b/src/content/compatibility-flags/rpc.md similarity index 100% rename from src/content/compatibility-dates/rpc.md rename to src/content/compatibility-flags/rpc.md diff --git a/src/content/compatibility-dates/setters-getters-on-api-object-prototypes.md b/src/content/compatibility-flags/setters-getters-on-api-object-prototypes.md similarity index 100% rename from src/content/compatibility-dates/setters-getters-on-api-object-prototypes.md rename to src/content/compatibility-flags/setters-getters-on-api-object-prototypes.md diff --git a/src/content/compatibility-dates/spec-compliant-response-redirect.md b/src/content/compatibility-flags/spec-compliant-response-redirect.md similarity index 100% rename from src/content/compatibility-dates/spec-compliant-response-redirect.md rename to src/content/compatibility-flags/spec-compliant-response-redirect.md diff --git a/src/content/compatibility-dates/streams-byob-reader-detaches-buffer.md b/src/content/compatibility-flags/streams-byob-reader-detaches-buffer.md similarity index 100% rename from src/content/compatibility-dates/streams-byob-reader-detaches-buffer.md rename to src/content/compatibility-flags/streams-byob-reader-detaches-buffer.md diff --git a/src/content/compatibility-dates/streams-constructors.md b/src/content/compatibility-flags/streams-constructors.md similarity index 100% rename from src/content/compatibility-dates/streams-constructors.md rename to src/content/compatibility-flags/streams-constructors.md diff --git a/src/content/compatibility-dates/strict-compression.md b/src/content/compatibility-flags/strict-compression.md similarity index 100% rename from src/content/compatibility-dates/strict-compression.md rename to src/content/compatibility-flags/strict-compression.md diff --git a/src/content/compatibility-dates/strict-crypto.md b/src/content/compatibility-flags/strict-crypto.md similarity index 100% rename from src/content/compatibility-dates/strict-crypto.md rename to src/content/compatibility-flags/strict-crypto.md diff --git a/src/content/compatibility-dates/transformstream-standard-constructor.md b/src/content/compatibility-flags/transformstream-standard-constructor.md similarity index 100% rename from src/content/compatibility-dates/transformstream-standard-constructor.md rename to src/content/compatibility-flags/transformstream-standard-constructor.md diff --git a/src/content/compatibility-dates/unwrap-custom-thenables.md b/src/content/compatibility-flags/unwrap-custom-thenables.md similarity index 100% rename from src/content/compatibility-dates/unwrap-custom-thenables.md rename to src/content/compatibility-flags/unwrap-custom-thenables.md diff --git a/src/content/compatibility-dates/urlsearchparams-deletehasvalue.md b/src/content/compatibility-flags/urlsearchparams-deletehasvalue.md similarity index 100% rename from src/content/compatibility-dates/urlsearchparams-deletehasvalue.md rename to src/content/compatibility-flags/urlsearchparams-deletehasvalue.md diff --git a/src/content/compatibility-dates/vectorize-query-metadata-optional.md b/src/content/compatibility-flags/vectorize-query-metadata-optional.md similarity index 100% rename from src/content/compatibility-dates/vectorize-query-metadata-optional.md rename to src/content/compatibility-flags/vectorize-query-metadata-optional.md diff --git a/src/content/compatibility-dates/web-socket-compression.md b/src/content/compatibility-flags/web-socket-compression.md similarity index 100% rename from src/content/compatibility-dates/web-socket-compression.md rename to src/content/compatibility-flags/web-socket-compression.md diff --git a/src/content/config.ts b/src/content/config.ts index 3a0c07abccc3f2..60cccf2337838d 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -7,7 +7,7 @@ import { notificationsSchema, pagesBuildEnvironmentSchema, pagesFrameworkPresetsSchema, - compatibilityDatesSchema, + compatibilityFlagsSchema, glossarySchema, learningPathsSchema, videosSchema, @@ -29,8 +29,8 @@ export const collections = { schema: changelogsSchema, type: "data", }), - "compatibility-dates": defineCollection({ - schema: compatibilityDatesSchema, + "compatibility-flags": defineCollection({ + schema: compatibilityFlagsSchema, }), partials: defineCollection({ schema: partialSchema, diff --git a/src/content/docs/workers/configuration/compatibility-dates.mdx b/src/content/docs/workers/configuration/compatibility-dates.mdx index 8b8acd9d40eb06..2b851b91f36adf 100644 --- a/src/content/docs/workers/configuration/compatibility-dates.mdx +++ b/src/content/docs/workers/configuration/compatibility-dates.mdx @@ -1,7 +1,7 @@ --- pcx_content_type: concept title: Compatibility dates -rss: https://github.com/cloudflare/cloudflare-docs/commits/production/src/content/compatibility-dates.atom +rss: https://github.com/cloudflare/cloudflare-docs/commits/production/src/content/compatibility-flags.atom head: [] description: Opt into a specific version of the Workers runtime for your Workers project. --- diff --git a/src/content/docs/workers/configuration/compatibility-flags.mdx b/src/content/docs/workers/configuration/compatibility-flags.mdx index e689ef2c3eee4b..f630259b299cc7 100644 --- a/src/content/docs/workers/configuration/compatibility-flags.mdx +++ b/src/content/docs/workers/configuration/compatibility-flags.mdx @@ -6,7 +6,7 @@ head: [] description: Opt into a specific features of the Workers runtime for your Workers project. --- -import { CompatibilityDates } from "~/components"; +import { CompatibilityFlags } from "~/components"; Compatibility flags enable specific features. They can be useful if you want to help the Workers team test upcoming changes that are not yet enabled by default, or if you need to hold back a change that your code depends on but still want to apply other compatibility changes. @@ -61,14 +61,14 @@ The Node.js `AsyncLocalStorage` API is a particularly useful feature for Workers compatibility_flags = [ "nodejs_als" ] ``` -## Change history +## Flags history -Newest changes are listed first. +Newest flags are listed first. - + -## Experimental changes +## Experimental flags -These changes can be enabled via `compatibility_flags`, but are not yet scheduled to become default on any particular date. +These flags can be enabled via `compatibility_flags`, but are not yet scheduled to become default on any particular date. - + diff --git a/src/pages/workers/platform/compatibility-dates.json.ts b/src/pages/workers/platform/compatibility-flags.json.ts similarity index 90% rename from src/pages/workers/platform/compatibility-dates.json.ts rename to src/pages/workers/platform/compatibility-flags.json.ts index 56748e73eb474e..089fa1c7d99a54 100644 --- a/src/pages/workers/platform/compatibility-dates.json.ts +++ b/src/pages/workers/platform/compatibility-flags.json.ts @@ -1,7 +1,7 @@ import { getCollection } from "astro:content"; export async function GET() { - const entries = await getCollection("compatibility-dates"); + const entries = await getCollection("compatibility-flags"); entries.sort((a, b) => a.data.sort_date.localeCompare(b.data.sort_date)); diff --git a/src/schemas/compatibility-dates.ts b/src/schemas/compatibility-flags.ts similarity index 65% rename from src/schemas/compatibility-dates.ts rename to src/schemas/compatibility-flags.ts index b4dfac16f7895f..f35f8b572a1497 100644 --- a/src/schemas/compatibility-dates.ts +++ b/src/schemas/compatibility-flags.ts @@ -1,8 +1,8 @@ import { z } from "astro:schema"; -export type CompatibilityDatesSchema = z.infer; +export type CompatibilityFlagsSchema = z.infer; -export const compatibilityDatesSchema = z.object({ +export const compatibilityFlagsSchema = z.object({ name: z.string(), enable_date: z.string().optional().nullable(), enable_flag: z.string().nullable(), diff --git a/src/schemas/index.ts b/src/schemas/index.ts index 6f7408ee143134..3288e0e47cda26 100644 --- a/src/schemas/index.ts +++ b/src/schemas/index.ts @@ -1,7 +1,7 @@ export * from "./apps"; export * from "./base"; export * from "./changelogs"; -export * from "./compatibility-dates"; +export * from "./compatibility-flags"; export * from "./glossary"; export * from "./learning-paths"; export * from "./notifications";