Skip to content

feat(nuxt): use druxt 0.25.0 and its server cache - #170

Merged
Decipher merged 6 commits into
developfrom
feature/druxt-0.25.0-dev
Oct 23, 2026
Merged

Decipher merged 6 commits into
developfrom
feature/druxt-0.25.0-dev

Conversation

@Decipher

@Decipher Decipher commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Moves the quickstart to Druxt 0.25.0 and sets it up to use the 0.25.0 server cache.

Changes

  • druxt-site at ^0.15.0, which brings every Druxt package at 0.25.0 with one top-level druxt. develop's lockfile had five copies of druxt across 0.22, 0.23 and 0.24.
  • druxt-auth at ^0.5.1, which admits the axios 0.34 that druxt 0.25.0 needs.
  • Drupal is installed with a page cache max-age of 60 seconds. At the default of 0, Drupal marks every response no-cache and the server cache keeps nothing.
  • CORS no longer sets supportsCredentials. With allowedOrigins: ['*'], credentials make every response Vary: Origin, which Druxt never caches. Sign-in uses OAuth bearer tokens, so nothing needs credentialed CORS.
  • druxt.schema.refresh, so a display changed in Drupal shows after a cache clear without a rebuild.
  • druxt.cache.secret from DRUXT_CACHE_SECRET, optional, for Drupal to clear the cache. README and .env.example cover it.
  • The Olivero layout wraps each region that has blocks in a div with the class Drupal's Olivero theme gives it, such as region--primary-menu. druxt 0.25.0 keeps a region's name out of the wrapper markup, so the end-to-end tests select these classes instead of div[blocks][name=...].

Checked

With Node 16.18.1 and npm 8.19.2, npm install gives one top-level druxt 0.25.0, druxt-site 0.15.0, druxt-auth 0.5.1 and axios 0.34.0, with no nested copy of druxt. npm run lint, test:unit, test:scripts, prettier, cspell, markdownlint and lint:private pass. The CI install and end-to-end jobs build and run it against Drupal.

On the 0.25.0 development release, with the same configuration, a repeat render didn't request the index or menus, POST /_druxt/cache/clear answered 401 for a wrong secret and 204 for the right one, and a renamed field label showed after a clear and not before.

Summary by CodeRabbit

  • New Features
    • Production builds now cache Drupal-powered menus and content for up to 60 seconds. The cache can be cleared through Drupal without rebuilding the site.
    • Olivero page regions now render with theme-compatible markup when their content is available.
  • Documentation
    • Added guidance on production caching, cache clearing, and development-mode behavior.
  • Bug Fixes
    • Updated page checks to target the rendered content and menu regions.

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 49 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 164960cf-8770-44e6-8da3-952ee54da5e5
📥 Commits

Reviewing files that changed from the base of the PR and between 8c1a327 and 5a14d8a.

📒 Files selected for processing: 1
  • README.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.24%. Comparing base (ccb7739) to head (5a14d8a).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #170   +/-   ##
========================================
  Coverage    90.24%   90.24%           
========================================
  Files           13       13           
  Lines         2132     2132           
  Branches       103      103           
========================================
  Hits          1924     1924           
  Misses         203      203           
  Partials         5        5           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

druxt-site ^0.15.0 brings the released druxt 0.25.0, which installs as a
single top-level druxt, so the Nuxt build resolves it again. druxt-auth
0.5.1 admits the axios 0.34 that druxt 0.25.0 needs. The CORS comment
now names the case that stops caching: credentials with the * origin.
@Decipher Decipher changed the title feat(nuxt): use the druxt 0.25.0 development release and its server cache feat(nuxt): use druxt 0.25.0 and its server cache Oct 23, 2026
druxt 0.25.0 keeps module data such as a region's name out of the
wrapper markup, so the end-to-end tests no longer found
div[blocks][name=...]. The Olivero layout now wraps each region that
has blocks in a div with the class Drupal's Olivero theme gives it,
such as region--primary-menu, and the tests select those.
@Decipher
Decipher marked this pull request as ready for review October 23, 2026 06:16
The installers set Drupal's page cache max-age to 60, but a site
installed before keeps its old value, 0 by default, and the server
cache keeps nothing. The caching section gives the two drush commands
that set it.
@Decipher
Decipher merged commit 677a0c1 into develop Oct 23, 2026
17 checks passed
@Decipher
Decipher deleted the feature/druxt-0.25.0-dev branch October 23, 2026 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant