Converted the `initializeI18nClient` function to an asynchronous function for a more straightforward implementation. Simultaneously, made some tweaks to the UI components, such as altering dimensions in `site-footer.tsx` and `site-page-header.tsx`, and refactoring the `FooterSectionHeading` component for easier maintenance and improved readability.
This commit updates multiple dependencies in the pnpm-lock.yaml file and imports the dynamic method from 'next/dynamic' in the site-header-account-section.tsx file. These updates are part of routine maintenance and improvement of the codebase. The import allows for dynamic imports, which can enhance performance.
This commit adds a fallback mechanism to handle `null` user values in the site header account section. Previously, if `user.data` was `null`, the code could fail. Now, it checks for valid `user.data` before proceeding. For the layout section, it now includes a separate condition for 'light' theme, providing a clear distinction between 'dark'
A "fade-in" animation has been added to the personal account dropdown menu on the dashboard home page. The user data handling has also been modified to ensure the props.user data is used as fallback. The changes should provide a smoother user experience and improved data stability.
Added error logging to the i18n client initialization to better handle and trace errors. Introduced React's Suspense component in `root-providers.tsx` to provide a fallback UI in case a component within the tree is not yet ready to render.
Updated several dependencies that mainly include '@manypkg/cli', '@supabase/supabase-js', 'edge-csrf', 'i18next', '@types/react', 'autoprefixer', 'supabase', and '@sentry/nextjs'. This is a general dependencies update for performance and security improvements, bug fixes, and newer features. The commit also includes changes to '@babel/types' inside dependencies of several packages.
The styling of multiple components has been updated for consistency and readability. A new heading font has been added to improve visual hierarchy. Changes include updating font sizes, adding a new heading font, and adjusting borders and padding over several components.
New type definitions have been added to the billing/core package: UpsertOrderParams and UpsertSubscriptionParams. These types were then exported and used in other services, removing duplication and ensuring type consistency across the package. The changes have been reflected in the package.json file of billing/core package.
Refactored the billing-event-handler.service.ts by introducing new types `UpsertSubscriptionParams` and `UpsertOrderParams` to simplify method parameters. Fixed minor bugs including the correction of an error message in lemon-squeezy-webhook-handler.service.ts and adjusting the handling of attribute types. Also updated comment in billing-webhook-handler.service.ts for better clarity.
The code introduces custom handlers for different billing events like subscription deletion, subscription update, checkout session completion, payment successes and failures, invoice payment, and a generic event handler. These customer handlers allow consumers to add their own custom behaviors when certain billing events occur. This flexibility can be utilized to better adapt the system to various business requirements and rules. Also, the invoice payment event and a generic event handler were added.
Changes are introduced primarily to the site header buttons and styles, as well as some content corrections. Also, the SUPABASE_SERVICE_ROLE_KEY environment variable is now sanitized before use to prevent potential security vulnerabilities. The function 'taintUniqueValue' from React is used to ensure this process. These changes align with good practices for both UI/UX and security.
Changed the captchaTokenSiteKey configuration in auth.config.ts. Previously, it could only accept strings of minimum length 1 but now, it is modified to accept any length string, including an empty string.
Authentication variables have been added to the .env file. This includes enabling password authentication, disabling magic link authentication, and adding
Refactored the user authentication method in the dashboard from getSession to getUser, and updated its related variables accordingly. UI components have also been modified, which includes streamlining the importation of the 'cn' function and exporting the 'Stepper' function directly. Lastly, the 'Stepper' function is now included in the package.json for the UI component package.
This commit updates the 'next' package from version 14.2.0 to 14.2.1 across various modules. It also refactors the code for user account handling to make it controlled by an enableTeamAccounts flag in the featureFlagsConfig, essentially allowing the enabling or disabling of the 'team accounts' feature according to the specified flag.
This commit adds Stripe as the billing provider in the .env file for the web application. This change is essential for enabling Stripe-based transactions within the application.
The code has been adjusted to update the description and requirement error messages of the feature flags. Additionally, the related environment variables used in feature flags have been renamed for better consistency and clarity. This helps in better identification and usage of these feature flags.
Environment variable definitions were moved from .env.development, .env.test and .env.production to a new shared .env file. This provides a centralized location for common environment variables values, easier manageability, and overrides capability in specific environments. The .gitignore file was also updated to no longer ignore the .env file as this file now contains public / non-sensitive configuration values.
The Stripe CLI command in the workflow file has been updated to use Docker. Additionally, the keys for line-item-details.tsx have been modified, changing item.id and tier.upTo to index to avoid potential key duplication issues within the same component.
This update enables sorting of blog page entries based on 'publishedAt' date or custom order. This flexibility has been implemented across the marketing blog page, Keystatic, Wordpress, and Core CMS client services. This functionality allows more control over the presentation of entries.
The theme property was added to the RootProvider component. This allows the application to initially load the theme stored in the user's cookies. The marketing page layout has been updated: images were resized, a billing section was added, and heading styles were adjusted. Text strings were also revised for clarity.
In the .env.test file, the Stripe publishable key for the testing environment was set to a new value. This change ensures that we are using the correct Stripe credentials during testing.
Removed the MONITORING_PROVIDER constant from the monitoring package, replaced it with direct process.env access. This ensures that environment variables are accessed directly at the time of use without intermediate variables. In the apps/web/instrumentation.ts file, refactored condition checks for runtime environment and instrumentation enablement, using direct access environmental variables. This change simplifies the code and improves readability.
The monitoring instrumentation methodology has been simplified for both Baselime and Sentry providers by aligning their registration functions and error handling processes. Specifically, function names have been standardized to 'registerInstrumentation' and handling for the absence of the INSTRUMENTATION_SERVICE_NAME environment variable is now conducted within these functions. In addition, the MONITORING_INSTRUMENTATION_PROVIDER variable has been renamed to MONITORING_PROVIDER.
Deleted the ErrorBoundary component from the makerkit package and introduced new exception capture mechanisms for Baselime and Sentry monitoring providers. The code now captures all exceptions thrown within components and sends them to the configured monitoring provider, which in turn logs the errors for debugging purposes. Updated packages and environment variables accordingly to support this feature.
An environment variable has been added to playwright config for running the server command. On billing error pages, an icon was added to the error message, and the duplicate billing error page was refactored to import from the existing page instead of maintaining separate code. Also, changes were made to the workflow to reflect new Playwright server command.
The .github/workflows/workflow.yml file has been updated to run the 'start:test' command in the background. This change was made to allow the workflow to continue running subsequent steps without waiting for the 'start:test' command to finish.
Changes include updating the user and team billing specs to increase visibility timeout and alter navigation route post-billing. Minor adjustments have been made to the page aesthetics and redirection logic. Also, refactored import statements for code organization purposes. Changes in the build script are also reflected in the commit.
The code changes incorporate UI updates for better usability and user experience. E2E test scripts(in `user-billing.spec.ts` and `team-billing.spec.ts`) were also updated for improved efficiency and accuracy, primarily replacing 'Active' status check with 'Trial'. Changes have been made in the trialDays configuration, with the term 'trialPeriod' now replaced by 'trialDays' across different components. Notably, a new error handling case is included in `lemon-squeezy-billing-strategy.service.ts` for failed subscription cancellation attempts.
Updated the locator for the 'manageBillingButton' in the end-to-end billing test. Instead of an id, the locator now targets a data property. This change was also reflected in the Button component within 'billing-portal-card.tsx' where the attribute data-test was added for test recognition.
Updated end-to-end tests to adjust for changes in user and team billing. Changes include adding await for URL on user-billing.spec.ts and adjusting selectors in billing.po.ts and team-accounts.po.ts. Additionally, we updated test parameters on team-billing.spec.ts.
This commit includes significant changes to the layout and presentation of billing related components. The most notable updates are replacing the static back button in 'billing-session-status.tsx' with a fully clickable link button, and improving the product description lookup to use i18n in 'current-subscription-card.tsx'. Additionally, the general structure and spacing of elements within 'billing/page.tsx' are enhanced for better user experience.
The end-to-end tests have been refactored for clarity and maintainability. This includes changes in how the 'Billing' link is accessed, addition of comments and small coding improvements. Moreover, the test timeout has been reduced from 2 minutes to 1 for efficiency. Changes were also applied to the text content in locales file and minor fixes in component styling.
Added a 'Subscription Cancelled' alert in the billing component to improve visibility of subscription status. Also, removed an unnecessary check for target_account_id in billing-event-handler service as it lead to early exits. Fixed a typo in stripe-webhook-handler service for better consistency in naming conventions.
The commit updates the Next.js package version in the pnpm lockfile from 14.2.0 to 14.2.1. The version update includes all dependencies that specify Next.js.
The commit changes the expected text for billing status in both 'user-billing.spec.ts' and 'team-billing.spec.ts' from 'active' to 'Active'. In addition, the waiting time for the page to return to home in 'billing.po.ts' has been increased from 500ms to 1000ms to improve testing reliability.
The commit adds detailed error messages for missing environment variables across different configuration files. It updates the zod schema validations in different files, such as feature-flags.config.ts, personal-accounts-server-actions.ts, and others to provide more informative error messages when environment variables are not provided.
The code now supplies a detailed error message when an invalid Supabase Service Role Key is provided. The error message prompts the user to check the SUPABASE_SERVICE_ROLE_KEY environment variable ensuring clearer debugging.
Updated the user billing process to add a return to home function and redirect users to their specific account page after payment. Enhanced error handling in the billing event handler to handle scenarios where no account id is found in the subscription. Removed unused billing page object from the stripe page object.
Code for billing process was refactored in end-to-end tests for clean code and better structure. In the described tests, related codes and classes have been moved to a new class named BillingPageObject. All corresponding calls were updated accordingly.
This commit introduces end-to-end tests for the user and team billing features. It also enhances existing billing configurations, logging, and error handling mechanisms. Refactoring has been done to simplify the code and make it more readable. Adjustments have also been made in the visual aspects of some components. The addition of these tests will help ensure the reliability of the billing features.
The join page's redirect functionality has been replaced with permanentRedirect. Adjustments were also made for handling conditional authentication and user account verification. Package upgrades were performed and the i18n client now checks if an instance is already initialized. The process tends to deliver performance benefits and enhancing the code readability.
Removed 'mr-2' from avatar styling in 'account-selector.tsx' and enhanced alignment within the group. Several environment variables were added in the GitHub workflow, improving the security and consistency of the test job. The names for 'typescript' and 'test' jobs are also standardized for better readability.
This commit modifies the `deleteAfter` flag from `false` to `true` in the E2E tests for invitations. This change helps to ensure that invitation emails are deleted after being confirmed during testing, keeping the test environment cleaner.
The playwright.config.ts file has been updated to comment out the part that runs the local dev server during end-to-end tests. Additionally, an action has been added in the GitHub workflow to specifically run the app. Also, a trivial modification to the 'startTransition' function in the 'invite-members-dialog-container.tsx' file has been made.
Improved the clarity of console logs within e2e tests for better debugging. Changed the timeout timing for webhook requests from 1000ms to 5000ms in the supabase seed.sql. The "deleteAfter" option of the visitConfirmEmailLink and getInviteEmail functions in the e2e tests has been set to "false" for email persistence.
The code now includes success and error messages for team member invitation completion. It validates entered email addresses for duplicates and sets a limit on the number of invitations that can be sent at once to avoid server spam. Also, visual changes have been made to the form - label placement, form message, button types, etc.
The refactoring includes the moving of the `getSupabaseClientKeys()` and `getServiceRoleKey()` function calls to the module scope and the addition of a `warnServiceRoleKeyUsage()` function, used to display a warning when the Supabase Service Role is accessed. The change aims to improve code readability and maintainability.
The e2e test configuration has been modified to take screenshots only on failure and the dev server code has been adjusted for better project directory handling. The "supabase:reset" command in package.json no longer starts the server after reset. Default roles 'owner' and 'member' are also now seeded into the roles table, and constraints in the roles table and its associated functions have been updated to manage hierarchy levels and role naming more effectively.