-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AC-1743] pt. 3 ⮕ Remove unused packages #399
Conversation
Ignore @types/jest in depcheck
|
.depcheckrc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine to leave it here, it might be useful in the future. No harm if not.
@@ -151,7 +144,6 @@ | |||
"dependencies": { | |||
"@angular/animations": "15.2.9", | |||
"@angular/cdk": "15.2.9", | |||
"@angular/cli": "15.2.9", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fwiw, I don't think we've ever used the Angular CLI so I agree with removing this. (Imagine not handcrafting all your components! ha! but really there is some work required to align our repos with Angular CLI's expectations so it's not useful to us at the moment.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still lots here we can remove when we clean up old jslib code. But a good start 👏
{ | ||
loader: "sass-loader", | ||
options: { | ||
implementation: require("sass"), | ||
}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should replace line 99 given that we're specifying the full "sass-loader" config object rather than just the shorthand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Resolved on 329be7a
Meant to request changes to webpack.renderer.js
[AC-1743] pt. 3 ⮕ Remove unused packages
Type of change
🏁 Objective
As part of an initiative to audit dependencies across Directory Connector it makes sense to clean up a few unused packages from
package.json
.🚩 The Problem
Directory Connector has a handful of completely unused packages. Some seem outdated, and some don't really make sense as to why there were ever here at all. A node dependency check tool called
depcheck
reports the following unused dependencies onmain
when running its default commanddepcheck
:Some of these are not exactly unused, but many are. This PR will run through this list and make accommodations as necessary for each package: either removing the package or asking
depcheck
to ignore it and rerunning the report.🏃 The Solution
The following matrix outlines each listed package and the state it is in after these changes:
🙄 **Github formatted this weird.** Leaving it here for the commit message. See below comment for an easier to read version during PR review.
nodemon
is a hot-reload tool for node apps. It is unclear what this was ever used for in DC, but we don't need it.prebuild-install
is a cli tool used in npm scripts. It is not used by any of Directory Connector's scripts.tappable
is a utility package for writing webpack plugins. It is unused.ttypescript
is a custom transformer tool that is unused by the project.typemoq
is a testing tool that is unused by the project.jest-junit
is a jest reporter that at this time is not used by Directory Connecor. It has been removed.ts-node
is a typescript execution cli tool. It isn't used by any of Directory Connector's scripts or pipelines.sass-loader
requiressass
or another sass implementation to function, and recommends declaring which one in the config. I added an explicit declaration to our webpack config and this dependency was properly detected.google-auth-library
was listed as a missing dependency. It's bundled with other dependencies we use, but we also explicitly reference it. I added an explicit reference to this package inpackage.json
dotenv
was listed as a missing dependency. We explicitly reference it during notorization, but depend on its presence via other packages. I added an explicit reference to this package inpackage.json
depcheck
reports no issues. Some notes:.depcheckrc
file to ignore some packages with the tool. I don't know if we'll use this consistently, so I was conflicted on adding a configuration file for it. I still think it's useful to have around, but will remove this if there are concerns.depcheck
found references to them in the source code, but no reference inpackage.json
. We were importing these packages because they were already needed by other dependencies. In those cases I have added explicit references topackage.json
.sass
was explicitly added as our sass implementation forsass-loader
.⏭️ What's next?
Next up in this dependency upgrade effort I'll be:
Testing requirements
There are no specific testing requirements for this. QA will be doing a regression run of Directory Connector at the end of this effort.
Before you submit
npm run lint
) (required)