fix(deps): fix batch of missing production dependencies v2.0.0-rc.1 #3344
Labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
good-first-issue
Good for newcomers
good-first-issue-400-expert
Hacktoberfest
Hacktoberfest participants are welcome to take a stab at issues marked with this label.
P1
Priority 1: Highest
Milestone
High level scope for this issue
Make sure all the missing production dependencies are specified in the package.json as needed.
Description / Context
It turns out that the missing dependency check that we have in place does not work as well as it should because some edge cases are not covered.
Quoting the work that was done already:
https://github.com/petermetz/cacti/tree/ci-fix-check-missing-node-deps =>
missing dependencies that we have because it only verifies that the
imported dependency is present SOMEwhere in the package.json file, not that
it is specifically present in the production dependencies section which
leads to crashes and broken packages due to the API server not installing
dev dependencies when instantiating a plugin and therefore missing a few
of the dependencies that are otherwise very much needed at runtime in
production.
with babel and then double check the work of depcheck to make sure that
the dependencies that it marks as "no issues" are actually OK and have no
issues.
import type { Express } from "express";
because the import was there, but we did not actually need that dependency
in the production dependencies as long as ALL of the imports to it in the
given package were type imports. To robustly verify this being the case or not
we had to pull out the big guns and parse all the typescript code per package
to make sure that we've looked at every single import of the dependency in
question at every single code file of the package in question.
(add more description and relevant links)
Acceptance Criteria
The text was updated successfully, but these errors were encountered: