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

chore: bump axios to 1.x [PHX-2741] #1892

Merged
merged 4 commits into from
Aug 1, 2023
Merged

Conversation

marcolink
Copy link
Member

@marcolink marcolink commented Jul 19, 2023

Summary

Bump contentful-sdk-core to the latest major version which also pulls in axios@1.4.0

Description

Bump contentful-sdk-core to the latest major version which also pulls in axios@1.4.0.
This requires some adjustment in the codebase:

Headers shape

The old shape of AxiosRequestHeaders is now represented by RawAxiosRequestHeaders.

Remove webpack plugin

After updating the dependencies, one of the build steps threw an error. This was caused by the babel plugin babel-minify-webpack-plugin which we used to minify the bundles. We still minify through loader options.

Motivation and Context

axios@1.x is now released for ~10 months and stable. To ensure we can receive updates for all our dependencies, we have to eventually update to the latest major.

Checklist (check all before merging)

  • Both unit and integration tests are passing
  • There are no breaking changes

@marcolink marcolink marked this pull request as ready for review July 19, 2023 16:11
@marcolink marcolink requested a review from a team as a code owner July 19, 2023 16:11
@andipaetzold
Copy link
Contributor

Should this be a breaking change of CMA.js?

@marcolink
Copy link
Member Author

@andipaetzold

Should this be a breaking change of CMA.js?

The main change (header type) is NOT changing the type of the publicly exposed API
I also tested this PR against the Web App - no type violations detected.

The other props exposed by our underlaying library don't seem to introduce a breaking change.

Any other touch points we should check beforehand?

@mayakarabula mayakarabula merged commit 03c9f40 into master Aug 1, 2023
2 checks passed
@mayakarabula mayakarabula deleted the chore/bump-axios-1.x branch August 1, 2023 13:37
@contentful-automation
Copy link
Contributor

🎉 This PR is included in version 10.40.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@luizfonseca
Copy link
Member

luizfonseca commented Oct 12, 2023

2 cents: this should've been a breaking change as @andipaetzold mentioned -- more so because of how this plays with peer deps and the fact that contentful-sdk-core has a different version now (might break other systems from building artifacts): https://github.com/contentful/contentful-sdk-core/blob/b014b841c0c09613a1847a6b34282224bc0e16dc/package.json#L70

(dependabot went ahead with a major update as well #1993)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants