Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/smart-rooms-refuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
4 changes: 3 additions & 1 deletion packages/tanstack-react-start/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
"lint": "eslint src",
"lint:attw": "attw --pack . --profile esm-only",
"lint:publint": "publint",
"publish:local": "pnpm yalc push --replace --sig"
"publish:local": "pnpm yalc push --replace --sig",
"test": "vitest run",
"test:watch": "vitest watch"
},
"dependencies": {
"@clerk/backend": "workspace:^",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`errors public exports > should not change unexpectedly 1`] = `
[
"EmailLinkErrorCode",
"EmailLinkErrorCodeStatus",
"isClerkAPIResponseError",
"isEmailLinkError",
"isKnownError",
"isMetamaskError",
"isReverificationCancelledError",
]
`;

exports[`root public exports > should not change unexpectedly 1`] = `
[
"AuthenticateWithRedirectCallback",
"ClerkDegraded",
"ClerkFailed",
"ClerkLoaded",
"ClerkLoading",
"ClerkProvider",
"CreateOrganization",
"GoogleOneTap",
"OrganizationList",
"OrganizationProfile",
"OrganizationSwitcher",
"Protect",
"RedirectToCreateOrganization",
"RedirectToOrganizationProfile",
"RedirectToSignIn",
"RedirectToSignUp",
"RedirectToUserProfile",
"SignIn",
"SignInButton",
"SignInWithMetamaskButton",
"SignOutButton",
"SignUp",
"SignUpButton",
"SignedIn",
"SignedOut",
"UserButton",
"UserProfile",
"Waitlist",
"useAuth",
"useClerk",
"useEmailLink",
"useOrganization",
"useOrganizationList",
"useReverification",
"useSession",
"useSessionList",
"useSignIn",
"useSignUp",
"useUser",
]
`;

exports[`server public exports > should not change unexpectedly 1`] = `
[
"clerkClient",
"createClerkHandler",
"getAuth",
]
`;

exports[`webhooks public exports > should not change unexpectedly 1`] = `
[
"verifyWebhook",
]
`;
28 changes: 28 additions & 0 deletions packages/tanstack-react-start/src/__tests__/exports.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import * as errorsExports from '../errors';
import * as publicExports from '../index';
import * as serverExports from '../server/index';
import * as webhooksExports from '../webhooks';

describe('root public exports', () => {
it('should not change unexpectedly', () => {
expect(Object.keys(publicExports).sort()).toMatchSnapshot();
});
});

describe('server public exports', () => {
it('should not change unexpectedly', () => {
expect(Object.keys(serverExports).sort()).toMatchSnapshot();
});
});

describe('errors public exports', () => {
it('should not change unexpectedly', () => {
expect(Object.keys(errorsExports).sort()).toMatchSnapshot();
});
});

describe('webhooks public exports', () => {
it('should not change unexpectedly', () => {
expect(Object.keys(webhooksExports).sort()).toMatchSnapshot();
});
});
9 changes: 9 additions & 0 deletions packages/tanstack-react-start/vitest.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
globals: true,
environment: 'jsdom',
setupFiles: './vitest.setup.mts',
},
});
3 changes: 3 additions & 0 deletions packages/tanstack-react-start/vitest.setup.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
globalThis.__DEV__ = true;
globalThis.PACKAGE_NAME = '@clerk/tanstack-react-start';
globalThis.PACKAGE_VERSION = '0.0.0-test';