From d0efff76b4166916e9c9c6690e70fedbb697efce Mon Sep 17 00:00:00 2001 From: Vaggelis Yfantis Date: Tue, 10 Dec 2024 00:08:51 +0200 Subject: [PATCH] fix(tanstack-start): Export error helpers form @clerk/clerk-react (#4741) --- .changeset/calm-tools-sneeze.md | 11 +++++++++++ packages/tanstack-start/errors/package.json | 4 ++++ packages/tanstack-start/package.json | 5 +++++ packages/tanstack-start/src/errors.ts | 7 +++++++ 4 files changed, 27 insertions(+) create mode 100644 .changeset/calm-tools-sneeze.md create mode 100644 packages/tanstack-start/errors/package.json create mode 100644 packages/tanstack-start/src/errors.ts diff --git a/.changeset/calm-tools-sneeze.md b/.changeset/calm-tools-sneeze.md new file mode 100644 index 0000000000..4f40c0abaa --- /dev/null +++ b/.changeset/calm-tools-sneeze.md @@ -0,0 +1,11 @@ +--- +'@clerk/tanstack-start': minor +--- + +Re-export missing error helpers functions from `@clerk/tanstack-start/errors` + +- `isClerkAPIResponseError` +- `isEmailLinkError` +- `isKnownError` +- `isMetamaskError` +- `EmailLinkErrorCode` diff --git a/packages/tanstack-start/errors/package.json b/packages/tanstack-start/errors/package.json new file mode 100644 index 0000000000..30a0e4b152 --- /dev/null +++ b/packages/tanstack-start/errors/package.json @@ -0,0 +1,4 @@ +{ + "main": "../dist/errors.js", + "types": "../dist/errors.d.ts" +} diff --git a/packages/tanstack-start/package.json b/packages/tanstack-start/package.json index cb21a7ffa1..50ce581f44 100644 --- a/packages/tanstack-start/package.json +++ b/packages/tanstack-start/package.json @@ -34,12 +34,17 @@ "types": "./dist/server/index.d.ts", "default": "./dist/server/index.js" }, + "./errors": { + "types": "./dist/errors.d.ts", + "default": "./dist/errors.js" + }, "./package.json": "./package.json" }, "main": "dist/index.js", "types": "dist/index.d.ts", "files": [ "dist", + "errors", "server" ], "scripts": { diff --git a/packages/tanstack-start/src/errors.ts b/packages/tanstack-start/src/errors.ts new file mode 100644 index 0000000000..96c4094f02 --- /dev/null +++ b/packages/tanstack-start/src/errors.ts @@ -0,0 +1,7 @@ +export { + isClerkAPIResponseError, + isEmailLinkError, + isKnownError, + isMetamaskError, + EmailLinkErrorCode, +} from '@clerk/clerk-react/errors';