Repository navigation
ci: build the PWA plugin in FIPS mode, to reproduce its empty precache - #13020
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
⚡️ Lighthouse report for the deploy preview of this PR
|
Workbox hashes the precached files with MD5. In FIPS mode, it doesn't fail the build: it only warns, and the service worker precaches nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d20956b to
72fdbb3
Compare
Motivation
Reproduces a bug of
@docusaurus/plugin-pwain FIPS mode (#10963), fixed by #13012 stacked on top. TheBuild FIPScheck of this PR is expected to fail.In FIPS mode, Node.js rejects MD5. The PWA plugin calls Workbox to list the files that the service worker precaches for offline mode, and Workbox hashes each file with MD5 (hardcoded, no option to change it: GoogleChrome/workbox#3366).
Workbox doesn't fail: it catches the error, returns it as a warning that the plugin ignores, and writes an empty list. The site builds successfully, but offline mode silently precaches nothing.
This PR adds the PWA plugin to the
Build FIPStest site, and a step checking that the builtsw.jsprecaches files. A successful build isn't enough to catch this bug.Test Plan
The new
Check the PWA precache manifeststep of theBuild FIPSworkflow should fail withThe service worker precaches no file.Test links
Deploy preview: https://deploy-preview-13020--docusaurus-2.netlify.app/
Related issues/PRs
🤖 Generated with Claude Code
Summary by CodeRabbit