Skip to content

Commit

Permalink
chore(backend): Drop deprecations (#1899)
Browse files Browse the repository at this point in the history
* chore(backend): Drop `__unstable_options`

* chore(backend): Drop `frontendApi`

* chore(backend): Drop `clockSkewInSeconds`

* chore(backend): Drop `apiKey` & rename `SetClerkSecretKeyOrAPIKey` to `SetClerkSecretKey`

* chore(backend): Drop `httpOptions`

* chore(backend): Drop image related properties

- `ExternalAccount.picture`
- `ExternalAccountJSON.avatar_url`
- `Organization.logoUrl`
- `OrganizationJSON.logo_url`
- `User.profileImageUrl`
- `UserJSON.profile_image_url`
- `OrganizationMembershipPublicUserData.profileImageUrl`
- `OrganizationMembershipPublicUserDataJSON.profile_image_url`

* chore(backend): Drop `pkgVersion`

* chore(backend): Drop `Organization.getOrganizationInvitationList`

* chore(backend): Drop `orgs` claim

* chore(backend): Cleanup stale TODO commit

* chore(*): Drop using empty frontendApi string on local interstitial

* fix(repo): Fix lint-staged failure for ignored file in shared tests

* chore(backend): Drop `remotePublicInterstitial`

* fix(backend): Replace `as string` with default empty string

The `as string` silents the typescript error but in the runtime
the code fails if the value of `null` or `undefined` is passed
in a function that expects a string to be passed.
Failures may be caused by invoking string specific methods (eg `startsWith`)
which raise a `Cannot read properties of undefined` error.

* chore(repo): Add changeset
  • Loading branch information
dimkl committed Nov 16, 2023
1 parent 7245325 commit cace853
Show file tree
Hide file tree
Showing 40 changed files with 562 additions and 868 deletions.
26 changes: 26 additions & 0 deletions .changeset/silly-poems-tease.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
'@clerk/backend': major
---

Drop deprecated properties. Migration steps:
- use `createClerkClient` instead of `__unstable_options`
- use `publishableKey` instead of `frontendApi`
- use `clockSkewInMs` instead of `clockSkewInSeconds`
- use `apiKey` instead of `secretKey`
- drop `httpOptions`
- use `*.image` instead of
- `ExternalAccount.picture`
- `ExternalAccountJSON.avatar_url`
- `Organization.logoUrl`
- `OrganizationJSON.logo_url`
- `User.profileImageUrl`
- `UserJSON.profile_image_url`
- `OrganizationMembershipPublicUserData.profileImageUrl`
- `OrganizationMembershipPublicUserDataJSON.profile_image_url`
- drop `pkgVersion`
- use `Organization.getOrganizationInvitationList` with // TODO
- drop `orgs` claim (if required, can be manually added by using `user.organizations` in a jwt template)
- use `localInterstitial` instead of `remotePublicInterstitial` / `remotePublicInterstitialUrl`

Internal changes:
- replaced error enum (and it's) `SetClerkSecretKeyOrAPIKey` with `SetClerkSecretKey`

0 comments on commit cace853

Please sign in to comment.