Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Compatibility Dates to Compatibility Flags #18176

Open
wants to merge 1 commit into
base: production
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions public/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
6 changes: 3 additions & 3 deletions src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
notificationsSchema,
pagesBuildEnvironmentSchema,
pagesFrameworkPresetsSchema,
compatibilityDatesSchema,
compatibilityFlagsSchema,
glossarySchema,
learningPathsSchema,
videosSchema,
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
---
Expand Down
14 changes: 7 additions & 7 deletions src/content/docs/workers/configuration/compatibility-flags.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.

<CompatibilityDates />
<CompatibilityFlags />

## 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.

<CompatibilityDates experimental />
<CompatibilityFlags experimental />
Original file line number Diff line number Diff line change
@@ -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));

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { z } from "astro:schema";

export type CompatibilityDatesSchema = z.infer<typeof compatibilityDatesSchema>;
export type CompatibilityFlagsSchema = z.infer<typeof compatibilityFlagsSchema>;

export const compatibilityDatesSchema = z.object({
export const compatibilityFlagsSchema = z.object({
name: z.string(),
enable_date: z.string().optional().nullable(),
enable_flag: z.string().nullable(),
Expand Down
2 changes: 1 addition & 1 deletion src/schemas/index.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
Loading