Skip to content

Commit e6bb8f8

Browse files
authored
Merge branch 'main' into aa/generate-object-docs
2 parents 847d2a6 + a233ddb commit e6bb8f8

11 files changed

Lines changed: 162 additions & 239 deletions

File tree

.changeset/famous-bats-tan.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/slow-breads-pump.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

integration/constants.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,18 @@ export const constants = {
8888
INTEGRATION_INSTANCE_KEYS: process.env.INTEGRATION_INSTANCE_KEYS,
8989
INTEGRATION_STAGING_INSTANCE_KEYS: process.env.INTEGRATION_STAGING_INSTANCE_KEYS,
9090
} as const;
91+
92+
/**
93+
* Floor versions of transitive deps that carry pnpm "trustedPublisher" evidence.
94+
* Injected as `pnpm.overrides` into every fixture's tmp `package.json` so that
95+
* isolated installs satisfy pnpm 10's trust-downgrade check. Sourced from the
96+
* 2026-05-11 npm supply-chain incident response (mini Shai-Hulud worm).
97+
* Update when upstream packages publish newer versions via OIDC trusted publisher.
98+
*/
99+
export const TRUSTED_OVERRIDES: Record<string, string> = {
100+
'semver@<7.7.3': '7.7.4',
101+
'chokidar@<5.0.0': '5.0.0',
102+
'undici-types@<7.16.0': '7.24.8',
103+
'tailwind-merge@<3.4.0': '3.4.0',
104+
'vite@<7.1.3': '7.3.3',
105+
};

integration/models/applicationConfig.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as path from 'node:path';
22

33
import type { AccountlessApplication } from '@clerk/backend';
44

5-
import { constants } from '../constants';
5+
import { constants, TRUSTED_OVERRIDES } from '../constants';
66
import { PKGLAB } from '../presets/utils';
77
import { createLogger, fs } from '../scripts';
88
import { application } from './application';
@@ -125,13 +125,22 @@ export const applicationConfig = () => {
125125
? []
126126
: [...dependencies.entries()].filter(([, version]) => version === PKGLAB).map(([name]) => [name, 'latest']),
127127
);
128+
const packageJsonPath = path.resolve(appDirPath, 'package.json');
129+
const contents = await fs.readJSON(packageJsonPath);
128130
if (npmDeps.length > 0) {
129-
const packageJsonPath = path.resolve(appDirPath, 'package.json');
130131
logger.info(`Modifying dependencies in "${packageJsonPath}"`);
131-
const contents = await fs.readJSON(packageJsonPath);
132132
contents.dependencies = { ...contents.dependencies, ...Object.fromEntries(npmDeps) };
133-
await fs.writeJSON(packageJsonPath, contents, { spaces: 2 });
134133
}
134+
// Pin transitives to versions with pnpm "trustedPublisher" evidence so the
135+
// isolated tmp install passes pnpm 10's trust-downgrade check.
136+
contents.pnpm = {
137+
...(contents.pnpm ?? {}),
138+
overrides: {
139+
...(contents.pnpm?.overrides ?? {}),
140+
...TRUSTED_OVERRIDES,
141+
},
142+
};
143+
await fs.writeJSON(packageJsonPath, contents, { spaces: 2 });
135144

136145
return application(self, appDirPath, appDirName, serverUrl);
137146
},

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,15 @@
161161
"msw"
162162
],
163163
"overrides": {
164+
"chokidar@<5.0.0": "5.0.0",
164165
"react": "catalog:react",
165166
"react-dom": "catalog:react",
166167
"rolldown": "catalog:repo",
167-
"utf-8-validate": "5.0.10"
168+
"semver@<7.7.3": "7.7.4",
169+
"tailwind-merge@<3.4.0": "3.4.0",
170+
"undici-types@<7.16.0": "7.24.8",
171+
"utf-8-validate": "5.0.10",
172+
"vite@<7.1.3": "7.3.3"
168173
}
169174
}
170175
}

packages/react/src/hooks/useAuth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type UseAuthOptions = PendingSessionOptions | undefined | null;
3333
* </If>
3434
*
3535
* @unionReturnHeadings
36-
* ["Initialization", "Signed out", "Signed in (no active organization)", "Signed in (with active organization)"]
36+
* ["Loading", "Signed out", "Signed in (no active organization)", "Signed in (with active organization)"]
3737
*
3838
* @param [options] - An object containing options for the `useAuth()` hook. `treatPendingAsSignedOut` is a boolean that indicates whether pending sessions are considered as signed out or not. Defaults to `true`.
3939
*

packages/shared/src/react/hooks/useSession.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const hookName = `useSession`;
1010
* The `useSession()` hook provides access to the current user's [`Session`](https://clerk.com/docs/reference/objects/session) object, as well as helpers for setting the active session.
1111
*
1212
* @unionReturnHeadings
13-
* ["Initialization", "Signed out", "Signed in"]
13+
* ["Loading", "Signed out", "Signed in"]
1414
*
1515
* @function
1616
*

packages/shared/src/react/hooks/useUser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import { useUserBase } from './base/useUserBase';
55

66
const hookName = 'useUser';
77
/**
8-
* The `useUser()` hook provides access to the current user's [`User`](https://clerk.com/docs/reference/objects/user) object, which contains all the data for a single user in your application and provides methods to manage their account. This hook also allows you to check if the user is signed in and if Clerk has loaded and initialized.
8+
* The `useUser()` hook provides access to the current user's [`User`](https://clerk.com/docs/reference/objects/user) object, which contains all the data for a single user in your application and provides methods to manage their account. This hook also allows you to check if the user is signed in and if Clerk has loaded.
99
*
1010
* @unionReturnHeadings
11-
* ["Initialization", "Signed out", "Signed in"]
11+
* ["Loading", "Signed out", "Signed in"]
1212
*
1313
* @example
1414
* ### Get the current user

packages/ui/src/components/SignUp/__tests__/SignUpStart.test.tsx

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -523,57 +523,4 @@ describe('SignUpStart', () => {
523523
await waitFor(() => screen.getByText(/create your account/i));
524524
});
525525
});
526-
527-
describe('unsafeMetadata', () => {
528-
it('does not throw when signUp.create rejects with an API error', async () => {
529-
Object.defineProperty(window, 'location', {
530-
writable: true,
531-
value: { href: 'http://localhost/sign-up' },
532-
});
533-
534-
let unhandledError: unknown = null;
535-
const onUnhandledRejection = (reason: unknown) => {
536-
unhandledError = reason;
537-
};
538-
process.on('unhandledRejection', onUnhandledRejection);
539-
540-
const { wrapper, fixtures, props } = await createFixtures(f => {
541-
f.withEmailAddress({ required: true });
542-
f.withPassword({ required: true });
543-
});
544-
fixtures.signUp.create.mockRejectedValueOnce(
545-
new ClerkAPIResponseError('Error', {
546-
data: [
547-
{
548-
code: 'form_password_pwned',
549-
long_message: 'Password has been found in an online data breach.',
550-
message: 'Password has been found in an online data breach.',
551-
meta: { param_name: 'password' },
552-
},
553-
],
554-
status: 422,
555-
}),
556-
);
557-
props.setProps({ unsafeMetadata: { foo: 'bar' } });
558-
559-
const { userEvent } = render(
560-
<CardStateProvider>
561-
<SignUpStart />
562-
</CardStateProvider>,
563-
{ wrapper },
564-
);
565-
566-
await userEvent.type(screen.getByLabelText(/email address/i), 'test@example.com');
567-
await userEvent.type(screen.getByPlaceholderText(/create a password/i), 'password123');
568-
await userEvent.click(screen.getByText(/continue/i));
569-
570-
await waitFor(() => expect(fixtures.signUp.create).toHaveBeenCalled());
571-
await screen.findByTestId('form-feedback-error');
572-
// Flush pending microtasks so any unhandled rejection event has a chance to fire.
573-
await new Promise(resolve => setTimeout(resolve, 0));
574-
575-
process.off('unhandledRejection', onUnhandledRejection);
576-
expect(unhandledError).toBeNull();
577-
}, 15_000);
578-
});
579526
});

0 commit comments

Comments
 (0)