CWA 2.0 is in alpha: try it, build with it, give feedback. APIs can still change between releases; see Releases.
Introduction

Releases

The latest api-components-bundle, @cwa/nuxt and template releases, with their notes and upgrade steps from GitHub.

A CWA site is built from three parts, each released on its own:

  • api-components-bundle, the Symfony bundle, installed with Composer.
  • @cwa/nuxt, the Nuxt module, installed from npm.
  • The template (components-web-app), the project create-cwa generates. create-cwa has the same version as the template release it installs.

All three are in 2.0.0-alpha. Pre-releases can change behaviour or configuration between versions, so update the three together and follow the upgrade notes of every release you skip over.

The docs follow the development branches. They describe the bundle's main, the module's dev and the template's main, which can be ahead of the last release. A recent change carries a short marker such as Since bundle 2.0.0-alpha.16, with a link to its upgrade notes.

Latest releases

Each release's notes come straight from GitHub, including its upgrade notes. Template releases also say which bundle and module versions they move to.

API bundle

2.0.0-alpha.18

Breaking

  • RouteGenerator takes a ValidatorInterface (#433)
  • A page's uiComponent is stored as the full component name, CwaPage<Name>: a POST or PATCH sending the short name (PrimaryPageTemplate, as the admin's page modals do) stores and returns CwaPagePrimaryPageTemplate, so pages written through the API and through CwaFixtureBuilder agree and generate-fixtures reloads them unchanged. Layouts are unchanged. Upgrade step: run silverback:api-components:prefix-page-ui-components once to prefix pages already stored with the short name; it is safe to run again (#431)

Fixed

  • POST /_/routes/generate is a 422 with a path violation, and creates nothing, when the parent's path and the title slug together are longer than 255 characters; RouteGenerator::create() throws the same ValidationException for fixtures. PATCH /_/routes/{id} with cascadeChildPaths checks every descendant's new path before writing anything, so a rename that would push one over 255 characters is a 422 naming that descendant instead of a 500 after the route and part of the tree were already moved. A cascade to a path under the route's own path no longer recurses without end when an unrouted child page loops back to it (#433)
  • A value longer than its VARCHAR(255) column (a page's title or metaDescription, any reference, uiComponent, route path/name, component position pageDataProperty/pageDataClass, site config key, form formType, collection resourceIri, user username/emailAddress/newEmailAddress) is a 422 with a field violation instead of a 500 from MySQL or PostgreSQL (#430)
  • A PUT to a user resource updates only the fields it sends. API Platform's default standard_put (on 4.x and 5.x) built a new user from the body, so a PUT returned 200 after blanking the password hash and resetting roles, enabled and email verification, or failed with 422/500 when it sent no email address. The bundle sets standard_put: false on every Put of an AbstractUser resource (#429)
  • CwaFixtureBuilder creates the groups of components declared inside a nested() closure, with their positions, so a scaffold generated from a site with nested pages no longer reloads those pages emptied below their first component (#428)
Template

v2.0.0-alpha.28

Upgrade notes

  • Update api-components-bundle to 2.0.0-alpha.17 (composer update components-web-app/api-components-bundle, or copy api/composer.lock) and copy the migration Version20261012160000, which drops variant file info written before alpha.17 (api-components-bundle#421); each row is read again from its stored variant on the next render. Nothing to run by hand: the deploy's new API pod starts with an empty cache, and a Cloudflare site's deploy already purges everything. Locally, run bin/console silverback:api-components:purge-http-cache after migrating. c754732 55e6beb
  • Copy app/nuxt.config.ts's precompressBuildAssets helper and the module that calls it, and delete compressPublicAssets from its nitro block: /_nuxt assets are still precompressed, but files in public/ no longer are, so a large file there no longer adds minutes to every app build (#155). c9da319

Fixed

  • api-components-bundle 2.0.0-alpha.17: storing an imagine variant again replaces its file info, so _metadata.mediaObjects reports the variant actually stored (api-components-bundle#421). c754732
  • App builds no longer brotli-compress everything in public/: only /_nuxt assets are precompressed. A 178 MB PDF in public/ had made a downstream site's app build take ~7 minutes instead of about one (#155). c9da319
API bundle

2.0.0-alpha.17

Fixed

  • Storing an imagine variant again replaces its file info, so _metadata.mediaObjects reports the variant actually stored after a filter's format, quality or size changes. Variant rows written before this fix stay stale: delete them with DELETE FROM _acb_imagine_cached_file_metadata WHERE filter <> '';, then purge the HTTP cache, and each row is read again from its stored variant on the next render (#421, #422)
Template

v2.0.0-alpha.27

Upgrade notes

  • Copy helm/cwa/templates/image-variants-cronjob.yaml, the cronjobs.imageVariants block of helm/cwa/values.yaml and bin/devops/k8s.sh: the image variants job now generates in its own Kubernetes Jobs (#153). It runs on production by default again; set CWA_CI_IMAGE_VARIANTS_PRODUCTION="false" to turn it off, and delete a "true" you set for alpha.26. 1c4b9f6 d400d1e 27141f0

Changed

  • The image variants job generates in one-off Kubernetes Jobs with their own memory limit (CWA_CI_IMAGE_VARIANTS_MEMORY, default 1536Mi), repeating with --max-memory until nothing is missing, so it can no longer run the serving API pod out of memory (#153). 1c4b9f6
Template

v2.0.0-alpha.26

Upgrade notes

  • Update api-components-bundle to 2.0.0-alpha.16 (composer update components-web-app/api-components-bundle, or copy api/composer.lock). No migration, no config change. 30673ac
  • The image variants job is now opt-in on production (CWA_CI_IMAGE_VARIANTS_PRODUCTION="true"). Its first production run ran out of memory in the serving API pod and the site returned 503s (#153). Leave it off on a site with many or large images until it runs as its own Kubernetes Job. Copy bin/devops/k8s.sh, .gitlab-ci.yml and .github/workflows/production.yml. If alpha.25's job already failed on your site there's nothing to undo: missing variants are generated on their first read, as before. ab86132
  • Corrections to alpha.25's upgrade notes: don't run imagine:generate by hand in the API pod of a site with many or large images either (the same out-of-memory risk). And to delete the old variants, remove every file under the bucket's cache/ folder that doesn't end in .webp, which also covers stored names without an extension: gcloud storage ls "gs://<bucket>/cache/**" | grep -v '\.webp$' | gcloud storage rm -I. Do it after the alpha.25 deploy, whose purge makes pages render with the WebP variants (#153). ab86132

Changed

  • api-components-bundle 2.0.0-alpha.16: imagine:generate --limit and --max-memory stop a run with exit 3 while variants are still missing, so it can be re-run in fresh processes until done; --max-memory counts libvips's native memory (#153). 30673ac

Fixed

  • The image variants job reports an out-of-memory kill (exit 137) as such, instead of as a failed variant (#153). ab86132

The module's minimum bundle

Some @cwa/nuxt releases need a newer bundle. Use at least this bundle version with each module version:

@cwa/nuxtapi-components-bundleWhy
2.0.0-alpha.10 and later2.0.0-alpha.13Publishing sends "publishedAt": "now", which older bundles reject
2.0.0-alpha.92.0.0-alpha.11For the Invalid files report; everything else works with 2.0.0-alpha.9
2.0.0-alpha.82.0.0-alpha.9For the Public without a route toggle
2.0.0-alpha.4 – 2.0.0-alpha.72.0.0-alpha.8Live updates use the Mercure 1.0 protocol, which a 0.x hub rejects

The module's other requirements, such as its Nuxt version, are in Module Setup → Requirements.