fix: decouple axios version from core SDK#232
Merged
rossiam merged 1 commit intoSmartThingsCommunity:mainfrom Jan 12, 2024
Merged
fix: decouple axios version from core SDK#232rossiam merged 1 commit intoSmartThingsCommunity:mainfrom
rossiam merged 1 commit intoSmartThingsCommunity:mainfrom
Conversation
🦋 Changeset detectedLatest commit: d60610c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Sitlintac
approved these changes
Jan 11, 2024
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.
Updated core SDK to decouple it from the axios version it uses. Dependents are now free to use whatever version of axios (or none if another request module is desired).
The old
Authorizationinterface had two methods,authenticateandauthenticateGeneric. Theauthenticatemethod was tied to axios so it was removed. TheauthenticateGenericmethod was then renamed toauthenticateand its return type was changed slightly to make it easier to use. (It now returns headers which can be folded into the user's request rather than simply the token.)The code that used the
authenticatemethod was updated accordingly.Unit tests were also updated as well. A couple of unit tests were moved and a few unrelated new unit tests were added to more fully cover
endpoint-client.tsas well.While this is technically a breaking change, the only dependent that will break because of it is the CLI so I opted not to confuse users by including that to the release notes.
I have tested this locally with both the CLI and the SmartApp SDK.