install-plugin-deps skips plugin npm deps when root has a version-specific override (e.g. Agent's ajv@^8)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, node.js
Research direction
Start with scripts/install-plugin-deps.js, especially the override name collection around line 85 and the dependency filter around line 96; compare those checks with the root package.json overrides and Agent’s dependencies.npm declaration described in the issue. Trace how the script decides whether to install a plugin dependency. Done means version-specific overrides no longer cause unrelated requested versions to be skipped, and skipped dependencies produce a warning.
Written by the indexing model from the issue text.
Description
Summary
scripts/install-plugin-deps.js silently skips a plugin's declared npm dependency whenever the root package.json has an override for any version of that package. Version-specific override keys such as "ajv@^6" are reduced to the bare name (key.split("@")[0]), so a plugin that declares "ajv": "^8.17.1" in plugin.json dependencies.npm never gets it installed.
scripts/install-plugin-deps.js#L85:rootOverriddenNames.add(key.split("@")[0] || key)scripts/install-plugin-deps.js#L96:if (rootOverriddenNames.has(name)) return false;package.json#L263-L264:"ajv@^6": "^6.14.0","ajv@^8": "^8.18.0"(security floors from #987)
Concrete impact
The MMGIS-Plugins Agent backend declares "ajv": "^8.17.1" and calls require("ajv"). Because of the skip above, that dependency is never installed, and Agent resolves the root node_modules/ajv, which is 6.15.0. It's only there because of build and lint tooling (eslint/@eslint/eslintrc, old schema-utils copies under webpack loaders, and the webpack bundled inside georaster/georaster-stack). Core MMGIS itself never imports ajv.
The major version changes behaviour. With Agent's exact options ({ allErrors: true, strict: false, coerceTypes: true, useDefaults: true }) and a { type: "string", format: "date-time" } property:
| ajv | { t: "not a date" } |
|---|---|
| 6.15.0 (what Agent gets today) | rejected |
| 8.20.0 (what Agent declares) | accepted: Ajv 8 has no built-in formats without ajv-formats |
So Agent's date-time validation works only by accident. Any change that moves ajv@8 to the top of node_modules (for example, eslint 9 flat config dropping @eslint/eslintrc) would disable it silently. This also led NASA-AMMOS/MMGIS-Plugins#13 to ship a plugin-local package.json/lockfile instead of using dependencies.npm.
Suggested fix
- In
install-plugin-deps.js, skip a plugin dependency only when an override applies to the version range it requests. One way: a bare-name override ("ajv") matches every request, and a versioned key ("ajv@^6") matches only when the requested range intersects it (semver.intersects). Or skip nothing and let npm apply the overrides. Note that scoped versioned keys ("@scope/pkg@^1") currently aren't reduced to a name at all. - Log a warning whenever a declared plugin dependency is skipped, instead of skipping silently.
- Separately, in MMGIS-Plugins: Agent should either add
ajv-formats(and declare it) or pin the ajv major it actually relies on.
- Dominant language
- JavaScript
- Stars
- 242
- Forks
- 86
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 15
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NASA-AMMOS/MMGIS
-
[Bug]: Draw template number fields reject valid decimals (e.g. 1.2 with step 0.1) due to floating-point step checkPossibly taken @Khan-Tzar claimed this 47 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
NASA-AMMOS/MMGIS#1129 ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
NASA-AMMOS/MMGIS#963 ·
Maintainers usually reply within 1 day
-
[New Feature]: Identifier — click a point to chart time-enabled layers over the time rangePossibly taken A pull request linked to this issue is open or already merged. Openenhancement
Difficulty 4/5 3-5 days Newbie friendliness 56/100
NASA-AMMOS/MMGIS#1159 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
NASA-AMMOS/MMGIS#1156 ·
Maintainers usually reply within 1 day
-
[Bug]: Adjacent servers in containers: in-container servers fail silently without a per-server .env, run unused under Docker, and the proxy target flips between Docker and PodmanPossibly taken @jl-0 claimed this 11 days ago. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 42/100
NASA-AMMOS/MMGIS#1138 ·
Maintainers usually reply within 1 day
All issues in NASA-AMMOS/MMGIS
Similar issues
-
01 type: bug 41 lvl: easy
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 2 days
-
accessibility bug dark-mode dashboards
Difficulty 1/5 Under an hour Newbie friendliness 84/100
quarto-dev/quarto-cli#15447 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
521xueweihan/HelloGitHub#4655 ·
-
[19.0] pos_sale: settling an order with a 0 down payment line crashes (reading 'reward_id') and leaves a wrong amount duePossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day