-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from wobsoriano/update-provided-value
Bump clerk-js version
- Loading branch information
Showing
18 changed files
with
347 additions
and
459 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "vue-clerk", | ||
"version": "0.3.5", | ||
"packageManager": "[email protected].0", | ||
"packageManager": "[email protected].1", | ||
"description": "", | ||
"author": "Robert Soriano <[email protected]>", | ||
"license": "MIT", | ||
|
@@ -61,12 +61,12 @@ | |
"vue": "^3.2.0" | ||
}, | ||
"dependencies": { | ||
"@clerk/clerk-js": "^5.2.1", | ||
"@clerk/types": "^4.2.0", | ||
"@clerk/clerk-js": "^5.2.4", | ||
"@clerk/types": "^4.2.1", | ||
"@vueuse/core": "^10.9.0" | ||
}, | ||
"devDependencies": { | ||
"@antfu/eslint-config": "^2.16.3", | ||
"@antfu/eslint-config": "^2.17.0", | ||
"@testing-library/jest-dom": "^6.4.5", | ||
"@testing-library/user-event": "^14.5.2", | ||
"@testing-library/vue": "^8.0.3", | ||
|
@@ -83,6 +83,6 @@ | |
"vitepress": "1.0.2", | ||
"vitest": "^1.6.0", | ||
"vue": "^3.4.27", | ||
"vue-tsc": "^2.0.16" | ||
"vue-tsc": "^2.0.17" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
import type { LoadedClerk } from '@clerk/types' | ||
import { useClerkProvide } from './useClerkProvide' | ||
import { useClerkProvider } from './useClerkProvider' | ||
|
||
export function useClerk(): LoadedClerk { | ||
const { clerk } = useClerkProvide() | ||
export function useClerk() { | ||
const { clerk } = useClerkProvider() | ||
|
||
// The actual value is an instance of IsomorphicClerk, not Clerk | ||
// we expose is as a Clerk instance | ||
return clerk as unknown as LoadedClerk | ||
return clerk | ||
} | ||
|
||
export { | ||
useClerkProvide, | ||
useClerkProvider, | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { inject } from 'vue' | ||
import type { VueClerkInjectionKey } from '../provideClerkToApp' | ||
|
||
export function useClerkProvider() { | ||
const ctx = inject<VueClerkInjectionKey>('VUE_CLERK') | ||
|
||
if (!ctx) { | ||
throw new Error( | ||
'This composable can only be used when the Vue Clerk plugin is installed. Learn more: https://vue-clerk.vercel.app/plugin', | ||
) | ||
} | ||
|
||
return ctx | ||
} | ||
|
||
/** | ||
* @deprecated use `useClerkProvider()` instead | ||
*/ | ||
export const useClerkProvide = useClerkProvider |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.