Skip to content

V16: Upgrade Login dependencies to Umbraco 16 #19433

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

Merged
merged 3 commits into from
May 28, 2025

Conversation

iOvergaard
Copy link
Contributor

@iOvergaard iOvergaard commented May 27, 2025

Note

We can upgrade to a public Umbraco 16 RC version on the login screen because we only need to match the typings

This pull request introduces several updates to the Umbraco.Web.UI.Login project, focusing on dependency upgrades, improved error handling, and code consistency. The most important changes include upgrading dependencies in package.json, enhancing error handling in various components, and improving code readability and consistency by updating imports and formatting.

Dependency Upgrades:

  • Updated @umbraco-cms/backoffice to version 16.0.0-rc3, @hey-api/openapi-ts to ^0.67.3, typescript to ^5.8.3, and vite to ^6.3.5 in package.json for compatibility with the latest features and bug fixes.

Error Handling Improvements:

  • Added checks for authContext availability in UmbNewPasswordLayoutElement and UmbResetPasswordPageElement to prevent potential runtime errors when the authentication context is unavailable. [1] [2]
  • Enhanced error handling in UmbSlimBackofficeController by adding a catch block for registerPublicExtensions to gracefully handle errors during extension registration.

Code Consistency and Cleanup:

  • Standardized import formatting across multiple files (e.g., reset-password.page.element.ts, auth.context.ts, auth.repository.ts, slim-backoffice-initializer.ts) by using single quotes and consistent ordering. [1] [2] [3] [4]

@iOvergaard iOvergaard requested review from leekelleher and Copilot May 27, 2025 12:30
@iOvergaard iOvergaard added dependencies Pull requests that update a dependency file release/16.0.0 release/16.0.0-rc4 labels May 27, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades the Umbraco login project to use Umbraco 16 dependencies, strengthens error handling guards in UI components, and brings consistent import formatting across the codebase.

  • Bumped core dependencies in package.json to align with Umbraco 16 (RC) and updated tooling versions.
  • Added fallback error handling for missing contexts and registration failures.
  • Standardized import syntax and quote style in multiple TypeScript files.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Umbraco.Web.UI.Login/src/controllers/slim-backoffice-initializer.ts Added a .catch() to extension registration and consolidated imports
src/Umbraco.Web.UI.Login/src/contexts/auth.repository.ts Reordered/moved backoffice imports for consistency
src/Umbraco.Web.UI.Login/src/contexts/auth.context.ts Standardized import quotes and removed redundant generic parameter
src/Umbraco.Web.UI.Login/src/components/pages/reset-password.page.element.ts Standardized imports and added guard for missing authContext
src/Umbraco.Web.UI.Login/src/components/pages/login.page.element.ts Updated supportPersistLogin assignment to use optional chaining
src/Umbraco.Web.UI.Login/src/components/layouts/new-password-layout.element.ts Added guard for missing passwordConfiguration and standardized imports
src/Umbraco.Web.UI.Login/package.json Upgraded @umbraco-cms/backoffice, @hey-api/openapi-ts, typescript, and vite

Copy link
Member

@leekelleher leekelleher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested out, Login works as expected! 🚀

@leekelleher leekelleher merged commit 434189e into release/16.0 May 28, 2025
20 of 21 checks passed
@leekelleher leekelleher deleted the v16/feature/login-v16-upgrade branch May 28, 2025 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file release/16.0.0-rc4 release/16.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants