Skip to content

NoTicket - Remove axios dependency - #48

Merged
juliomalves merged 6 commits into
mainfrom
remove-axios
May 5, 2026
Merged

NoTicket - Remove axios dependency#48
juliomalves merged 6 commits into
mainfrom
remove-axios

Conversation

@juliomalves

Copy link
Copy Markdown
Contributor

This PR replaces axios with the fetch API. This minimises future work updating the dependency, and reduces the risk of vulnerabilities.

lodash has also been removed from the dependencies as it's not used anywhere.

juliomalves and others added 3 commits May 5, 2026 14:30
@juliomalves juliomalves self-assigned this May 5, 2026
@juliomalves
juliomalves requested a review from Copilot May 5, 2026 13:39
@snyk-io-eu

snyk-io-eu Bot commented May 5, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copilot AI left a comment

Copy link
Copy Markdown

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 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(...) with fetch(...).json() in the app’s URL-loading path.
  • Update unit tests to stub global.fetch instead of proxyquiring axios.
  • Remove axios/lodash from dependencies and reflect dependency tree changes in package-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.

Comment thread app/app.js
Comment thread tests/unit/app/app.js Outdated
Comment thread tests/unit/app/app.js Outdated
@juliomalves
juliomalves requested review from a team, Macro80-20, joffyb and josephlalley1 and removed request for a team May 5, 2026 14:01

@Zsugi-itv Zsugi-itv left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice clean up, tests also pass. 👍🏻

@juliomalves
juliomalves merged commit 02a8d18 into main May 5, 2026
5 checks passed
@juliomalves
juliomalves deleted the remove-axios branch May 5, 2026 14:27
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.

4 participants