Redesign dependency list, reducing dependencies where possible. #448
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.
Resolves #445
The
@ngrx/store-devtools
is being included in production code. Follow the design suggested here https://ngrx.io/guide/store-devtools/recipes/exclude . This design conditionally removes the devtools when building production (taking advantage of tree-shaking to do so). A customdevtools/instrument.ts
anddevtools/instrument.prod.ts
are provided to achieve this.The version should be something more like 2.0.3-rc.1.
Many of the dependencies are already being included. Remove the redundant dependencies, where possible. In some cases, the dependency is necessary to prevent an unwanted version from being pulled in. Remove all variable versioning and use explicit version numbers.
The
ng-inline-svg
is removed by other work and is now removed from the dependencies list. Thecss-element-queries
is removed by other work and is now removed from the dependencies list.There are problems where numerous versions of the same package are being included. This is a problem with how npm's package system is designed. Use the "overrides" section to prevent and intermix of versions. I only fixed the packages I noticed as there are quite a lot of packages (a ballpark of ~2000 dependencies).
The use of the "overrides" is also used to remove security issues. It turns out one of the dependencies is pulling in an angular 11.x dependency for
@angular/core
. This is the reason for some of the more serious security issues.Several of the polyfills are now removed.
The wysiwyg uses a lot of dependencies but is not removed.
The lighthouse dependencies remain in place because several of the scripts still use them. A redesign of the scripting process might make it possible to remove this (including moving the code into the Github workflows). Lighthouse also brings in
5 moderate severity vulnerabilities
due to thelatest-version
dependency (which is now overwritten).Protractor has a lot of dependencies, but it will not go away so long as we are using angular 12. This is being brought in through Angular 12 dependencies but is otherwise not explicitly defined in the dependency list.
The tslint/eslint dependencies can be reduced.
This is a large task and there is already another issue for solving this. Such changes are left alone and are expected to be resolved in the other issue.
The unit tests pass for me but I am unable to run the e2e tests due to problems with the chromium webdriver version that suddenly appeared.
I made attempts and replacing
karma-coverage-istanbul-reporter
withkarma-coverage
. Problems happened, so I backed off.Replacing
karma-coverage-istanbul-reporter
would allow for more dependency removals.The build statistics are now as follows: