Update frontend transitive dependencies - #137
Conversation
Add resolutions for browserslist (4.28.1 -> 4.28.9), nanoid (3.3.17 -> 3.3.18), decode-uri-component (0.2.2 -> 0.5.0), and @humanfs/node (0.16.7 -> 0.16.8) to pull in upstream fixes. decode-uri-component is ESM-only from 0.4.0 onward while its only consumer, query-string@7, is CommonJS. Vite/Rollup resolves the interop at bundle time and the production build succeeds, but the package no longer loads under a bare Node require().
There was a problem hiding this comment.
🟡 Changes recommended
It force-overrides decode-uri-component to an out-of-range, ESM-only version for a CommonJS consumer (query-string@7), which can break any unbundled Node/CommonJS usage paths.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the frontend’s dependency graph by adding Yarn resolutions in src/gprofiler/frontend/package.json and regenerating yarn.lock so several transitive dependencies resolve to newer patch versions.
Changes:
- Add
resolutionsoverrides forbrowserslist,nanoid,decode-uri-component, and@humanfs/node. - Update
yarn.lockto reflect the newly forced versions (including new@humanfs/typesdue to the@humanfs/*bump).
File summaries
| File | Description |
|---|---|
| src/gprofiler/frontend/package.json | Adds Yarn resolutions to force specific transitive dependency versions. |
| src/gprofiler/frontend/yarn.lock | Lockfile updates reflecting the forced dependency versions and resulting sub-dependency changes. |
Review details
- Files reviewed: 1/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: mlim19 <38572129+mlim19@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The PR description and the actual resolutions behavior/versions are currently inconsistent (notably around decode-uri-component and “patch-only” pinning), which needs to be reconciled before merging.
Review details
Suppressed comments (2)
Previously missed (1) — in code that hasn't changed since the last review.
src/gprofiler/frontend/package.json:22
- The PR description says these resolutions are intended to bump transitive deps to their latest patch versions, but using caret ranges (e.g.
^4.28.7,^3.3.18) can allow future minor releases on the next install, so the repo may drift beyond the intended patch pins. If the goal is to pin to the specific patch versions reflected inyarn.lock, use exact versions (or~ranges) here; otherwise, update the PR description to match the behavior.
This issue also appears on line 20 of the same file.
src/gprofiler/frontend/package.json:21
- The PR description (and its table) states
decode-uri-componentis being bumped to 0.5.0, but the actual resolution and lockfile still keep it at0.2.2(andquery-string@7.1.3depends on^0.2.2). Please update the PR description to avoid confusion about what’s changing and the ESM/CJS risk discussion.
"nanoid": "^3.3.18",
"decode-uri-component": "^0.2.2",
- Files reviewed: 1/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
Summary
Adds
resolutionsentries insrc/gprofiler/frontend/package.jsonto pull four transitive frontend dependencies up to their latest patch releases. All four are transitive — none are direct dependencies.browserslist^4.24.0(build toolchain)nanoid^3.3.16(postcss)decode-uri-component^0.2.2(query-string@7)@humanfs/node^0.16.6(eslint)Only
package.jsonandyarn.lockare touched — no source changes.Note on
decode-uri-componentThree of these are ordinary in-range patch bumps. This one is not, and is worth a look before merging:
query-string@7declares^0.2.2, i.e.<0.3.0. Moving to 0.5.0 pushes it two minors past what its consumer asks for.decode-uri-componentswitched to ESM-only at 0.4.0, whilequery-string@7is CommonJS. Under a bare Noderequire()the package now fails to load withERR_REQUIRE_ESM.Verification
yarn buildpasses (2561 modules transformed)yarn eslint --max-warnings=0cleandecode-uri-component@0.5.0spot-checked directly against howquery-stringcalls it: percent-encoded, UTF-8 multibyte, and malformed input (%E0%A4%A,%) all decode as beforeyarn installneeds--ignore-engineson Node 18, sincejs-cookie@3.0.7declaresnode >=20.