-
Notifications
You must be signed in to change notification settings - Fork 431
feat(shared,localizations): Add flatLocalization utility
#7659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 66b9d1c The changes in this PR will be included in the next version bump. This PR includes changesets to release 20 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
📝 WalkthroughWalkthroughAdds support for flattened localization objects and conversion utilities. Introduces the FlattenedLocalizationResource type and new shared utils: unflattenObject and validateLocalizationFormat. Adds flatLocalization and re-exports it from packages/localizations/src/utils. Includes comprehensive runtime and type tests for flatLocalization, a vitest.config.mts and tsconfig.test.json for tests, a package.json test script, vitest devDependencies, expands tsup entry points to include src/utils, and exposes a public exports entry for "./utils" in packages/localizations/package.json. 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
!snapshot |
|
Hey @alexcarpenter - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/agent-toolkit@0.2.9-snapshot.v20260123180714 --save-exact
npm i @clerk/astro@3.0.0-snapshot.v20260123180714 --save-exact
npm i @clerk/backend@3.0.0-snapshot.v20260123180714 --save-exact
npm i @clerk/chrome-extension@3.0.0-snapshot.v20260123180714 --save-exact
npm i @clerk/clerk-js@6.0.0-snapshot.v20260123180714 --save-exact
npm i @clerk/dev-cli@1.0.0-snapshot.v20260123180714 --save-exact
npm i @clerk/expo@3.0.0-snapshot.v20260123180714 --save-exact
npm i @clerk/expo-passkeys@1.0.0-snapshot.v20260123180714 --save-exact
npm i @clerk/express@2.0.0-snapshot.v20260123180714 --save-exact
npm i @clerk/fastify@2.6.9-snapshot.v20260123180714 --save-exact
npm i @clerk/localizations@4.0.0-snapshot.v20260123180714 --save-exact
npm i @clerk/msw@0.0.1-snapshot.v20260123180714 --save-exact
npm i @clerk/nextjs@7.0.0-snapshot.v20260123180714 --save-exact
npm i @clerk/nuxt@2.0.0-snapshot.v20260123180714 --save-exact
npm i @clerk/react@6.0.0-snapshot.v20260123180714 --save-exact
npm i @clerk/react-router@3.0.0-snapshot.v20260123180714 --save-exact
npm i @clerk/shared@4.0.0-snapshot.v20260123180714 --save-exact
npm i @clerk/tanstack-react-start@1.0.0-snapshot.v20260123180714 --save-exact
npm i @clerk/testing@2.0.0-snapshot.v20260123180714 --save-exact
npm i @clerk/ui@1.0.0-snapshot.v20260123180714 --save-exact
npm i @clerk/upgrade@2.0.0-snapshot.v20260123180714 --save-exact
npm i @clerk/vue@2.0.0-snapshot.v20260123180714 --save-exact |
|
!snapshot |
|
Hey @alexcarpenter - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/agent-toolkit@0.2.9-snapshot.v20260123183947 --save-exact
npm i @clerk/astro@3.0.0-snapshot.v20260123183947 --save-exact
npm i @clerk/backend@3.0.0-snapshot.v20260123183947 --save-exact
npm i @clerk/chrome-extension@3.0.0-snapshot.v20260123183947 --save-exact
npm i @clerk/clerk-js@6.0.0-snapshot.v20260123183947 --save-exact
npm i @clerk/dev-cli@1.0.0-snapshot.v20260123183947 --save-exact
npm i @clerk/expo@3.0.0-snapshot.v20260123183947 --save-exact
npm i @clerk/expo-passkeys@1.0.0-snapshot.v20260123183947 --save-exact
npm i @clerk/express@2.0.0-snapshot.v20260123183947 --save-exact
npm i @clerk/fastify@2.6.9-snapshot.v20260123183947 --save-exact
npm i @clerk/localizations@4.0.0-snapshot.v20260123183947 --save-exact
npm i @clerk/msw@0.0.1-snapshot.v20260123183947 --save-exact
npm i @clerk/nextjs@7.0.0-snapshot.v20260123183947 --save-exact
npm i @clerk/nuxt@2.0.0-snapshot.v20260123183947 --save-exact
npm i @clerk/react@6.0.0-snapshot.v20260123183947 --save-exact
npm i @clerk/react-router@3.0.0-snapshot.v20260123183947 --save-exact
npm i @clerk/shared@4.0.0-snapshot.v20260123183947 --save-exact
npm i @clerk/tanstack-react-start@1.0.0-snapshot.v20260123183947 --save-exact
npm i @clerk/testing@2.0.0-snapshot.v20260123183947 --save-exact
npm i @clerk/ui@1.0.0-snapshot.v20260123183947 --save-exact
npm i @clerk/upgrade@2.0.0-snapshot.v20260123183947 --save-exact
npm i @clerk/vue@2.0.0-snapshot.v20260123183947 --save-exact |
Description
A utility function that converts flattened localization objects (with dot-notation keys) to nested
LocalizationResourceobjects for use with Clerk'slocalizationprop.Installation
Usage
Convert flattened localization keys to nested objects:
Use with Clerk components:
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
Summary by CodeRabbit
New Features
Tests
Chores
✏️ Tip: You can customize this high-level summary in your review settings.