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

[Chore] Support Angular v19 (Nx v20.3.0) #8610

Draft
wants to merge 29 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3546c21
chore(nx): migrate @nx/workspace to version 20.3.0
rahul-rocket Dec 21, 2024
9d908b7
chore(material): run migration-v19 for Angular Material update
rahul-rocket Dec 21, 2024
6095392
chore(packages): run explicit-standalone-flag migration for Angular v19
rahul-rocket Dec 21, 2024
a0e2ddc
chore(deps): downgrade TypeScript to 5.5.4 for Angular compatibility
rahul-rocket Dec 21, 2024
be77cad
chore(deps): bump Angular ESLint dependencies to version 19
rahul-rocket Dec 21, 2024
d43a1cf
chore(deps): bump @ng-select/ng-select to version 14.1.0
rahul-rocket Dec 21, 2024
9855a05
Merge branch 'develop' into chore/upgrade-ng-to-19
rahul-rocket Dec 23, 2024
9e9c3e8
chore(deps): bump @commitlint packages to latest versions
rahul-rocket Dec 23, 2024
df9e7fe
fix(cspell): typo spelling :-)
rahul-rocket Dec 23, 2024
27930e9
chore(packages): migrate initializers to new provider functions
rahul-rocket Dec 23, 2024
01e98c1
chore(deps): update the @angular/cli package version to ~19.0.0
rahul-rocket Dec 23, 2024
0194b5b
chore(deps): update packages to support Angular v19
rahul-rocket Dec 23, 2024
bc8ad97
chore(packages): migrate initializers to new provider functions
rahul-rocket Dec 23, 2024
b2c7c6d
fix: correct Sentry.TraceService injection in AppInitializer
rahul-rocket Dec 23, 2024
27f7f88
Merge branch 'develop' into chore/upgrade-ng-to-19
rahul-rocket Dec 24, 2024
4b48f9e
Merge branch 'develop' into chore/upgrade-ng-to-19
rahul-rocket Dec 27, 2024
b375387
Merge branch 'develop' into chore/upgrade-ng-to-19
rahul-rocket Dec 28, 2024
ccd5254
Update yarn.lock
rahul-rocket Dec 28, 2024
0fa5565
Update yarn.lock
rahul-rocket Dec 28, 2024
b925368
Merge branch 'develop' into chore/upgrade-ng-to-19
rahul-rocket Jan 1, 2025
28be36a
Merge branch 'develop' into chore/upgrade-ng-to-19
rahul-rocket Jan 2, 2025
1523f73
Merge branch 'develop' into chore/upgrade-ng-to-19
rahul-rocket Jan 6, 2025
20e75b4
fix: update yarn.lock
rahul-rocket Jan 6, 2025
1b6eb5f
Merge branch 'develop' into chore/upgrade-ng-to-19
rahul-rocket Jan 9, 2025
c8d2e5f
fix(cspell): typo spelling :-)
rahul-rocket Jan 9, 2025
76d84f6
fix: update yarn.lock
rahul-rocket Jan 9, 2025
50ad6b1
Merge branch 'develop' into chore/upgrade-ng-to-19
rahul-rocket Jan 16, 2025
ccdec04
Merge branch 'develop' into chore/upgrade-ng-to-19
rahul-rocket Jan 20, 2025
9a1fefc
Merge branch 'develop' into chore/upgrade-ng-to-19
rahul-rocket Jan 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 4 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,7 @@
"localforage",
"longform",
"rfdc",
"bluehalo",
"libx264",
"libx",
"WXGA",
Expand All @@ -546,7 +547,9 @@
"elif",
"appleboy",
"apidemoda",
"forin"
"forin",
"distutils",
"loggable"
],
"useGitignore": true,
"ignorePaths": [
Expand Down
20 changes: 10 additions & 10 deletions apps/desktop-timer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
"terser-webpack-plugin": "^5.3.10"
},
"dependencies": {
"@angular/animations": "18.2.12",
"@angular/cdk": "18.2.14",
"@angular/common": "18.2.12",
"@angular/core": "18.2.12",
"@angular/forms": "18.2.12",
"@angular/material": "18.2.14",
"@angular/router": "18.2.12",
"@angular/animations": "19.0.5",
"@angular/cdk": "19.0.4",
"@angular/common": "19.0.5",
"@angular/core": "19.0.5",
"@angular/forms": "19.0.5",
"@angular/material": "19.0.4",
"@angular/router": "19.0.5",
"@datorama/akita": "^8.0.1",
"@datorama/akita-ngdevtools": "^7.0.0",
"@electron/remote": "^2.0.8",
Expand All @@ -49,10 +49,10 @@
"@nebular/eva-icons": "^14.0.2",
"@nebular/security": "^14.0.2",
"@nebular/theme": "^14.0.2",
"@ng-select/ng-select": "^13.9.0",
"@ng-select/ng-select": "^14.1.0",
"@ngneat/until-destroy": "^10.0.0",
"@ngx-translate/core": "^16.0.3",
"@ngx-translate/http-loader": "^16.0.0",
"@ngx-translate/core": "^16.0.4",
"@ngx-translate/http-loader": "^16.0.1",
"@sentry/angular-ivy": "^7.101.1",
"@sentry/electron": "^4.18.0",
"@sentry/node": "^7.101.1",
Expand Down
7 changes: 4 additions & 3 deletions apps/desktop-timer/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ import { AppService } from './app.service';

@UntilDestroy({ checkProperties: true })
@Component({
selector: 'gauzy-root',
template: '<router-outlet></router-outlet>',
styleUrls: ['./app.component.scss']
selector: 'gauzy-root',
template: '<router-outlet></router-outlet>',
styleUrls: ['./app.component.scss'],
standalone: false
})
export class AppComponent implements OnInit, AfterViewInit {
constructor(
Expand Down
27 changes: 14 additions & 13 deletions apps/desktop-timer/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HTTP_INTERCEPTORS, HttpClient, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { APP_INITIALIZER, ErrorHandler, Injector, NgModule } from '@angular/core';
import { ErrorHandler, Injector, NgModule, inject, provideAppInitializer } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { Router } from '@angular/router';
Expand Down Expand Up @@ -181,12 +181,15 @@ if (environment.SENTRY_DSN) {
provide: ErrorHandler,
useClass: ErrorHandlerService
},
{
provide: APP_INITIALIZER,
useFactory: serverConnectionFactory,
deps: [ServerConnectionService, Store, Router, Injector],
multi: true
},
provideAppInitializer(() => {
const initializerFn = (serverConnectionFactory)(
inject(ServerConnectionService),
inject(Store),
inject(Router),
inject(Injector)
);
return initializerFn();
}),
{
provide: ErrorHandler,
useValue: Sentry.createErrorHandler({
Expand All @@ -197,12 +200,10 @@ if (environment.SENTRY_DSN) {
provide: Sentry.TraceService,
deps: [Router]
},
{
provide: APP_INITIALIZER,
useFactory: () => () => { },
deps: [Sentry.TraceService],
multi: true
},
provideAppInitializer(() => {
const initializerFn = ((trace: Sentry.TraceService) => () => { })(inject(Sentry.TraceService));
return initializerFn();
}),
{ provide: DEFAULT_TIMEOUT, useValue: 80000 },
{
provide: GAUZY_ENV,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
@use '@angular/material' as mat;

@mixin angular-material() {
@include mat.core();
@include mat.elevation-classes();
@include mat.app-background();

@include nb-for-theme(material-dark) {
$custom-dark-theme: mat.m2-define-dark-theme(
Expand Down
20 changes: 10 additions & 10 deletions apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
"terser-webpack-plugin": "^5.3.10"
},
"dependencies": {
"@angular/animations": "18.2.12",
"@angular/cdk": "18.2.14",
"@angular/common": "18.2.12",
"@angular/core": "18.2.12",
"@angular/forms": "18.2.12",
"@angular/material": "18.2.14",
"@angular/router": "18.2.12",
"@angular/animations": "19.0.5",
"@angular/cdk": "19.0.4",
"@angular/common": "19.0.5",
"@angular/core": "19.0.5",
"@angular/forms": "19.0.5",
"@angular/material": "19.0.4",
"@angular/router": "19.0.5",
"@datorama/akita": "^8.0.1",
"@datorama/akita-ngdevtools": "^7.0.0",
"@electron/remote": "^2.0.8",
Expand All @@ -51,10 +51,10 @@
"@nebular/security": "^14.0.2",
"@nebular/theme": "^14.0.2",
"@nestjs/typeorm": "^10.0.2",
"@ng-select/ng-select": "^13.9.0",
"@ng-select/ng-select": "^14.1.0",
"@ngneat/until-destroy": "^10.0.0",
"@ngx-translate/core": "^16.0.3",
"@ngx-translate/http-loader": "^16.0.0",
"@ngx-translate/core": "^16.0.4",
"@ngx-translate/http-loader": "^16.0.1",
"@sentry/angular-ivy": "^7.101.1",
"@sentry/electron": "^4.18.0",
"@sentry/node": "^7.101.1",
Expand Down
5 changes: 3 additions & 2 deletions apps/desktop/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import { ActivityWatchElectronService, ElectronService, LanguageElectronService,
import { AppService } from './app.service';

@Component({
selector: 'gauzy-root',
template: '<router-outlet></router-outlet>'
selector: 'gauzy-root',
template: '<router-outlet></router-outlet>',
standalone: false
})
export class AppComponent implements OnInit, AfterViewInit {
public title: string;
Expand Down
12 changes: 5 additions & 7 deletions apps/desktop/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { APP_INITIALIZER, ErrorHandler, NgModule } from '@angular/core';
import { ErrorHandler, NgModule, inject, provideAppInitializer } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { Router, RouterModule } from '@angular/router';
Expand Down Expand Up @@ -128,12 +128,10 @@ if (environment.SENTRY_DSN) {
provide: Sentry.TraceService,
deps: [Router]
},
{
provide: APP_INITIALIZER,
useFactory: () => () => { },
deps: [Sentry.TraceService],
multi: true
},
provideAppInitializer(() => {
const initializerFn = ((trace: Sentry.TraceService) => () => { })(inject(Sentry.TraceService));
return initializerFn();
}),
{
provide: ErrorHandler,
useClass: ErrorHandlerService
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
@use '@angular/material' as mat;

@mixin angular-material() {
@include mat.core();
@include mat.elevation-classes();
@include mat.app-background();

@include nb-for-theme(material-dark) {
$custom-dark-theme: mat.define-dark-theme(
Expand Down
2 changes: 1 addition & 1 deletion apps/gauzy-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"jasmine-core": "^3.6.0",
"jasmine-spec-reporter": "^6.0.0",
"jest": "^29.7.0",
"jest-preset-angular": "14.1.1",
"jest-preset-angular": "14.4.2",
"karma": "^5.2.3",
"karma-chrome-launcher": "^3.1.0",
"karma-cli": "^2.0.0",
Expand Down
45 changes: 22 additions & 23 deletions apps/gauzy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@
},
"dependencies": {
"@akveo/ng2-completer": "^9.0.1",
"@ali-hm/angular-tree-component": "^18.0.5",
"@ali-hm/angular-tree-component": "^19.0.1",
"@angular-slider/ngx-slider": "^18.0.0",
"@angular/animations": "18.2.12",
"@angular/cdk": "18.2.14",
"@angular/common": "18.2.12",
"@angular/core": "18.2.12",
"@angular/forms": "18.2.12",
"@angular/language-service": "18.2.12",
"@angular/material": "18.2.14",
"@angular/platform-browser": "18.2.12",
"@angular/platform-browser-dynamic": "18.2.12",
"@angular/router": "18.2.12",
"@angular/service-worker": "18.2.12",
"@asymmetrik/ngx-leaflet": "^18.0.1",
"@angular/animations": "19.0.5",
"@angular/cdk": "19.0.4",
"@angular/common": "19.0.5",
"@angular/core": "19.0.5",
"@angular/forms": "19.0.5",
"@angular/language-service": "19.0.5",
"@angular/material": "19.0.4",
"@angular/platform-browser": "19.0.5",
"@angular/platform-browser-dynamic": "19.0.5",
"@angular/router": "19.0.5",
"@angular/service-worker": "19.0.5",
"@bluehalo/ngx-leaflet": "^19.0.0",
"@cloudinary/ng": "^2.0.0",
"@cloudinary/url-gen": "^1.14.0",
"@datorama/akita": "^8.0.1",
Expand All @@ -49,8 +49,7 @@
"@fortawesome/free-brands-svg-icons": "^6.7.2",
"@fortawesome/free-regular-svg-icons": "^6.7.2",
"@fortawesome/free-solid-svg-icons": "^6.7.2",
"@fullcalendar/angular": "^6.1.15",
"@fullcalendar/bootstrap": "^6.1.15",
"@fullcalendar/angular": "^6.1.16",
"@fullcalendar/core": "^6.1.15",
"@fullcalendar/daygrid": "^6.1.15",
"@fullcalendar/interaction": "^6.1.15",
Expand All @@ -73,18 +72,18 @@
"@nebular/theme": "^14.0.2",
"@ng-maps/core": "^7.0.0",
"@ng-maps/google": "^7.0.0",
"@ng-select/ng-select": "^13.9.0",
"@ng-select/ng-select": "^14.1.0",
"@ngneat/until-destroy": "^10.0.0",
"@ngx-translate/core": "^16.0.3",
"@ngx-translate/http-loader": "^16.0.0",
"@ngx-translate/core": "^16.0.4",
"@ngx-translate/http-loader": "^16.0.1",
"@sentry/angular-ivy": "^7.101.1",
"@sentry/browser": "^7.90.0",
"@sentry/node": "^7.101.1",
"@sentry/tracing": "^7.101.1",
"@sentry/types": "^7.101.1",
"@sentry/utils": "^7.90.0",
"@swimlane/ngx-charts": "^20.1.0",
"angular2-smart-table": "^3.4.0",
"angular2-smart-table": "^3.5.0",
"bootstrap": "^4.3.1",
"brace": "^0.11.1",
"camelcase": "^6.3.0",
Expand Down Expand Up @@ -136,14 +135,14 @@
"ngx-ace-editor-wrapper": "^9.1.12",
"ngx-clipboard": "^16.0.0",
"ngx-color-picker": "^17.0.0",
"ngx-cookie-service": "^18.0.0",
"ngx-countdown": "^17.1.1",
"ngx-cookie-service": "^19.0.0",
"ngx-countdown": "^19.0.0",
"ngx-daterangepicker-material": "^6.0.4",
"ngx-draggable-dom": "^3.4.1",
"ngx-echarts": "^8.0.1",
"ngx-feature-toggle": "^12.0.0",
"ngx-filepond": "^7.0.3",
"ngx-infinite-scroll": "^18.0.0",
"ngx-infinite-scroll": "^19.0.0",
"ngx-moment": "^6.0.2",
"ngx-page-scroll": "^13.0.0",
"ngx-page-scroll-core": "^13.0.0",
Expand Down Expand Up @@ -190,7 +189,7 @@
"jasmine-core": "^3.6.0",
"jasmine-spec-reporter": "^6.0.0",
"jest": "^29.7.0",
"jest-preset-angular": "14.1.1",
"jest-preset-angular": "14.4.2",
"karma": "^5.2.3",
"karma-chrome-launcher": "^3.1.0",
"karma-cli": "^2.0.0",
Expand Down
5 changes: 3 additions & 2 deletions apps/gauzy/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ import { I18nService } from '@gauzy/ui-core/i18n';

@UntilDestroy({ checkProperties: true })
@Component({
selector: 'ga-app',
template: '<router-outlet *ngIf="!loading"></router-outlet>'
selector: 'ga-app',
template: '<router-outlet *ngIf="!loading"></router-outlet>',
standalone: false
})
export class AppComponent implements OnInit, AfterViewInit {
// Loading indicator
Expand Down
42 changes: 17 additions & 25 deletions apps/gauzy/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { HTTP_INTERCEPTORS, HttpClient, provideHttpClient, withInterceptorsFromD
import { ExtraOptions, Router, RouterModule } from '@angular/router';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule, APP_INITIALIZER, ErrorHandler } from '@angular/core';
import { NgModule, ErrorHandler, inject, provideAppInitializer } from '@angular/core';
import { AkitaNgDevtools } from '@datorama/akita-ngdevtools';
import {
NbChatModule,
Expand Down Expand Up @@ -163,33 +163,25 @@ const FEATURE_MODULES = [
multi: true
},
ServerConnectionService,
{
provide: APP_INITIALIZER,
useFactory: serverConnectionFactory,
deps: [ServerConnectionService, Store, Router],
multi: true
},
provideAppInitializer(() => {
const initializerFn = (serverConnectionFactory)(inject(ServerConnectionService), inject(Store), inject(Router));
return initializerFn();
}),
GoogleMapsLoaderService,
{
provide: APP_INITIALIZER,
useFactory: googleMapsLoaderFactory,
deps: [GoogleMapsLoaderService],
multi: true
},
provideAppInitializer(() => {
const initializerFn = (googleMapsLoaderFactory)(inject(GoogleMapsLoaderService));
return initializerFn();
}),
FeatureService,
{
provide: APP_INITIALIZER,
useFactory: featureToggleLoaderFactory,
deps: [FeatureService, Store],
multi: true
},
provideAppInitializer(() => {
const initializerFn = (featureToggleLoaderFactory)(inject(FeatureService), inject(Store));
return initializerFn();
}),
AppInitService,
{
provide: APP_INITIALIZER,
useFactory: initializeApp,
deps: [AppInitService],
multi: true
},
provideAppInitializer(() => {
const initializerFn = (initializeApp)(inject(AppInitService));
return initializerFn();
}),
{
provide: ErrorHandler,
useClass: SentryErrorHandler
Expand Down
5 changes: 3 additions & 2 deletions apps/gauzy/src/app/pages/about/about.component.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Component, OnInit, OnDestroy } from '@angular/core';

@Component({
selector: 'ngx-about',
templateUrl: './about.component.html'
selector: 'ngx-about',
templateUrl: './about.component.html',
standalone: false
})
export class AboutComponent implements OnInit, OnDestroy {
constructor() {}
Expand Down
Loading
Loading