NoTicket - Remove axios dependency#48
Merged
Merged
Conversation
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
Pull request overview
This PR removes the axios (and unused lodash) dependency by switching HTTP retrieval of Pact files in Application to the native fetch API, and updates related unit tests and lockfile contents.
Changes:
- Replace
axios.get(...)withfetch(...).json()in the app’s URL-loading path. - Update unit tests to stub
global.fetchinstead of proxyquiringaxios. - Remove
axios/lodashfrom dependencies and reflect dependency tree changes inpackage-lock.json.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| app/app.js | Switches remote Pact retrieval from axios to fetch. |
| tests/unit/app/app.js | Updates unit tests to stub global.fetch instead of stubbing axios. |
| package.json | Removes axios/lodash and bumps package version. |
| package-lock.json | Removes axios/lodash transitive entries; lockfile updated for dependency tree. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <copilot@github.com>
…thod Co-authored-by: Copilot <copilot@github.com>
websterchris
approved these changes
May 5, 2026
Zsugi-itv
approved these changes
May 5, 2026
Zsugi-itv
left a comment
There was a problem hiding this comment.
Nice clean up, tests also pass. 👍🏻
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.
This PR replaces
axioswith the fetch API. This minimises future work updating the dependency, and reduces the risk of vulnerabilities.lodashhas also been removed from the dependencies as it's not used anywhere.