Repository navigation
Consolidate Learn dependencies and runtime updates - #3136
Conversation
✅ Deploy Preview for netdata-docusaurus ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Warning Review limit reachedYou'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 12 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (3)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
⛔ Files ignored due to path filters (7)
📒 Files selected for processing (34)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe pull request updates Node.js, npm, CI actions, and JavaScript and Python dependencies. It also updates Mermaid rendering behavior, vendor metadata, compatibility guidance, and related tests. ChangesRuntime and CI
JavaScript Dependencies and Rendering
Python Ingest Requirements
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Other
|
There was a problem hiding this comment.
1 issue found across 41 files
Confidence score: 4/5
src/components/Nedi/assets.jsloads Mermaid’s ~5.5 MB UMD bundle, which can add noticeable download and parse time for Ask Nedi users. Consider using a smaller build or loading the bundle only when needed.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/components/Nedi/assets.js">
<violation number="1" location="src/components/Nedi/assets.js:20">
P3: Ask Nedi now loads mermaid 12's main UMD bundle, which includes the Elk layout engine by default and is ~5.5 MB minified (unpkg shows `mermaid.min.js` at 5.49 MB in mermaid@12.1.0). Mermaid's own docs state that in v12 ELK is "bundled with `mermaid` and used by default", and the no-Elk build is the separate `@mermaid-js/tiny` package. Check with the Nedi embed owner whether the Elk layouts are actually needed for diagram answers; if not, pin `@mermaid-js/tiny` (or the site's existing mermaid 12 ESM bundle) instead of shipping a 5.5 MB script with a new SRI hash on this route.</violation>
</file>
Architecture diagram
sequenceDiagram
participant Dev as Developer
participant CI as GitHub Actions
participant Build as Netlify Build
participant Site as Docusaurus Site
participant Mermaid as Mermaid Renderer
participant Swagger as Swagger UI
participant Nedi as Nedi Chatbot
participant CDN as CDN (jsdelivr)
participant IndexNow as IndexNow Plugin
participant Gate as Site Build Gate
Note over Dev,CI: Consolidated dependency management
Dev->>Dev: Yarn Classic 1.22.22 resolves dependencies
Dev->>Dev: Node 22.23.3 + npm 10.9.9 pinned
CI->>CI: setup-node v7.1.0 with Node 22.23.3
CI->>CI: upload/download-artifact v7.0.2/v8.0.2
Build->>Build: Node 22.23.3 + npm 10.9.9 environment
Build->>Site: Build Docusaurus site
Site->>Mermaid: Render diagrams (v12.1.0)
Site->>Swagger: Serve API viewer (v5.33.1)
Site->>Nedi: Load chatbot assets
Note over Site,Mermaid: NEW: Theme-keyed wrapper
Site->>Mermaid: Pass colorMode as key
Mermaid->>Mermaid: Fresh render per theme
alt Theme change (light/dark)
Site->>Mermaid: Remount with new key
Mermaid-->>Site: Clean SVG render
end
Note over Nedi,CDN: Integrity-checked assets
Nedi->>CDN: Load markdown-it@15.0.2
Nedi->>CDN: Load mermaid@12.1.0
Nedi->>CDN: Load viz@3.31.0
CDN-->>Nedi: Verify integrity hashes
Note over Nedi: Requires ES2024 browsers (Safari 17.4+)
Note over Build,IndexNow: IndexNow contract
Build->>IndexNow: Execute deployment plugin
IndexNow->>IndexNow: Use @netlify/blobs@11.1.4
IndexNow->>IndexNow: Verify vendor checksums match Website
Note over Build,Gate: Static build validation
Build->>Gate: Run site build gate
Gate->>Gate: Verify entities@8.1.0, source-map-js@1.2.2
Gate->>Gate: Check package-lock.json hash
Note over CI: Test execution
CI->>CI: Vitest v5 with clearMocks: false
CI->>CI: Run 490 tests + 99 Node checks
CI->>CI: Pixelmatch 8 visual calibration
opt Test failure
CI->>CI: Report dependency impact
CI->>CI: Upload artifact for review
end
Note over Build,Site: Production deploy
Build-->>Site: Deploy to Netlify
Site-->>Dev: Accessible at production URL
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Learn's dependency updates were spread across overlapping PRs, so the declared packages, copied browser bundles and runtime pins could be reviewed or merged at different versions. This combines all supported updates into one tested change and includes newly available compatible updates.
What changes in production
Development tooling also moves to dotenv 18.0.7, Vitest/coverage 5.0.3 and Pixelmatch 8.0.0. The existing dotenv config API is retained; explicit
clearMocks: falsepreserves the prior test lifecycle. Pixelmatch changes its color-distance algorithm, but the existing visual thresholds and nine-page same-build calibration remain unchanged and pass. No documentation content, redirect/indexability policy, sidebar experiment or DCstat producer migration is included.Validation and limits
test:run: 494 Vitest tests pass with one existing skip, plus 99 Node checks. Isolated link tests, updated ingest dependency-policy tests and Swagger/vendor identity checks pass.Consolidation and delivery
Supersedes #3073, #3080, #3081, #3082, #3093, #3121, #3128, #3129, #3130, #3131, #3132, #3133 and #3135. Old history and branches remain available; final supported versions are resolved together under Yarn.
Ordinary upstream review is required. Deliver the corresponding Website IndexNow owner before this exact consumer. The separate sidebar experiment #3127 and producer migration #3126 stay outside this change. SEO SOW-0038 and Learn's dependency documentation retain measured qualification and follow-up holds.
Summary by cubic
Consolidates Learn's dependency updates into one tested change so declared packages, copied browser bundles, and runtime pins merge at matching versions. Replaces 13 overlapping PRs.
Aligns Node 22.23.3/npm 10.9.9 across Netlify, containers, and workflows, and refreshes security/build dependencies including js-yaml, Joi, SVGO, Mermaid 12.1.0, and Nedi's Markdown-it 15.0.2/Viz 3.31.0 assets. Upgrades Swagger UI to 5.33.1 with its checksum-verified distribution, imports the Website IndexNow Blob SDK 11.1.4 contract and the canonical site-build-gate (entities 8.1.0, source-map-js 1.2.2), and moves dev tooling to dotenv 18.0.7, Vitest 5.0.3, and Pixelmatch 8.0.0 with Playwright 1.64.0.
Behavior changes to check
clearMocks: falsepreserves the previous test lifecycle under the Vitest v5 default change.Written for commit e00761c. Summary will update on new commits.
Summary by CodeRabbit
Improvements
Documentation
Maintenance
Review follow-up
The follow-up changes documentation and tests only. Production wrapper, runtime configuration, locks and compiled site behavior remain unchanged from the qualified candidate.