fix(deps): make the npm overrides follow their direct dependency - #575
Merged
Conversation
Dependabot cannot update these packages. Its npm updater fails with: npm error code EOVERRIDE npm error Override for <pkg> conflicts with direct dependency The package is listed BOTH as a direct dependency and as a literal overrides entry pinned to the same range. Dependabot bumps the direct dependency and does not move the override, npm rejects the mismatched pair, and the update is abandoned -- so these packages can never be updated, security advisories included. npm's self-reference is the idiom for exactly this: $<name> tells the override to follow whatever the direct dependency resolves to, instead of a range that has to be kept in lockstep by hand. This repo already uses it (see the vue entry under @vue/test-utils). Transitive consumers still get pinned to one version -- the direct dependency's -- which is what the override was there to do. What changes is that the pin tracks the dependency instead of duplicating it. Verified in a clean container: bumping the direct dependency with the literal override reproduces the EOVERRIDE above; with the self-reference the same bump resolves.
Contributor
Quality Report — ConductionNL/keepiq @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-manifest | ✅ | ||||
| test-l10n | ✅ | ||||
| format | ✅ | ||||
| check-l10n-js | ✅ | ||||
| check-schema-l10n | ✅ | ||||
| composer | ✅ | ✅ 111/111 | |||
| npm | ✅ | ✅ 536/536 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| PHPUnit | ✅ | ||||
| Newman | ✅ | ||||
| Playwright | ⏭️ deferred — runs on the promotion into beta/main, not on a pull request into development | ||||
| Hydra gates | ✅ |
Quality workflow — 2026-08-31 16:11 UTC
Download the full PDF report from the workflow artifacts.
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.
Dependabot cannot update these packages. Its npm updater fails with:
The package is listed both as a direct dependency and as a literal
overridesentry pinned to the same range. Dependabot bumps the direct dependency, does not move the override, npm rejects the mismatched pair, and the update is abandoned — so these packages can never be updated, security advisories included.This is invisible unless you open the Dependabot check: every other check stays green, and
npm ciis unaffected because it replays the committed lockfile rather than re-resolving.The fix
npm's self-reference is the idiom for exactly this.
$<name>tells the override to follow whatever the direct dependency resolves to, instead of a range that has to be kept in lockstep by hand:"overrides": { - "@nextcloud/axios": "~2.5.2" + "@nextcloud/axios": "$@nextcloud/axios" }This repo already uses the idiom — see the
vueentry under@vue/test-utils.Transitive consumers still get pinned to a single version — the direct dependency's — which is what the override was there to do. What changes is that the pin tracks the dependency instead of duplicating it.
Verification
Measured in a clean
node:22-alpinecontainer, on this app's ownpackage.json:npm error code EOVERRIDE — Override for @nextcloud/axios@^2.6.0 conflicts with direct dependency$@nextcloud/axiosThe control reproduces Dependabot's error verbatim, so the check would still fail if the fix were wrong.
Part of a fleet sweep: 14 apps carried 22 such override/direct pairs.