Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Kangrui Johann Ye <kangrui.ye@cloudflight.io>
  • Loading branch information
strawberry-choco committed Jun 19, 2024
1 parent 9aee1ae commit dc1eae2
Show file tree
Hide file tree
Showing 14 changed files with 910 additions and 1,132 deletions.
42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@
"@datorama/akita": "~8.0.1",
"@swc/helpers": "0.5.11",
"rxjs": "7.8.1",
"tslib": "2.6.2",
"tslib": "2.6.3",
"zone.js": "0.14.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "18.0.4",
"@angular-devkit/core": "18.0.4",
"@angular-devkit/schematics": "18.0.4",
"@angular/cli": "~18.0.0",
"@angular/cli": "~18.0.4",
"@angular/compiler-cli": "18.0.3",
"@angular/language-service": "18.0.3",
"@cloudflight/eslint-plugin-angular": "0.24.0",
"@cloudflight/eslint-plugin-typescript": "0.24.0",
"@cloudflight/eslint-plugin-angular": "0.26.0",
"@cloudflight/eslint-plugin-typescript": "0.26.0",
"@cloudflight/prettier-config": "0.18.0",
"@nx/angular": "19.3.0",
"@nx/devkit": "19.3.0",
Expand All @@ -63,49 +63,49 @@
"@nx/vite": "19.3.0",
"@nx/web": "19.3.0",
"@nx/workspace": "19.3.0",
"@rushstack/eslint-patch": "1.7.2",
"@rushstack/eslint-patch": "1.10.3",
"@schematics/angular": "18.0.4",
"@swc-node/register": "1.9.2",
"@swc/cli": "0.3.12",
"@swc/core": "1.5.29",
"@swc/core": "1.6.3",
"@swc/jest": "0.2.36",
"@types/jest": "29.5.12",
"@types/node": "20.11.25",
"@vitest/coverage-istanbul": "1.3.1",
"@vitest/ui": "1.3.1",
"autoprefixer": "10.4.18",
"@types/node": "20.14.5",
"@vitest/coverage-istanbul": "1.6.0",
"@vitest/ui": "1.6.0",
"autoprefixer": "10.4.19",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-import-resolver-typescript": "3.6.1",
"happy-dom": "13.6.2",
"happy-dom": "13.10.1",
"husky": "9.0.11",
"jest": "29.7.0",
"jest-auto-spies": "3.0.0",
"jest-environment-jsdom": "29.7.0",
"jest-environment-node": "29.7.0",
"jest-preset-angular": "14.1.0",
"jsdom": "24.0.0",
"jsdom": "24.1.0",
"jsonc-eslint-parser": "2.4.0",
"lint-staged": "15.2.2",
"lint-staged": "15.2.7",
"ng-packagr": "18.0.0",
"nx": "19.3.0",
"postcss": "8.4.35",
"postcss-import": "16.0.1",
"postcss-preset-env": "9.5.0",
"postcss": "8.4.38",
"postcss-import": "16.1.0",
"postcss-preset-env": "9.5.14",
"postcss-url": "10.1.3",
"prettier": "2.8.8",
"sass-loader": "14.1.1",
"sass-loader": "14.2.1",
"symbol-observable": "4.0.0",
"ts-jest": "29.1.2",
"ts-jest": "29.1.5",
"ts-node": "10.9.2",
"typedoc": "0.24.8",
"typedoc-plugin-markdown": "4.0.0-next.12",
"typedoc-vitepress-theme": "1.0.0-next.1",
"typescript": "5.4.5",
"vite": "5.0.12",
"vite-plugin-dts": "3.7.3",
"vite": "5.3.1",
"vite-plugin-dts": "3.9.1",
"vitepress": "1.0.0-rc.41",
"vitest": "1.3.1"
"vitest": "1.6.0"
},
"lint-staged": {
"*": "prettier --write --ignore-unknown"
Expand Down
2 changes: 1 addition & 1 deletion packages/angular-display/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"access": "public"
},
"peerDependencies": {
"@angular/core": "^17.0.6",
"@angular/core": "^18.0.3",
"rxjs": "^7.4.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ describe('IsDisplayDirective', () => {
selector: 'clf-complex',
template: ` <span>{{ content }}</span> `,
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
})
class ComplexComponent {
@Input({required: true})
Expand All @@ -84,6 +85,8 @@ describe('IsDisplayDirective', () => {
<clf-complex *clfIsDisplay="'${breakpoint}'" [content]="content"></clf-complex>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [IsDisplayDirective, ComplexComponent],
})
class NormalBreakpointComponent {
protected readonly content = content;
Expand All @@ -93,8 +96,7 @@ describe('IsDisplayDirective', () => {

beforeEach(() => {
fixture = TestBed.configureTestingModule({
imports: [IsDisplayDirective],
declarations: [NormalBreakpointComponent, ComplexComponent],
imports: [NormalBreakpointComponent, ComplexComponent],
providers: [{provide: IsDisplayService, useValue: isDisplayServiceMock}],
}).createComponent(NormalBreakpointComponent);
fixture.detectChanges();
Expand Down Expand Up @@ -193,15 +195,16 @@ describe('IsDisplayDirective', () => {
@Component({
template: ` <div id="display-only" *clfIsDisplay="'!${breakpoint}'">display-only</div> `,
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [IsDisplayDirective],
})
class InvertedBreakpointComponent {}

let fixture: ComponentFixture<InvertedBreakpointComponent>;

beforeEach(() => {
fixture = TestBed.configureTestingModule({
imports: [IsDisplayDirective],
declarations: [InvertedBreakpointComponent],
imports: [InvertedBreakpointComponent],
providers: [{provide: IsDisplayService, useValue: isDisplayServiceMock}],
}).createComponent(InvertedBreakpointComponent);
fixture.detectChanges();
Expand Down Expand Up @@ -234,15 +237,16 @@ describe('IsDisplayDirective', () => {
@Component({
template: ` <div id="display-only" *clfIsDisplay="'<=tablet'">display-only</div> `,
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [IsDisplayDirective],
})
class InvertedBreakpointComponent {}

let fixture: ComponentFixture<InvertedBreakpointComponent>;

beforeEach(() => {
fixture = TestBed.configureTestingModule({
imports: [IsDisplayDirective],
declarations: [InvertedBreakpointComponent],
imports: [InvertedBreakpointComponent],
providers: [{provide: IsDisplayService, useValue: isDisplayServiceMock}],
}).createComponent(InvertedBreakpointComponent);
fixture.detectChanges();
Expand Down Expand Up @@ -274,15 +278,16 @@ describe('IsDisplayDirective', () => {
@Component({
template: ` <div id="display-only" *clfIsDisplay="'>=tablet'">display-only</div> `,
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [IsDisplayDirective],
})
class InvertedBreakpointComponent {}

let fixture: ComponentFixture<InvertedBreakpointComponent>;

beforeEach(() => {
fixture = TestBed.configureTestingModule({
imports: [IsDisplayDirective],
declarations: [InvertedBreakpointComponent],
imports: [InvertedBreakpointComponent],
providers: [{provide: IsDisplayService, useValue: isDisplayServiceMock}],
}).createComponent(InvertedBreakpointComponent);
fixture.detectChanges();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export class IsDisplayDirective implements OnDestroy {
public set clfIsNotDisplay(option: Breakpoint) {
// in normal use ValidOption will be a template-string but here ts thinks it is never, because Breakpoints does not have any keys
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
this._init(`!${option}` as ValidOption);
this._init(`!${String(option)}` as ValidOption);
}

private _init(option: ValidOption): void {
Expand Down
28 changes: 14 additions & 14 deletions packages/angular-display/src/lib/service/is-display.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ describe('IsDisplayService', () => {
fakeMediaMatcher.setMatchesQuery(query, matches);
});

test(`should return "${matches}" for isDisplay('phone')`, () => {
test(`should return "${String(matches)}" for isDisplay('phone')`, () => {
expect(isDisplayService.isDisplay('phone')).toEqual(matches);
});

test(`should emit "${matches}" for isDisplay$('phone')`, async () => {
test(`should emit "${String(matches)}" for isDisplay$('phone')`, async () => {
await expect(firstValueFrom(isDisplayService.isDisplay$('phone'))).resolves.toEqual(matches);
});

Expand All @@ -143,11 +143,11 @@ describe('IsDisplayService', () => {
await expect(firstValueFrom(isDisplayService.isDisplayAtLeast$('tablet'))).resolves.toEqual(false);
});

test(`should emit "${matches}" for isDisplayAtMost('tablet')`, () => {
test(`should emit "${String(matches)}" for isDisplayAtMost('tablet')`, () => {
expect(isDisplayService.isDisplayAtMost('tablet')).toEqual(matches);
});

test(`should emit "${matches}" for isDisplayAtMost$('tablet')`, async () => {
test(`should emit "${String(matches)}" for isDisplayAtMost$('tablet')`, async () => {
await expect(firstValueFrom(isDisplayService.isDisplayAtMost$('tablet'))).resolves.toEqual(matches);
});
});
Expand All @@ -165,27 +165,27 @@ describe('IsDisplayService', () => {
fakeMediaMatcher.setMatchesQuery(query, matches);
});

test(`should return "${matches}" for isDisplay('tablet')`, () => {
test(`should return "${String(matches)}" for isDisplay('tablet')`, () => {
expect(isDisplayService.isDisplay('tablet')).toEqual(matches);
});

test(`should emit "${matches}" for isDisplay$('tablet')`, async () => {
test(`should emit "${String(matches)}" for isDisplay$('tablet')`, async () => {
await expect(firstValueFrom(isDisplayService.isDisplay$('tablet'))).resolves.toEqual(matches);
});

test(`should emit "${matches}" for isDisplayAtLeast('tablet')`, () => {
test(`should emit "${String(matches)}" for isDisplayAtLeast('tablet')`, () => {
expect(isDisplayService.isDisplayAtLeast('tablet')).toEqual(matches);
});

test(`should emit "${matches}" for isDisplayAtLeast$('tablet')`, async () => {
test(`should emit "${String(matches)}" for isDisplayAtLeast$('tablet')`, async () => {
await expect(firstValueFrom(isDisplayService.isDisplayAtLeast$('tablet'))).resolves.toEqual(matches);
});

test(`should emit "${matches}" for isDisplayAtMost('tablet')`, () => {
test(`should emit "${String(matches)}" for isDisplayAtMost('tablet')`, () => {
expect(isDisplayService.isDisplayAtMost('tablet')).toEqual(matches);
});

test(`should emit "${matches}" for isDisplayAtMost$('tablet')`, async () => {
test(`should emit "${String(matches)}" for isDisplayAtMost$('tablet')`, async () => {
await expect(firstValueFrom(isDisplayService.isDisplayAtMost$('tablet'))).resolves.toEqual(matches);
});
});
Expand All @@ -203,19 +203,19 @@ describe('IsDisplayService', () => {
fakeMediaMatcher.setMatchesQuery(query, matches);
});

test(`should return "${matches}" for isDisplay('desktop')`, () => {
test(`should return "${String(matches)}" for isDisplay('desktop')`, () => {
expect(isDisplayService.isDisplay('desktop')).toEqual(matches);
});

test(`should emit "${matches}" for isDisplay$('desktop')`, async () => {
test(`should emit "${String(matches)}" for isDisplay$('desktop')`, async () => {
await expect(firstValueFrom(isDisplayService.isDisplay$('desktop'))).resolves.toEqual(matches);
});

test(`should emit "${matches}" for isDisplayAtLeast('tablet')`, () => {
test(`should emit "${String(matches)}" for isDisplayAtLeast('tablet')`, () => {
expect(isDisplayService.isDisplayAtLeast('tablet')).toEqual(matches);
});

test(`should emit "${matches}" for isDisplayAtLeast$('tablet')`, async () => {
test(`should emit "${String(matches)}" for isDisplayAtLeast$('tablet')`, async () => {
await expect(firstValueFrom(isDisplayService.isDisplayAtLeast$('tablet'))).resolves.toEqual(matches);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export class IsDisplayService implements OnDestroy {
function createMediaQuery(minWidthInclusive?: number, maxWidthExclusive?: number): string {
let query = '';
if (minWidthInclusive != null) {
query = `${query}(min-width: ${minWidthInclusive}px)`;
query = `${query}(min-width: ${String(minWidthInclusive)}px)`;
}
if (minWidthInclusive != null && maxWidthExclusive != null) {
query = `${query} and `;
Expand All @@ -146,7 +146,7 @@ function createMediaQuery(minWidthInclusive?: number, maxWidthExclusive?: number
// a very small number to make exclusive work
// eslint-disable-next-line no-magic-numbers
const maxWidth = maxWidthExclusive - 0.001;
query = `${query}(max-width: ${maxWidth}px)`;
query = `${query}(max-width: ${String(maxWidth)}px)`;
}
return query;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/angular-logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"access": "public"
},
"peerDependencies": {
"@angular/core": "^17.0.6",
"@angular/core": "^18.0.3",
"@cloudflight/logger": "0.7.0"
}
}
2 changes: 1 addition & 1 deletion packages/concurrency-utils/src/lib/concurrency-pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface ConcurrencyToken {
*/
export class InvalidConcurrencyPoolSizeException extends Error {
public constructor(size: number) {
super(`Concurrency pool initialized with size ${size} but should be at least 1`);
super(`Concurrency pool initialized with size ${String(size)} but should be at least 1`);
}
}

Expand Down
3 changes: 2 additions & 1 deletion packages/logger/src/lib/consumers/console-consumer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export function createConsoleConsumer(): LogConsumer {
logLevel: undefined,
consume(name: string, level: LogLevel, messages: unknown[]) {
const identifier = `%c[${name}][${getLevelName(level)}]`;
const color = `color:white; background: hsl(${getColorFor(name)},100%,40%);padding: 4px;font-weight:bold`;
const colorNumber = getColorFor(name);
const color = `color:white; background: hsl(${String(colorNumber)},100%,40%);padding: 4px;font-weight:bold`;

switch (level) {
case LogLevel.Debug:
Expand Down
6 changes: 3 additions & 3 deletions packages/rxjs-read/src/lib/operators/filter.operator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ describe('filter-operator', () => {
let finalRead: Read<string, true>;

beforeEach(() => {
finalRead = mappedRead.pipe(map((data: Data) => `${data.count}`));
finalRead = mappedRead.pipe(map((data: Data) => String(data.count)));
});

describe('and when subscribing', () => {
it('should observe the mapped state', () => {
testScheduler.run(({expectObservable, cold}) => {
const expected$ = cold('a', {
a: `${initial.count}`,
a: String(initial.count),
});
expectObservable(from(finalRead)).toEqual(expected$);
});
Expand All @@ -72,7 +72,7 @@ describe('filter-operator', () => {

describe('and when synchronously accessing', () => {
it('should return the mapped state', () => {
expect(finalRead.value).toEqual(`${initial.count}`);
expect(finalRead.value).toEqual(String(initial.count));
});
});
});
Expand Down
6 changes: 3 additions & 3 deletions packages/rxjs-read/src/lib/operators/map.operator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ describe('map-operator', () => {
let finalRead: Read<string>;

beforeEach(() => {
finalRead = mappedRead.pipe(map((value: number) => `${value}`));
finalRead = mappedRead.pipe(map((value: number) => String(value)));
});

describe('and when subscribing', () => {
it('should observe mapped state', () => {
testScheduler.run(({expectObservable, cold}) => {
const expected$ = cold('a', {
a: `${initial.count}`,
a: String(initial.count),
});
expectObservable(from(finalRead)).toEqual(expected$);
});
Expand All @@ -71,7 +71,7 @@ describe('map-operator', () => {

describe('and when synchronously accessing', () => {
it('should return the mapped state', () => {
expect(finalRead.value).toEqual(`${initial.count}`);
expect(finalRead.value).toEqual(String(initial.count));
});
});
});
Expand Down
4 changes: 3 additions & 1 deletion packages/rxjs-read/src/lib/pipe/pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ export function pipe<Functions extends ((arg: any) => PipeFnResult<any>)[]>(
let pipeline = arg;

for (const fn of functions) {
const result = fn(pipeline);
// eslint parsed the type here incorrectly, leading to a false negative
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
const result = fn(pipeline) as PipeFnResult<any>;
if (result.type === 'cancel') {
return result;
}
Expand Down
5 changes: 2 additions & 3 deletions packages/rxjs-read/src/lib/read.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,8 @@ export class Read<T, Cancelling extends boolean = false> implements InteropObser
return (
provider
.observable()
/* the pipe function does provide a rest parameter implementation,
TS just cannot find it for some reason
@ts-expect-error */
// @ts-expect-error the pipe function does provide a rest parameter implementation,
// TS just cannot find it for some reason
.pipe<ReturnTypeOfTailOperator<Operators>>(...operators.map((it) => it.observableOperator))
);
},
Expand Down
Loading

0 comments on commit dc1eae2

Please sign in to comment.