Skip to content

Commit 9993fc9

Browse files
authored
feat(core): depedency updates and new functionalities added (#9)
* feat(doorkeeper): ✨ add deference function to obtain the schema from compiled schemas * feat(crash): 🎨 increase the maximum length of error message to 800 (from 240) * feat(faker): 🎨 improve the types of Factory to allow extend method
1 parent 12e0620 commit 9993fc9

File tree

30 files changed

+350
-108
lines changed

30 files changed

+350
-108
lines changed
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
steps:
2-
- task: SonarQubePrepare@4
2+
- task: SonarQubePrepare@5
33
displayName: 'Setting Sonarqube analysis'
44
inputs:
55
SonarQube: 'NetinSystems-SonarQube Endpoint-MytraManagementSystem'
66
scannerMode: 'CLI'
77
configMode: 'file'
88
configFile: './.config/sonar-project.properties'
9+
projectVersion: $(Build.BuildNumber)
910
extraProperties:
1011
sonar.projectVersion=$(Build.BuildNumber)
1112

12-
- task: SonarSource.sonarqube.6D01813A-9589-4B15-8491-8164AEB38055.SonarQubeAnalyze@4
13+
- task: SonarSource.sonarqube.6D01813A-9589-4B15-8491-8164AEB38055.SonarQubeAnalyze@5
1314
displayName: 'Run Code Analysis'
1415

15-
- task: SonarSource.sonarqube.291ed61f-1ee4-45d3-b1b0-bf822d9095ef.SonarQubePublish@4
16+
- task: SonarSource.sonarqube.291ed61f-1ee4-45d3-b1b0-bf822d9095ef.SonarQubePublish@5
1617
displayName: 'Publish Quality Gate Result'
1718

18-
- task: SimondeLang.sonar-buildbreaker.sonar-buildbreaker.sonar-buildbreaker@7
19+
- task: SimondeLang.sonar-buildbreaker.sonar-buildbreaker.sonar-buildbreaker@8
1920
displayName: 'Break build on quality gate failure'
2021
inputs:
2122
SonarQube: 'NetinSystems-SonarQube Endpoint-MytraManagementSystem'

package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,38 +26,38 @@
2626
},
2727
"devDependencies": {
2828
"@mdf.js/repo-config": "*",
29-
"@stryker-mutator/core": "^7.0.2",
30-
"@stryker-mutator/jest-runner": "^7.0.2",
31-
"@stryker-mutator/typescript-checker": "^7.0.2",
29+
"@stryker-mutator/core": "^7.1.0",
30+
"@stryker-mutator/jest-runner": "^7.1.0",
31+
"@stryker-mutator/typescript-checker": "^7.1.0",
3232
"@types/jest": "29.5.2",
33-
"@types/node": "20.3.1",
34-
"@typescript-eslint/eslint-plugin": "5.60.0",
35-
"@typescript-eslint/parser": "5.60.0",
33+
"@types/node": "20.3.3",
34+
"@typescript-eslint/eslint-plugin": "5.61.0",
35+
"@typescript-eslint/parser": "5.61.0",
3636
"cross-env": "^7.0.3",
37-
"dependency-cruiser": "^13.0.4",
38-
"eslint": "~8.43.0",
37+
"dependency-cruiser": "^13.0.5",
38+
"eslint": "~8.44.0",
3939
"eslint-config-prettier": "^8.8.0",
4040
"eslint-plugin-import": "^2.27.5",
4141
"eslint-plugin-prettier": "^4.2.1",
4242
"eslint-plugin-tsdoc": "^0.2.17",
43-
"glob": "^10.2.6",
44-
"jest": "29.5.0",
45-
"jest-environment-jsdom": "29.5.0",
46-
"jest-html-reporter": "^3.10.0",
43+
"glob": "^10.3.1",
44+
"jest": "29.6.0",
45+
"jest-environment-jsdom": "29.6.0",
46+
"jest-html-reporter": "^3.10.1",
4747
"jest-junit": "^16.0.0",
4848
"jest-slow-test-reporter": "^1.0.0",
49-
"lerna": "^7.0.2",
49+
"lerna": "^7.1.1",
5050
"license-checker": "^25.0.1",
5151
"npm-check": "^6.0.1",
5252
"prettier": "^2.8.8",
5353
"rimraf": "^5.0.1",
54-
"snyk": "^1.1183.0",
54+
"snyk": "^1.1187.0",
5555
"snyk-to-html": "^2.3.7",
56-
"sort-package-json": "^2.4.1",
57-
"ts-jest": "29.1.0",
56+
"sort-package-json": "^2.5.0",
57+
"ts-jest": "29.1.1",
5858
"ts-node": "10.9.1",
59-
"turbo": "^1.9.9",
59+
"turbo": "^1.10.7",
6060
"typedoc": "0.24.8",
61-
"typescript": "5.1.3"
61+
"typescript": "5.1.6"
6262
}
6363
}

packages/api/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"express": "^4.18.2",
4141
"joi": "^17.9.2",
4242
"lodash": "^4.17.21",
43-
"tslib": "^2.5.2",
43+
"tslib": "^2.6.0",
4444
"uuid": "^9.0.0"
4545
},
4646
"devDependencies": {

packages/api/crash/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"test": "jest --detectOpenHandles --config ./jest.config.js"
3535
},
3636
"dependencies": {
37-
"tslib": "^2.5.2",
37+
"tslib": "^2.6.0",
3838
"uuid": "^9.0.0"
3939
},
4040
"devDependencies": {

packages/api/crash/src/Crash/Crash.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// #region Arrange
99
import { v4 as uuidV4, v4 } from 'uuid';
1010
import { Multi } from '../Multi';
11+
import { CONFIG_MAX_ERROR_MESSAGE_LENGTH } from '../const';
1112
import { Crash } from './CrashError';
1213
const uuidTest = uuidV4();
1314
const query = { query: 'fake' };
@@ -214,9 +215,9 @@ describe('#Crash error', () => {
214215
expect(errorTest.cause?.message).toEqual('Cause');
215216
expect(errorTest.info).toEqual(objectTest);
216217
});
217-
it('Should truncate the message if message is to large (>240)', () => {
218-
const error = new Crash('o'.padEnd(241, 'o'), uuidTest);
219-
expect(error.message.length).toEqual(240);
218+
it(`Should truncate the message if message is to large (>${CONFIG_MAX_ERROR_MESSAGE_LENGTH})`, () => {
219+
const error = new Crash('o'.padEnd(CONFIG_MAX_ERROR_MESSAGE_LENGTH + 1, 'o'), uuidTest);
220+
expect(error.message.length).toEqual(CONFIG_MAX_ERROR_MESSAGE_LENGTH);
220221
expect(error.message).toContain('...too long error');
221222
});
222223
it('isCrash method should return true', () => {

packages/api/crash/src/Multi/MultiError.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import { v4 } from 'uuid';
99
import { Crash } from '../Crash/CrashError';
10+
import { CONFIG_MAX_ERROR_MESSAGE_LENGTH } from '../const';
1011
import { Multi } from './MultiError';
1112
const uuidTest = v4();
1213
const causes: Array<Crash | Error> = [];
@@ -159,9 +160,9 @@ describe('In #Multi class the ', () => {
159160
};
160161
expect(test).toThrowError('Message parameter must be a string');
161162
});
162-
it('Should truncate the message if message is to large (>240)', () => {
163-
const error = new Crash('o'.padEnd(241, 'o'), uuidTest);
164-
expect(error.message.length).toEqual(240);
163+
it(`Should truncate the message if message is to large (>${CONFIG_MAX_ERROR_MESSAGE_LENGTH})`, () => {
164+
const error = new Crash('o'.padEnd(CONFIG_MAX_ERROR_MESSAGE_LENGTH + 1, 'o'), uuidTest);
165+
expect(error.message.length).toEqual(CONFIG_MAX_ERROR_MESSAGE_LENGTH);
165166
expect(error.message).toContain('...too long error');
166167
});
167168
it('Should throw a Crash error if name!=string', () => {

packages/api/crash/src/const/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import { HTTPCode } from '../types';
99

10-
export const CONFIG_MAX_ERROR_MESSAGE_LENGTH = 240;
10+
export const CONFIG_MAX_ERROR_MESSAGE_LENGTH = 800;
1111
export const HTTP_CODES = new Map([
1212
[HTTPCode.CONTINUE, 'Continue'],
1313
[HTTPCode.SWITCHING_PROTOCOLS, 'Switching Protocols'],

packages/api/doorkeeper/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,13 @@
3535
"ajv-formats": "^2.1.1",
3636
"ajv-keywords": "^5.1.0",
3737
"jsonpointer": "^5.0.0",
38-
"tslib": "^2.5.2",
38+
"lodash": "^4.17.21",
39+
"tslib": "^2.6.0",
3940
"uuid": "^9.0.0"
4041
},
4142
"devDependencies": {
4243
"@mdf.js/repo-config": "*",
44+
"@types/lodash": "^4.14.175",
4345
"@types/supertest": "^2.0.12",
4446
"@types/uuid": "^9.0.1"
4547
},

0 commit comments

Comments
 (0)