chore: bump version to 2.21.2 in package.json and update feature flags for account settings (#412)

- Incremented application version from 2.21.0 to 2.21.2 in package.json.
- Added logic to conditionally show email option in account settings based on enabled authentication methods.
- Updated PersonalAccountSettingsContainer to utilize the new showLinkEmailOption feature flag.
- Refactored migration script to correct delimiter usage for better parsing of migration lines.
This commit is contained in:
Giancarlo Buomprisco
2025-11-11 11:05:37 +07:00
committed by GitHub
parent 1583a743ce
commit 7569ebaaad
4 changed files with 14 additions and 5 deletions

View File

@@ -10,9 +10,16 @@ import { createI18nServerInstance } from '~/lib/i18n/i18n.server';
import { withI18n } from '~/lib/i18n/with-i18n'; import { withI18n } from '~/lib/i18n/with-i18n';
import { requireUserInServerComponent } from '~/lib/server/require-user-in-server-component'; import { requireUserInServerComponent } from '~/lib/server/require-user-in-server-component';
// Show email option if password, magic link, or OTP is enabled
const showEmailOption =
authConfig.providers.password ||
authConfig.providers.magicLink ||
authConfig.providers.otp;
const features = { const features = {
enableAccountDeletion: featureFlagsConfig.enableAccountDeletion, showLinkEmailOption: showEmailOption,
enablePasswordUpdate: authConfig.providers.password, enablePasswordUpdate: authConfig.providers.password,
enableAccountDeletion: featureFlagsConfig.enableAccountDeletion,
enableAccountLinking: authConfig.enableIdentityLinking, enableAccountLinking: authConfig.enableIdentityLinking,
}; };

View File

@@ -1,6 +1,6 @@
{ {
"name": "next-supabase-saas-kit-turbo", "name": "next-supabase-saas-kit-turbo",
"version": "2.21.0", "version": "2.21.2",
"private": true, "private": true,
"sideEffects": false, "sideEffects": false,
"engines": { "engines": {

View File

@@ -33,6 +33,7 @@ export function PersonalAccountSettingsContainer(
enableAccountDeletion: boolean; enableAccountDeletion: boolean;
enablePasswordUpdate: boolean; enablePasswordUpdate: boolean;
enableAccountLinking: boolean; enableAccountLinking: boolean;
showLinkEmailOption: boolean;
}; };
paths: { paths: {
@@ -171,8 +172,8 @@ export function PersonalAccountSettingsContainer(
<LinkAccountsList <LinkAccountsList
providers={props.providers} providers={props.providers}
enabled={props.features.enableAccountLinking} enabled={props.features.enableAccountLinking}
showEmailOption showEmailOption={props.features.showLinkEmailOption}
showPasswordOption showPasswordOption={props.features.enablePasswordUpdate}
/> />
</CardContent> </CardContent>
</Card> </Card>

View File

@@ -16,7 +16,8 @@ export function checkPendingMigrations() {
const pendingMigrations = migrationLines const pendingMigrations = migrationLines
.filter((line) => { .filter((line) => {
const [local, remote] = line.split('').map((s) => s.trim()); const [local, remote] = line.split('|').map((s) => s.trim());
return local !== '' && remote === ''; return local !== '' && remote === '';
}) })
.map((line) => (line.split('│')[0] ?? '').trim()); .map((line) => (line.split('│')[0] ?? '').trim());