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(clerk-sdk-node): Drop deprecations #2021

Merged
merged 8 commits into from
Nov 7, 2023

Conversation

dimkl
Copy link
Member

@dimkl dimkl commented Nov 2, 2023

Description

Drop deprecations. Migration steps:

  • use CLERK_SECRET_KEY instead of CLERK_API_KEY env variable
  • use secretKey instead of apiKey
  • use CLERK_PUBLISHABLE_KEY instead of CLERK_FRONTEND_API env variable
  • use publishableKey instead of frontendApi
  • drop Redwood hotfix (upgrade to latest version)
  • use createClerkClient with options to create a new clerkClient instead of using
    the following setters:
    • setClerkApiVersion
    • setClerkHttpOptions
    • setClerkServerApiUrl
    • setClerkApiKey
  • use @clerk/clerk-sdk-node instead of @clerk/clerk-sdk-node/{cjs|esm}/instance

Extra:

  • bundle only index.ts and instance.ts

Depends on the following PRs because of re-exports:

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/backend
  • @clerk/chrome-extension
  • @clerk/clerk-js
  • @clerk/clerk-expo
  • @clerk/fastify
  • gatsby-plugin-clerk
  • @clerk/localizations
  • @clerk/nextjs
  • @clerk/clerk-react
  • @clerk/remix
  • @clerk/clerk-sdk-node
  • @clerk/shared
  • @clerk/themes
  • @clerk/types
  • build/tooling/chore

@dimkl dimkl self-assigned this Nov 2, 2023
@dimkl dimkl requested a review from a team as a code owner November 2, 2023 23:58
Copy link

changeset-bot bot commented Nov 2, 2023

🦋 Changeset detected

Latest commit: 8148ca3

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

This PR includes changesets to release 2 packages
Name Type
@clerk/clerk-sdk-node Major
gatsby-plugin-clerk 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
Copy link
Member Author

dimkl commented Nov 3, 2023

Blocked by #2006

@dimkl dimkl force-pushed the sdk-782-drop-deprecations-sdk-node branch 5 times, most recently from ae6352e to 56b4880 Compare November 3, 2023 15:00
@dimkl dimkl closed this Nov 3, 2023
@dimkl dimkl reopened this Nov 3, 2023
],
"scripts": {
"build": "npm run clean && tsup",
"postbuild": "node ../../scripts/subpath-workaround.mjs sdk-node",
Copy link
Member

Choose a reason for hiding this comment

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

@dimkl probably i'm missing some context, but why do we need this ? feel free to point me to an internal document if necessary.

Copy link
Member Author

Choose a reason for hiding this comment

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

This will generate a packages/sdk-node/instance/ folder with a package.json to be used for subpath import of @clerk/clerk-sdk-node/instance. We have used it in @clerk/shared.

packages/sdk-node/package.json Outdated Show resolved Hide resolved
packages/sdk-node/.gitignore Outdated Show resolved Hide resolved
packages/sdk-node/subpaths.mjs Outdated Show resolved Hide resolved
packages/sdk-node/package.json Outdated Show resolved Hide resolved
@dimkl dimkl force-pushed the sdk-782-drop-deprecations-sdk-node branch from 56b4880 to 7f9ed77 Compare November 6, 2023 11:00
@dimkl dimkl requested a review from LekoArts November 6, 2023 11:01
@dimkl dimkl force-pushed the sdk-782-drop-deprecations-sdk-node branch 5 times, most recently from 1431f76 to 7abf631 Compare November 6, 2023 14:41
@dimkl dimkl force-pushed the sdk-782-drop-deprecations-sdk-node branch from 7abf631 to 6abb21b Compare November 7, 2023 10:45
@dimkl dimkl force-pushed the sdk-782-drop-deprecations-sdk-node branch from 6abb21b to 96a48a0 Compare November 7, 2023 11:04
@dimkl dimkl enabled auto-merge November 7, 2023 11:04
packages/sdk-node/tsup.config.ts Outdated Show resolved Hide resolved
@dimkl dimkl force-pushed the sdk-782-drop-deprecations-sdk-node branch from 96a48a0 to 915c067 Compare November 7, 2023 11:42
@dimkl dimkl force-pushed the sdk-782-drop-deprecations-sdk-node branch from 915c067 to 8148ca3 Compare November 7, 2023 11:44
@nikosdouvlis nikosdouvlis dismissed LekoArts’s stale review November 7, 2023 11:57

Dismissing the "request changes" review as it's blocking Dimitris. I've confirmed that the requested changes have been made.

@dimkl dimkl added this pull request to the merge queue Nov 7, 2023
Merged via the queue into main with commit ee432df Nov 7, 2023
7 checks passed
@dimkl dimkl deleted the sdk-782-drop-deprecations-sdk-node branch November 7, 2023 12:02
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.

None yet

5 participants