Skip to content

XS⚠️ ◾ Replace Dependency Packages#781

Merged
muiriswoulfe merged 3 commits intomainfrom
chore/dependency-replacements
Apr 10, 2026
Merged

XS⚠️ ◾ Replace Dependency Packages#781
muiriswoulfe merged 3 commits intomainfrom
chore/dependency-replacements

Conversation

@muiriswoulfe
Copy link
Copy Markdown
Member

@muiriswoulfe muiriswoulfe commented Apr 10, 2026

Summary

  • Replace glob dev dependency with Node's built-in fs.globSync(): Removes the glob package (v13.0.6) from devDependencies and uses fs.globSync() with cwd option in the test file resources.resjson.spec.ts. Results are mapped to absolute paths to match the prior behaviour.
  • Replace octokit umbrella with @octokit/rest + @octokit/request-error: Replaces the heavy octokit umbrella package (which pulls in GraphQL, webhooks, OAuth, GitHub App auth, retry, and throttling) with the two specific packages actually used: @octokit/rest (v22.0.1) for REST API calls and @octokit/request-error (v7.1.0) for error handling. Updates all 14 source and test files that imported from "octokit".

@muiriswoulfe
Copy link
Copy Markdown
Member Author

muiriswoulfe commented Apr 10, 2026

PR Metrics

Thanks for keeping your pull request small.
⚠️ Consider adding additional tests.

Lines
Product Code 18
Test Code 6
Subtotal 24
Ignored Code 44
Total 68

Metrics computed by PR Metrics. Add it to your Azure DevOps and GitHub PRs!

@muiriswoulfe muiriswoulfe changed the title Replace Dependency Packages XS⚠️ ◾ Replace Dependency Packages Apr 10, 2026
@muiriswoulfe
Copy link
Copy Markdown
Member Author

Super-linter summary

Language Validation result
BIOME_LINT Pass ✅
CHECKOV Pass ✅
EDITORCONFIG Pass ✅
GITHUB_ACTIONS Pass ✅
GITHUB_ACTIONS_ZIZMOR Pass ✅
GITLEAKS Pass ✅
GIT_MERGE_CONFLICT_MARKERS Pass ✅
JSCPD Pass ✅
JSON_PRETTIER Pass ✅
MARKDOWN Pass ✅
MARKDOWN_PRETTIER Pass ✅
NATURAL_LANGUAGE Pass ✅
POWERSHELL Pass ✅
PRE_COMMIT Pass ✅
SPELL_CODESPELL Pass ✅
TRIVY Pass ✅
TYPESCRIPT_PRETTIER Pass ✅
XML Pass ✅
YAML Pass ✅
YAML_PRETTIER Pass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces dependency footprint in the PR Metrics repo by replacing third-party packages with narrower or built-in alternatives (glob/file discovery in tests; Octokit client/error types in source and tests).

Changes:

  • Replaced glob usage in resources.resjson.spec.ts with Node’s fs.globSync() and removed glob from devDependencies.
  • Replaced the octokit umbrella dependency with @octokit/rest and @octokit/request-error, updating imports across wrappers, repos invokers, and tests.
  • Updated lockfile to reflect removed/transitive packages.

Reviewed changes

Copilot reviewed 16 out of 18 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/task/tests/testUtilities/createRequestError.ts Switches RequestError import to @octokit/request-error.
src/task/tests/Strings/resources.resjson.spec.ts Uses fs.globSync() instead of globSync() for TS file discovery.
src/task/tests/repos/gitHubReposInvoker.spec.ts Updates RequestError type import to @octokit/request-error.
src/task/src/wrappers/octokitWrapper.ts Swaps Octokit client import to @octokit/rest while continuing to call REST endpoints via octokit.rest.*.
src/task/src/wrappers/octokitInterfaces/updatePullResponse.ts Updates Octokit import source for response typing.
src/task/src/wrappers/octokitInterfaces/updateIssueCommentResponse.ts Updates Octokit import source for response typing.
src/task/src/wrappers/octokitInterfaces/listCommitsResponse.ts Updates Octokit import source for response typing.
src/task/src/wrappers/octokitInterfaces/getReviewCommentsResponse.ts Updates Octokit import source for response typing.
src/task/src/wrappers/octokitInterfaces/getPullResponse.ts Updates Octokit import source for response typing.
src/task/src/wrappers/octokitInterfaces/getIssueCommentsResponse.ts Updates Octokit import source for response typing.
src/task/src/wrappers/octokitInterfaces/deleteReviewCommentResponse.ts Updates Octokit import source for response typing.
src/task/src/wrappers/octokitInterfaces/createReviewCommentResponse.ts Updates Octokit import source for response typing.
src/task/src/wrappers/octokitInterfaces/createIssueCommentResponse.ts Updates Octokit import source for response typing.
src/task/src/repos/gitHubReposInvoker.ts Switches RequestError import to @octokit/request-error for runtime instanceof handling.
package.json Removes octokit and glob; adds @octokit/rest and @octokit/request-error.
package-lock.json Lockfile updates reflecting dependency replacements/removals.

@muiriswoulfe
Copy link
Copy Markdown
Member Author

Super-linter summary

Language Validation result
BIOME_LINT Pass ✅
CHECKOV Pass ✅
EDITORCONFIG Pass ✅
GITHUB_ACTIONS Pass ✅
GITHUB_ACTIONS_ZIZMOR Pass ✅
GITLEAKS Pass ✅
GIT_MERGE_CONFLICT_MARKERS Pass ✅
JSCPD Pass ✅
JSON_PRETTIER Pass ✅
MARKDOWN Pass ✅
MARKDOWN_PRETTIER Pass ✅
NATURAL_LANGUAGE Pass ✅
POWERSHELL Pass ✅
PRE_COMMIT Pass ✅
SPELL_CODESPELL Pass ✅
TRIVY Pass ✅
TYPESCRIPT_PRETTIER Pass ✅
XML Pass ✅
YAML Pass ✅
YAML_PRETTIER Pass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

@muiriswoulfe
Copy link
Copy Markdown
Member Author

Super-linter summary

Language Validation result
BIOME_LINT Pass ✅
CHECKOV Pass ✅
EDITORCONFIG Pass ✅
GITHUB_ACTIONS Pass ✅
GITHUB_ACTIONS_ZIZMOR Pass ✅
GITLEAKS Pass ✅
GIT_MERGE_CONFLICT_MARKERS Pass ✅
JSCPD Pass ✅
JSON_PRETTIER Pass ✅
MARKDOWN Pass ✅
MARKDOWN_PRETTIER Pass ✅
NATURAL_LANGUAGE Pass ✅
POWERSHELL Pass ✅
PRE_COMMIT Pass ✅
SPELL_CODESPELL Pass ✅
TRIVY Pass ✅
TYPESCRIPT_PRETTIER Pass ✅
XML Pass ✅
YAML Pass ✅
YAML_PRETTIER Pass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

@muiriswoulfe muiriswoulfe self-assigned this Apr 10, 2026
@muiriswoulfe muiriswoulfe added enhancement New feature or request dependencies Updates to dependencies labels Apr 10, 2026
@muiriswoulfe muiriswoulfe enabled auto-merge (squash) April 10, 2026 10:45
@muiriswoulfe muiriswoulfe merged commit 07c34f9 into main Apr 10, 2026
35 checks passed
@muiriswoulfe muiriswoulfe deleted the chore/dependency-replacements branch April 10, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Updates to dependencies enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants