Skip to content

Commit

Permalink
chore(dependencies): ⬆️ upgrade nx dependencies to version 20 (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicoss54 authored Oct 31, 2024
1 parent d01aef7 commit 54fc900
Show file tree
Hide file tree
Showing 7 changed files with 7,476 additions and 5,405 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { afterNextRender, AfterRenderPhase, Component, ElementRef, forwardRef, input, OnDestroy, Renderer2, signal, viewChild } from '@angular/core';
import { afterNextRender, Component, ElementRef, forwardRef, input, OnDestroy, Renderer2, signal, viewChild } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { fromEvent, merge, Subject, takeUntil, tap } from 'rxjs';
import { MatFormFieldModule } from '@angular/material/form-field';
Expand All @@ -22,26 +22,23 @@ export class CustomInputComponent implements OnDestroy, ControlValueAccessor {
private _onTouched: () => void;
private unsubscribe$: Subject<boolean> = new Subject();

#listener = afterNextRender(
() => {
#listener = afterNextRender({
read: () => {
const inputListener$ = fromEvent(this.inputElement().nativeElement, 'input').pipe(
tap(() => {
this._onChange(this.inputElement().nativeElement.value);
this._onTouched();
}),
);

const blurListener$ = fromEvent(this.inputElement().nativeElement, 'blur').pipe(
tap(() => {
this._onTouched();
this.userLoseFocus$.set(true);
}),
);

merge(inputListener$, blurListener$).pipe(takeUntil(this.unsubscribe$)).subscribe();
},
{ phase: AfterRenderPhase.Read },
);
});

constructor(private readonly renderer: Renderer2) {}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { afterNextRender, AfterRenderPhase, Component, ElementRef, forwardRef, input, OnDestroy, Renderer2, signal, viewChild } from '@angular/core';
import { afterNextRender, Component, ElementRef, forwardRef, input, OnDestroy, Renderer2, signal, viewChild } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { fromEvent, merge, Subject, takeUntil, tap } from 'rxjs';
import { MatFormFieldModule } from '@angular/material/form-field';
Expand All @@ -22,26 +22,23 @@ export class CustomInputComponent implements OnDestroy, ControlValueAccessor {
private _onTouched: () => void;
private unsubscribe$: Subject<boolean> = new Subject();

#listener = afterNextRender(
() => {
#listener = afterNextRender({
read: () => {
const inputListener$ = fromEvent(this.inputElement().nativeElement, 'input').pipe(
tap(() => {
this._onChange(this.inputElement().nativeElement.value);
this._onTouched();
}),
);

const blurListener$ = fromEvent(this.inputElement().nativeElement, 'blur').pipe(
tap(() => {
this._onTouched();
this.userLoseFocus$.set(true);
}),
);

merge(inputListener$, blurListener$).pipe(takeUntil(this.unsubscribe$)).subscribe();
},
{ phase: AfterRenderPhase.Read },
);
});

constructor(private readonly renderer: Renderer2) {}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { afterNextRender, AfterRenderPhase, Component, ElementRef, forwardRef, input, OnDestroy, Renderer2, signal, viewChild } from '@angular/core';
import { afterNextRender, Component, ElementRef, forwardRef, input, OnDestroy, Renderer2, signal, viewChild } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { fromEvent, merge, Subject, takeUntil, tap } from 'rxjs';
import { MatFormFieldModule } from '@angular/material/form-field';
Expand All @@ -22,26 +22,23 @@ export class CustomInputComponent implements OnDestroy, ControlValueAccessor {
private _onTouched: () => void;
private unsubscribe$: Subject<boolean> = new Subject();

#listener = afterNextRender(
() => {
#listener = afterNextRender({
read: () => {
const inputListener$ = fromEvent(this.inputElement().nativeElement, 'input').pipe(
tap(() => {
this._onChange(this.inputElement().nativeElement.value);
this._onTouched();
}),
);

const blurListener$ = fromEvent(this.inputElement().nativeElement, 'blur').pipe(
tap(() => {
this._onTouched();
this.userLoseFocus$.set(true);
}),
);

merge(inputListener$, blurListener$).pipe(takeUntil(this.unsubscribe$)).subscribe();
},
{ phase: AfterRenderPhase.Read },
);
});

constructor(private readonly renderer: Renderer2) {}

Expand Down
2 changes: 1 addition & 1 deletion apps/server-express/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"tags": [],
"targets": {
"build": {
"executor": "@nrwl/webpack:webpack",
"executor": "@nx/webpack:webpack",
"outputs": [
"{options.outputPath}"
],
Expand Down
8 changes: 4 additions & 4 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { getJestProjects } = require('@nx/jest');
const {getJestProjectsAsync} = require('@nx/jest');

export default {
projects: getJestProjects(),
};
export default async () => ({
projects: await getJestProjectsAsync(),
});
Loading

0 comments on commit 54fc900

Please sign in to comment.