Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Updated axios min version and moved it to peer dependency #112

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rililive
Copy link

The gitignore is just a common boilerplate for JS projects. Moving axios to a peerDependency also allows consumers to keep it up to date. There was a recent, critical vulnerability discovered in the previous version, so this update resolve any security concerns.

Axios also has a default export that acts as a singleton, so having multiple versions installed can create bugs that are hard to track down. The peer dependency usage makes this easier to prevent by having one version and only one singleton that defaults get applied to.

@hungdev
Copy link
Owner

hungdev commented May 17, 2022

@rililive please remove package-lock.json

@rililive
Copy link
Author

I can remove the package-lock if you like, but best practice is to commit it in git. It keeps versions consistent so that all consumers get the same versions.

@rililive
Copy link
Author

For example npm ci uses the package-lock in ci/cd workflows to ensure versions are consistent with your local/testing environment

@rililive
Copy link
Author

rililive commented May 17, 2022 via email

@hungdev
Copy link
Owner

hungdev commented May 18, 2022

Hi @rililive
I don't think we should put it in lib, because when you install it, lib can use existing axios in your app, and then we don't care about consistent versioning. Besides it is a special case, some people use yarn instead of npm.

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.

None yet

2 participants