Skip to content

Commit

Permalink
Merge branch 'main' into lekoarts/eco-247-bootstrap-new-package
Browse files Browse the repository at this point in the history
  • Loading branch information
LekoArts authored Nov 25, 2024
2 parents ef306a6 + c7f509e commit 94e4944
Show file tree
Hide file tree
Showing 289 changed files with 11,904 additions and 3,778 deletions.
3 changes: 0 additions & 3 deletions .changeset/few-files-switch.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/fifty-cameras-tease.md

This file was deleted.

2 changes: 0 additions & 2 deletions .changeset/friendly-mice-pull.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/itchy-cycles-sell.md

This file was deleted.

2 changes: 0 additions & 2 deletions .changeset/large-bulldogs-tap.md

This file was deleted.

8 changes: 0 additions & 8 deletions .changeset/mighty-clouds-explode.md

This file was deleted.

2 changes: 0 additions & 2 deletions .changeset/orange-radios-nail.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/polite-seals-bake.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/proud-carrots-carry.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/proud-poems-walk.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/red-chicken-visit.md

This file was deleted.

2 changes: 0 additions & 2 deletions .changeset/rude-lions-know.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/shaggy-donuts-cry.md

This file was deleted.

2 changes: 0 additions & 2 deletions .changeset/shy-months-invite.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/silent-bears-worry.md

This file was deleted.

2 changes: 0 additions & 2 deletions .changeset/small-knives-behave.md

This file was deleted.

2 changes: 0 additions & 2 deletions .changeset/ten-hornets-deny.md

This file was deleted.

2 changes: 0 additions & 2 deletions .changeset/ten-jeans-double.md

This file was deleted.

2 changes: 0 additions & 2 deletions .changeset/thin-turkeys-turn.md

This file was deleted.

2 changes: 0 additions & 2 deletions .changeset/unlucky-teachers-joke.md

This file was deleted.

2 changes: 0 additions & 2 deletions .changeset/wet-dryers-pay.md

This file was deleted.

2 changes: 2 additions & 0 deletions .github/actions/init-blacksmith/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ runs:
registry-url: ${{ inputs.registry-url }}

- name: Install PNPM Dependencies
env:
CYPRESS_INSTALL_BINARY: 0
run: pnpm install
shell: bash

Expand Down
4 changes: 3 additions & 1 deletion .github/actions/init/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ runs:
registry-url: ${{ inputs.registry-url }}

- name: Install PNPM Dependencies
run: pnpm install
env:
CYPRESS_INSTALL_BINARY: 0
run: pnpm install
shell: bash

- name: Get Playwright Version
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';
import { useState, useTransition } from 'react';
import { __experimental_useReverification as useReverification } from '@clerk/nextjs';
import { useReverification } from '@clerk/nextjs';
import { logUserIdActionReverification } from '@/app/(reverification)/actions';

function Page() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
'use server';

import { auth } from '@clerk/nextjs/server';
import { __experimental_reverificationError as reverificationError } from '@clerk/shared/authorization-errors';
import { __experimental_ReverificationConfig } from '@clerk/types';

import { auth, reverificationError } from '@clerk/nextjs/server';
import { ReverificationConfig } from '@clerk/types';
const logUserIdActionReverification = async () => {
const { userId, has } = await auth.protect();

const config = {
level: 'second_factor',
afterMinutes: 1,
} satisfies __experimental_ReverificationConfig;
} satisfies ReverificationConfig;

const userNeedsReverification = !has({
__experimental_reverification: config,
reverification: config,
});

if (userNeedsReverification) {
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"version-packages": "changeset version && pnpm install --lockfile-only --engine-strict=false",
"version-packages:canary": "./scripts/canary.mjs",
"version-packages:snapshot": "./scripts/snapshot.mjs",
"yalc:all": "for d in packages/*/; do echo $d; cd $d; pnpm dlx yalc push --replace --sig; cd '../../'; done"
"yalc:all": "for d in packages/*/; do echo $d; cd $d; pnpm yalc push --replace --sig; cd '../../'; done"
},
"devDependencies": {
"@actions/core": "^1.10.1",
Expand Down Expand Up @@ -106,6 +106,7 @@
"typescript": "catalog:repo",
"verdaccio": "^5.26.3",
"vitest": "2.1.4",
"yalc": "1.0.0-pre.53",
"zx": "^7.2.3"
},
"packageManager": "pnpm@9.13.0+sha512.beb9e2a803db336c10c9af682b58ad7181ca0fbd0d4119f2b33d5f2582e96d6c0d93c85b23869295b765170fbdaa92890c0da6ada457415039769edf3c959efe",
Expand All @@ -117,6 +118,9 @@
"overrides": {
"jest": "29.7.0",
"jest-snapshot-prettier": "npm:prettier@^3"
},
"patchedDependencies": {
"yalc@1.0.0-pre.53": "patches/yalc@1.0.0-pre.53.patch"
}
}
}
33 changes: 33 additions & 0 deletions packages/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# @clerk/astro

## 1.4.17

### Patch Changes

- Ignore pre-rendered files in Clerk Middleware ([#4640](https://github.com/clerk/javascript/pull/4640)) by [@jlengstorf](https://github.com/jlengstorf)

## 1.4.16

### Patch Changes

- Updated dependencies [[`fe9e147e366153d664af7fc325655ecb299a1f9d`](https://github.com/clerk/javascript/commit/fe9e147e366153d664af7fc325655ecb299a1f9d), [`fe9e147e366153d664af7fc325655ecb299a1f9d`](https://github.com/clerk/javascript/commit/fe9e147e366153d664af7fc325655ecb299a1f9d), [`d84d7e31235c5c7da3415981dc76db4473a71a39`](https://github.com/clerk/javascript/commit/d84d7e31235c5c7da3415981dc76db4473a71a39), [`fe9e147e366153d664af7fc325655ecb299a1f9d`](https://github.com/clerk/javascript/commit/fe9e147e366153d664af7fc325655ecb299a1f9d), [`dce4f7ffca7248c0500f0ec9a978672b1f2fad69`](https://github.com/clerk/javascript/commit/dce4f7ffca7248c0500f0ec9a978672b1f2fad69)]:
- @clerk/shared@2.17.0
- @clerk/types@4.35.0
- @clerk/backend@1.18.0

## 1.4.15

### Patch Changes

- Updated dependencies [[`c70994b5b6f92a6550dfe37547f01bbfa810c223`](https://github.com/clerk/javascript/commit/c70994b5b6f92a6550dfe37547f01bbfa810c223), [`7623a99594e7329200b6b374e483152d7679ce66`](https://github.com/clerk/javascript/commit/7623a99594e7329200b6b374e483152d7679ce66)]:
- @clerk/types@4.34.2
- @clerk/backend@1.17.2
- @clerk/shared@2.16.1

## 1.4.14

### Patch Changes

- Updated dependencies [[`e47eb5882a7fd4a8dee25933c6644790d6ea3407`](https://github.com/clerk/javascript/commit/e47eb5882a7fd4a8dee25933c6644790d6ea3407), [`273d16cb0665d4d960838cb294dc356f41814745`](https://github.com/clerk/javascript/commit/273d16cb0665d4d960838cb294dc356f41814745), [`6b0961765e1f3d09679be4b163fa13ac7dd97191`](https://github.com/clerk/javascript/commit/6b0961765e1f3d09679be4b163fa13ac7dd97191)]:
- @clerk/shared@2.16.0
- @clerk/types@4.34.1
- @clerk/backend@1.17.1

## 1.4.13

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/astro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@clerk/astro",
"version": "1.4.13",
"version": "1.4.17",
"description": "Clerk SDK for Astro",
"keywords": [
"auth",
Expand Down Expand Up @@ -78,7 +78,7 @@
"lint": "eslint src/",
"lint:attw": "attw --pack . --ignore-rules no-resolution cjs-resolves-to-esm internal-resolution-error",
"lint:publint": "pnpm copy:components && publint",
"publish:local": "pnpm dlx yalc push --replace --sig"
"publish:local": "pnpm yalc push --replace --sig"
},
"dependencies": {
"@clerk/backend": "workspace:*",
Expand Down
5 changes: 5 additions & 0 deletions packages/astro/src/server/clerk-middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ export const clerkMiddleware: ClerkMiddleware = (...args: unknown[]): any => {
const [handler, options] = parseHandlerAndOptions(args);

const astroMiddleware: AstroMiddleware = async (context, next) => {
// if the current page is prerendered, do nothing
if ('isPrerendered' in context && context.isPrerendered) {
return next();
}

const clerkRequest = createClerkRequest(context.request);

clerkClient(context).telemetry.record(
Expand Down
33 changes: 33 additions & 0 deletions packages/backend/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Change Log

## 1.18.0

### Minor Changes

- Update AuthObject property from `__experimental_factorVerificationAge` to `factorVerificationAge`. ([#4536](https://github.com/clerk/javascript/pull/4536)) by [@panteliselef](https://github.com/panteliselef)

Also replaces the following APIs:

- `__experimental_reverificationError` -> `__reverificationError`
- `__experimental_reverificationErrorResponse` -> `reverificationErrorResponse`

### Patch Changes

- Updated dependencies [[`fe9e147e366153d664af7fc325655ecb299a1f9d`](https://github.com/clerk/javascript/commit/fe9e147e366153d664af7fc325655ecb299a1f9d), [`fe9e147e366153d664af7fc325655ecb299a1f9d`](https://github.com/clerk/javascript/commit/fe9e147e366153d664af7fc325655ecb299a1f9d), [`d84d7e31235c5c7da3415981dc76db4473a71a39`](https://github.com/clerk/javascript/commit/d84d7e31235c5c7da3415981dc76db4473a71a39), [`dce4f7ffca7248c0500f0ec9a978672b1f2fad69`](https://github.com/clerk/javascript/commit/dce4f7ffca7248c0500f0ec9a978672b1f2fad69)]:
- @clerk/shared@2.17.0
- @clerk/types@4.35.0

## 1.17.2

### Patch Changes

- Updated dependencies [[`c70994b5b6f92a6550dfe37547f01bbfa810c223`](https://github.com/clerk/javascript/commit/c70994b5b6f92a6550dfe37547f01bbfa810c223), [`7623a99594e7329200b6b374e483152d7679ce66`](https://github.com/clerk/javascript/commit/7623a99594e7329200b6b374e483152d7679ce66)]:
- @clerk/types@4.34.2
- @clerk/shared@2.16.1

## 1.17.1

### Patch Changes

- Updated dependencies [[`e47eb5882a7fd4a8dee25933c6644790d6ea3407`](https://github.com/clerk/javascript/commit/e47eb5882a7fd4a8dee25933c6644790d6ea3407), [`273d16cb0665d4d960838cb294dc356f41814745`](https://github.com/clerk/javascript/commit/273d16cb0665d4d960838cb294dc356f41814745), [`6b0961765e1f3d09679be4b163fa13ac7dd97191`](https://github.com/clerk/javascript/commit/6b0961765e1f3d09679be4b163fa13ac7dd97191)]:
- @clerk/shared@2.16.0
- @clerk/types@4.34.1

## 1.17.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@clerk/backend",
"version": "1.17.0",
"version": "1.18.0",
"description": "Clerk Backend SDK - REST Client for Backend API & JWT verification utilities",
"homepage": "https://clerk.com/",
"bugs": {
Expand Down Expand Up @@ -79,7 +79,7 @@
"build:declarations": "tsc -p tsconfig.declarations.json",
"dev": "tsup --watch",
"dev:publish": "pnpm dev -- --env.publish",
"publish:local": "pnpm dlx yalc push --replace --sig",
"publish:local": "pnpm yalc push --replace --sig",
"build:lib": "tsup --env.NODE_ENV production",
"build:runtime": "cpy 'src/runtime/**/*.{mjs,js,cjs}' dist/runtime",
"clean": "rimraf ./dist",
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/__tests__/exports.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ describe('subpath /internal exports', () => {
expect(Object.keys(internalExports).sort()).toMatchInlineSnapshot(`
[
"AuthStatus",
"__experimental_reverificationError",
"__experimental_reverificationErrorResponse",
"constants",
"createAuthenticateRequest",
"createClerkRequest",
"createRedirect",
"debugRequestState",
"decorateObjectWithResources",
"makeAuthObjectSerializable",
"reverificationError",
"reverificationErrorResponse",
"signedInAuthObject",
"signedOutAuthObject",
"stripPrivateDataFromObject",
Expand Down
5 changes: 1 addition & 4 deletions packages/backend/src/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,4 @@ export { decorateObjectWithResources, stripPrivateDataFromObject } from './util/
export { createClerkRequest } from './tokens/clerkRequest';
export type { ClerkRequest } from './tokens/clerkRequest';

export {
__experimental_reverificationError,
__experimental_reverificationErrorResponse,
} from '@clerk/shared/authorization-errors';
export { reverificationError, reverificationErrorResponse } from '@clerk/shared/authorization-errors';
14 changes: 6 additions & 8 deletions packages/backend/src/tokens/authObjects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ export type SignedInAuthObject = {
* Factor Verification Age
* Each item represents the minutes that have passed since the last time a first or second factor were verified.
* [fistFactorAge, secondFactorAge]
* @experimental This API is experimental and may change at any moment.
*/
__experimental_factorVerificationAge: [number, number] | null;
factorVerificationAge: [number, number] | null;
getToken: ServerGetToken;
has: CheckAuthorizationWithCustomPermissions;
debug: AuthObjectDebug;
Expand All @@ -63,9 +62,8 @@ export type SignedOutAuthObject = {
* Factor Verification Age
* Each item represents the minutes that have passed since the last time a first or second factor were verified.
* [fistFactorAge, secondFactorAge]
* @experimental This API is experimental and may change at any moment.
*/
__experimental_factorVerificationAge: null;
factorVerificationAge: null;
getToken: ServerGetToken;
has: CheckAuthorizationWithCustomPermissions;
debug: AuthObjectDebug;
Expand Down Expand Up @@ -111,7 +109,7 @@ export function signedInAuthObject(
});

// fva can be undefined for instances that have not opt-in
const __experimental_factorVerificationAge = fva ?? null;
const factorVerificationAge = fva ?? null;

return {
actor,
Expand All @@ -122,9 +120,9 @@ export function signedInAuthObject(
orgRole,
orgSlug,
orgPermissions,
__experimental_factorVerificationAge,
factorVerificationAge,
getToken,
has: createCheckAuthorization({ orgId, orgRole, orgPermissions, userId, __experimental_factorVerificationAge }),
has: createCheckAuthorization({ orgId, orgRole, orgPermissions, userId, factorVerificationAge }),
debug: createDebug({ ...authenticateContext, sessionToken }),
};
}
Expand All @@ -142,7 +140,7 @@ export function signedOutAuthObject(debugData?: AuthObjectDebugData): SignedOutA
orgRole: null,
orgSlug: null,
orgPermissions: null,
__experimental_factorVerificationAge: null,
factorVerificationAge: null,
getToken: () => Promise.resolve(null),
has: () => false,
debug: createDebug(debugData),
Expand Down
Loading

0 comments on commit 94e4944

Please sign in to comment.