Skip to content

Phase 2: Expand reusedCode detection to federal npm and PyPI dependencies#126

Open
haseebmalik18 wants to merge 2 commits into
DSACMS:devfrom
haseebmalik18:DSACMS/haseeb/add-gov-dependencies
Open

Phase 2: Expand reusedCode detection to federal npm and PyPI dependencies#126
haseebmalik18 wants to merge 2 commits into
DSACMS:devfrom
haseebmalik18:DSACMS/haseeb/add-gov-dependencies

Conversation

@haseebmalik18

@haseebmalik18 haseebmalik18 commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Auto-fills code.json's reusedCode field with the federal dependencies detected in a repository's manifests. Phase 2 of #124.

Changes

  • Curated federal npm + PyPI package → agency mapping in src/gov-dependencies.data.ts.
  • Detects npm deps from package.json and PyPI deps from requirements.txt, each through its own lookup since PyPI normalizes names differently.
  • Exact package names map 1:1 to their own entry with the repository URL. Unlisted packages under a known org fall back to a scope-level entry so they still get picked up.
  • Refactor: agency constants and maps moved to src/gov-dependencies.data.ts. src/gov-dependencies.ts keeps the lookup logic only.

@haseebmalik18
haseebmalik18 force-pushed the DSACMS/haseeb/add-gov-dependencies branch from 944d244 to bc2a3b3 Compare July 15, 2026 15:55
@haseebmalik18 haseebmalik18 changed the title Dsacms/haseeb/add gov dependencies Phase 2: Expand reusedCode detection to federal npm and PyPI dependencies Jul 15, 2026
@haseebmalik18

Copy link
Copy Markdown
Collaborator Author

Not ready for review yet

@haseebmalik18
haseebmalik18 force-pushed the DSACMS/haseeb/add-gov-dependencies branch from bc2a3b3 to 4170e82 Compare July 16, 2026 15:08
@haseebmalik18
haseebmalik18 marked this pull request as ready for review July 16, 2026 15:35
@haseebmalik18

Copy link
Copy Markdown
Collaborator Author

@natalialuzuriaga Ready for review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant