Skip to content

Commit

Permalink
chore(repo): Replace clerk.dev with clerk.com (#1878)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkl authored and tmilewski committed Nov 17, 2023
1 parent e0bfc5a commit 038ddc9
Show file tree
Hide file tree
Showing 51 changed files with 213 additions and 206 deletions.
12 changes: 12 additions & 0 deletions .changeset/friendly-vans-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
'gatsby-plugin-clerk': patch
'@clerk/clerk-js': patch
'@clerk/clerk-sdk-node': patch
'@clerk/backend': patch
'@clerk/fastify': patch
'@clerk/nextjs': patch
'@clerk/shared': patch
'@clerk/clerk-expo': patch
---

Internal update default apiUrl domain from clerk.dev to clerk.com
2 changes: 1 addition & 1 deletion packages/backend/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const API_URL = 'https://api.clerk.dev';
export const API_URL = 'https://api.clerk.com';
export const API_VERSION = 'v1';

// TODO: Get information from package.json or define them from ESBuild
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/tokens/keys.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default (QUnit: QUnit) => {
skipJwksCache: true,
});

fakeFetch.calledOnceWith('https://api.clerk.dev/v1/jwks', {
fakeFetch.calledOnceWith('https://api.clerk.com/v1/jwks', {
method: 'GET',
headers: {
Authorization: 'Bearer deadbeef',
Expand All @@ -73,7 +73,7 @@ export default (QUnit: QUnit) => {
skipJwksCache: true,
});

fakeFetch.calledOnceWith('https://api.clerk.dev/v1/jwks', {
fakeFetch.calledOnceWith('https://api.clerk.com/v1/jwks', {
method: 'GET',
headers: {
Authorization: 'Bearer deadbeef',
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/core/clerk.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,7 @@ describe('Clerk singleton', () => {
external_verification_redirect_url: '',
error: {
code: 'not_allowed_to_sign_up',
long_message: 'You cannot sign up with test@clerk.dev since this is a restricted application.',
long_message: 'You cannot sign up with test@clerk.com since this is a restricted application.',
message: 'Not allowed to sign up',
meta: {
session_id: 'sess_1yDceUR8SIKtQ0gIOO8fNsW7nhe',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ describe('OrganizationDomain', () => {
const organization = new OrganizationDomain({
object: 'organization_domain',
id: 'test_domain_id',
name: 'clerk.dev',
name: 'clerk.com',
organization_id: 'test_org_id',
enrollment_mode: 'manual_invitation',
verification: {
Expand All @@ -14,7 +14,7 @@ describe('OrganizationDomain', () => {
strategy: 'email_code',
status: 'verified',
},
affiliation_email_address: 'some@clerk.dev',
affiliation_email_address: 'some@clerk.com',
created_at: 12345,
updated_at: 5678,
});
Expand All @@ -26,7 +26,7 @@ describe('OrganizationDomain', () => {
const organization = new OrganizationDomain({
object: 'organization_domain',
id: 'test_domain_id',
name: 'clerk.dev',
name: 'clerk.com',
organization_id: 'test_org_id',
enrollment_mode: 'manual_invitation',
verification: null,
Expand Down
4 changes: 2 additions & 2 deletions packages/clerk-js/src/core/resources/User.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe('User', () => {
const userWithUnverifiedEmail = new User({
email_addresses: [
{
emailAddress: 'unverified@clerk.dev',
emailAddress: 'unverified@clerk.com',
verification: null,
},
],
Expand All @@ -88,7 +88,7 @@ describe('User', () => {
const userWithVerifiedEmail = new User({
email_addresses: [
{
emailAddress: 'unverified@clerk.dev',
emailAddress: 'unverified@clerk.com',
verification: {
status: 'verified',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ OrganizationDomain {
"delete": [Function],
"enrollmentMode": "manual_invitation",
"id": "test_domain_id",
"name": "clerk.dev",
"name": "clerk.com",
"organizationId": "test_org_id",
"pathRoot": "",
"prepareAffiliationVerification": [Function],
Expand All @@ -20,12 +20,12 @@ OrganizationDomain {

exports[`OrganizationDomain has the same initial properties 1`] = `
OrganizationDomain {
"affiliationEmailAddress": "some@clerk.dev",
"affiliationEmailAddress": "some@clerk.com",
"attemptAffiliationVerification": [Function],
"delete": [Function],
"enrollmentMode": "manual_invitation",
"id": "test_domain_id",
"name": "clerk.dev",
"name": "clerk.com",
"organizationId": "test_org_id",
"pathRoot": "",
"prepareAffiliationVerification": [Function],
Expand Down
4 changes: 2 additions & 2 deletions packages/clerk-js/src/core/test/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const createEmail = (params?: Partial<EmailAddressJSON>): EmailAddressJSO
return {
object: 'email_address',
id: params?.email_address || '',
email_address: 'test@clerk.dev',
email_address: 'test@clerk.com',
reserved: false,
verification: {
status: 'verified',
Expand Down Expand Up @@ -111,7 +111,7 @@ export const createExternalAccount = (params?: Partial<ExternalAccountJSON>): Ex
identification_id: '98675202',
provider_user_id: '3232',
approved_scopes: '',
email_address: 'test@clerk.dev',
email_address: 'test@clerk.com',
first_name: 'First name',
last_name: 'Last name',
avatar_url: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe('CreateOrganization', () => {
const { wrapper } = await createFixtures(f => {
f.withOrganizations();
f.withUser({
email_addresses: ['test@clerk.dev'],
email_addresses: ['test@clerk.com'],
});
});
const { getByText } = render(<CreateOrganization />, { wrapper });
Expand All @@ -83,7 +83,7 @@ describe('CreateOrganization', () => {
const { wrapper, fixtures, props } = await createFixtures(f => {
f.withOrganizations();
f.withUser({
email_addresses: ['test@clerk.dev'],
email_addresses: ['test@clerk.com'],
});
});

Expand Down Expand Up @@ -111,7 +111,7 @@ describe('CreateOrganization', () => {
const { wrapper, fixtures, props } = await createFixtures(f => {
f.withOrganizations();
f.withUser({
email_addresses: ['test@clerk.dev'],
email_addresses: ['test@clerk.com'],
});
});

Expand Down Expand Up @@ -139,7 +139,7 @@ describe('CreateOrganization', () => {
const { wrapper, fixtures } = await createFixtures(f => {
f.withOrganizations();
f.withUser({
email_addresses: ['test@clerk.dev'],
email_addresses: ['test@clerk.com'],
});
});

Expand Down Expand Up @@ -167,7 +167,7 @@ describe('CreateOrganization', () => {
const { wrapper, fixtures, props } = await createFixtures(f => {
f.withOrganizations();
f.withUser({
email_addresses: ['test@clerk.dev'],
email_addresses: ['test@clerk.com'],
});
});

Expand All @@ -191,7 +191,7 @@ describe('CreateOrganization', () => {
const { wrapper, fixtures, props } = await createFixtures(f => {
f.withOrganizations();
f.withUser({
email_addresses: ['test@clerk.dev'],
email_addresses: ['test@clerk.com'],
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('OrganizationList', () => {
const { wrapper } = await createFixtures(f => {
f.withOrganizations();
f.withUser({
email_addresses: ['test@clerk.dev'],
email_addresses: ['test@clerk.com'],
});
});

Expand All @@ -40,7 +40,7 @@ describe('OrganizationList', () => {
const { wrapper, props, fixtures } = await createFixtures(f => {
f.withOrganizations();
f.withUser({
email_addresses: ['test@clerk.dev'],
email_addresses: ['test@clerk.com'],
});
});

Expand Down Expand Up @@ -88,7 +88,7 @@ describe('OrganizationList', () => {
const { wrapper, props } = await createFixtures(f => {
f.withOrganizations();
f.withUser({
email_addresses: ['test@clerk.dev'],
email_addresses: ['test@clerk.com'],
organization_memberships: [{ name: 'Org1', id: '1', role: 'admin' }],
});
});
Expand Down Expand Up @@ -118,7 +118,7 @@ describe('OrganizationList', () => {
const { wrapper, props, fixtures } = await createFixtures(f => {
f.withOrganizations();
f.withUser({
email_addresses: ['test@clerk.dev'],
email_addresses: ['test@clerk.com'],
});
});

Expand Down Expand Up @@ -198,7 +198,7 @@ describe('OrganizationList', () => {
it('display CreateOrganization within OrganizationList', async () => {
const { wrapper } = await createFixtures(f => {
f.withOrganizations();
f.withUser({ email_addresses: ['test@clerk.dev'] });
f.withUser({ email_addresses: ['test@clerk.com'] });
});

const { queryByLabelText, getByRole, userEvent, queryByRole } = render(<OrganizationList />, { wrapper });
Expand All @@ -224,7 +224,7 @@ describe('OrganizationList', () => {
it('display CreateOrganization and navigates to Invite Members', async () => {
const { wrapper } = await createFixtures(f => {
f.withOrganizations();
f.withUser({ email_addresses: ['test@clerk.dev'] });
f.withUser({ email_addresses: ['test@clerk.com'] });
});

const { getByLabelText, getByRole, userEvent, queryByText } = render(<OrganizationList />, { wrapper });
Expand All @@ -247,7 +247,7 @@ describe('OrganizationList', () => {
f.withOrganizations();
f.withUser({
id: 'test_user_id',
email_addresses: ['test@clerk.dev'],
email_addresses: ['test@clerk.com'],
});
});

Expand Down Expand Up @@ -276,7 +276,7 @@ describe('OrganizationList', () => {
f.withOrganizations();
f.withUser({
id: 'test_user_id',
email_addresses: ['test@clerk.dev'],
email_addresses: ['test@clerk.com'],
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('InviteMembersPage', () => {
it('renders the component', async () => {
const { wrapper, fixtures } = await createFixtures(f => {
f.withOrganizations();
f.withUser({ email_addresses: ['test@clerk.dev'], organization_memberships: [{ name: 'Org1', role: 'admin' }] });
f.withUser({ email_addresses: ['test@clerk.com'], organization_memberships: [{ name: 'Org1', role: 'admin' }] });
});

fixtures.clerk.organization?.getRoles.mockRejectedValue(null);
Expand All @@ -28,7 +28,7 @@ describe('InviteMembersPage', () => {
const { wrapper, fixtures } = await createFixtures(f => {
f.withOrganizations();
f.withUser({
email_addresses: ['test@clerk.dev'],
email_addresses: ['test@clerk.com'],
organization_memberships: [{ name: 'Org1', role: 'admin' }],
});
});
Expand All @@ -49,7 +49,7 @@ describe('InviteMembersPage', () => {
const { wrapper, fixtures } = await createFixtures(f => {
f.withOrganizations();
f.withUser({
email_addresses: ['test@clerk.dev'],
email_addresses: ['test@clerk.com'],
organization_memberships: [{ name: 'Org1', role: 'admin' }],
});
});
Expand All @@ -62,7 +62,7 @@ describe('InviteMembersPage', () => {
await userEvent.click(getByText('Member'));
await userEvent.click(getByRole('button', { name: 'Send invitations' }));
expect(fixtures.clerk.organization?.inviteMembers).toHaveBeenCalledWith({
emailAddresses: ['test+1@clerk.dev'],
emailAddresses: ['test+1@clerk.com'],
role: 'basic_member' as MembershipRole,
});
});
Expand Down Expand Up @@ -108,7 +108,7 @@ describe('InviteMembersPage', () => {
const { wrapper, fixtures } = await createFixtures(f => {
f.withOrganizations();
f.withUser({
email_addresses: ['test@clerk.dev'],
email_addresses: ['test@clerk.com'],
organization_memberships: [{ name: 'Org1', role: 'admin' }],
});
});
Expand All @@ -118,13 +118,13 @@ describe('InviteMembersPage', () => {
const { getByRole, userEvent, getByTestId, getByText } = render(<InviteMembersPage />, { wrapper });
await userEvent.type(
getByTestId('tag-input'),
'test+1@clerk.dev,test+2@clerk.dev,test+3@clerk.dev,test+4@clerk.dev,',
'test+1@clerk.com,test+2@clerk.com,test+3@clerk.com,test+4@clerk.com,',
);
await userEvent.click(getByRole('button', { name: 'Select an option' }));
await userEvent.click(getByText('Member'));
await userEvent.click(getByRole('button', { name: 'Send invitations' }));
expect(fixtures.clerk.organization?.inviteMembers).toHaveBeenCalledWith({
emailAddresses: ['test+1@clerk.dev', 'test+2@clerk.dev', 'test+3@clerk.dev', 'test+4@clerk.dev'],
emailAddresses: ['test+1@clerk.com', 'test+2@clerk.com', 'test+3@clerk.com', 'test+4@clerk.com'],
role: 'basic_member' as MembershipRole,
});
});
Expand All @@ -133,7 +133,7 @@ describe('InviteMembersPage', () => {
const { wrapper, fixtures } = await createFixtures(f => {
f.withOrganizations();
f.withUser({
email_addresses: ['test@clerk.dev'],
email_addresses: ['test@clerk.com'],
organization_memberships: [{ name: 'Org1', role: 'admin' }],
});
});
Expand All @@ -146,7 +146,7 @@ describe('InviteMembersPage', () => {
await userEvent.click(getByText('Admin'));
await userEvent.click(getByRole('button', { name: 'Send invitations' }));
expect(fixtures.clerk.organization?.inviteMembers).toHaveBeenCalledWith({
emailAddresses: ['test+1@clerk.dev'],
emailAddresses: ['test+1@clerk.com'],
role: 'admin' as MembershipRole,
});
});
Expand All @@ -155,7 +155,7 @@ describe('InviteMembersPage', () => {
const { wrapper, fixtures } = await createFixtures(f => {
f.withOrganizations();
f.withUser({
email_addresses: ['test@clerk.dev'],
email_addresses: ['test@clerk.com'],
organization_memberships: [{ name: 'Org1', role: 'admin' }],
});
});
Expand All @@ -166,9 +166,9 @@ describe('InviteMembersPage', () => {
data: [
{
code: 'duplicate_record',
long_message: 'There are already pending invitations for the following email addresses: test+1@clerk.dev',
long_message: 'There are already pending invitations for the following email addresses: test+1@clerk.com',
message: 'duplicate invitation',
meta: { email_addresses: ['test+5@clerk.dev', 'test+6@clerk.dev', 'test+7@clerk.dev'] },
meta: { email_addresses: ['test+5@clerk.com', 'test+6@clerk.com', 'test+7@clerk.com'] },
},
],
status: 400,
Expand All @@ -183,7 +183,7 @@ describe('InviteMembersPage', () => {
await waitFor(() =>
expect(
getByText(
'The invitations could not be sent. There are already pending invitations for the following email addresses: test+5@clerk.dev, test+6@clerk.dev, and test+7@clerk.dev.',
'The invitations could not be sent. There are already pending invitations for the following email addresses: test+5@clerk.com, test+6@clerk.com, and test+7@clerk.com.',
),
).toBeInTheDocument(),
);
Expand Down Expand Up @@ -262,7 +262,7 @@ describe('InviteMembersPage', () => {
const { wrapper, fixtures } = await createFixtures(f => {
f.withOrganizations();
f.withUser({
email_addresses: ['test@clerk.dev'],
email_addresses: ['test@clerk.com'],
organization_memberships: [{ name: 'Org1', role: 'admin' }],
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('LeaveOrganizationPage', () => {
const { wrapper, fixtures } = await createFixtures(f => {
f.withOrganizations();
f.withUser({
email_addresses: ['test@clerk.dev'],
email_addresses: ['test@clerk.com'],
organization_memberships: [{ name: 'Org1', role: 'basic_member' }],
});
});
Expand All @@ -36,7 +36,7 @@ describe('LeaveOrganizationPage', () => {
const { wrapper, fixtures } = await createFixtures(f => {
f.withOrganizations();
f.withUser({
email_addresses: ['test@clerk.dev'],
email_addresses: ['test@clerk.com'],
organization_memberships: [{ name: 'Org1', role: 'basic_member' }],
});
});
Expand Down
Loading

0 comments on commit 038ddc9

Please sign in to comment.