Skip to content

Commit

Permalink
Merge branch 'main' into elef/sdki-806-discrepancy-in-handling-_clerk…
Browse files Browse the repository at this point in the history
…_db_jwt-between-handshake-and
  • Loading branch information
panteliselef authored Dec 16, 2024
2 parents 7d35c57 + dcd2f39 commit 0154d0d
Show file tree
Hide file tree
Showing 155 changed files with 1,948 additions and 375 deletions.
7 changes: 0 additions & 7 deletions .changeset/cold-tomatoes-float.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/fresh-olives-watch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@clerk/vue": patch
---

Fixed an issue when accessing Clerk properties inside composables before Clerk is available.
5 changes: 5 additions & 0 deletions .changeset/large-hats-clap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/remix': patch
---

Add note about React Router v7 to the README. If you want to use React Router v7 and Clerk together, please use the [`@clerk/react-router`](https://clerk.com/docs/references/react-router/overview) SDK instead.
5 changes: 5 additions & 0 deletions .changeset/loud-keys-smash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@clerk/localizations": patch
---

Improve `el-GR` localization.
5 changes: 5 additions & 0 deletions .changeset/ninety-wasps-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@clerk/localizations": patch
---

Improve `pl-PL` localization.
File renamed without changes.
2 changes: 2 additions & 0 deletions .changeset/stale-cougars-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
5 changes: 5 additions & 0 deletions .changeset/young-swans-sin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': minor
---

Redirect to the current page when within modal mode and no redirect URL is provided.
9 changes: 9 additions & 0 deletions packages/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @clerk/astro

## 2.1.2

### Patch Changes

- Updated dependencies [[`aeafa7c5efd50c893d088ac99199d7eaecc04025`](https://github.com/clerk/javascript/commit/aeafa7c5efd50c893d088ac99199d7eaecc04025), [`acd9326ef2d6942b981b3ee59c4b20ddd303323d`](https://github.com/clerk/javascript/commit/acd9326ef2d6942b981b3ee59c4b20ddd303323d)]:
- @clerk/types@4.39.4
- @clerk/backend@1.21.2
- @clerk/shared@2.20.2

## 2.1.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@clerk/astro",
"version": "2.1.1",
"version": "2.1.2",
"description": "Clerk SDK for Astro",
"keywords": [
"auth",
Expand Down
8 changes: 8 additions & 0 deletions packages/backend/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Change Log

## 1.21.2

### Patch Changes

- Updated dependencies [[`aeafa7c5efd50c893d088ac99199d7eaecc04025`](https://github.com/clerk/javascript/commit/aeafa7c5efd50c893d088ac99199d7eaecc04025), [`acd9326ef2d6942b981b3ee59c4b20ddd303323d`](https://github.com/clerk/javascript/commit/acd9326ef2d6942b981b3ee59c4b20ddd303323d)]:
- @clerk/types@4.39.4
- @clerk/shared@2.20.2

## 1.21.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@clerk/backend",
"version": "1.21.1",
"version": "1.21.2",
"description": "Clerk Backend SDK - REST Client for Backend API & JWT verification utilities",
"homepage": "https://clerk.com/",
"bugs": {
Expand Down
9 changes: 9 additions & 0 deletions packages/chrome-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Change Log

## 2.1.2

### Patch Changes

- Updated dependencies [[`aeafa7c5efd50c893d088ac99199d7eaecc04025`](https://github.com/clerk/javascript/commit/aeafa7c5efd50c893d088ac99199d7eaecc04025), [`acd9326ef2d6942b981b3ee59c4b20ddd303323d`](https://github.com/clerk/javascript/commit/acd9326ef2d6942b981b3ee59c4b20ddd303323d)]:
- @clerk/clerk-js@5.42.1
- @clerk/clerk-react@5.20.2
- @clerk/shared@2.20.2

## 2.1.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/chrome-extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@clerk/chrome-extension",
"version": "2.1.1",
"version": "2.1.2",
"description": "Clerk SDK for Chrome extensions",
"keywords": [
"auth",
Expand Down
13 changes: 13 additions & 0 deletions packages/clerk-js/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Change Log

## 5.42.1

### Patch Changes

- Added min and max length username settings to username field error. ([#4771](https://github.com/clerk/javascript/pull/4771)) by [@alexcarpenter](https://github.com/alexcarpenter)

- Rename `toJSON()` resource methods to `__internal_toSnapshot()` to avoid issues with serializing functions. ([#4777](https://github.com/clerk/javascript/pull/4777)) by [@anagstef](https://github.com/anagstef)

- Updated dependencies [[`aeafa7c5efd50c893d088ac99199d7eaecc04025`](https://github.com/clerk/javascript/commit/aeafa7c5efd50c893d088ac99199d7eaecc04025), [`acd9326ef2d6942b981b3ee59c4b20ddd303323d`](https://github.com/clerk/javascript/commit/acd9326ef2d6942b981b3ee59c4b20ddd303323d)]:
- @clerk/[email protected]
- @clerk/[email protected]
- @clerk/[email protected]

## 5.42.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@clerk/clerk-js",
"version": "5.42.0",
"version": "5.42.1",
"description": "Clerk JS library",
"keywords": [
"clerk",
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/core/resources/AuthConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class AuthConfig extends BaseResource implements AuthConfigResource {
return this;
}

public toJSON(): AuthConfigJSONSnapshot {
public __internal_toSnapshot(): AuthConfigJSONSnapshot {
return {
object: 'auth_config',
id: this.id || '',
Expand Down
8 changes: 4 additions & 4 deletions packages/clerk-js/src/core/resources/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,14 @@ export class Client extends BaseResource implements ClientResource {
return this;
}

public toJSON(): ClientJSONSnapshot {
public __internal_toSnapshot(): ClientJSONSnapshot {
return {
object: 'client',
status: null,
id: this.id || '',
sessions: this.sessions.map(s => s.toJSON()),
sign_up: this.signUp.toJSON(),
sign_in: this.signIn.toJSON(),
sessions: this.sessions.map(s => s.__internal_toSnapshot()),
sign_up: this.signUp.__internal_toSnapshot(),
sign_in: this.signIn.__internal_toSnapshot(),
last_active_session_id: this.lastActiveSessionId,
cookie_expires_at: this.cookieExpiresAt ? this.cookieExpiresAt.getTime() : null,
created_at: this.createdAt?.getTime() ?? null,
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/core/resources/DisplayConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export class DisplayConfig extends BaseResource implements DisplayConfigResource
return this;
}

public toJSON(): DisplayConfigJSONSnapshot {
public __internal_toSnapshot(): DisplayConfigJSONSnapshot {
return {
object: 'display_config',
id: this.id,
Expand Down
6 changes: 3 additions & 3 deletions packages/clerk-js/src/core/resources/EmailAddress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ export class EmailAddress extends BaseResource implements EmailAddressResource {
return this;
}

public toJSON(): EmailAddressJSONSnapshot {
public __internal_toSnapshot(): EmailAddressJSONSnapshot {
return {
object: 'email_address',
id: this.id,
email_address: this.emailAddress,
verification: this.verification.toJSON(),
linked_to: this.linkedTo.map(link => link.toJSON()),
verification: this.verification.__internal_toSnapshot(),
linked_to: this.linkedTo.map(link => link.__internal_toSnapshot()),
};
}
}
8 changes: 4 additions & 4 deletions packages/clerk-js/src/core/resources/EnterpriseAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class EnterpriseAccount extends BaseResource implements EnterpriseAccount
return this;
}

public toJSON(): EnterpriseAccountJSONSnapshot {
public __internal_toSnapshot(): EnterpriseAccountJSONSnapshot {
return {
object: 'enterprise_account',
id: this.id,
Expand All @@ -70,8 +70,8 @@ export class EnterpriseAccount extends BaseResource implements EnterpriseAccount
first_name: this.firstName,
last_name: this.lastName,
public_metadata: this.publicMetadata,
verification: this.verification?.toJSON() || null,
enterprise_connection: this.enterpriseConnection?.toJSON() || null,
verification: this.verification?.__internal_toSnapshot() || null,
enterprise_connection: this.enterpriseConnection?.__internal_toSnapshot() || null,
};
}
}
Expand Down Expand Up @@ -115,7 +115,7 @@ export class EnterpriseAccountConnection extends BaseResource implements Enterpr
return this;
}

public toJSON(): EnterpriseAccountConnectionJSONSnapshot {
public __internal_toSnapshot(): EnterpriseAccountConnectionJSONSnapshot {
return {
object: 'enterprise_account_connection',
id: this.id,
Expand Down
10 changes: 5 additions & 5 deletions packages/clerk-js/src/core/resources/Environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ export class Environment extends BaseResource implements EnvironmentResource {
return this;
}

public toJSON(): EnvironmentJSONSnapshot {
public __internal_toSnapshot(): EnvironmentJSONSnapshot {
return {
object: 'environment',
id: this.id || '',
auth_config: this.authConfig.toJSON(),
display_config: this.displayConfig.toJSON(),
user_settings: this.userSettings.toJSON(),
organization_settings: this.organizationSettings.toJSON(),
auth_config: this.authConfig.__internal_toSnapshot(),
display_config: this.displayConfig.__internal_toSnapshot(),
user_settings: this.userSettings.__internal_toSnapshot(),
organization_settings: this.organizationSettings.__internal_toSnapshot(),
maintenance_mode: this.maintenanceMode,
};
}
Expand Down
4 changes: 2 additions & 2 deletions packages/clerk-js/src/core/resources/ExternalAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class ExternalAccount extends BaseResource implements ExternalAccountReso
return this;
}

public toJSON(): ExternalAccountJSONSnapshot {
public __internal_toSnapshot(): ExternalAccountJSONSnapshot {
return {
object: 'external_account',
id: this.id,
Expand All @@ -83,7 +83,7 @@ export class ExternalAccount extends BaseResource implements ExternalAccountReso
username: this.username,
public_metadata: this.publicMetadata,
label: this.label,
verification: this.verification?.toJSON() || null,
verification: this.verification?.__internal_toSnapshot() || null,
};
}

Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/core/resources/IdentificationLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class IdentificationLink extends BaseResource implements IdentificationLi
return this;
}

public toJSON(): IdentificationLinkJSONSnapshot {
public __internal_toSnapshot(): IdentificationLinkJSONSnapshot {
return {
object: 'identification_link',
id: this.id,
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/core/resources/Organization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ export class Organization extends BaseResource implements OrganizationResource {
return this;
}

public toJSON(): OrganizationJSONSnapshot {
public __internal_toSnapshot(): OrganizationJSONSnapshot {
return {
object: 'organization',
id: this.id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ export class OrganizationMembership extends BaseResource implements Organization
return this;
}

public toJSON(): OrganizationMembershipJSONSnapshot {
public __internal_toSnapshot(): OrganizationMembershipJSONSnapshot {
return {
object: 'organization_membership',
id: this.id,
organization: this.organization.toJSON(),
organization: this.organization.__internal_toSnapshot(),
public_metadata: this.publicMetadata,
public_user_data: this.publicUserData.toJSON(),
public_user_data: this.publicUserData.__internal_toSnapshot(),
permissions: this.permissions,
role: this.role,
created_at: this.createdAt.getTime(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class OrganizationSettings extends BaseResource implements OrganizationSe
return this;
}

public toJSON(): OrganizationSettingsJSONSnapshot {
public __internal_toSnapshot(): OrganizationSettingsJSONSnapshot {
return {
enabled: this.enabled,
max_allowed_memberships: this.maxAllowedMemberships,
Expand Down
4 changes: 2 additions & 2 deletions packages/clerk-js/src/core/resources/Passkey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,12 @@ export class Passkey extends BaseResource implements PasskeyResource {
return this;
}

public toJSON(): PasskeyJSONSnapshot {
public __internal_toSnapshot(): PasskeyJSONSnapshot {
return {
object: 'passkey',
id: this.id,
name: this.name,
verification: this.verification?.toJSON() || null,
verification: this.verification?.__internal_toSnapshot() || null,
last_used_at: this.lastUsedAt?.getTime() || null,
created_at: this.createdAt.getTime(),
updated_at: this.updatedAt.getTime(),
Expand Down
6 changes: 3 additions & 3 deletions packages/clerk-js/src/core/resources/PhoneNumber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ export class PhoneNumber extends BaseResource implements PhoneNumberResource {
return this;
}

public toJSON(): PhoneNumberJSONSnapshot {
public __internal_toSnapshot(): PhoneNumberJSONSnapshot {
return {
object: 'phone_number',
id: this.id || '',
phone_number: this.phoneNumber,
reserved_for_second_factor: this.reservedForSecondFactor,
default_second_factor: this.defaultSecondFactor,
verification: this.verification.toJSON(),
linked_to: this.linkedTo.map(link => link.toJSON()),
verification: this.verification.__internal_toSnapshot(),
linked_to: this.linkedTo.map(link => link.__internal_toSnapshot()),
backup_codes: this.backupCodes,
};
}
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/core/resources/PublicUserData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class PublicUserData implements IPublicUserData {
return this;
}

public toJSON(): PublicUserDataJSONSnapshot {
public __internal_toSnapshot(): PublicUserDataJSONSnapshot {
return {
object: 'public_user_data',
id: this.userId || '',
Expand Down
8 changes: 4 additions & 4 deletions packages/clerk-js/src/core/resources/SamlAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class SamlAccount extends BaseResource implements SamlAccountResource {
return this;
}

public toJSON(): SamlAccountJSONSnapshot {
public __internal_toSnapshot(): SamlAccountJSONSnapshot {
return {
object: 'saml_account',
id: this.id,
Expand All @@ -65,8 +65,8 @@ export class SamlAccount extends BaseResource implements SamlAccountResource {
email_address: this.emailAddress,
first_name: this.firstName,
last_name: this.lastName,
verification: this.verification?.toJSON() || null,
saml_connection: this.samlConnection?.toJSON(),
verification: this.verification?.__internal_toSnapshot() || null,
saml_connection: this.samlConnection?.__internal_toSnapshot(),
};
}
}
Expand Down Expand Up @@ -106,7 +106,7 @@ export class SamlAccountConnection extends BaseResource implements SamlAccountCo
return this;
}

public toJSON(): SamlAccountConnectionJSONSnapshot {
public __internal_toSnapshot(): SamlAccountConnectionJSONSnapshot {
return {
object: 'saml_account_connection',
id: this.id,
Expand Down
8 changes: 4 additions & 4 deletions packages/clerk-js/src/core/resources/Session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export class Session extends BaseResource implements SessionResource {
return this;
}

public toJSON(): SessionJSONSnapshot {
public __internal_toSnapshot(): SessionJSONSnapshot {
return {
object: 'session',
id: this.id,
Expand All @@ -245,9 +245,9 @@ export class Session extends BaseResource implements SessionResource {
last_active_at: this.lastActiveAt.getTime(),
last_active_organization_id: this.lastActiveOrganizationId,
actor: this.actor,
user: this.user?.toJSON() || null,
public_user_data: this.publicUserData.toJSON(),
last_active_token: this.lastActiveToken?.toJSON() || null,
user: this.user?.__internal_toSnapshot() || null,
public_user_data: this.publicUserData.__internal_toSnapshot(),
last_active_token: this.lastActiveToken?.__internal_toSnapshot() || null,
created_at: this.createdAt.getTime(),
updated_at: this.updatedAt.getTime(),
};
Expand Down
Loading

0 comments on commit 0154d0d

Please sign in to comment.