Skip to content

chore(types,clerk-react): Make routerPush / routerReplace both required or both optional#2227

Merged
dimkl merged 6 commits intomainfrom
sdk-683-router-options
Nov 29, 2023
Merged

chore(types,clerk-react): Make routerPush / routerReplace both required or both optional#2227
dimkl merged 6 commits intomainfrom
sdk-683-router-options

Conversation

@dimkl
Copy link
Copy Markdown
Contributor

@dimkl dimkl commented Nov 28, 2023

Description

Changes (review per commit for more info):

  • Use Without generic to resolve issues with Omit and complex types
  • Make routerPush and routerReplace options both required or both optional
  • Improve performance of formatting CICD step by ignoring some git ignored or already formatted (since they are auto-generated) files

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 28, 2023
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Nov 28, 2023

🦋 Changeset detected

Latest commit: 495c3eb

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-react Minor
@clerk/types Minor
@clerk/chrome-extension Patch
@clerk/clerk-expo Patch
gatsby-plugin-clerk Patch
@clerk/nextjs Patch
@clerk/remix Patch
@clerk/backend Patch
@clerk/clerk-js Patch
@clerk/fastify 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

…ired or both optional

In order to use unions we converted the `ClerkOptions`
interface to type to compose the union for mutual required
or optional for `routerPush` and `routerReplace` options.
Fixed the 3 slowed formatted files (filename ignored -> ms saved):
- packages/backend/tests/cloudflare-miniflare/worker.js -> 1582ms
- packages/backend/tests/edge-runtime/bundle.js -> 1477ms
- packages/clerk-js/CHANGELOG.md -> 177ms
@dimkl dimkl force-pushed the sdk-683-router-options branch from 2b24271 to 69b3cff Compare November 29, 2023 13:21
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Changes detected under the ClerkJS ui directory!

Don't forget to apply the same changes under the /ui.retheme directory:
packages/clerk-js/src/ui/** ➡️ packages/clerk-js/src/ui.retheme/**

Also, you may need to update the following files:

  • packages/localizations/src/en-US.retheme.ts
  • packages/localizations/src/index.retheme.ts
  • packages/types/src/appearance.retheme.ts
  • packages/types/src/clerk.retheme.ts
  • packages/types/src/index.retheme.ts
  • packages/types/src/localization.retheme.ts

Comment on lines +9 to +15
# files with matching `*.retheme.ts` retheme variant
- 'packages/localizations/src/en-US.ts'
- 'packages/localizations/src/index.ts'
- 'packages/types/src/appearance.ts'
- 'packages/types/src/clerk.ts'
- 'packages/types/src/index.ts'
- 'packages/types/src/localization.ts'
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.

💯

@dimkl dimkl added this pull request to the merge queue Nov 29, 2023
Merged via the queue into main with commit d6a7ea6 Nov 29, 2023
@dimkl dimkl deleted the sdk-683-router-options branch November 29, 2023 14:18
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.

4 participants