Skip to content

chore(clerk-js,backend,shared):Apply deprecation warnings @clerk/types - #1823

Merged
dimkl merged 13 commits into
mainfrom
apply-deprecation-warnings-types
Oct 6, 2023
Merged

chore(clerk-js,backend,shared):Apply deprecation warnings @clerk/types#1823
dimkl merged 13 commits into
mainfrom
apply-deprecation-warnings-types

Conversation

@dimkl

@dimkl dimkl commented Oct 3, 2023

Copy link
Copy Markdown
Contributor

Description

Review it per commit

Deprecations:

  • orgs jwt claims
  • apiKey
  • frontendApi
  • redirect_url
  • password
  • generateSignature
  • afterSwitchOrganizationUrl
  • profileImageUrl

Other changes:

  • fix typo of frontendApi

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Packages affected

  • @clerk/clerk-js
  • @clerk/clerk-react
  • @clerk/nextjs
  • @clerk/remix
  • @clerk/types
  • @clerk/themes
  • @clerk/localizations
  • @clerk/clerk-expo
  • @clerk/backend
  • @clerk/clerk-sdk-node
  • @clerk/shared
  • @clerk/fastify
  • @clerk/chrome-extension
  • gatsby-plugin-clerk
  • build/tooling/chore

@dimkl
dimkl requested a review from a team as a code owner October 3, 2023 16:58
@dimkl dimkl self-assigned this Oct 3, 2023
@changeset-bot

changeset-bot Bot commented Oct 3, 2023

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 10fb826

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

This PR includes changesets to release 11 packages
Name Type
@clerk/clerk-js Patch
@clerk/backend Patch
@clerk/shared Patch
@clerk/clerk-react Patch
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch
@clerk/fastify Patch
gatsby-plugin-clerk Patch
@clerk/nextjs Patch
@clerk/remix Patch
@clerk/clerk-sdk-node 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

@dimkl
dimkl force-pushed the fix-nextjs-shared-deps branch from bffe9d9 to 63f77bd Compare October 4, 2023 14:07
@dimkl
dimkl force-pushed the apply-deprecation-warnings-types branch from 1e91a8d to 339eeba Compare October 4, 2023 14:08
@dimkl
dimkl force-pushed the fix-nextjs-shared-deps branch 2 times, most recently from 9acaa62 to 319d166 Compare October 5, 2023 12:01
Base automatically changed from fix-nextjs-shared-deps to main October 5, 2023 16:24
@dimkl
dimkl force-pushed the apply-deprecation-warnings-types branch 4 times, most recently from 67930d2 to d8a7164 Compare October 5, 2023 17:14
import type { PublicUserDataJSON } from '@clerk/types';

export class OrganizationPublicUserData implements PublicUserData {
export class PublicUserData implements IPublicUserData {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ Why are we renaming this class?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the publicUserData property is the same for all Resources (eg OrganizationMembership , Session), so there is no need to create a separate class for each resource.

Comment thread packages/clerk-js/src/core/resources/Session.ts
@dimkl
dimkl force-pushed the apply-deprecation-warnings-types branch from d8a7164 to fbad687 Compare October 6, 2023 12:11
@dimkl
dimkl force-pushed the apply-deprecation-warnings-types branch from fbad687 to 10fb826 Compare October 6, 2023 20:31
@dimkl
dimkl enabled auto-merge October 6, 2023 20:34
@dimkl
dimkl disabled auto-merge October 6, 2023 20:34
@dimkl
dimkl added this pull request to the merge queue Oct 6, 2023
Merged via the queue into main with commit 1e212c1 Oct 6, 2023
@dimkl
dimkl deleted the apply-deprecation-warnings-types branch October 6, 2023 20:49
@clerk-cookie clerk-cookie mentioned this pull request Oct 6, 2023
@ZeldOcarina

Copy link
Copy Markdown

Hi I am now getting DEPRECATION WARNING: "frontendApi" is deprecated and will be removed in the next major release.
How do I fix it?

@dimkl

dimkl commented Oct 10, 2023

Copy link
Copy Markdown
Contributor Author

Hello @ZeldOcarina
I think that there is another line in the deprecation warning which indicates that you should use the publishableKey instead of frontendApi. This warning may be caused by using the environment variable related to the forntendApi.

@ZeldOcarina

ZeldOcarina commented Oct 10, 2023

Copy link
Copy Markdown

Hi @dimkl it only says this:

DEPRECATION WARNING: "frontendApi" is deprecated and will be removed in the next major release.
Use `publishableKey` instead.

I am just using these as envs:

CLERK_PUBLISHABLE_KEY=pk_test_**********
CLERK_SECRET_KEY=sk_test_***********
CLERK_JWT_JSON_ENDPOINT=https://clerk.monarchy.io/.well-known/jwks.json

@dimkl

dimkl commented Oct 10, 2023

Copy link
Copy Markdown
Contributor Author

@ZeldOcarina let me take a better look at it, and I will get back to you :)
How do you use CLERK_JWT_JSON_ENDPOINT env? This is not an environment variable used internally by Clerk.
Also what packages are you using?

@ZeldOcarina

Copy link
Copy Markdown

I am using :

"@clerk/clerk-sdk-node": "^4.12.12",
"@clerk/remix": "^3.0.5",

That env was in an old guide, if not needed anymore I can delete it I am not manually using it anywhere!

@dimkl

dimkl commented Oct 10, 2023

Copy link
Copy Markdown
Contributor Author

@ZeldOcarina you can drop this env.
Also about the deprecation warnings, this PR should resolve your case: #1856

@yns01

yns01 commented Nov 8, 2023

Copy link
Copy Markdown

Hey @dimkl, I'm still getting the warning:

Clerk - DEPRECATION WARNING: "frontendApi" is deprecated and will be removed in the next major release.
Use `publishableKey` instead.

I'm using

    "@clerk/localizations": "^1.26.8",
    "@clerk/remix": "^3.1.3",

and I have the following env defined:

CLERK_PUBLISHABLE_KEY
CLERK_SECRET_KEY

@dimkl

dimkl commented Nov 8, 2023

Copy link
Copy Markdown
Contributor Author

@yns01 thanks for reporting this, i will take a look and come back.

@dimkl

dimkl commented Nov 9, 2023

Copy link
Copy Markdown
Contributor Author

@yns01 Should be fixed in @clerk/remix@3.1.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants