Repository navigation
fix(config-ui): remove unused @ahooksjs/use-url-state - #9311
Merged
Merged
Conversation
The last useUrlState call was replaced by react-router's useLocation in apache#7841, but the dependency stayed in package.json. Through query-string@6 it pulls in decode-uri-component 0.2.2, which is affected by GHSA-vcc3-ghjq-m6fr and GHSA-qr28-fpjm-wq7f (denial of service on malformed percent-encoded input). Fixed versions (>= 0.5.1) are ESM-only and cannot be used by query-string@6. Removing the dependency drops query-string, decode-uri-component, filter-obj, split-on-first and strict-uri-encode from yarn.lock. The vite build output is byte-identical before and after. Signed-off-by: DoDiODev <DoDiDev@proton.me> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
klesh
approved these changes
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
config-ui/package.jsonstill lists@ahooksjs/use-url-state, but nothingimports it any more. The last
useUrlStatecall was replaced byreact-router's
useLocationin #7841 (Aug 2024).The package is not just dead weight. It pulls in
decode-uri-component0.2.2 through
query-string@6:That version is affected by two advisories:
Both describe denial of service on malformed percent-encoded input.
Because the code is never bundled, there is no actual exposure. Security
scanners still flag it, though. Dependabot cannot raise a fix for it
either: from 0.3.0 onwards
decode-uri-componentis ESM-only, whilequery-string@6loads it withrequire(). Aresolutionsoverride wouldtherefore break.
This PR removes the dependency (
yarn remove @ahooksjs/use-url-state).That also drops
query-string,decode-uri-component,filter-obj,split-on-firstandstrict-uri-encodefromyarn.lock.ahooksstays,because it is a direct dependency.
Does this close any open issues?
N/A
Screenshots
N/A (no UI change)
Other Information
vite buildoutput (dist/) is byte-identicalbefore and after this change.
config-ui:tsc,eslint .(0 errors),yarn buildand
yarn test(80/80) pass.PostgreSQL, config-ui, license header, Grafana check; 14/14 jobs green):
https://github.com/DoDiODev/devlake/actions/runs/41605205365