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: decouple axios version from core SDK #232

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

rossiam
Copy link
Contributor

@rossiam rossiam commented Jan 10, 2024

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 Authorization interface had two methods, authenticate and authenticateGeneric. The authenticate method was tied to axios so it was removed. The authenticateGeneric method was then renamed to authenticate and 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 authenticate method 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.ts as 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.

Copy link

changeset-bot bot commented Jan 10, 2024

🦋 Changeset detected

Latest commit: d60610c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@smartthings/core-sdk Patch

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

@rossiam rossiam merged commit 01a6aa2 into SmartThingsCommunity:main Jan 12, 2024
5 checks passed
@rossiam rossiam deleted the decouple-axios branch January 12, 2024 16:57
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.

2 participants