Skip to content

Commit

Permalink
feat(nx): upgrade nx 20 and angular 19
Browse files Browse the repository at this point in the history
  • Loading branch information
tomalaforge committed Dec 6, 2024
1 parent bdc6d9e commit f3be3ee
Show file tree
Hide file tree
Showing 143 changed files with 13,819 additions and 14,031 deletions.
7 changes: 1 addition & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@angular-eslint/no-host-metadata-property": "off",
"@nx/enforce-module-boundaries": [
"error",
{
Expand All @@ -18,12 +19,6 @@
}
]
}
],
"@angular-eslint/no-host-metadata-property": [
"error",
{
"allowStatic": true
}
]
}
},
Expand Down
6 changes: 4 additions & 2 deletions apps/angular/1-projection/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
"tags": [],
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:application",
"executor": "@angular-devkit/build-angular:browser",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/apps/angular/1-projection",
"index": "apps/angular/1-projection/src/index.html",
"browser": "apps/angular/1-projection/src/main.ts",
"main": "apps/angular/1-projection/src/main.ts",
"polyfills": ["apps/angular/1-projection/src/polyfills.ts"],
"tsConfig": "apps/angular/1-projection/tsconfig.app.json",
"inlineStyleLanguage": "scss",
Expand Down Expand Up @@ -41,7 +41,9 @@
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
Expand Down
7 changes: 3 additions & 4 deletions apps/angular/1-projection/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ import { TeacherCardComponent } from './component/teacher-card/teacher-card.comp
selector: 'app-root',
template: `
<div class="grid grid-cols-3 gap-3">
<app-teacher-card></app-teacher-card>
<app-student-card></app-student-card>
<app-city-card></app-city-card>
<app-teacher-card />
<app-student-card />
<app-city-card />
</div>
`,
standalone: true,
imports: [TeacherCardComponent, StudentCardComponent, CityCardComponent],
})
export class AppComponent {}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-city-card',
template: 'TODO City',
standalone: true,
imports: [],
})
export class CityCardComponent implements OnInit {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { CardComponent } from '../../ui/card/card.component';
[type]="cardType"
customClass="bg-light-green"></app-card>
`,
standalone: true,
styles: [
`
::ng-deep .bg-light-green {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import { CardComponent } from '../../ui/card/card.component';
}
`,
],
standalone: true,
imports: [CardComponent],
})
export class TeacherCardComponent implements OnInit {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import { ListItemComponent } from '../list-item/list-item.component';
</button>
</div>
`,
standalone: true,
imports: [NgIf, NgFor, ListItemComponent],
})
export class CardComponent {
Expand Down
2 changes: 1 addition & 1 deletion apps/angular/1-projection/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app/app.component';

bootstrapApplication(AppComponent);
bootstrapApplication(AppComponent).catch((err) => console.error(err));
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Component } from '@angular/core';
import { PersonUtils } from './person.utils';

@Component({
standalone: true,
imports: [NgFor],
selector: 'app-root',
template: `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { TextComponent } from './text.component';

@Component({
selector: 'page',
standalone: true,
imports: [TextStaticComponent, TextComponent],
template: `
<static-text></static-text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export type StaticTextType = 'normal' | 'warning' | 'error';

@Component({
selector: 'static-text',
standalone: true,
imports: [TextComponent],
template: `
<text [font]="font" [color]="color">This is a static text</text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export class ProductDirective {
}

@Component({
standalone: true,
imports: [TableComponent, CurrencyPipe, AsyncPipe, NgFor, ProductDirective],
providers: [CurrencyService],
selector: 'app-root',
Expand Down
1 change: 0 additions & 1 deletion apps/angular/21-anchor-navigation/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';

@Component({
standalone: true,
imports: [RouterOutlet],
selector: 'app-root',
template: `
Expand Down
1 change: 0 additions & 1 deletion apps/angular/21-anchor-navigation/src/app/foo.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Component } from '@angular/core';
import { NavButtonComponent } from './nav-button.component';

@Component({
standalone: true,
imports: [NavButtonComponent],
selector: 'app-foo',
template: `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Component } from '@angular/core';
import { NavButtonComponent } from './nav-button.component';

@Component({
standalone: true,
imports: [NavButtonComponent],
selector: 'app-home',
template: `
Expand Down
1 change: 0 additions & 1 deletion apps/angular/22-router-input/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { FormControl, ReactiveFormsModule } from '@angular/forms';
import { RouterLink, RouterModule } from '@angular/router';

@Component({
standalone: true,
imports: [RouterLink, RouterModule, ReactiveFormsModule],
selector: 'app-root',
template: `
Expand Down
1 change: 0 additions & 1 deletion apps/angular/22-router-input/src/app/home.component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-home',
standalone: true,
imports: [],
template: `
<div>Home</div>
Expand Down
1 change: 0 additions & 1 deletion apps/angular/22-router-input/src/app/test.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { map } from 'rxjs';

@Component({
selector: 'app-subscription',
standalone: true,
imports: [AsyncPipe],
template: `
<div>TestId: {{ testId$ | async }}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ interface Person {
}

@Component({
standalone: true,
imports: [NgFor, NgIf],
selector: 'app-root',
template: `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ import { Component } from '@angular/core';
host: {
class: 'flex flex-col p-4 gap-3',
},
standalone: false,
})
export class AppComponent {}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';

@Component({
standalone: true,
imports: [RouterOutlet],
selector: 'app-root',
template: `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ interface MenuItem {

@Component({
selector: 'app-nav',
standalone: true,
imports: [RouterLink, RouterLinkActive, NgFor],
template: `
<ng-container *ngFor="let menu of menus">
Expand Down Expand Up @@ -38,7 +37,6 @@ export class NavigationComponent {
}

@Component({
standalone: true,
imports: [NavigationComponent, NgIf, AsyncPipe],
template: `
<ng-container *ngIf="info$ | async as info">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { BtnHelmetDirective } from '@angular-challenges/decoupling/helmet';
import { Component } from '@angular/core';

@Component({
standalone: true,
imports: [BtnDisabledDirective, BtnHelmetDirective],
selector: 'app-root',
template: `
Expand Down
1 change: 0 additions & 1 deletion apps/angular/39-injection-token/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Component } from '@angular/core';
import { RouterLink, RouterOutlet } from '@angular/router';

@Component({
standalone: true,
imports: [RouterOutlet, RouterLink],
selector: 'app-root',
template: `
Expand Down
1 change: 0 additions & 1 deletion apps/angular/39-injection-token/src/app/phone.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { TimerContainerComponent } from './timer-container.component';

@Component({
selector: 'app-phone',
standalone: true,
imports: [TimerContainerComponent],
template: `
<div class="flex gap-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { DEFAULT_TIMER } from './data';
import { TimerComponent } from './timer.component';
@Component({
selector: 'timer-container',
standalone: true,
imports: [TimerComponent],
template: `
<div class="flex gap-2">
Expand Down
1 change: 0 additions & 1 deletion apps/angular/39-injection-token/src/app/video.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { TimerContainerComponent } from './timer-container.component';

@Component({
selector: 'app-video',
standalone: true,
imports: [TimerContainerComponent],
template: `
<div class="flex gap-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { ListComponent } from './list.component';
import { PersonComponent } from './person.component';

@Component({
standalone: true,
imports: [NgTemplateOutlet, PersonComponent, ListComponent],
selector: 'app-root',
template: `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {

@Component({
selector: 'list',
standalone: true,
imports: [CommonModule],
template: `
<div *ngFor="let item of list; index as i">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ interface Person {
}

@Component({
standalone: true,
imports: [NgTemplateOutlet],
selector: 'person',
template: `
Expand Down
1 change: 0 additions & 1 deletion apps/angular/44-view-transition/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';

@Component({
standalone: true,
imports: [RouterOutlet],
selector: 'app-root',
template: `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { ThumbnailComponent } from './thumbnail.component';

@Component({
selector: 'blog',
standalone: true,
imports: [ThumbnailComponent],
template: `
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Component, input } from '@angular/core';

@Component({
selector: 'thumbnail-header',
standalone: true,
imports: [NgOptimizedImage],
template: `
<div class="flex gap-3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { ThumbnailHeaderComponent } from './thumbnail-header.component';

@Component({
selector: 'blog-thumbnail',
standalone: true,
imports: [NgOptimizedImage, ThumbnailHeaderComponent, RouterLinkWithHref],
template: `
<a [routerLink]="['post', post().id]">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Component, input } from '@angular/core';

@Component({
selector: 'post-header',
standalone: true,
imports: [NgOptimizedImage],
template: `
<div class="relative">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { PostHeaderComponent } from './post-header.component';

@Component({
selector: 'post',
standalone: true,
imports: [
ThumbnailHeaderComponent,
NgOptimizedImage,
Expand Down
1 change: 0 additions & 1 deletion apps/angular/45-react-in-angular/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { PostComponent } from './react/post.component';
type Post = { title: string; description: string };

@Component({
standalone: true,
imports: [PostComponent],
selector: 'app-root',
template: `
Expand Down
1 change: 0 additions & 1 deletion apps/angular/46-simple-animations/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Component } from '@angular/core';

@Component({
standalone: true,
imports: [],
selector: 'app-root',
styles: `
Expand Down
1 change: 0 additions & 1 deletion apps/angular/5-crud-application/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Component, OnInit } from '@angular/core';
import { randText } from '@ngneat/falso';

@Component({
standalone: true,
imports: [CommonModule],
selector: 'app-root',
template: `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { Component, signal } from '@angular/core';
}
</div>
`,
standalone: false,
})
export class AppComponent {
topLoaded = signal(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ import { Component } from '@angular/core';
height: 50%;
}
`,
standalone: false,
})
export class PlaceholderComponent {}
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ import { Component } from '@angular/core';
height: 50%;
}
`,
standalone: false,
})
export class TopComponent {}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Component } from '@angular/core';
import { RouterLink, RouterOutlet } from '@angular/router';

@Component({
standalone: true,
imports: [RouterOutlet, RouterLink],
selector: 'app-root',
templateUrl: './app.component.html',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
@Component({
selector: 'app-dialog-dialog',
templateUrl: './dialog.component.html',
standalone: true,
imports: [
MatButtonModule,
MatDialogActions,
Expand Down
Loading

0 comments on commit f3be3ee

Please sign in to comment.