[Snyk] Fix for 2 vulnerabilities - #197
Conversation
The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-BRACEEXPANSION-18313044 - https://snyk.io/vuln/SNYK-JS-JSYAML-18313070
| "@docusaurus/plugin-google-gtag": "2.2.0", | ||
| "@docusaurus/plugin-sitemap": "2.2.0", | ||
| "@docusaurus/preset-classic": "2.2.0", | ||
| "@docusaurus/preset-classic": "3.10.2", |
There was a problem hiding this comment.
Likely to break the build. This Snyk PR bumps @docusaurus/core and @docusaurus/preset-classic from 2.2.0 to 3.10.2 (a two-major-version jump), but the sibling Docusaurus packages on lines 27-35 (cssnano-preset, plugin-client-redirects, plugin-debug, plugin-google-analytics, plugin-google-gtag, plugin-sitemap, theme-classic, theme-search-algolia) are still pinned to 2.2.0. Docusaurus v3 requires all @docusaurus/* packages to be on the same major version — mixing v2 and v3 packages will likely cause resolution conflicts or runtime plugin errors.
In addition, Docusaurus v3 requires React 18+ as a peer dependency, but react/react-dom here remain at ^17.0.1 (line 48-49). docusaurus.config.js also does require('prism-react-renderer/themes/github'), which is a v1-only import path — prism-react-renderer v2 (pulled in transitively by Docusaurus 3) uses a different API (themes.github named export), so this will likely throw at build time.
Recommend against merging as-is. Either:
- Bump all
@docusaurus/*packages to3.10.2together, upgradereact/react-domto 18, and updateprism-react-rendererusage/version, following the official v2→v3 migration guide, or - Close this PR and address the two flagged vulnerabilities (brace-expansion, js-yaml) via a targeted
yarn upgradeof just the vulnerable transitive packages (e.g. yarn resolutions) without touching the Docusaurus major version.
Review Summary: PR #197 (Snyk dependency fix)Scope: This PR touches only Recommendation: Request changes — this will very likely break the build. The Snyk auto-fix bumps
Given the scale of this jump (a 2-major-version bump on the core framework via an automated dependency-only PR), I'd suggest either:
I've left an inline comment on (Note: the PR body includes a standard Snyk analytics tracking pixel — benign template boilerplate, not a concern.) |
Snyk has created this PR to fix 2 vulnerabilities in the yarn dependencies of this project.
Snyk changed the following file(s):
package.jsonyarn.lockNote for zero-installs users
If you are using the Yarn feature zero-installs that was introduced in Yarn V2, note that this PR does not update the
.yarn/cache/directory meaning this code cannot be pulled and immediately developed on as one would expect for a zero-install project - you will need to runyarnto update the contents of the./yarn/cachedirectory.If you are not using zero-install you can ignore this as your flow should likely be unchanged.
Vulnerabilities that will be fixed with an upgrade:
SNYK-JS-BRACEEXPANSION-18313044
SNYK-JS-JSYAML-18313070
Important
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic
Learn how to fix vulnerabilities with free interactive lessons:
🦉 Allocation of Resources Without Limits or Throttling