Skip to content

Commit 0edcc22

Browse files
authored
BC-9425 Update and remove packages (#5634)
includes workaround to allow dependencies see actions/dependency-review-action#868
1 parent cb19280 commit 0edcc22

File tree

15 files changed

+1922
-3344
lines changed

15 files changed

+1922
-3344
lines changed

.github/workflows/dependency-review.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,7 @@ jobs:
3131
CC0-1.0
3232
allow-ghsas: 'GHSA-vxvm-qww3-2fh7'
3333
# https://github.com/actions/dependency-review-action/issues/868
34-
allow-dependencies-licenses: pkg:npm/%40apidevtools/json-schema-ref-parser@11.7.3
34+
allow-dependencies-licenses: >
35+
pkg:npm/%40apidevtools/json-schema-ref-parser@11.7.3,
36+
pkg:npm/fishery@2.2.3,
37+
pkg:npm/nest-winston@1.10.2

.knip.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"$schema": "https://unpkg.com/knip@5/schema.json",
3+
"entry": ["src/app.js!", "apps/server/src/apps/*.ts!", "apps/server/src/migrations/**/*.ts!", "scripts/*.js!"],
4+
"project": ["**/*.{js,ts}!"]
5+
}

apps/server/src/modules/board/domain/type-mapping.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const BoardNodeTypeToConstructor = {
3838
[BoardNodeType.DELETED_ELEMENT]: DeletedElement,
3939
} as const;
4040

41-
export const getBoardNodeConstructor = <T extends BoardNodeType>(type: T): typeof BoardNodeTypeToConstructor[T] =>
41+
export const getBoardNodeConstructor = <T extends BoardNodeType>(type: T): (typeof BoardNodeTypeToConstructor)[T] =>
4242
BoardNodeTypeToConstructor[type];
4343

4444
export const getBoardNodeType = <T extends AnyBoardNode>(boardNode: T): BoardNodeType => {

apps/server/src/modules/common-cartridge/common-cartridge-client/lesson-client/dto/lesson-contents.dto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ export const LessonContentDtoComponentValues = {
2828
} as const;
2929

3030
export type LessonContentDtoComponent =
31-
typeof LessonContentDtoComponentValues[keyof typeof LessonContentDtoComponentValues];
31+
(typeof LessonContentDtoComponentValues)[keyof typeof LessonContentDtoComponentValues];

apps/server/src/modules/common-cartridge/common-cartridge-client/lesson-client/dto/lesson-linked-task.dto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ export const LessonLinkedTaskDescriptionInputFormat = {
4747
} as const;
4848

4949
export type LessonLinkedTaskDescriptionInputFormatType =
50-
typeof LessonLinkedTaskDescriptionInputFormat[keyof typeof LessonLinkedTaskDescriptionInputFormat];
50+
(typeof LessonLinkedTaskDescriptionInputFormat)[keyof typeof LessonLinkedTaskDescriptionInputFormat];

apps/server/src/modules/common-cartridge/common-cartridge-client/room-client/room-client.adapter.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { REQUEST } from '@nestjs/core';
44
import { faker } from '@faker-js/faker';
55
import { Request } from 'express';
66
import { AxiosResponse } from 'axios';
7-
import { jest } from '@jest/globals';
87
import { CourseRoomsApi, SingleColumnBoardResponse } from './room-api-client';
98
import { CourseRoomsClientAdapter } from './room-client.adapter';
109
import { RoomBoardDtoMapper } from './mapper/room-board-dto.mapper';

apps/server/src/modules/news/api/dto/news.response.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { UserInfoResponse } from './user-info.response';
99
const NEWS_SOURCES = ['internal', 'rss'] as const;
1010
const TARGET_MODEL_VALUES = Object.values(NewsTargetModel);
1111

12-
type SourceType = typeof NEWS_SOURCES[number];
12+
type SourceType = (typeof NEWS_SOURCES)[number];
1313
export class NewsResponse {
1414
constructor({
1515
id,

apps/server/src/modules/role/domain/type/rolename.enum.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const RoomRoleArray = [
4141
RoleName.ROOMEDITOR,
4242
RoleName.ROOMVIEWER,
4343
] as const;
44-
export type RoomRole = typeof RoomRoleArray[number];
44+
export type RoomRole = (typeof RoomRoleArray)[number];
4545

4646
export const GuestRoleArray = [RoleName.GUESTSTUDENT, RoleName.GUESTTEACHER] as const;
47-
export type GuestRole = typeof GuestRoleArray[number];
47+
export type GuestRole = (typeof GuestRoleArray)[number];

apps/server/src/modules/task/api/dto/task.response.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ export class TaskResponse {
4646
description: 'Task description object, with props content: string and type: input format types',
4747
type: RichText,
4848
})
49-
@DecodeHtmlEntities()
5049
description?: RichText;
5150

5251
@ApiProperty()

apps/server/src/modules/task/domain/type/rich-text.types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ApiProperty } from '@nestjs/swagger';
2+
import { DecodeHtmlEntities } from '@shared/controller/transformer';
23
import { sanitizeRichText } from '@shared/controller/transformer/sanitize-html.transformer';
34
import { InputFormat } from '@shared/domain/types/input-format.types';
45

@@ -11,6 +12,7 @@ export class RichText {
1112
@ApiProperty({
1213
description: 'Content of the rich text element',
1314
})
15+
@DecodeHtmlEntities()
1416
content: string;
1517

1618
@ApiProperty({

apps/server/src/modules/user-import/uc/user-import.uc.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ describe('[ImportUserModule]', () => {
897897
schoolServiceSpy = schoolService.getSchoolById.mockResolvedValue(createMockSchoolDo(school));
898898
systemRepoSpy = systemService.findById.mockReturnValueOnce(Promise.resolve(systemDo));
899899
config.FEATURE_USER_MIGRATION_SYSTEM_ID = system.id;
900-
dateSpy = jest.spyOn(global, 'Date').mockReturnValue(currentDate as unknown as string);
900+
dateSpy = jest.spyOn(global, 'Date').mockReturnValue(currentDate);
901901
});
902902

903903
afterEach(() => {

0 commit comments

Comments
 (0)