Skip to content

Commit

Permalink
Update dependencies (#208)
Browse files Browse the repository at this point in the history
* update nx

Signed-off-by: Kangrui Johann Ye <kangrui.ye@cloudflight.io>

* update dependencies

Signed-off-by: Kangrui Johann Ye <kangrui.ye@cloudflight.io>

---------

Signed-off-by: Kangrui Johann Ye <kangrui.ye@cloudflight.io>
  • Loading branch information
strawberry-choco authored Jun 26, 2024
1 parent 6c46a44 commit e58e4fe
Show file tree
Hide file tree
Showing 17 changed files with 3,499 additions and 2,904 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,4 @@ Thumbs.db
apps/documentation/src/api

.nx/cache
.nx/workspace-data
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ tmp
.yarn

/.nx/cache

/.nx/workspace-data
6 changes: 2 additions & 4 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
},
"extends": "nx/presets/npm.json",
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"affected": {
"defaultBase": "main"
},
"namedInputs": {
"default": ["{projectRoot}/**/*"]
},
Expand Down Expand Up @@ -69,5 +66,6 @@
"inputs": ["default", "{workspaceRoot}/.eslintrc.js"],
"cache": true
}
}
},
"defaultBase": "main"
}
108 changes: 54 additions & 54 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,91 +21,91 @@
"url": "https://github.com/cloudflightio/cloudflight-js-utils/issues"
},
"volta": {
"node": "20.11.0",
"yarn": "4.1.0"
"node": "20.14.0",
"yarn": "4.3.0"
},
"workspaces": [
"packages/*",
"apps/*"
],
"dependencies": {
"@angular/animations": "17.2.4",
"@angular/common": "17.2.4",
"@angular/compiler": "17.2.4",
"@angular/core": "17.2.4",
"@angular/forms": "17.2.4",
"@angular/platform-browser": "17.2.4",
"@angular/platform-browser-dynamic": "17.2.4",
"@angular/router": "17.2.4",
"@angular/animations": "18.0.3",
"@angular/common": "18.0.3",
"@angular/compiler": "18.0.3",
"@angular/core": "18.0.3",
"@angular/forms": "18.0.3",
"@angular/platform-browser": "18.0.3",
"@angular/platform-browser-dynamic": "18.0.3",
"@angular/router": "18.0.3",
"@datorama/akita": "~8.0.1",
"@swc/helpers": "0.5.6",
"@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": "17.2.3",
"@angular-devkit/core": "17.2.3",
"@angular-devkit/schematics": "17.2.3",
"@angular/cli": "17.2.3",
"@angular/compiler-cli": "17.2.4",
"@angular/language-service": "17.2.4",
"@cloudflight/eslint-plugin-angular": "0.24.0",
"@cloudflight/eslint-plugin-typescript": "0.24.0",
"@angular-devkit/build-angular": "18.0.4",
"@angular-devkit/core": "18.0.4",
"@angular-devkit/schematics": "18.0.4",
"@angular/cli": "~18.0.4",
"@angular/compiler-cli": "18.0.3",
"@angular/language-service": "18.0.3",
"@cloudflight/eslint-plugin-angular": "0.26.0",
"@cloudflight/eslint-plugin-typescript": "0.26.0",
"@cloudflight/prettier-config": "0.18.0",
"@nx/angular": "18.0.7",
"@nx/devkit": "18.0.7",
"@nx/eslint": "18.0.7",
"@nx/eslint-plugin": "18.0.7",
"@nx/jest": "18.0.7",
"@nx/js": "18.0.7",
"@nx/plugin": "18.0.7",
"@nx/vite": "18.0.7",
"@nx/web": "18.0.7",
"@nx/workspace": "18.0.7",
"@rushstack/eslint-patch": "1.7.2",
"@schematics/angular": "17.2.3",
"@swc-node/register": "1.9.0",
"@swc/cli": "0.3.10",
"@swc/core": "1.4.6",
"@nx/angular": "19.3.0",
"@nx/devkit": "19.3.0",
"@nx/eslint": "19.3.0",
"@nx/eslint-plugin": "19.3.0",
"@nx/jest": "19.3.0",
"@nx/js": "19.3.0",
"@nx/plugin": "19.3.0",
"@nx/vite": "19.3.0",
"@nx/web": "19.3.0",
"@nx/workspace": "19.3.0",
"@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.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.0.3",
"jsdom": "24.0.0",
"jest-preset-angular": "14.1.0",
"jsdom": "24.1.0",
"jsonc-eslint-parser": "2.4.0",
"lint-staged": "15.2.2",
"ng-packagr": "17.2.1",
"nx": "18.0.7",
"postcss": "8.4.35",
"postcss-import": "16.0.1",
"postcss-preset-env": "9.5.0",
"lint-staged": "15.2.7",
"ng-packagr": "18.0.0",
"nx": "19.3.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.3.3",
"vite": "5.0.12",
"vite-plugin-dts": "3.7.3",
"typescript": "5.4.5",
"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
Loading

0 comments on commit e58e4fe

Please sign in to comment.