Skip to content
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

Angular update to version 14 #1285

Merged
merged 36 commits into from
Jan 18, 2023
Merged

Angular update to version 14 #1285

merged 36 commits into from
Jan 18, 2023

Conversation

art-alexeyenko
Copy link
Contributor

Update for Angular package and sample app to version 14

Description / Motivation

JSS will now use the LTS version of Angular. This comes with some side effects, considering the changes introduced in Angular 13 (https://blog.angular.io/angular-v13-is-now-available-cce66f7bc296)

  • sitecore-jss-angular is now built into ESM, no UMD output available.
  • sitecore-jss-angular is configured as an angular library. angular.json added, ng test is used to run unit tests.
  • karma-typescript no longer used for unit tests in sitecore-jss-angular due to compatibility issues Is karma-typescript compatible with Angular 13+ ? monounity/karma-typescript#589 .
  • Test coverage report is no longer written to console, only the html output is generated.
  • ComponentFactoryResult interface no longer has componentFactory field as it's no longer needed. The new approach to component creation can be used.
  • IE11 no longer supported by JSS angular apps.
  • angular sample app uses constants from a dedicated JSON file now, instead of importing them from base package, due to module format conflicts.
  • Removed and deprecated imports are removed and the logic corrected to account for the changes.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@art-alexeyenko art-alexeyenko requested review from illiakovalenko and a team January 11, 2023 22:31
Copy link
Contributor

@illiakovalenko illiakovalenko left a comment

Choose a reason for hiding this comment

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

Great work! See review comments below and some things to mention:

  1. Check packages by using npm i, sitecore-jss-angular can't be installed
  2. npm run coverage is not working for sitecore-jss-angular
  3. Coverage report should be logged to the console as it was before
  4. Unit tests coverage is not included in Azure pipelines coverage report, but it should be there as it was before
  5. Check package.json files and use latest version everywhere. (^ uses the latest, but anyway it should be explicitly set)
  6. There is no way to import something from sitecore-jss-angular if you are using script, it's an issue and we will need to maintain both places (cause you added duplicate)

CHANGELOG.md Outdated Show resolved Hide resolved
packages/sitecore-jss-angular-schematics/package.json Outdated Show resolved Hide resolved
packages/sitecore-jss-angular/tsconfig.json Outdated Show resolved Hide resolved
packages/sitecore-jss-angular/tsconfig.spec.json Outdated Show resolved Hide resolved
packages/sitecore-jss-angular/angular.json Outdated Show resolved Hide resolved
packages/sitecore-jss-angular/package.json Show resolved Hide resolved
packages/sitecore-jss-angular/angular.json Show resolved Hide resolved
packages/sitecore-jss-angular/package.json Outdated Show resolved Hide resolved
packages/sitecore-jss-angular/.gitignore Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
packages/sitecore-jss-angular/base-pkg-cjs.d.ts Outdated Show resolved Hide resolved
packages/sitecore-jss-angular/base-pkg-cjs.js Outdated Show resolved Hide resolved
Copy link
Contributor

@illiakovalenko illiakovalenko left a comment

Choose a reason for hiding this comment

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

Nice work! 👍

CHANGELOG.md Outdated Show resolved Hide resolved
@art-alexeyenko art-alexeyenko merged commit 4b19a6e into dev Jan 18, 2023
@art-alexeyenko art-alexeyenko deleted the feature/angular-update-ex branch January 18, 2023 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants