From a5edda967990c9d4ee9879fd0e8698336e38476c Mon Sep 17 00:00:00 2001 From: OM MISHRA <152969928+howwohmm@users.noreply.github.com> Date: Mon, 23 Mar 2026 17:04:28 +0530 Subject: [PATCH] feat(ui): flag git and https dependencies Add visual warning icon next to dependencies that use URL-based version specifiers (git:, https:, github:user/repo, etc.) instead of the npm registry. These bypass npm registry integrity checks and can be manipulated. - Add isUrlDependency() utility in shared/utils/version-source.ts - Detect all non-registry protocols: git:, git+https:, git+ssh:, http:, https:, file:, github:, gist:, bitbucket:, gitlab:, and user/repo shorthand - Show unlink icon with i18n tooltip in all dependency sections (dependencies, peer dependencies, optional dependencies) - Add unit tests with 100% coverage for the detection function Closes #1084 Co-Authored-By: Claude Opus 4.6 --- app/components/Package/Dependencies.vue | 76 +++++++++++++++---- i18n/locales/en.json | 1 + i18n/schema.json | 3 + shared/utils/version-source.ts | 21 +++++ test/unit/shared/utils/version-source.spec.ts | 76 +++++++++++++++++++ 5 files changed, 161 insertions(+), 16 deletions(-) create mode 100644 shared/utils/version-source.ts create mode 100644 test/unit/shared/utils/version-source.spec.ts diff --git a/app/components/Package/Dependencies.vue b/app/components/Package/Dependencies.vue index 7f3836214f..012ab45dfe 100644 --- a/app/components/Package/Dependencies.vue +++ b/app/components/Package/Dependencies.vue @@ -1,5 +1,6 @@