Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@clerk/shared

Package Overview
Dependencies
Maintainers
7
Versions
1752
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@clerk/shared - npm Package Compare versions

Comparing version 0.20.0-staging.0847f32 to 0.20.0-staging.5ecbb0a

15

dist/cjs/utils/url.js

@@ -22,4 +22,2 @@ "use strict";

addClerkPrefix: () => addClerkPrefix,
isCrossOrigin: () => isCrossOrigin,
isRelativeUrl: () => isRelativeUrl,
parseSearchParams: () => parseSearchParams,

@@ -29,3 +27,2 @@ stripScheme: () => stripScheme

module.exports = __toCommonJS(url_exports);
const DUMMY_URL_BASE = "http://clerk-dummy";
function parseSearchParams(queryString = "") {

@@ -55,17 +52,5 @@ if (queryString.startsWith("?")) {

}
function isRelativeUrl(str) {
const url = new URL(str, DUMMY_URL_BASE);
return url.origin === DUMMY_URL_BASE;
}
function isCrossOrigin(str1, str2) {
const base = typeof window === void 0 ? DUMMY_URL_BASE : window.location.origin;
const url1 = new URL(str1, base);
const url2 = new URL(str2, base);
return url1.origin !== url2.origin;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
addClerkPrefix,
isCrossOrigin,
isRelativeUrl,
parseSearchParams,

@@ -72,0 +57,0 @@ stripScheme

@@ -1,2 +0,1 @@

const DUMMY_URL_BASE = "http://clerk-dummy";
function parseSearchParams(queryString = "") {

@@ -26,16 +25,4 @@ if (queryString.startsWith("?")) {

}
function isRelativeUrl(str) {
const url = new URL(str, DUMMY_URL_BASE);
return url.origin === DUMMY_URL_BASE;
}
function isCrossOrigin(str1, str2) {
const base = typeof window === void 0 ? DUMMY_URL_BASE : window.location.origin;
const url1 = new URL(str1, base);
const url2 = new URL(str2, base);
return url1.origin !== url2.origin;
}
export {
addClerkPrefix,
isCrossOrigin,
isRelativeUrl,
parseSearchParams,

@@ -42,0 +29,0 @@ stripScheme

27

dist/types/hooks/useOrganizations.d.ts
import type { CreateOrganizationParams, OrganizationMembershipResource, OrganizationResource } from '@clerk/types';
type UseOrganizationsReturn = {
isLoaded: false;
/**
* @deprecated Use `createOrganization` from `useOrganizationList`
* Example const {createOrganization} = useOrganizationList()
*/
createOrganization: undefined;
/**
* @deprecated Use `membershipList` from `useOrganization`
* Example const {membershipList} = useOrganization()
*/
getOrganizationMemberships: undefined;
/**
* @deprecated Use `getOrganization` from `useClerk`
* Example const {getOrganization} = useClerk()
*/
getOrganization: undefined;
} | {
isLoaded: true;
/**
* @deprecated Use `createOrganization` from `useOrganizationList`
* Example const {createOrganization} = useOrganizationList()
*/
createOrganization: (params: CreateOrganizationParams) => Promise<OrganizationResource>;
/**
* @deprecated Use `membershipList` from `useOrganization`
* Example const {membershipList} = useOrganization()
*/
getOrganizationMemberships: () => Promise<OrganizationMembershipResource[]>;
/**
* @deprecated Use `getOrganization` from `useClerk`
* Example const {getOrganization} = useClerk()
*/
getOrganization: (organizationId: string) => Promise<OrganizationResource | undefined>;
};
type UseOrganizations = () => UseOrganizationsReturn;
/**
* @deprecated Use useOrganizationList, useOrganization, or useClerk instead
*/
export declare const useOrganizations: UseOrganizations;
export {};
//# sourceMappingURL=useOrganizations.d.ts.map

2

dist/types/utils/url.d.ts
export declare function parseSearchParams(queryString?: string): URLSearchParams;
export declare function stripScheme(url?: string): string;
export declare function addClerkPrefix(str: string | undefined): string;
export declare function isRelativeUrl(str: string): boolean;
export declare function isCrossOrigin(str1: string, str2: string): boolean;
//# sourceMappingURL=url.d.ts.map
{
"name": "@clerk/shared",
"version": "0.20.0-staging.0847f32",
"version": "0.20.0-staging.5ecbb0a",
"description": "Internal package utils used by the Clerk SDKs",

@@ -38,3 +38,3 @@ "types": "./dist/types/index.d.ts",

"devDependencies": {
"@clerk/types": "3.46.1-staging.0847f32",
"@clerk/types": "3.47.0-staging.5ecbb0a",
"@types/glob-to-regexp": "0.4.1",

@@ -41,0 +41,0 @@ "@types/js-cookie": "3.0.2",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc