From 4c0bd54248a7248c844f8255120adadea57b5bee Mon Sep 17 00:00:00 2001 From: Ian McPhail Date: Thu, 3 Mar 2022 09:36:16 -0500 Subject: [PATCH 01/10] fix(clerk-expo): Add guard clause for tokenCache methods --- packages/expo/src/singleton.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/expo/src/singleton.ts b/packages/expo/src/singleton.ts index a5962113c40..b93c7e853b6 100644 --- a/packages/expo/src/singleton.ts +++ b/packages/expo/src/singleton.ts @@ -25,8 +25,8 @@ export function buildClerk({ frontendApi, tokenCache, }: BuildClerkOptions): ClerkProp { - const getToken = tokenCache ? tokenCache.getToken : getTokenFromMemory; - const saveToken = tokenCache ? tokenCache.saveToken : saveTokenInMemory; + const getToken = (tokenCache && tokenCache.getToken) ?? getTokenFromMemory; + const saveToken = (tokenCache && tokenCache.saveToken) ?? saveTokenInMemory; if (!clerk) { clerk = new Clerk(frontendApi); From 7a69d870e5a6a73f34d6989643b55d2ff131536e Mon Sep 17 00:00:00 2001 From: Ian McPhail Date: Thu, 3 Mar 2022 09:36:49 -0500 Subject: [PATCH 02/10] fix(clerk-expo): Add early return if tokenCache is not provided --- packages/expo/src/singleton.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/expo/src/singleton.ts b/packages/expo/src/singleton.ts index b93c7e853b6..fc27b5f06a4 100644 --- a/packages/expo/src/singleton.ts +++ b/packages/expo/src/singleton.ts @@ -31,6 +31,11 @@ export function buildClerk({ if (!clerk) { clerk = new Clerk(frontendApi); + if (!tokenCache) { + // Exit early if tokenCache is not provided, assuming web platform + return; + } + // @ts-expect-error clerk.__unstable__onBeforeRequest(async (requestInit: FapiRequestInit) => { // https://reactnative.dev/docs/0.61/network#known-issues-with-fetch-and-cookie-based-authentication From ae00d03e6a188b11862bac3ef401366258f5e862 Mon Sep 17 00:00:00 2001 From: Ian McPhail Date: Thu, 3 Mar 2022 16:57:06 -0500 Subject: [PATCH 03/10] chore(types): Add license --- packages/types/LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 packages/types/LICENSE diff --git a/packages/types/LICENSE b/packages/types/LICENSE new file mode 100644 index 00000000000..66914b6af7c --- /dev/null +++ b/packages/types/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Clerk, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From eb1ee490e608c3b061be03e54b6bb3f368cd01b5 Mon Sep 17 00:00:00 2001 From: Ian McPhail Date: Thu, 3 Mar 2022 16:57:39 -0500 Subject: [PATCH 04/10] chore(types): Add contribution docs --- packages/types/docs/CODE_OF_CONDUCT.md | 132 +++++++++++++++++++++++++ packages/types/docs/CONTRIBUTING.md | 120 ++++++++++++++++++++++ packages/types/docs/SECURITY.md | 19 ++++ 3 files changed, 271 insertions(+) create mode 100644 packages/types/docs/CODE_OF_CONDUCT.md create mode 100644 packages/types/docs/CONTRIBUTING.md create mode 100644 packages/types/docs/SECURITY.md diff --git a/packages/types/docs/CODE_OF_CONDUCT.md b/packages/types/docs/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..ac0d295cf55 --- /dev/null +++ b/packages/types/docs/CODE_OF_CONDUCT.md @@ -0,0 +1,132 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances of + any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email address, + without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +[community@clerk.dev](mailto:community@clerk.dev). +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at +[https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/packages/types/docs/CONTRIBUTING.md b/packages/types/docs/CONTRIBUTING.md new file mode 100644 index 00000000000..596289a82f1 --- /dev/null +++ b/packages/types/docs/CONTRIBUTING.md @@ -0,0 +1,120 @@ +# Contributing + +When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change. +Please note we have a [code of conduct](CODE_OF_CONDUCT.md), please follow it in all your interactions with the project. + +
+TABLE OF CONTENTS + +- [Development environment setup](#development-environment-setup) +- [Issues and feature requests](#issues-and-feature-requests) + - [How to submit a Pull Request](#how-to-submit-a-pull-request) +- [Publishing packages](#publishing-packages) + - [Publishing `@next` package versions](#publishing-next-package-versions) +- [License](#license) + +
+ +## Development environment setup + +The current monorepo setup is based on: + +- [Lerna](https://github.com/lerna/lerna) used mostly for task running and versioning. +- [npm workspaces](https://docs.npmjs.com/cli/v8/using-npm/workspaces) used for package linking. + +### A note on commit messages + +The processes required for Lerna to manage releases and changelogs is done through the [conventional-commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. + +To set up your development environment, please follow these steps: + +1. Clone the repo + + ```sh + git clone https://github.com/clerkinc/javascript + ``` + +2. Change into the directory and install dependencies + + ```sh + cd javascript + npm install + ``` + +3. Build all the packages in the monorepo by running: + + ```sh + npm run build + ``` +## Issues and feature requests + +You've found a bug in the source code, a mistake in the documentation or maybe you'd like a new feature? You can help us by [submitting an issue on GitHub](https://github.com/clerkinc/javascript/issues). Before you create an issue, make sure to search the issue archive -- your issue may have already been addressed! + +Please try to create bug reports that are: + +- _Reproducible._ Include steps to reproduce the problem. +- _Specific._ Include as much detail as possible: which version, what environment, etc. +- _Unique._ Do not duplicate existing opened issues. +- _Scoped to a Single Bug._ One bug per report. + +**Even better: Submit a pull request with a fix or new feature!** + +### How to submit a Pull Request + +1. Search our repository for open or closed + [Pull Requests](https://github.com/clerkinc/javascript/pulls) + that relate to your submission. You don't want to duplicate effort. +2. Fork the project +3. Create your feature branch (`git checkout -b feat/amazing_feature`) +4. Commit your changes (`git commit -m 'feat: Add amazing_feature'`). Clerk uses [conventional commits](https://www.conventionalcommits.org), so please follow the specification in your commit messages. +5. Push to the branch (`git push origin feat/amazing_feature`) +6. [Open a Pull Request](https://github.com/clerkinc/javascript/compare?expand=1) + +## Publishing packages + +_Version updates and publishing is managed using Lerna._ + +### TL;DR +1. `npm run bump` +2. `npm run release` + +### Commands explanation + +After all the features have been merged and we want to create a new release, we use `npm run bump`. + +This script will use `lerna version` to check which packages need to be updated and in what way based on the updates since the previous release. + +The command will guide you through the version changes that are detected and will: +- Bump the package versions. +- Run the `version` hook updating the version info files. +- Create new tags and a "release" commit. +- Push the commit and tags to the origin. + +After that is done, and all seems valid, you can run `npm run release` which will go through the publish process of the packages included in the release commit. + +For more info you can check the [lerna version](https://github.com/lerna/lerna/tree/main/commands/version) and [lerna publish](https://github.com/lerna/lerna/tree/main/commands/publish) documentation. + + +## Publishing `@next` package versions + +_`@next` version updates and publishing is managed using Lerna._ + +Install the `@next` version using `npm install @clerk/{package_name}@next`. + +### TL;DR +1. `npm run bump:next` +2. `npm run release:next` + +### Graduate the next version +To graduate\* the version pointed by the `@next` tag: +1. `npm run graduate:next` +2. `npm run release` + +### Process explanation +The `bump:next` command will create an `alpha` version update on the packages changed. Next if you want to release this version on npm to be installed, you would run the `npm run release:next` which would publish the version under the `@next` tag. + +\* By 'graduate' we mean publishing the `@next` tagged versions, which in actual versions result in `x.y.z-alpha.a.b.c`, to the stable one `x.y.z`. + +## License + +By contributing to Clerk, you agree that your contributions will be licensed under its MIT License. diff --git a/packages/types/docs/SECURITY.md b/packages/types/docs/SECURITY.md new file mode 100644 index 00000000000..eb1a76f8257 --- /dev/null +++ b/packages/types/docs/SECURITY.md @@ -0,0 +1,19 @@ +# Security Policy + +We take the security of our systems seriously, and we value the security community. The disclosure of security vulnerabilities helps us ensure the security and privacy of our users. + +## Reporting a Vulnerability + +**Please do not report security vulnerabilities through public GitHub issues.** + +If you believe you’ve found a security vulnerability in one of our products or platforms, please send it to us by emailing [security@clerk.dev](mailto:security@clerk.dev). Please include the following details with your report: + +1. Description of the location and potential impact of the vulnerability; and + +2. A detailed description of the steps required to reproduce the vulnerability (POC scripts, screenshots, and compressed screen captures are all helpful to us). + +We will evaluate the vulnerability and, if necessary, release a fix or mitigating steps to address it. We will contact you to let you know the outcome, and will credit you in the report. + +Please **do not disclose the vulnerability publicly** until a fix is released. + +Once we have either a) published a fix, or b) declined to address the vulnerability for whatever reason, you are free to publicly disclose it. From 99f678002851008601c2e2d83c7e83a4295d23ea Mon Sep 17 00:00:00 2001 From: Ian McPhail Date: Thu, 3 Mar 2022 16:58:14 -0500 Subject: [PATCH 05/10] chore(types): Update README --- packages/types/README.md | 93 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 92 insertions(+), 1 deletion(-) diff --git a/packages/types/README.md b/packages/types/README.md index 5fed5ae7bf4..e36b00c6ba0 100644 --- a/packages/types/README.md +++ b/packages/types/README.md @@ -1,3 +1,94 @@ +

+ + Clerk logo + +
+

+ # @clerk/types -Typings for Clerk.dev libraries. +
+ +[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A) +[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://docs.clerk.dev?utm_source=github&utm_medium=clerk_types) +[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev) + +[Changelog](CHANGELOG.md) +· +[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+) +· +[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+) +· +[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+) + +
+ +--- + +## Overview + +This package provides the TypeScript type declarations for Clerk libraries. + +## Getting Started + +It is worth noting that Clerk packages automatically include their type declarations when installed so adding this package manually is not typically necessary. + +### Installation + +```sh +npm install --save-dev @clerk/types +``` + +### Build + +```sh +npm run build +``` + +To build types in watch mode, run the following: + +```sh +npm run dev +``` + +## Usage + +Example implementation: + +```ts +import type { OAuthStrategy } from '@clerk/types'; + +export type OAuthProps = { + oAuthOptions: OAuthStrategy[]; + error?: string; + setError?: React.Dispatch>; +}; +``` + +_For further details and examples, please refer to our [Documentation](https://docs.clerk.dev?utm_source=github&utm_medium=clerk_types)._ + +## Support + +You can get in touch with us in any of the following ways: + +- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A) +- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+) +- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_types) + +## Contributing + +We're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](docs/CONTRIBUTING.md). + +## Security + +`@clerk/types` follows good practices of security, but 100% security cannot be assured. + +`@clerk/types` is provided **"as is"** without any **warranty**. Use at your own risk. + +_For more information and to report security issues, please refer to our [security documentation](docs/SECURITY.md)._ + +## License + +This project is licensed under the **MIT license**. + +See [LICENSE](LICENSE) for more information. From 721ce7228c37b012891b2bec8caf290239164d05 Mon Sep 17 00:00:00 2001 From: Peter Perlepes Date: Fri, 4 Mar 2022 13:17:23 +0200 Subject: [PATCH 06/10] fix(clerk-react,clerk-js,types): Crate of API feedback fixes --- packages/clerk-js/src/core/clerk.ts | 9 ------ .../src/core/resources/Organization.ts | 24 ++++++++------ .../core/resources/OrganizationInvitation.ts | 2 +- .../resources/OrganizationMembership.test.ts | 1 + .../core/resources/OrganizationMembership.ts | 30 +++++++++++++++++- .../__snapshots__/Organization.test.ts.snap | 4 +-- .../OrganizationMembership.test.ts.snap | 4 +++ packages/react/src/hooks/index.ts | 1 - packages/react/src/hooks/useOrganization.ts | 27 ---------------- packages/react/src/isomorphicClerk.ts | 15 --------- packages/types/src/json.ts | 1 + packages/types/src/jwt.ts | 4 +++ packages/types/src/organization.ts | 31 ++++++++++++++++--- packages/types/src/organizationMembership.ts | 1 + 14 files changed, 84 insertions(+), 70 deletions(-) delete mode 100644 packages/react/src/hooks/useOrganization.ts diff --git a/packages/clerk-js/src/core/clerk.ts b/packages/clerk-js/src/core/clerk.ts index bdc3f922beb..4600e49aa9c 100644 --- a/packages/clerk-js/src/core/clerk.ts +++ b/packages/clerk-js/src/core/clerk.ts @@ -7,7 +7,6 @@ import type { Clerk as ClerkInterface, ClerkOptions, ClientResource, - CreateOrganizationInvitationParams, CreateOrganizationParams, EnvironmentResource, HandleMagicLinkVerificationParams, @@ -65,7 +64,6 @@ import { MagicLinkError, MagicLinkErrorCode, Organization, - OrganizationInvitation, } from './resources/internal'; export type ClerkCoreBroadcastChannelEvent = { type: 'signout' }; @@ -632,13 +630,6 @@ export default class Clerk implements ClerkInterface { this.#fapiClient.onAfterResponse(callback); } - __unstable_inviteMember = async ( - organizationId: string, - params: CreateOrganizationInvitationParams, - ) => { - return await OrganizationInvitation.create(organizationId, params); - }; - #loadInBrowser = async (): Promise => { this.#authService = new AuthenticationService(this); diff --git a/packages/clerk-js/src/core/resources/Organization.ts b/packages/clerk-js/src/core/resources/Organization.ts index 3f38d1d80e5..97029cf3b76 100644 --- a/packages/clerk-js/src/core/resources/Organization.ts +++ b/packages/clerk-js/src/core/resources/Organization.ts @@ -1,5 +1,5 @@ import type { - GetMembersParams, + GetMembershipsParams, MembershipRole, OrganizationInvitationJSON, OrganizationJSON, @@ -56,13 +56,13 @@ export class Organization extends BaseResource implements OrganizationResource { .catch(() => []); } - getMembers = async ( - getMemberParams?: GetMembersParams, + getMemberships = async ( + getMemberhipsParams?: GetMembershipsParams, ): Promise => { return await BaseResource._fetch({ path: `/organizations/${this.id}/memberships`, method: 'GET', - search: getMemberParams as any, + search: getMemberhipsParams as any, }) .then(res => { const members = @@ -87,8 +87,8 @@ export class Organization extends BaseResource implements OrganizationResource { .catch(() => []); }; - inviteUser = async (inviteUserParams: InviteUserParams) => { - return await OrganizationInvitation.create(this.id, inviteUserParams); + inviteMember = async (inviteMemberParams: InviteMemberParams) => { + return await OrganizationInvitation.create(this.id, inviteMemberParams); }; updateMember = async ({ @@ -105,10 +105,14 @@ export class Organization extends BaseResource implements OrganizationResource { ); }; - removeMember = async (userId: string) => { - return await this._baseDelete({ + removeMember = async (userId: string): Promise => { + return await BaseResource._fetch({ + method: 'DELETE', path: `/organizations/${this.id}/memberships/${userId}`, - }); + }).then( + res => + new OrganizationMembership(res?.response as OrganizationMembershipJSON), + ); }; protected fromJSON(data: OrganizationJSON): this { @@ -128,7 +132,7 @@ export type GetOrganizationParams = { offset?: number; }; -export type InviteUserParams = { +export type InviteMemberParams = { emailAddress: string; role: MembershipRole; redirectUrl?: string; diff --git a/packages/clerk-js/src/core/resources/OrganizationInvitation.ts b/packages/clerk-js/src/core/resources/OrganizationInvitation.ts index 0dcff5e2376..7e7223a7fbf 100644 --- a/packages/clerk-js/src/core/resources/OrganizationInvitation.ts +++ b/packages/clerk-js/src/core/resources/OrganizationInvitation.ts @@ -44,7 +44,7 @@ export class OrganizationInvitation this.fromJSON(data); } - revoke = async () => { + revoke = async (): Promise => { return await this._basePost({ path: `/organizations/${this.organizationId}/invitations/${this.id}/revoke`, }); diff --git a/packages/clerk-js/src/core/resources/OrganizationMembership.test.ts b/packages/clerk-js/src/core/resources/OrganizationMembership.test.ts index 83960de8d05..d7ca7530fb2 100644 --- a/packages/clerk-js/src/core/resources/OrganizationMembership.test.ts +++ b/packages/clerk-js/src/core/resources/OrganizationMembership.test.ts @@ -5,6 +5,7 @@ describe('OrganizationMembership', () => { const organizationMemberShip = new OrganizationMembership({ object: 'organization_membership', id: 'test_id', + organization_id: 'test_org_id', created_at: 12345, updated_at: 5678, role: 'admin', diff --git a/packages/clerk-js/src/core/resources/OrganizationMembership.ts b/packages/clerk-js/src/core/resources/OrganizationMembership.ts index 2e12168fac9..325cc67371c 100644 --- a/packages/clerk-js/src/core/resources/OrganizationMembership.ts +++ b/packages/clerk-js/src/core/resources/OrganizationMembership.ts @@ -6,19 +6,43 @@ import { } from '@clerk/types'; import { unixEpochToDate } from 'utils/date'; -export class OrganizationMembership implements OrganizationMembershipResource { +import { BaseResource } from './internal'; + +export class OrganizationMembership + extends BaseResource + implements OrganizationMembershipResource +{ id!: string; + organizationId!: string; publicUserData!: PublicUserData; role!: MembershipRole; createdAt!: Date; updatedAt!: Date; constructor(data: OrganizationMembershipJSON) { + super(); this.fromJSON(data); } + destroy = async (): Promise => { + // FIXME: Revise the return type of _baseDelete + return (await this._baseDelete({ + path: `/organizations/${this.organizationId}/memberships/${this.publicUserData.userId}`, + })) as unknown as OrganizationMembership; + }; + + update = async ({ + role, + }: UpdateOrganizationMembershipParams): Promise => { + return await this._basePatch({ + path: `/organizations/${this.organizationId}/memberships/${this.publicUserData.userId}`, + body: { role }, + }); + }; + protected fromJSON(data: OrganizationMembershipJSON): this { this.id = data.id; + this.organizationId = data.organization_id; this.publicUserData = { firstName: data.public_user_data.first_name, lastName: data.public_user_data.last_name, @@ -32,3 +56,7 @@ export class OrganizationMembership implements OrganizationMembershipResource { return this; } } + +export type UpdateOrganizationMembershipParams = { + role: MembershipRole; +}; diff --git a/packages/clerk-js/src/core/resources/__snapshots__/Organization.test.ts.snap b/packages/clerk-js/src/core/resources/__snapshots__/Organization.test.ts.snap index ea41d626b67..5640abad70e 100644 --- a/packages/clerk-js/src/core/resources/__snapshots__/Organization.test.ts.snap +++ b/packages/clerk-js/src/core/resources/__snapshots__/Organization.test.ts.snap @@ -4,11 +4,11 @@ exports[`Organization has the same initial properties 1`] = ` Organization { "createdAt": 1970-01-01T00:00:12.345Z, "createdBy": "test_user_id", - "getMembers": [Function], + "getMemberships": [Function], "getPendingInvitations": [Function], "id": "test_id", "instanceId": "test_instance_id", - "inviteUser": [Function], + "inviteMember": [Function], "name": "test_name", "pathRoot": "", "removeMember": [Function], diff --git a/packages/clerk-js/src/core/resources/__snapshots__/OrganizationMembership.test.ts.snap b/packages/clerk-js/src/core/resources/__snapshots__/OrganizationMembership.test.ts.snap index 48cf7112e7c..d91444d13bc 100644 --- a/packages/clerk-js/src/core/resources/__snapshots__/OrganizationMembership.test.ts.snap +++ b/packages/clerk-js/src/core/resources/__snapshots__/OrganizationMembership.test.ts.snap @@ -3,7 +3,10 @@ exports[`OrganizationMembership has the same initial properties 1`] = ` OrganizationMembership { "createdAt": 1970-01-01T00:00:12.345Z, + "destroy": [Function], "id": "test_id", + "organizationId": "test_org_id", + "pathRoot": "", "publicUserData": Object { "firstName": "test_first_name", "identifier": "test@identifier.gr", @@ -12,6 +15,7 @@ OrganizationMembership { "userId": undefined, }, "role": "admin", + "update": [Function], "updatedAt": 1970-01-01T00:00:05.678Z, } `; diff --git a/packages/react/src/hooks/index.ts b/packages/react/src/hooks/index.ts index ad65238be78..3a2b2cdc51c 100644 --- a/packages/react/src/hooks/index.ts +++ b/packages/react/src/hooks/index.ts @@ -1,3 +1,2 @@ -export * from './useOrganization'; export * from './useOrganizations'; export * from './useMagicLink'; diff --git a/packages/react/src/hooks/useOrganization.ts b/packages/react/src/hooks/useOrganization.ts deleted file mode 100644 index c3056d1ac88..00000000000 --- a/packages/react/src/hooks/useOrganization.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { - CreateOrganizationInvitationParams, - OrganizationResource, -} from '@clerk/types'; -import { useContext } from 'react'; - -import { useClerk } from '../contexts'; -import { assertWrappedByClerkProvider } from '../contexts/assertHelpers'; -import { StructureContext } from '../contexts/StructureContext'; - -type UseOrganization = { - inviteMember: ( - params: CreateOrganizationInvitationParams, - ) => Promise; -}; - -export function useOrganization(organizationId: string): UseOrganization { - const structureCtx = useContext(StructureContext); - assertWrappedByClerkProvider(structureCtx); - const clerk = useClerk(); - - return { - inviteMember: async (params: CreateOrganizationInvitationParams) => - // @ts-expect-error - await clerk.__unstable_inviteMember(organizationId, params), - }; -} diff --git a/packages/react/src/isomorphicClerk.ts b/packages/react/src/isomorphicClerk.ts index 126169be89d..2e3bbaad9d3 100644 --- a/packages/react/src/isomorphicClerk.ts +++ b/packages/react/src/isomorphicClerk.ts @@ -237,21 +237,6 @@ export default class IsomorphicClerk { } } - __unstable_inviteMember = async ( - organizationId: string, - params: CreateOrganizationInvitationParams, - ): Promise => { - const callback = () => - // @ts-expect-error - this.clerkjs.__unstable_inviteMember(organizationId, params); - if (this.clerkjs && this._loaded) { - return callback() as Promise; - } else { - // @ts-expect-error - this.premountMethodCalls.set('__unstable_inviteMember', callback); - } - }; - setSession = ( session: ActiveSessionResource | string | null, beforeEmit?: (session: ActiveSessionResource | null) => void | Promise, diff --git a/packages/types/src/json.ts b/packages/types/src/json.ts index 65eed7ddd5e..9727a4ee93c 100644 --- a/packages/types/src/json.ts +++ b/packages/types/src/json.ts @@ -334,6 +334,7 @@ export interface OrganizationJSON extends ClerkResourceJSON { export interface OrganizationMembershipJSON extends ClerkResourceJSON { object: 'organization_membership'; id: string; + organization_id: string; public_user_data: PublicUserDataJSON; role: MembershipRole; created_at: number; diff --git a/packages/types/src/jwt.ts b/packages/types/src/jwt.ts index f26bb2926c0..3ac4cbb2187 100644 --- a/packages/types/src/jwt.ts +++ b/packages/types/src/jwt.ts @@ -1,3 +1,5 @@ +import { MembershipRole } from '.'; + export interface JWTClaims { __raw: string; sub: string; @@ -8,9 +10,11 @@ export interface JWTClaims { iat?: number; nbf?: number; name?: string; + orgs?: OrganizationsJWTClaim; [key: string]: unknown; } +export type OrganizationsJWTClaim = Record; // eslint-disable-next-line @typescript-eslint/naming-convention export interface JWT { encoded: { header: string; payload: string; signature: string }; diff --git a/packages/types/src/organization.ts b/packages/types/src/organization.ts index c1c840aa23a..8b16bb9b4fb 100644 --- a/packages/types/src/organization.ts +++ b/packages/types/src/organization.ts @@ -1,4 +1,8 @@ -import { MembershipRole, OrganizationMembershipResource } from '.'; +import { + MembershipRole, + OrganizationInvitationResource, + OrganizationMembershipResource, +} from '.'; export interface OrganizationResource { id: string; @@ -8,12 +12,31 @@ export interface OrganizationResource { createdBy: string; createdAt: Date; updatedAt: Date; - getMembers: ( - params?: GetMembersParams, + getMemberships: ( + params?: GetMembershipsParams, ) => Promise; + getPendingInvitations: () => Promise; + inviteMember: ( + params: InviteMemberParams, + ) => Promise; + updateMember: ( + params: UpdateMembershipParams, + ) => Promise; + removeMember: (userId: string) => Promise; } -export interface GetMembersParams { +export interface GetMembershipsParams { limit?: number; offset?: number; } + +export interface InviteMemberParams { + emailAddress: string; + role: MembershipRole; + redirectUrl?: string; +} + +export interface UpdateMembershipParams { + userId: string; + role: MembershipRole; +} diff --git a/packages/types/src/organizationMembership.ts b/packages/types/src/organizationMembership.ts index f110d80c8b0..8cbc6eef8c4 100644 --- a/packages/types/src/organizationMembership.ts +++ b/packages/types/src/organizationMembership.ts @@ -2,6 +2,7 @@ import { PublicUserData } from '.'; export interface OrganizationMembershipResource { id: string; + organizationId: string; publicUserData: PublicUserData; role: MembershipRole; createdAt: Date; From a1cdb79f9abde74b92911394b50e7d75107a9cfd Mon Sep 17 00:00:00 2001 From: Peter Perlepes Date: Fri, 4 Mar 2022 13:42:38 +0200 Subject: [PATCH 07/10] fix(types): Change type import from dot --- packages/types/src/clerk.ts | 3 ++- packages/types/src/json.ts | 3 ++- packages/types/src/jwt.ts | 2 +- packages/types/src/organization.ts | 8 +++----- packages/types/src/organizationInvitation.ts | 2 +- packages/types/src/organizationMembership.ts | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/types/src/clerk.ts b/packages/types/src/clerk.ts index 0584b45754e..3d469168284 100644 --- a/packages/types/src/clerk.ts +++ b/packages/types/src/clerk.ts @@ -1,6 +1,7 @@ -import { MembershipRole, OrganizationResource } from '.'; import { ClientResource } from './client'; import { DisplayThemeJSON } from './json'; +import { OrganizationResource } from './organization'; +import { MembershipRole } from './organizationMembership'; import { ActiveSessionResource } from './session'; import { UserResource } from './user'; import { DeepPartial, DeepSnakeToCamel } from './utils'; diff --git a/packages/types/src/json.ts b/packages/types/src/json.ts index 9727a4ee93c..8adb917a545 100644 --- a/packages/types/src/json.ts +++ b/packages/types/src/json.ts @@ -2,10 +2,11 @@ * Currently representing API DTOs in their JSON form. */ -import { MembershipRole, OrganizationInvitationStatus } from '.'; import { ToggleType, ToggleTypeWithRequire } from './authConfig'; import { EmailAddressVerificationStrategy } from './emailAddress'; import { OAuthStrategy } from './oauth'; +import { OrganizationInvitationStatus } from './organizationInvitation'; +import { MembershipRole } from './organizationMembership'; import { SessionStatus } from './session'; import { IdentificationStrategy, diff --git a/packages/types/src/jwt.ts b/packages/types/src/jwt.ts index 3ac4cbb2187..db1ab00ff8c 100644 --- a/packages/types/src/jwt.ts +++ b/packages/types/src/jwt.ts @@ -1,4 +1,4 @@ -import { MembershipRole } from '.'; +import { MembershipRole } from './organizationMembership'; export interface JWTClaims { __raw: string; diff --git a/packages/types/src/organization.ts b/packages/types/src/organization.ts index 8b16bb9b4fb..9d0d24e4a86 100644 --- a/packages/types/src/organization.ts +++ b/packages/types/src/organization.ts @@ -1,8 +1,6 @@ -import { - MembershipRole, - OrganizationInvitationResource, - OrganizationMembershipResource, -} from '.'; +import { OrganizationInvitationResource } from './organizationInvitation'; +import { OrganizationMembershipResource } from './organizationMembership'; +import { MembershipRole } from './organizationMembership'; export interface OrganizationResource { id: string; diff --git a/packages/types/src/organizationInvitation.ts b/packages/types/src/organizationInvitation.ts index ff29c0338a1..5c037116acb 100644 --- a/packages/types/src/organizationInvitation.ts +++ b/packages/types/src/organizationInvitation.ts @@ -1,4 +1,4 @@ -import { MembershipRole } from '.'; +import { MembershipRole } from './organizationMembership'; export interface OrganizationInvitationResource { id: string; diff --git a/packages/types/src/organizationMembership.ts b/packages/types/src/organizationMembership.ts index 8cbc6eef8c4..46ad1b2104c 100644 --- a/packages/types/src/organizationMembership.ts +++ b/packages/types/src/organizationMembership.ts @@ -1,4 +1,4 @@ -import { PublicUserData } from '.'; +import { PublicUserData } from './session'; export interface OrganizationMembershipResource { id: string; From f4dde550190d3b4f894e17f5784c29f934daab40 Mon Sep 17 00:00:00 2001 From: Giannis Katsanos Date: Fri, 4 Mar 2022 12:23:00 +0200 Subject: [PATCH 08/10] feat(backend-core): Organizations API Added support for managing organizations through the OrganizationApi. Currently, the only method that is supported can be used to create a new organization and it's named createOrganization(). Added the Organization resource, along with types for organization properties and JSON serialization. --- packages/backend-core/API.md | 17 +++++++++ .../__tests__/apis/OrganizationApi.test.ts | 37 +++++++++++++++++++ .../src/__tests__/utils/Deserializer.test.ts | 21 +++++++++++ .../backend-core/src/api/ClerkBackendAPI.ts | 13 ++++++- .../src/api/collection/OrganizationApi.ts | 19 ++++++++++ .../backend-core/src/api/collection/index.ts | 1 + .../backend-core/src/api/resources/JSON.ts | 8 ++++ .../src/api/resources/Organization.ts | 23 ++++++++++++ .../backend-core/src/api/resources/Props.ts | 6 +++ .../backend-core/src/api/resources/index.ts | 1 + .../src/api/utils/Deserializer.ts | 21 +++++++---- 11 files changed, 157 insertions(+), 10 deletions(-) create mode 100644 packages/backend-core/src/__tests__/apis/OrganizationApi.test.ts create mode 100644 packages/backend-core/src/api/collection/OrganizationApi.ts create mode 100644 packages/backend-core/src/api/resources/Organization.ts diff --git a/packages/backend-core/API.md b/packages/backend-core/API.md index 12353e73706..8cc6c251a41 100644 --- a/packages/backend-core/API.md +++ b/packages/backend-core/API.md @@ -18,6 +18,8 @@ Reference of the methods supported in the Clerk Backend API wrapper. [API refere - [getInvitationList()](#getinvitationlist) - [createInvitation(params)](#createinvitationparams) - [revokeInvitation(invitationId)](#revokeinvitationinvitationId) +- [Organization operations](#organization-operations) + - [createOrganization(params)](#createorganizationparams) - [Session operations](#session-operations) - [getSessionList({ clientId, userId })](#getsessionlist-clientid-userid-) - [getSession(sessionId)](#getsessionsessionid) @@ -145,6 +147,21 @@ Only active (i.e. non-revoked) invitations can be revoked. const invitation = await clerkAPI.invitations.revokeInvitation('inv_some-id'); ``` +## Organization operations + +Organization operations are exposed by the `organizations` sub-api (`clerkAPI.organizations`). + +#### createOrganization(params) + +Creates a new organization with the given name. You need to provide the user ID who is going to be the organization owner. The user will become an administrator for the organization. + +```js +const organization = await clerkAPI.organizations.createOrganization({ + name: 'Acme Inc', + createdBy: 'user_1o4q123qMeCkKKIXcA9h8', +}); +``` + ## Session operations Session operations are exposed by the `sessions` sub-api (`clerkAPI.sessions`). diff --git a/packages/backend-core/src/__tests__/apis/OrganizationApi.test.ts b/packages/backend-core/src/__tests__/apis/OrganizationApi.test.ts new file mode 100644 index 00000000000..ddc8b727768 --- /dev/null +++ b/packages/backend-core/src/__tests__/apis/OrganizationApi.test.ts @@ -0,0 +1,37 @@ +import nock from 'nock'; + +import { Organization } from '../../api/resources'; +import { TestBackendAPIClient } from '../TestBackendAPI'; + +test('createOrganization() creates an organization', async () => { + const name = 'Acme Inc'; + const createdBy = 'user_randomid'; + const resJSON = { + object: 'organization', + id: 'org_randomid', + name, + created_at: 1611948436, + updated_at: 1611948436, + }; + + nock('https://api.clerk.dev') + .post('/v1/organizations', { + name, + created_by: createdBy, + }) + .reply(200, resJSON); + + const organization = + await TestBackendAPIClient.organizations.createOrganization({ + name, + createdBy, + }); + expect(organization).toEqual( + new Organization({ + id: resJSON.id, + name, + createdAt: resJSON.created_at, + updatedAt: resJSON.updated_at, + }), + ); +}); diff --git a/packages/backend-core/src/__tests__/utils/Deserializer.test.ts b/packages/backend-core/src/__tests__/utils/Deserializer.test.ts index d553f2cd2ca..3e65add1110 100644 --- a/packages/backend-core/src/__tests__/utils/Deserializer.test.ts +++ b/packages/backend-core/src/__tests__/utils/Deserializer.test.ts @@ -3,6 +3,7 @@ import { Client, Email, Invitation, + Organization, Session, SMSMessage, } from '../../api/resources'; @@ -46,6 +47,14 @@ const invitationJSON = { updated_at: 1612378465, }; +const organizationJSON = { + object: 'organization', + id: 'org_randomid', + name: 'Acme Inc', + created_at: 1612378465, + updated_at: 1612378465, +}; + const sessionJSON = { object: 'session', id: 'sess_efgh', @@ -108,6 +117,18 @@ test('deserializes an array of Invitation objects', () => { expect(invitations[0]).toBeInstanceOf(Invitation); }); +test('deserializes an Organization object', () => { + const organization = deserialize(organizationJSON); + expect(organization).toBeInstanceOf(Organization); +}); + +test('deserializes an array of Organization objects', () => { + const organizations = deserialize([organizationJSON]); + expect(organizations).toBeInstanceOf(Array); + expect(organizations.length).toBe(1); + expect(organizations[0]).toBeInstanceOf(Organization); +}); + test('deserializes a Session object', () => { const session = deserialize(sessionJSON); expect(session).toBeInstanceOf(Session); diff --git a/packages/backend-core/src/api/ClerkBackendAPI.ts b/packages/backend-core/src/api/ClerkBackendAPI.ts index 2c6d124bab0..918435b62ee 100644 --- a/packages/backend-core/src/api/ClerkBackendAPI.ts +++ b/packages/backend-core/src/api/ClerkBackendAPI.ts @@ -3,6 +3,7 @@ import { ClientApi, EmailApi, InvitationApi, + OrganizationApi, SessionApi, SMSMessageApi, UserApi, @@ -45,6 +46,7 @@ export class ClerkBackendAPI { private _clientApi?: ClientApi; private _emailApi?: EmailApi; private _invitationApi?: InvitationApi; + private _organizationApi?: OrganizationApi; private _sessionApi?: SessionApi; private _smsMessageApi?: SMSMessageApi; private _userApi?: UserApi; @@ -69,7 +71,7 @@ export class ClerkBackendAPI { fetcher, libName, libVersion, - packageRepo + packageRepo, ); } @@ -103,7 +105,7 @@ export class ClerkBackendAPI { get allowlistIdentifiers(): AllowlistIdentifierApi { if (!this._allowlistIdentifierApi) { this._allowlistIdentifierApi = new AllowlistIdentifierApi( - this._restClient + this._restClient, ); } return this._allowlistIdentifierApi; @@ -132,6 +134,13 @@ export class ClerkBackendAPI { return this._invitationApi; } + get organizations(): OrganizationApi { + if (!this._organizationApi) { + this._organizationApi = new OrganizationApi(this._restClient); + } + return this._organizationApi; + } + get sessions(): SessionApi { if (!this._sessionApi) { this._sessionApi = new SessionApi(this._restClient); diff --git a/packages/backend-core/src/api/collection/OrganizationApi.ts b/packages/backend-core/src/api/collection/OrganizationApi.ts new file mode 100644 index 00000000000..af5957afbdf --- /dev/null +++ b/packages/backend-core/src/api/collection/OrganizationApi.ts @@ -0,0 +1,19 @@ +import { Organization } from '../resources/Organization'; +import { AbstractApi } from './AbstractApi'; + +const basePath = '/organizations'; + +type CreateParams = { + name: string; + createdBy: string; +}; + +export class OrganizationApi extends AbstractApi { + public async createOrganization(params: CreateParams) { + return this._restClient.makeRequest({ + method: 'POST', + path: basePath, + bodyParams: params, + }); + } +} diff --git a/packages/backend-core/src/api/collection/index.ts b/packages/backend-core/src/api/collection/index.ts index 788b2354abd..67683873002 100644 --- a/packages/backend-core/src/api/collection/index.ts +++ b/packages/backend-core/src/api/collection/index.ts @@ -3,6 +3,7 @@ export * from './AllowlistIdentifierApi'; export * from './ClientApi'; export * from './EmailApi'; export * from './InvitationApi'; +export * from './OrganizationApi'; export * from './SMSMessageApi'; export * from './SessionApi'; export * from './UserApi'; diff --git a/packages/backend-core/src/api/resources/JSON.ts b/packages/backend-core/src/api/resources/JSON.ts index 58e285c3d70..10e9d24b84d 100644 --- a/packages/backend-core/src/api/resources/JSON.ts +++ b/packages/backend-core/src/api/resources/JSON.ts @@ -16,6 +16,7 @@ export enum ObjectType { FacebookAccount = 'facebook_account', GoogleAccount = 'google_account', Invitation = 'invitation', + Organization = 'organization', PhoneNumber = 'phone_number', Session = 'session', SignInAttempt = 'sign_in_attempt', @@ -113,6 +114,13 @@ export interface InvitationJSON extends ClerkResourceJSON { updated_at: number; } +export interface OrganizationJSON extends ClerkResourceJSON { + object: ObjectType.Organization; + name: string; + created_at: number; + updated_at: number; +} + export interface PhoneNumberJSON extends ClerkResourceJSON { object: ObjectType.PhoneNumber; phone_number: string; diff --git a/packages/backend-core/src/api/resources/Organization.ts b/packages/backend-core/src/api/resources/Organization.ts new file mode 100644 index 00000000000..d7886187c9c --- /dev/null +++ b/packages/backend-core/src/api/resources/Organization.ts @@ -0,0 +1,23 @@ +import camelcaseKeys from 'camelcase-keys'; + +import filterKeys from '../utils/Filter'; +import type { OrganizationJSON } from './JSON'; +import type { OrganizationProps } from './Props'; + +interface OrganizationPayload extends OrganizationProps {} + +export class Organization { + static attributes = ['id', 'name', 'createdAt', 'updatedAt']; + + static defaults = []; + + constructor(data: Partial = {}) { + Object.assign(this, Organization.defaults, data); + } + + static fromJSON(data: OrganizationJSON): Organization { + const camelcased = camelcaseKeys(data); + const filtered = filterKeys(camelcased, Organization.attributes); + return new Organization(filtered as OrganizationPayload); + } +} diff --git a/packages/backend-core/src/api/resources/Props.ts b/packages/backend-core/src/api/resources/Props.ts index 5f28a2b058b..53cf10b0155 100644 --- a/packages/backend-core/src/api/resources/Props.ts +++ b/packages/backend-core/src/api/resources/Props.ts @@ -63,6 +63,12 @@ export interface InvitationProps extends ClerkProps { updatedAt: number; } +export interface OrganizationProps extends ClerkProps { + name: string; + createdAt: number; + updatedAt: number; +} + export interface PhoneNumberProps extends ClerkProps { phoneNumber: Nullable; // verification: Nullable; diff --git a/packages/backend-core/src/api/resources/index.ts b/packages/backend-core/src/api/resources/index.ts index 45f667b7035..5776810fd6c 100644 --- a/packages/backend-core/src/api/resources/index.ts +++ b/packages/backend-core/src/api/resources/index.ts @@ -6,6 +6,7 @@ export * from './Enums'; export * from './ExternalAccount'; export * from './IdentificationLink'; export * from './Invitation'; +export * from './Organization'; export * from './JSON'; export * from './PhoneNumber'; export * from './Props'; diff --git a/packages/backend-core/src/api/utils/Deserializer.ts b/packages/backend-core/src/api/utils/Deserializer.ts index a5611e67620..8c64305ab7d 100644 --- a/packages/backend-core/src/api/utils/Deserializer.ts +++ b/packages/backend-core/src/api/utils/Deserializer.ts @@ -1,17 +1,20 @@ -import { AllowlistIdentifier } from '../resources/AllowlistIdentifier'; -import { Client } from '../resources/Client'; -import { Email } from '../resources/Email'; -import { Invitation } from '../resources/Invitation'; +import { + AllowlistIdentifier, + Client, + Email, + Invitation, + Organization, + Session, + SMSMessage, + User, +} from '../resources'; import { ObjectType } from '../resources/JSON'; -import { Session } from '../resources/Session'; -import { SMSMessage } from '../resources/SMSMessage'; -import { User } from '../resources/User'; import Logger from './Logger'; // FIXME don't return any export default function deserialize(data: any): any { if (Array.isArray(data)) { - return data.map((item) => jsonToObject(item)); + return data.map(item => jsonToObject(item)); } else { return jsonToObject(data); } @@ -29,6 +32,8 @@ function jsonToObject(item: any): any { return Email.fromJSON(item); case ObjectType.Invitation: return Invitation.fromJSON(item); + case ObjectType.Organization: + return Organization.fromJSON(item); case ObjectType.User: return User.fromJSON(item); case ObjectType.Session: From 8bac04c90ab79c6fb2e319f5c566f421e5984fa7 Mon Sep 17 00:00:00 2001 From: Peter Perlepes Date: Fri, 4 Mar 2022 17:09:21 +0200 Subject: [PATCH 09/10] fix(types): Add OrganizationMembership methods on types --- packages/types/src/organizationMembership.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/types/src/organizationMembership.ts b/packages/types/src/organizationMembership.ts index 46ad1b2104c..8d55667b665 100644 --- a/packages/types/src/organizationMembership.ts +++ b/packages/types/src/organizationMembership.ts @@ -7,6 +7,14 @@ export interface OrganizationMembershipResource { role: MembershipRole; createdAt: Date; updatedAt: Date; + destroy: () => Promise; + update: ( + updateParams: UpdateOrganizationMembershipParams, + ) => Promise; } export type MembershipRole = 'admin' | 'basic_member'; + +export type UpdateOrganizationMembershipParams = { + role: MembershipRole; +}; From 4a9d27a97c622538107ddf79ab07904b812039e2 Mon Sep 17 00:00:00 2001 From: Peter Perlepes Date: Fri, 4 Mar 2022 17:56:55 +0200 Subject: [PATCH 10/10] chore(release): Publish - @clerk/backend-core@0.5.0 - @clerk/clerk-js@2.17.1 - @clerk/edge@0.3.5 - @clerk/clerk-expo@0.8.11 - @clerk/nextjs@2.11.9 - @clerk/clerk-react@2.12.1 - @clerk/clerk-sdk-node@2.9.5 - @clerk/shared@0.0.10 - @clerk/types@1.28.1 --- package-lock.json | 204 +++++++++++++---------------- packages/backend-core/CHANGELOG.md | 9 ++ packages/backend-core/package.json | 2 +- packages/clerk-js/CHANGELOG.md | 9 ++ packages/clerk-js/package.json | 6 +- packages/edge/CHANGELOG.md | 8 ++ packages/edge/package.json | 4 +- packages/edge/src/info.ts | 2 +- packages/expo/CHANGELOG.md | 10 ++ packages/expo/package.json | 8 +- packages/nextjs/CHANGELOG.md | 8 ++ packages/nextjs/package.json | 8 +- packages/react/CHANGELOG.md | 9 ++ packages/react/package.json | 4 +- packages/react/src/info.ts | 2 +- packages/sdk-node/CHANGELOG.md | 8 ++ packages/sdk-node/package.json | 4 +- packages/sdk-node/src/info.ts | 2 +- packages/shared/CHANGELOG.md | 8 ++ packages/shared/package.json | 4 +- packages/types/CHANGELOG.md | 11 ++ packages/types/package.json | 2 +- 22 files changed, 195 insertions(+), 137 deletions(-) diff --git a/package-lock.json b/package-lock.json index 65368d1f5ca..37959913d0a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7463,7 +7463,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "devOptional": true, + "dev": true, "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -8032,7 +8032,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "devOptional": true, + "dev": true, "engines": { "node": ">=8" } @@ -8137,7 +8137,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "devOptional": true, + "dev": true, "dependencies": { "fill-range": "^7.0.1" }, @@ -8524,7 +8524,7 @@ "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "devOptional": true, + "dev": true, "funding": [ { "type": "individual", @@ -8551,7 +8551,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "devOptional": true, + "dev": true, "dependencies": { "is-glob": "^4.0.1" }, @@ -11056,7 +11056,7 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "devOptional": true, + "dev": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -11473,6 +11473,7 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, "hasInstallScript": true, "optional": true, "os": [ @@ -12375,7 +12376,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0.tgz", "integrity": "sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==", - "devOptional": true + "dev": true }, "node_modules/import-fresh": { "version": "3.3.0", @@ -12697,7 +12698,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "devOptional": true, + "dev": true, "dependencies": { "binary-extensions": "^2.0.0" }, @@ -12797,7 +12798,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "devOptional": true, + "dev": true, "engines": { "node": ">=0.10.0" } @@ -12824,7 +12825,7 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "devOptional": true, + "dev": true, "dependencies": { "is-extglob": "^2.1.1" }, @@ -12854,7 +12855,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "devOptional": true, + "dev": true, "engines": { "node": ">=0.12.0" } @@ -16868,7 +16869,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "devOptional": true, + "dev": true, "engines": { "node": ">=0.10.0" } @@ -17812,7 +17813,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "devOptional": true, + "dev": true, "engines": { "node": ">=8.6" }, @@ -19159,7 +19160,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "devOptional": true, + "dev": true, "dependencies": { "picomatch": "^2.2.1" }, @@ -19590,7 +19591,7 @@ "version": "1.49.7", "resolved": "https://registry.npmjs.org/sass/-/sass-1.49.7.tgz", "integrity": "sha512-13dml55EMIR2rS4d/RDHHP0sXMY3+30e1TKsyXaSz3iLWVoDWEoboY8WzJd5JMnxrRHffKO3wq2mpJ0jxRJiEQ==", - "devOptional": true, + "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -20885,7 +20886,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "devOptional": true, + "dev": true, "dependencies": { "is-number": "^7.0.0" }, @@ -22594,7 +22595,7 @@ }, "packages/backend-core": { "name": "@clerk/backend-core", - "version": "0.4.4", + "version": "0.5.0", "license": "MIT", "dependencies": { "camelcase-keys": "^7.0.1", @@ -22623,10 +22624,10 @@ }, "packages/clerk-js": { "name": "@clerk/clerk-js", - "version": "2.17.0", + "version": "2.17.1", "license": "MIT", "dependencies": { - "@clerk/types": "^1.28.0", + "@clerk/types": "^1.28.1", "@popperjs/core": "^2.4.4", "browser-tabs-lock": "^1.2.15", "classnames": "^2.3.1", @@ -22646,7 +22647,7 @@ "@babel/preset-env": "^7.12.1", "@babel/preset-react": "^7.12.5", "@babel/preset-typescript": "^7.12.1", - "@clerk/shared": "^0.0.9", + "@clerk/shared": "^0.0.10", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.2", "@svgr/webpack": "^6.2.1", "@testing-library/dom": "^7.28.1", @@ -22738,10 +22739,10 @@ }, "packages/edge": { "name": "@clerk/edge", - "version": "0.3.4", + "version": "0.3.5", "license": "MIT", "dependencies": { - "@clerk/backend-core": "^0.4.4", + "@clerk/backend-core": "^0.5.0", "@peculiar/webcrypto": "^1.2.3", "next": "^12.0.7" }, @@ -22764,15 +22765,15 @@ }, "packages/expo": { "name": "@clerk/clerk-expo", - "version": "0.8.10", + "version": "0.8.11", "license": "MIT", "dependencies": { - "@clerk/clerk-js": "^2.17.0", - "@clerk/clerk-react": "^2.12.0", + "@clerk/clerk-js": "^2.17.1", + "@clerk/clerk-react": "^2.12.1", "base-64": "^1.0.0" }, "devDependencies": { - "@clerk/types": "^1.28.0", + "@clerk/types": "^1.28.1", "@types/jest": "^27.4.0", "@types/node": "^16.11.9", "@types/react": "^17.0.39", @@ -22799,12 +22800,12 @@ }, "packages/nextjs": { "name": "@clerk/nextjs", - "version": "2.11.8", + "version": "2.11.9", "license": "MIT", "dependencies": { - "@clerk/clerk-react": "^2.12.0", - "@clerk/clerk-sdk-node": "^2.9.4", - "@clerk/types": "^1.28.0", + "@clerk/clerk-react": "^2.12.1", + "@clerk/clerk-sdk-node": "^2.9.5", + "@clerk/types": "^1.28.1", "tslib": "^2.3.1" }, "devDependencies": { @@ -22834,10 +22835,10 @@ }, "packages/react": { "name": "@clerk/clerk-react", - "version": "2.12.0", + "version": "2.12.1", "license": "MIT", "dependencies": { - "@clerk/types": "^1.28.0", + "@clerk/types": "^1.28.1", "tslib": "^2.3.1" }, "devDependencies": { @@ -22874,10 +22875,10 @@ }, "packages/sdk-node": { "name": "@clerk/clerk-sdk-node", - "version": "2.9.4", + "version": "2.9.5", "license": "MIT", "dependencies": { - "@clerk/backend-core": "^0.4.4", + "@clerk/backend-core": "^0.5.0", "@peculiar/webcrypto": "^1.2.3", "camelcase-keys": "^6.2.2", "cookies": "^0.8.0", @@ -23151,12 +23152,12 @@ }, "packages/shared": { "name": "@clerk/shared", - "version": "0.0.9", + "version": "0.0.10", "devDependencies": { "@babel/core": "^7.13.14", "@babel/preset-env": "^7.13.12", "@babel/preset-react": "^7.13.13", - "@clerk/types": "^1.28.0", + "@clerk/types": "^1.28.1", "@popperjs/core": "^2.5.4", "@sentry/browser": "^6.3.0", "@svgr/webpack": "^6.2.1", @@ -23210,7 +23211,7 @@ }, "packages/types": { "name": "@clerk/types", - "version": "1.28.0", + "version": "1.28.1", "license": "MIT", "devDependencies": { "@types/jest": "^27.4.0", @@ -24484,9 +24485,9 @@ "@clerk/clerk-expo": { "version": "file:packages/expo", "requires": { - "@clerk/clerk-js": "^2.17.0", - "@clerk/clerk-react": "^2.12.0", - "@clerk/types": "^1.28.0", + "@clerk/clerk-js": "^2.17.1", + "@clerk/clerk-react": "^2.12.1", + "@clerk/types": "^1.28.1", "@types/jest": "^27.4.0", "@types/node": "^16.11.9", "@types/react": "^17.0.39", @@ -24517,8 +24518,8 @@ "@babel/preset-env": "^7.12.1", "@babel/preset-react": "^7.12.5", "@babel/preset-typescript": "^7.12.1", - "@clerk/shared": "^0.0.9", - "@clerk/types": "^1.28.0", + "@clerk/shared": "^0.0.10", + "@clerk/types": "^1.28.1", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.2", "@popperjs/core": "^2.4.4", "@svgr/webpack": "^6.2.1", @@ -24608,7 +24609,7 @@ "@clerk/clerk-react": { "version": "file:packages/react", "requires": { - "@clerk/types": "^1.28.0", + "@clerk/types": "^1.28.1", "@testing-library/dom": "^7.28.1", "@testing-library/jest-dom": "^5.11.6", "@testing-library/react": "^11.2.1", @@ -24640,7 +24641,7 @@ "@clerk/clerk-sdk-node": { "version": "file:packages/sdk-node", "requires": { - "@clerk/backend-core": "^0.4.4", + "@clerk/backend-core": "^0.5.0", "@peculiar/webcrypto": "^1.2.3", "@types/cookies": "^0.7.7", "@types/express": "^4.17.11", @@ -24779,8 +24780,7 @@ "version": "8.3.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", - "dev": true, - "requires": {} + "dev": true }, "eslint-scope": { "version": "7.1.0", @@ -24841,7 +24841,7 @@ "@clerk/edge": { "version": "file:packages/edge", "requires": { - "@clerk/backend-core": "^0.4.4", + "@clerk/backend-core": "^0.5.0", "@peculiar/webcrypto": "^1.2.3", "@types/jest": "^27.4.0", "@types/node": "^16.11.12", @@ -24862,9 +24862,9 @@ "@clerk/nextjs": { "version": "file:packages/nextjs", "requires": { - "@clerk/clerk-react": "^2.12.0", - "@clerk/clerk-sdk-node": "^2.9.4", - "@clerk/types": "^1.28.0", + "@clerk/clerk-react": "^2.12.1", + "@clerk/clerk-sdk-node": "^2.9.5", + "@clerk/types": "^1.28.1", "@types/jest": "^27.4.0", "@types/node": "^16.11.9", "@types/react": "^17.0.39", @@ -24892,7 +24892,7 @@ "@babel/core": "^7.13.14", "@babel/preset-env": "^7.13.12", "@babel/preset-react": "^7.13.13", - "@clerk/types": "^1.28.0", + "@clerk/types": "^1.28.1", "@popperjs/core": "^2.5.4", "@sentry/browser": "^6.3.0", "@svgr/webpack": "^6.2.1", @@ -25402,8 +25402,7 @@ "version": "0.2.4", "resolved": "https://registry.npmjs.org/@icons/material/-/material-0.2.4.tgz", "integrity": "sha512-QPcGmICAPbGLGb6F/yNf/KzKqvFx8z5qx3D1yFqVAjoFmXK35EgyW+cJ57Te3CNsmzblwtzakLGFqHPqrfb4Tw==", - "dev": true, - "requires": {} + "dev": true }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", @@ -27592,8 +27591,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz", "integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==", - "dev": true, - "requires": {} + "dev": true }, "@octokit/plugin-rest-endpoint-methods": { "version": "5.13.0", @@ -27847,57 +27845,49 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-6.0.0.tgz", "integrity": "sha512-MdPdhdWLtQsjd29Wa4pABdhWbaRMACdM1h31BY+c6FghTZqNGT7pEYdBoaGeKtdTOBC/XNFQaKVj+r/Ei2ryWA==", - "dev": true, - "requires": {} + "dev": true }, "@svgr/babel-plugin-remove-jsx-attribute": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-6.0.0.tgz", "integrity": "sha512-aVdtfx9jlaaxc3unA6l+M9YRnKIZjOhQPthLKqmTXC8UVkBLDRGwPKo+r8n3VZN8B34+yVajzPTZ+ptTSuZZCw==", - "dev": true, - "requires": {} + "dev": true }, "@svgr/babel-plugin-remove-jsx-empty-expression": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-6.0.0.tgz", "integrity": "sha512-Ccj42ApsePD451AZJJf1QzTD1B/BOU392URJTeXFxSK709i0KUsGtbwyiqsKu7vsYxpTM0IA5clAKDyf9RCZyA==", - "dev": true, - "requires": {} + "dev": true }, "@svgr/babel-plugin-replace-jsx-attribute-value": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-6.0.0.tgz", "integrity": "sha512-88V26WGyt1Sfd1emBYmBJRWMmgarrExpKNVmI9vVozha4kqs6FzQJ/Kp5+EYli1apgX44518/0+t9+NU36lThQ==", - "dev": true, - "requires": {} + "dev": true }, "@svgr/babel-plugin-svg-dynamic-title": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-6.0.0.tgz", "integrity": "sha512-F7YXNLfGze+xv0KMQxrl2vkNbI9kzT9oDK55/kUuymh1ACyXkMV+VZWX1zEhSTfEKh7VkHVZGmVtHg8eTZ6PRg==", - "dev": true, - "requires": {} + "dev": true }, "@svgr/babel-plugin-svg-em-dimensions": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-6.0.0.tgz", "integrity": "sha512-+rghFXxdIqJNLQK08kwPBD3Z22/0b2tEZ9lKiL/yTfuyj1wW8HUXu4bo/XkogATIYuXSghVQOOCwURXzHGKyZA==", - "dev": true, - "requires": {} + "dev": true }, "@svgr/babel-plugin-transform-react-native-svg": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-6.0.0.tgz", "integrity": "sha512-VaphyHZ+xIKv5v0K0HCzyfAaLhPGJXSk2HkpYfXIOKb7DjLBv0soHDxNv6X0vr2titsxE7klb++u7iOf7TSrFQ==", - "dev": true, - "requires": {} + "dev": true }, "@svgr/babel-plugin-transform-svg-component": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-6.2.0.tgz", "integrity": "sha512-bhYIpsORb++wpsp91fymbFkf09Z/YEKR0DnFjxvN+8JHeCUD2unnh18jIMKnDJTWtvpTaGYPXELVe4OOzFI0xg==", - "dev": true, - "requires": {} + "dev": true }, "@svgr/babel-preset": { "version": "6.2.0", @@ -29064,8 +29054,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.1.1.tgz", "integrity": "sha512-1FBc1f9G4P/AxMqIgfZgeOTuRnwZMten8E7zap5zgpPInnCrP8D4Q81+4CWIch8i/Nf7nXjP0v6CjjbHOrXhKg==", - "dev": true, - "requires": {} + "dev": true }, "@webpack-cli/info": { "version": "1.4.1", @@ -29080,8 +29069,7 @@ "version": "1.6.1", "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.6.1.tgz", "integrity": "sha512-gNGTiTrjEVQ0OcVnzsRSqTxaBSr+dmTfm+qJsCDluky8uhdLWep7Gcr62QsAKHTMxjCS/8nEITsmFAhfIx+QSw==", - "dev": true, - "requires": {} + "dev": true }, "@xtuc/ieee754": { "version": "1.2.0", @@ -29145,15 +29133,13 @@ "version": "1.8.0", "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", - "dev": true, - "requires": {} + "dev": true }, "acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "requires": {} + "dev": true }, "acorn-walk": { "version": "7.2.0", @@ -29250,8 +29236,7 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "requires": {} + "dev": true }, "ansi-colors": { "version": "4.1.1", @@ -29301,7 +29286,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "devOptional": true, + "dev": true, "requires": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -29753,7 +29738,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "devOptional": true + "dev": true }, "body-parser": { "version": "1.19.1", @@ -29842,7 +29827,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "devOptional": true, + "dev": true, "requires": { "fill-range": "^7.0.1" } @@ -30133,7 +30118,7 @@ "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "devOptional": true, + "dev": true, "requires": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -30149,7 +30134,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "devOptional": true, + "dev": true, "requires": { "is-glob": "^4.0.1" } @@ -31696,15 +31681,13 @@ "version": "8.1.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.1.0.tgz", "integrity": "sha512-oKMhGv3ihGbCIimCAjqkdzx2Q+jthoqnXSP+d86M9tptwugycmTFdVR4IpLgq2c4SHifbwO90z2fQ8/Aio73yw==", - "dev": true, - "requires": {} + "dev": true }, "eslint-plugin-simple-import-sort": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-7.0.0.tgz", "integrity": "sha512-U3vEDB5zhYPNfxT5TYR7u01dboFZp+HNpnGhkDB2g/2E4wZ/g1Q9Ton8UwCLfRV9yAKyYqDh62oHOamvkFxsvw==", - "dev": true, - "requires": {} + "dev": true }, "eslint-scope": { "version": "5.1.1", @@ -32070,7 +32053,7 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "devOptional": true, + "dev": true, "requires": { "to-regex-range": "^5.0.1" } @@ -32376,6 +32359,7 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, "optional": true }, "function-bind": { @@ -33047,8 +33031,7 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", - "dev": true, - "requires": {} + "dev": true }, "identity-obj-proxy": { "version": "3.0.0", @@ -33078,7 +33061,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0.tgz", "integrity": "sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==", - "devOptional": true + "dev": true }, "import-fresh": { "version": "3.3.0", @@ -33322,7 +33305,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "devOptional": true, + "dev": true, "requires": { "binary-extensions": "^2.0.0" } @@ -33388,7 +33371,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "devOptional": true + "dev": true }, "is-fullwidth-code-point": { "version": "3.0.0", @@ -33406,7 +33389,7 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "devOptional": true, + "dev": true, "requires": { "is-extglob": "^2.1.1" } @@ -33427,7 +33410,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "devOptional": true + "dev": true }, "is-number-object": { "version": "1.0.6", @@ -34498,8 +34481,7 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", - "dev": true, - "requires": {} + "dev": true }, "jest-regex-util": { "version": "27.4.0", @@ -36483,7 +36465,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "devOptional": true + "dev": true }, "normalize-range": { "version": "0.1.2", @@ -37195,7 +37177,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "devOptional": true + "dev": true }, "pidtree": { "version": "0.3.1", @@ -37387,8 +37369,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", - "dev": true, - "requires": {} + "dev": true }, "postcss-modules-local-by-default": { "version": "4.0.0", @@ -38221,7 +38202,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "devOptional": true, + "dev": true, "requires": { "picomatch": "^2.2.1" } @@ -38549,7 +38530,7 @@ "version": "1.49.7", "resolved": "https://registry.npmjs.org/sass/-/sass-1.49.7.tgz", "integrity": "sha512-13dml55EMIR2rS4d/RDHHP0sXMY3+30e1TKsyXaSz3iLWVoDWEoboY8WzJd5JMnxrRHffKO3wq2mpJ0jxRJiEQ==", - "devOptional": true, + "dev": true, "requires": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -39269,8 +39250,7 @@ "styled-jsx": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.0.tgz", - "integrity": "sha512-qUqsWoBquEdERe10EW8vLp3jT25s/ssG1/qX5gZ4wu15OZpmSMFI2v+fWlRhLfykA5rFtlJ1ME8A8pm/peV4WA==", - "requires": {} + "integrity": "sha512-qUqsWoBquEdERe10EW8vLp3jT25s/ssG1/qX5gZ4wu15OZpmSMFI2v+fWlRhLfykA5rFtlJ1ME8A8pm/peV4WA==" }, "supports-color": { "version": "5.5.0", @@ -39530,7 +39510,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "devOptional": true, + "dev": true, "requires": { "is-number": "^7.0.0" } @@ -40393,8 +40373,7 @@ "version": "8.4.2", "resolved": "https://registry.npmjs.org/ws/-/ws-8.4.2.tgz", "integrity": "sha512-Kbk4Nxyq7/ZWqr/tarI9yIt/+iNNFOjBXEWgTb4ydaNHBNGgvf2QHbS9fdfsndfjFlFwEd4Al+mw83YkaD10ZA==", - "dev": true, - "requires": {} + "dev": true } } }, @@ -40673,8 +40652,7 @@ "version": "7.5.6", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==", - "dev": true, - "requires": {} + "dev": true }, "xml-name-validator": { "version": "3.0.0", diff --git a/packages/backend-core/CHANGELOG.md b/packages/backend-core/CHANGELOG.md index a975db5b6ad..4167897cd48 100644 --- a/packages/backend-core/CHANGELOG.md +++ b/packages/backend-core/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.5.0](https://github.com/clerkinc/javascript/compare/@clerk/backend-core@0.4.4...@clerk/backend-core@0.5.0) (2022-03-04) + + +### Features + +* **backend-core:** Organizations API ([f4dde55](https://github.com/clerkinc/javascript/commit/f4dde550190d3b4f894e17f5784c29f934daab40)) + + + ### [0.4.4](https://github.com/clerkinc/javascript/compare/@clerk/backend-core@0.4.4-staging.0...@clerk/backend-core@0.4.4) (2022-02-24) **Note:** Version bump only for package @clerk/backend-core diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 51b82115a65..f623ffb8cef 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@clerk/backend-core", - "version": "0.4.4", + "version": "0.5.0", "license": "MIT", "description": "Clerk Backend API core resources and authentication utilities for JavaScript environments.", "scripts": { diff --git a/packages/clerk-js/CHANGELOG.md b/packages/clerk-js/CHANGELOG.md index 011adcb7203..d5d41c92972 100644 --- a/packages/clerk-js/CHANGELOG.md +++ b/packages/clerk-js/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +### [2.17.1](https://github.com/clerkinc/javascript/compare/@clerk/clerk-js@2.17.0...@clerk/clerk-js@2.17.1) (2022-03-04) + + +### Bug Fixes + +* **clerk-react,clerk-js,types:** Crate of API feedback fixes ([721ce72](https://github.com/clerkinc/javascript/commit/721ce7228c37b012891b2bec8caf290239164d05)) + + + ## [2.17.0](https://github.com/clerkinc/javascript/compare/@clerk/clerk-js@2.16.1...@clerk/clerk-js@2.17.0) (2022-03-04) diff --git a/packages/clerk-js/package.json b/packages/clerk-js/package.json index 01890b460d1..230986807b8 100644 --- a/packages/clerk-js/package.json +++ b/packages/clerk-js/package.json @@ -1,6 +1,6 @@ { "name": "@clerk/clerk-js", - "version": "2.17.0", + "version": "2.17.1", "license": "MIT", "description": "Clerk.dev JS library", "keywords": [ @@ -38,7 +38,7 @@ "test:coverage": "jest --collectCoverage" }, "dependencies": { - "@clerk/types": "^1.28.0", + "@clerk/types": "^1.28.1", "@popperjs/core": "^2.4.4", "browser-tabs-lock": "^1.2.15", "classnames": "^2.3.1", @@ -58,7 +58,7 @@ "@babel/preset-env": "^7.12.1", "@babel/preset-react": "^7.12.5", "@babel/preset-typescript": "^7.12.1", - "@clerk/shared": "^0.0.9", + "@clerk/shared": "^0.0.10", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.2", "@svgr/webpack": "^6.2.1", "@testing-library/dom": "^7.28.1", diff --git a/packages/edge/CHANGELOG.md b/packages/edge/CHANGELOG.md index 760954a58f1..165d273bc90 100644 --- a/packages/edge/CHANGELOG.md +++ b/packages/edge/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +### [0.3.5](https://github.com/clerkinc/javascript/compare/@clerk/edge@0.3.4...@clerk/edge@0.3.5) (2022-03-04) + +**Note:** Version bump only for package @clerk/edge + + + + + ### [0.3.4](https://github.com/clerkinc/javascript/compare/@clerk/edge@0.3.4-staging.0...@clerk/edge@0.3.4) (2022-02-24) **Note:** Version bump only for package @clerk/edge diff --git a/packages/edge/package.json b/packages/edge/package.json index 71244f8876f..845d3f6cfd1 100644 --- a/packages/edge/package.json +++ b/packages/edge/package.json @@ -1,6 +1,6 @@ { "name": "@clerk/edge", - "version": "0.3.4", + "version": "0.3.5", "license": "MIT", "description": "Clerk SDK for serverless and edge environments", "keywords": [ @@ -36,7 +36,7 @@ "build": "node ./scripts/info.cjs && tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix" }, "dependencies": { - "@clerk/backend-core": "^0.4.4", + "@clerk/backend-core": "^0.5.0", "@peculiar/webcrypto": "^1.2.3", "next": "^12.0.7" }, diff --git a/packages/edge/src/info.ts b/packages/edge/src/info.ts index 7e0ca2269d2..ec4a46cb894 100644 --- a/packages/edge/src/info.ts +++ b/packages/edge/src/info.ts @@ -1,4 +1,4 @@ /** DO NOT EDIT: This file is automatically generated by ../scripts/info.js */ -export const LIB_VERSION="0.3.4"; +export const LIB_VERSION="0.3.5"; export const LIB_NAME="@clerk/edge"; diff --git a/packages/expo/CHANGELOG.md b/packages/expo/CHANGELOG.md index 41fd293f8b3..918804a0270 100644 --- a/packages/expo/CHANGELOG.md +++ b/packages/expo/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +### [0.8.11](https://github.com/clerkinc/javascript/compare/@clerk/clerk-expo@0.8.10...@clerk/clerk-expo@0.8.11) (2022-03-04) + + +### Bug Fixes + +* **clerk-expo:** Add early return if tokenCache is not provided ([7a69d87](https://github.com/clerkinc/javascript/commit/7a69d870e5a6a73f34d6989643b55d2ff131536e)) +* **clerk-expo:** Add guard clause for tokenCache methods ([4c0bd54](https://github.com/clerkinc/javascript/commit/4c0bd54248a7248c844f8255120adadea57b5bee)) + + + ### [0.8.10](https://github.com/clerkinc/javascript/compare/@clerk/clerk-expo@0.8.9...@clerk/clerk-expo@0.8.10) (2022-03-04) **Note:** Version bump only for package @clerk/clerk-expo diff --git a/packages/expo/package.json b/packages/expo/package.json index 0c60ff603f5..3192e0b20ac 100644 --- a/packages/expo/package.json +++ b/packages/expo/package.json @@ -1,6 +1,6 @@ { "name": "@clerk/clerk-expo", - "version": "0.8.10", + "version": "0.8.11", "license": "MIT", "description": "Clerk.dev React Native/Expo library", "keywords": [ @@ -26,12 +26,12 @@ "dev": "tsc -p tsconfig.build.json --watch" }, "dependencies": { - "@clerk/clerk-js": "^2.17.0", - "@clerk/clerk-react": "^2.12.0", + "@clerk/clerk-js": "^2.17.1", + "@clerk/clerk-react": "^2.12.1", "base-64": "^1.0.0" }, "devDependencies": { - "@clerk/types": "^1.28.0", + "@clerk/types": "^1.28.1", "@types/jest": "^27.4.0", "@types/node": "^16.11.9", "@types/react": "^17.0.39", diff --git a/packages/nextjs/CHANGELOG.md b/packages/nextjs/CHANGELOG.md index e6128eec774..0c30d6b94e9 100644 --- a/packages/nextjs/CHANGELOG.md +++ b/packages/nextjs/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +### [2.11.9](https://github.com/clerkinc/javascript/compare/@clerk/nextjs@2.11.8...@clerk/nextjs@2.11.9) (2022-03-04) + +**Note:** Version bump only for package @clerk/nextjs + + + + + ### [2.11.8](https://github.com/clerkinc/javascript/compare/@clerk/nextjs@2.11.7...@clerk/nextjs@2.11.8) (2022-03-04) **Note:** Version bump only for package @clerk/nextjs diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index 246b685cf4b..9dda1f6b3c2 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -1,6 +1,6 @@ { "name": "@clerk/nextjs", - "version": "2.11.8", + "version": "2.11.9", "license": "MIT", "description": "Clerk.dev SDK for NextJS", "keywords": [ @@ -30,9 +30,9 @@ "dev": "tsc -p tsconfig.build.json --watch" }, "dependencies": { - "@clerk/clerk-react": "^2.12.0", - "@clerk/clerk-sdk-node": "^2.9.4", - "@clerk/types": "^1.28.0", + "@clerk/clerk-react": "^2.12.1", + "@clerk/clerk-sdk-node": "^2.9.5", + "@clerk/types": "^1.28.1", "tslib": "^2.3.1" }, "devDependencies": { diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index db813d92e9c..809f9ea4ec9 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -3,6 +3,15 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +### [2.12.1](https://github.com/clerkinc/javascript/compare/@clerk/clerk-react@2.12.0...@clerk/clerk-react@2.12.1) (2022-03-04) + + +### Bug Fixes + +* **clerk-react,clerk-js,types:** Crate of API feedback fixes ([721ce72](https://github.com/clerkinc/javascript/commit/721ce7228c37b012891b2bec8caf290239164d05)) + + + ## [2.12.0](https://github.com/clerkinc/javascript/compare/@clerk/clerk-react@2.11.7...@clerk/clerk-react@2.12.0) (2022-03-04) diff --git a/packages/react/package.json b/packages/react/package.json index 5c927e73123..f21082a1475 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@clerk/clerk-react", - "version": "2.12.0", + "version": "2.12.1", "license": "MIT", "description": "Clerk.dev React library", "keywords": [ @@ -28,7 +28,7 @@ "test": "jest" }, "dependencies": { - "@clerk/types": "^1.28.0", + "@clerk/types": "^1.28.1", "tslib": "^2.3.1" }, "devDependencies": { diff --git a/packages/react/src/info.ts b/packages/react/src/info.ts index 545a06e6c7f..615d1edf07d 100644 --- a/packages/react/src/info.ts +++ b/packages/react/src/info.ts @@ -1,4 +1,4 @@ /** DO NOT EDIT: This file is automatically generated by ../scripts/info.js */ -export const LIB_VERSION='2.12.0'; +export const LIB_VERSION='2.12.1'; export const LIB_NAME='@clerk/clerk-react'; diff --git a/packages/sdk-node/CHANGELOG.md b/packages/sdk-node/CHANGELOG.md index 7231eafb627..23b48e9ed00 100644 --- a/packages/sdk-node/CHANGELOG.md +++ b/packages/sdk-node/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +### [2.9.5](https://github.com/clerkinc/javascript/compare/@clerk/clerk-sdk-node@2.9.4...@clerk/clerk-sdk-node@2.9.5) (2022-03-04) + +**Note:** Version bump only for package @clerk/clerk-sdk-node + + + + + ### [2.9.4](https://github.com/clerkinc/javascript/compare/@clerk/clerk-sdk-node@2.9.4-staging.0...@clerk/clerk-sdk-node@2.9.4) (2022-02-24) **Note:** Version bump only for package @clerk/clerk-sdk-node diff --git a/packages/sdk-node/package.json b/packages/sdk-node/package.json index 5311ededa54..cb51a5185e0 100644 --- a/packages/sdk-node/package.json +++ b/packages/sdk-node/package.json @@ -1,5 +1,5 @@ { - "version": "2.9.4", + "version": "2.9.5", "license": "MIT", "main": "dist/index.js", "module": "esm/index.js", @@ -51,7 +51,7 @@ "typescript": "4.5.5" }, "dependencies": { - "@clerk/backend-core": "^0.4.4", + "@clerk/backend-core": "^0.5.0", "@peculiar/webcrypto": "^1.2.3", "camelcase-keys": "^6.2.2", "cookies": "^0.8.0", diff --git a/packages/sdk-node/src/info.ts b/packages/sdk-node/src/info.ts index d240d725c78..35b76ba3fba 100644 --- a/packages/sdk-node/src/info.ts +++ b/packages/sdk-node/src/info.ts @@ -1,4 +1,4 @@ /** DO NOT EDIT: This file is automatically generated by ../scripts/info.js */ -export const LIB_VERSION="2.9.4"; +export const LIB_VERSION="2.9.5"; export const LIB_NAME="@clerk/clerk-sdk-node"; diff --git a/packages/shared/CHANGELOG.md b/packages/shared/CHANGELOG.md index 88021c11cc7..fd8fc00a322 100644 --- a/packages/shared/CHANGELOG.md +++ b/packages/shared/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +### [0.0.10](https://github.com/clerkinc/clerk_docker/compare/@clerk/shared@0.0.9...@clerk/shared@0.0.10) (2022-03-04) + +**Note:** Version bump only for package @clerk/shared + + + + + ### [0.0.9](https://github.com/clerkinc/clerk_docker/compare/@clerk/shared@0.0.8...@clerk/shared@0.0.9) (2022-03-04) **Note:** Version bump only for package @clerk/shared diff --git a/packages/shared/package.json b/packages/shared/package.json index 03263ab98aa..1bc52240eac 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@clerk/shared", - "version": "0.0.9", + "version": "0.0.10", "private": true, "main": "index.js", "module": "index.js", @@ -26,7 +26,7 @@ "@babel/core": "^7.13.14", "@babel/preset-env": "^7.13.12", "@babel/preset-react": "^7.13.13", - "@clerk/types": "^1.28.0", + "@clerk/types": "^1.28.1", "@popperjs/core": "^2.5.4", "@sentry/browser": "^6.3.0", "@svgr/webpack": "^6.2.1", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index b7ba39d6972..d24a3b18f43 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +### [1.28.1](https://github.com/clerkinc/javascript/compare/@clerk/types@1.28.0...@clerk/types@1.28.1) (2022-03-04) + + +### Bug Fixes + +* **clerk-react,clerk-js,types:** Crate of API feedback fixes ([721ce72](https://github.com/clerkinc/javascript/commit/721ce7228c37b012891b2bec8caf290239164d05)) +* **types:** Add OrganizationMembership methods on types ([8bac04c](https://github.com/clerkinc/javascript/commit/8bac04c90ab79c6fb2e319f5c566f421e5984fa7)) +* **types:** Change type import from dot ([a1cdb79](https://github.com/clerkinc/javascript/commit/a1cdb79f9abde74b92911394b50e7d75107a9cfd)) + + + ## [1.28.0](https://github.com/clerkinc/javascript/compare/@clerk/types@1.27.1...@clerk/types@1.28.0) (2022-03-04) diff --git a/packages/types/package.json b/packages/types/package.json index b41d70bcbe7..3093be57bed 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@clerk/types", - "version": "1.28.0", + "version": "1.28.1", "license": "MIT", "description": "Typings for Clerk libraries.", "keywords": [