Prune verified dead code and unused dependencies - #625
Open
fpigeonjr wants to merge 2 commits into
Open
Conversation
Removes dead build tooling and unused dependencies left over from the pre-2018 webpack/karma pipeline, now superseded by the Angular CLI / Karma harness in test-app. - Root package.json: drop 41 unused deps (@angular-devkit/schematics plus 40 devDeps for webpack, loaders, old karma, typedoc, etc.) that depcheck and knip confirm are unreferenced by any working script. - Root angular.json: remove dead build/serve/extract-i18n/test architect targets — they point at files that no longer exist (src/main.ts, src/test.ts, karma.conf.js, etc.) and the underlying builder package isn't even installed. The working lint target is unchanged. - Delete mock-test.js, an unreferenced 2018 BSP workaround (process.exit() only). - test-app/package.json: drop @angular/language-service and karma-cli, confirmed unused by depcheck and by a clean reinstall + full test/build/lint run. Verified with npm run validate:publish that the frozen consumer deep-import contract (src/formly, src/ui-kit/**) is unaffected, and that build + all 667 executed specs remain green in test-app after the prune. Closes #572
There was a problem hiding this comment.
Pull request overview
Prunes obsolete root build/test tooling while preserving the active test-app harness and publication contract.
Changes:
- Removes legacy Angular architect targets and unused dependencies.
- Deletes the obsolete BSP test workaround.
- Regenerates both dependency lockfiles.
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
angular.json |
Removes inactive root build, serve, i18n, and test targets. |
package.json |
Removes legacy tooling dependencies. |
package-lock.json |
Updates the root dependency resolution. |
mock-test.js |
Deletes the obsolete test workaround. |
test-app/package.json |
Removes two unused development dependencies. |
test-app/package-lock.json |
Updates test-app dependency resolution. |
Files not reviewed (1)
- test-app/package-lock.json: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- tsconfig.json: remove the now-dangling 'webpack' entry from compilerOptions.types (its @types/webpack devDependency was already removed in the previous commit; leaving it would surface TS2688 on any tool that loads this root config after a clean install). - Delete typedoc.json and typedoc.md: no script references the typedoc command anymore since its devDependency was removed, and the docs described an unsupported workflow. No replacement command is currently exposed, per the PR's dead-code pruning scope.
fpigeonjr
marked this pull request as ready for review
August 26, 2026 20:06
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.
Description
Prunes verified dead code and unused dependencies left over from the pre-2018 webpack/karma build pipeline, now fully superseded by the Angular CLI / Karma harness in
test-app. Run solo/last in the pipeline wave per the parent epic, since it touches bothpackage.jsonroots andangular.jsonbroadly.package.json: removed 41 unused dependencies (@angular-devkit/schematicsplus 40 devDependencies for webpack, loaders, the old karma stack, and typedoc). Confirmed unreferenced by any working script viadepcheckandknip, cross-checked manually against every script/config in the repo.angular.json: removed the deadbuild/serve/extract-i18n/testarchitect targets. They pointed at files that no longer exist (src/main.ts,src/test.ts,karma.conf.js, etc.), and the underlying builder package (@angular-devkit/build-angular) isn't even installed at the root. The workinglinttarget (used by CI) is unchanged.mock-test.js: deleted — an unreferenced 2018 BSP workaround (process.exit()only, no script invokes it).test-app/package.json: removed@angular/language-serviceandkarma-cli. Both confirmed unused bydepcheck; also verified with a clean reinstall (rm -rf node_modules && npm install) followed by a fulltest/build/lintrun to rule out any tooling-implicit usage.No component or spec source files under
src/were removed.knip's "unused exports/files" report for the library source is largely false positives in this raw-source, barrel-export publishing model — the frozenconsumer-deep-imports.jsonpaths must stay reachable even though nothing inside this repo imports them directly, and static analysis can't safely distinguish "genuinely dead" from "part of the public surface" here. Source-level pruning is left as a judgment call for a dedicated follow-up rather than risking the frozen deep-import contract.Motivation and Context
Closes #572
Type of Change (Select One and Apply Label)
bugfixlabelenhancementlabelbreakinglabelmaintenancelabelHow to Test
npm installat repo root, thennpm --prefix test-app install— both should complete cleanly with the pruned dependency sets.npm run format:check— passes (0 errors; pre-existing warn-only Prettier backlog is unchanged frommaster).npm run lint— passes (0 errors, 1631 warnings, unchanged frommaster).npm run validate:publish— confirms the frozen deep-import contract: 741 packed files, 637 trackedsrc/ui-kitfiles,src/formly/index.ts, and all 67 consumer deep imports across 3 repos still resolve.cd test-app && npm run build— succeeds.cd test-app && npm test— 667/667 executed specs pass (37 skipped, same as pre-change baseline).cd test-app && npm run test:e2e— Playwright smoke test passes.Expected result: All commands above complete with no new failures, and dependency counts in both
package.jsonfiles are reduced with no change in test/lint/build outcomes.Screenshots (if appropriate)
N/A — backend/tooling changes only.
Checklist
IAEMOD-61187/feat-slug, per this repo's Jira-tracked epic IAEMOD-61187)format:checkpasses (npm run format:check)lintpasses (npm run lint)buildpasses (cd test-app && npm run build)cd test-app && npm test)