From 5486d30c3f09273f7019c3f7ea5e1ecda04d85d8 Mon Sep 17 00:00:00 2001 From: Anni Wang Date: Mon, 24 Feb 2025 14:17:44 -0500 Subject: [PATCH 1/9] pnpm 10 support in workers builds release note --- src/content/release-notes/workers.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/content/release-notes/workers.yaml b/src/content/release-notes/workers.yaml index 0a6e489bce4159..edde647953bc45 100644 --- a/src/content/release-notes/workers.yaml +++ b/src/content/release-notes/workers.yaml @@ -5,6 +5,9 @@ productLink: "/workers/" productArea: Developer platform productAreaLink: /workers/platform/changelog/platform/ entries: + - publish_date: "2025-02-24" + description: |- + - [Workers Builds](/workers/ci-cd/builds/) now supports building projects that use **pnpm 10** as their package manager. If your build previously failed due to this unsupported version, retry your build. No config changes needed. - publish_date: "2025-02-13" description: |- - [Smart Placement](/workers/configuration/smart-placement/) no longer runs Workers in the same location as D1 databases they are bound to. The same [placement logic](/workers/configuration/smart-placement/#understand-how-smart-placement-works) now applies to all Workers that use Smart Placement, regardless of whether they use D1 bindings. From c9a66aabfba04b8d4b10c91a35beed4679cfc604 Mon Sep 17 00:00:00 2001 From: Anni Wang Date: Mon, 24 Feb 2025 20:52:32 -0500 Subject: [PATCH 2/9] Updates in skip_dependency_install and default version specification --- .../configuration/build-configuration.mdx | 2 +- .../docs/pages/configuration/build-image.mdx | 12 ++++- .../docs/workers/ci-cd/builds/build-image.mdx | 49 ++++++++++++++----- .../workers/ci-cd/builds/configuration.mdx | 4 +- 4 files changed, 53 insertions(+), 14 deletions(-) diff --git a/src/content/docs/pages/configuration/build-configuration.mdx b/src/content/docs/pages/configuration/build-configuration.mdx index f59ab32ca9d1a7..65bbc7971030dc 100644 --- a/src/content/docs/pages/configuration/build-configuration.mdx +++ b/src/content/docs/pages/configuration/build-configuration.mdx @@ -34,7 +34,7 @@ If you are not using a preset, use `exit 0` as your **Build command**. ## Environment variables -If your project makes use of environment variables to build your site, provide custom environment variables: +If your project makes use of environment variables to build your site, you can provide custom environment variables by: 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account. 2. In **Account Home**, select **Workers & Pages**. diff --git a/src/content/docs/pages/configuration/build-image.mdx b/src/content/docs/pages/configuration/build-image.mdx index 566a98f72def71..9562cb7fe58140 100644 --- a/src/content/docs/pages/configuration/build-image.mdx +++ b/src/content/docs/pages/configuration/build-image.mdx @@ -47,7 +47,9 @@ For example, if you use Gatsby, your `package.json` should include the following When your build starts, if not already [cached](/pages/configuration/build-caching/), version 5.13.7 of Gatsby will be installed using `npm install`. -## Overriding default versions +## Advanced Settings + +### Overriding default versions To override default versions of languages and tools in the build system, you can either set the desired version through environment variables or by adding files to your project. @@ -63,6 +65,14 @@ Or, to set the version by adding a file to your project, you can: For example, if you were previously relying on the default version of Node.js in the v1 build system, to migrate to v2, you must specify that you need Node.js `12.18.0` by setting a `NODE_VERSION = 12.18.0` environment variable or by adding a `.node-version` or `.nvmrc` file to your project with `12.18.0` added as the contents to the file. +### Skip dependency install + +You can add the following **environment variable** to disable automatic dependency installation, and run a custom install command instead. + +| Build variable | Value | +| ------------------------- | ------------- | +| `SKIP_DEPENDENCY_INSTALL` | `1` or `true` | + ## V2 build system The [v2 build system](https://blog.cloudflare.com/moderizing-cloudflare-pages-builds-toolbox/) announced in May 2023 brings several improvements to project builds. diff --git a/src/content/docs/workers/ci-cd/builds/build-image.mdx b/src/content/docs/workers/ci-cd/builds/build-image.mdx index 11e9e2ff8b0268..653d91c46b6f44 100644 --- a/src/content/docs/workers/ci-cd/builds/build-image.mdx +++ b/src/content/docs/workers/ci-cd/builds/build-image.mdx @@ -8,20 +8,39 @@ sidebar: Workers Builds uses a build image with support for a variety of languages and tools such as Node.js, Python, PHP, Ruby, and Go. -## Supported Languages and Tools +## Supported tooling -In the following table, review the preinstalled versions for languages and tools included in the Cloudflare Workers' build image, and the environment variables and/or files available for [overriding the preinstalled version](/workers/ci-cd/builds/build-image/#overriding-default-versions): - -| Tool | Default version | Environment variable | File | -| ----------- | ---------------- | -------------------- | ---------------------------- | -| **Go** | 1.23.0 | `GO_VERSION` | | -| **Node.js** | 22 | `NODE_VERSION` | .nvmrc, .node-version | -| **Python** | 3.12.5 | `PYTHON_VERSION` | .python-version, runtime.txt | -| **Ruby** | 3.3.5 | `RUBY_VERSION` | .ruby-version | -| **Bun** | 1.1.28 | `BUN_VERSION` | | -| **Hugo** | extended_0.134.3 | `HUGO_VERSION` | | +Workers Builds supports a variety of runtimes, languages, and tools. Builds will use the default versions listed below unless a custom version is detected or specified. You can [override the default versions](/workers/ci-cd/builds/build-image/#overriding-default-versions) using environment variables or version files. All versions are available for override. +:::note[Default version updates] The default versions will be updated regularly to the latest minor version. No major version updates will be made without notice. If you need a specific minor version, please specify it by overriding the default version. +::: + +### Runtime + +| Tool | Default version | Environment variable | File | +| ----------- | --------------- | -------------------- | ---------------------------- | +| **Go** | 1.23.0 | `GO_VERSION` | | +| **Node.js** | 22.9.0 | `NODE_VERSION` | .nvmrc, .node-version | +| **Python** | 3.12.5 | `PYTHON_VERSION` | .python-version, runtime.txt | +| **Ruby** | 3.3.5 | `RUBY_VERSION` | .ruby-version | + +### Tools and langauges + +| Tool | Default version | Environment variable | +| ----------- | ---------------- | -------------------- | +| **Bun** | 1.1.33 | `BUN_VERSION` | +| **Hugo** | extended_0.134.3 | `HUGO_VERSION` | +| **npm** | 10.8.3 | | +| **yarn** | 4.5.0 | `YARN_VERSION` | +| **pnpm** | 9.10.0 | `PNPM_VERSION` | +| **pip** | 24.2 | | +| **gem** | 3.5.19 | | +| **poetry** | 1.8.3 | | +| **pipx** | 1.7.1 | | +| **bundler** | 2.4.10 | | + +## Advanced Settings ### Overriding Default Versions @@ -37,6 +56,14 @@ Or, to set the version by adding a file to your project, you can: 1. Find the filename for the language or tool (e.g. `.nvmrc`) 2. Add the specified file name to the root directory and set the desired version number as the file's content. For example, if the version number is 22, the file should contain '22'. +### Skip dependency install + +You can add the following **build variable** to disable automatic dependency installation, and run a custom install command instead. + +| Build variable | Value | +| ------------------------- | ------------- | +| `SKIP_DEPENDENCY_INSTALL` | `1` or `true` | + ## Pre-installed Packages In the following table, review the pre-installed packages in the build image. The packages are installed with `apt`, a package manager for Linux distributions. diff --git a/src/content/docs/workers/ci-cd/builds/configuration.mdx b/src/content/docs/workers/ci-cd/builds/configuration.mdx index ec4ca15299093a..0e4caca53fcb6b 100644 --- a/src/content/docs/workers/ci-cd/builds/configuration.mdx +++ b/src/content/docs/workers/ci-cd/builds/configuration.mdx @@ -20,7 +20,7 @@ Note that when you update and save build settings, the updated settings will be | Setting | Description | | ---------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **Git account** | Select the Git account you would like to use. After the initial connection, you can continue to use this Git account for future projects. | +| **Git account** | Select the Git account you would like to use. After the initial connection, you can continue to use this Git account for future projects. | | **Git repository** | Choose the Git repository you would like to connect your Worker to. | | **Git branch** | Select the branch you would like Cloudflare to listen to for new commits. This will be defaulted to `main`. | | **Build command** _(Optional)_ | Set a build command if your project requires a build step (e.g. `npm run build`). This is necessary, for example, when using a [front-end framework](/workers/ci-cd/builds/configuration/#framework-support) such as Next.js or Remix. | @@ -49,6 +49,8 @@ Examples of other deploy commands you can set include: ### API token +The API token in Workers Builds defines the access granted to Workers Builds for interacting with your account's resources. Currently, only user tokens are supported, with account-owned token support coming soon. + When you select **Create new token**, a new API token will be created automatically with the following permissions: - **Account:** Account Settings (read), Workers Scripts (edit), Workers KV Storage (edit), Workers R2 Storage (edit) From a1448e894581d4bfcd381522dbd527cc3537214e Mon Sep 17 00:00:00 2001 From: Anni Wang <54481763+aninibread@users.noreply.github.com> Date: Tue, 25 Feb 2025 13:28:52 -0500 Subject: [PATCH 3/9] Update src/content/docs/pages/configuration/build-configuration.mdx Co-authored-by: ToriLindsay --- src/content/docs/pages/configuration/build-configuration.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/pages/configuration/build-configuration.mdx b/src/content/docs/pages/configuration/build-configuration.mdx index 65bbc7971030dc..1a193fd0d1e003 100644 --- a/src/content/docs/pages/configuration/build-configuration.mdx +++ b/src/content/docs/pages/configuration/build-configuration.mdx @@ -34,7 +34,7 @@ If you are not using a preset, use `exit 0` as your **Build command**. ## Environment variables -If your project makes use of environment variables to build your site, you can provide custom environment variables by: +If your project makes use of environment variables to build your site, you can provide custom environment variables: 1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account. 2. In **Account Home**, select **Workers & Pages**. From 3f47560c08dba6deaa40dd8c9bc5fca240a148c5 Mon Sep 17 00:00:00 2001 From: Anni Wang <54481763+aninibread@users.noreply.github.com> Date: Tue, 25 Feb 2025 13:29:00 -0500 Subject: [PATCH 4/9] Update src/content/docs/pages/configuration/build-image.mdx Co-authored-by: ToriLindsay --- src/content/docs/pages/configuration/build-image.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/pages/configuration/build-image.mdx b/src/content/docs/pages/configuration/build-image.mdx index 9562cb7fe58140..54e197dbc17464 100644 --- a/src/content/docs/pages/configuration/build-image.mdx +++ b/src/content/docs/pages/configuration/build-image.mdx @@ -49,7 +49,7 @@ When your build starts, if not already [cached](/pages/configuration/build-cachi ## Advanced Settings -### Overriding default versions +### Override default versions To override default versions of languages and tools in the build system, you can either set the desired version through environment variables or by adding files to your project. From 4cc0f5611ba955d0c7e412967ab698de4bbbaf52 Mon Sep 17 00:00:00 2001 From: Anni Wang <54481763+aninibread@users.noreply.github.com> Date: Tue, 25 Feb 2025 13:29:08 -0500 Subject: [PATCH 5/9] Update src/content/docs/pages/configuration/build-image.mdx Co-authored-by: ToriLindsay --- src/content/docs/pages/configuration/build-image.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/pages/configuration/build-image.mdx b/src/content/docs/pages/configuration/build-image.mdx index 54e197dbc17464..58fc571a5a1773 100644 --- a/src/content/docs/pages/configuration/build-image.mdx +++ b/src/content/docs/pages/configuration/build-image.mdx @@ -67,7 +67,7 @@ For example, if you were previously relying on the default version of Node.js in ### Skip dependency install -You can add the following **environment variable** to disable automatic dependency installation, and run a custom install command instead. +You can add the following environment variable to disable automatic dependency installation, and run a custom install command instead. | Build variable | Value | | ------------------------- | ------------- | From 5cf3ae9bad2c1b31325162d97dc1415ec4c7f7df Mon Sep 17 00:00:00 2001 From: Anni Wang <54481763+aninibread@users.noreply.github.com> Date: Tue, 25 Feb 2025 13:29:22 -0500 Subject: [PATCH 6/9] Update src/content/docs/workers/ci-cd/builds/build-image.mdx Co-authored-by: ToriLindsay --- src/content/docs/workers/ci-cd/builds/build-image.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/workers/ci-cd/builds/build-image.mdx b/src/content/docs/workers/ci-cd/builds/build-image.mdx index 653d91c46b6f44..63073cf629befe 100644 --- a/src/content/docs/workers/ci-cd/builds/build-image.mdx +++ b/src/content/docs/workers/ci-cd/builds/build-image.mdx @@ -8,7 +8,7 @@ sidebar: Workers Builds uses a build image with support for a variety of languages and tools such as Node.js, Python, PHP, Ruby, and Go. -## Supported tooling +## Supported Tooling Workers Builds supports a variety of runtimes, languages, and tools. Builds will use the default versions listed below unless a custom version is detected or specified. You can [override the default versions](/workers/ci-cd/builds/build-image/#overriding-default-versions) using environment variables or version files. All versions are available for override. From 71826a9f76c543f12427be7aee7266bf61d4da8a Mon Sep 17 00:00:00 2001 From: Anni Wang <54481763+aninibread@users.noreply.github.com> Date: Tue, 25 Feb 2025 13:29:31 -0500 Subject: [PATCH 7/9] Update src/content/docs/workers/ci-cd/builds/build-image.mdx Co-authored-by: ToriLindsay --- src/content/docs/workers/ci-cd/builds/build-image.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/workers/ci-cd/builds/build-image.mdx b/src/content/docs/workers/ci-cd/builds/build-image.mdx index 63073cf629befe..0393f3c18b68f5 100644 --- a/src/content/docs/workers/ci-cd/builds/build-image.mdx +++ b/src/content/docs/workers/ci-cd/builds/build-image.mdx @@ -58,7 +58,7 @@ Or, to set the version by adding a file to your project, you can: ### Skip dependency install -You can add the following **build variable** to disable automatic dependency installation, and run a custom install command instead. +You can add the following build variable to disable automatic dependency installation and run a custom install command instead. | Build variable | Value | | ------------------------- | ------------- | From c3126594205752fd8e8b82f7142dd96463459964 Mon Sep 17 00:00:00 2001 From: Anni Wang Date: Wed, 26 Feb 2025 11:20:47 -0500 Subject: [PATCH 8/9] add pages changelog --- src/content/release-notes/pages.yaml | 4 ++++ src/content/release-notes/workers.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/content/release-notes/pages.yaml b/src/content/release-notes/pages.yaml index b64f05878f233d..ba8c0501c03d3b 100644 --- a/src/content/release-notes/pages.yaml +++ b/src/content/release-notes/pages.yaml @@ -5,6 +5,10 @@ productLink: "/pages/" productArea: Developer platform productAreaLink: /workers/platform/changelog/platform/ entries: + - publish_date: "2025-02-24" + title: Support for pnpm 10 in build system + description: |- + - Pages build system now supports building projects that use **pnpm 10** as the package manager. If your build previously failed due to this unsupported version, retry your build. No config changes needed. - publish_date: "2024-12-19" title: Cloudflare GitHub App Permissions Update description: |- diff --git a/src/content/release-notes/workers.yaml b/src/content/release-notes/workers.yaml index edde647953bc45..5ff0d9965eae39 100644 --- a/src/content/release-notes/workers.yaml +++ b/src/content/release-notes/workers.yaml @@ -7,7 +7,7 @@ productAreaLink: /workers/platform/changelog/platform/ entries: - publish_date: "2025-02-24" description: |- - - [Workers Builds](/workers/ci-cd/builds/) now supports building projects that use **pnpm 10** as their package manager. If your build previously failed due to this unsupported version, retry your build. No config changes needed. + - [Workers Builds](/workers/ci-cd/builds/) now supports building projects that use **pnpm 10** as the package manager. If your build previously failed due to this unsupported version, retry your build. No config changes needed. - publish_date: "2025-02-13" description: |- - [Smart Placement](/workers/configuration/smart-placement/) no longer runs Workers in the same location as D1 databases they are bound to. The same [placement logic](/workers/configuration/smart-placement/#understand-how-smart-placement-works) now applies to all Workers that use Smart Placement, regardless of whether they use D1 bindings. From af2b4a827d36e892ad08ad5a3559672ec14ddd5c Mon Sep 17 00:00:00 2001 From: Anni Wang Date: Wed, 26 Feb 2025 11:24:21 -0500 Subject: [PATCH 9/9] update dates --- src/content/release-notes/pages.yaml | 2 +- src/content/release-notes/workers.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/release-notes/pages.yaml b/src/content/release-notes/pages.yaml index ba8c0501c03d3b..aa500c6fcfb04e 100644 --- a/src/content/release-notes/pages.yaml +++ b/src/content/release-notes/pages.yaml @@ -5,7 +5,7 @@ productLink: "/pages/" productArea: Developer platform productAreaLink: /workers/platform/changelog/platform/ entries: - - publish_date: "2025-02-24" + - publish_date: "2025-02-26" title: Support for pnpm 10 in build system description: |- - Pages build system now supports building projects that use **pnpm 10** as the package manager. If your build previously failed due to this unsupported version, retry your build. No config changes needed. diff --git a/src/content/release-notes/workers.yaml b/src/content/release-notes/workers.yaml index 5ff0d9965eae39..f65069fccb06cd 100644 --- a/src/content/release-notes/workers.yaml +++ b/src/content/release-notes/workers.yaml @@ -5,7 +5,7 @@ productLink: "/workers/" productArea: Developer platform productAreaLink: /workers/platform/changelog/platform/ entries: - - publish_date: "2025-02-24" + - publish_date: "2025-02-26" description: |- - [Workers Builds](/workers/ci-cd/builds/) now supports building projects that use **pnpm 10** as the package manager. If your build previously failed due to this unsupported version, retry your build. No config changes needed. - publish_date: "2025-02-13"