Skip to content

Commit

Permalink
chore(deps): EXUI-375 (#239)
Browse files Browse the repository at this point in the history
* chore: reduce high/critical vulnerabilities

Update packages to reduce vulnerabilites

* fix(fix unit tests): fix erroring unit tests

* fix: downgrade commitlint to work with node 14

Downgrade commitlint version so it is compatible with node 14 build in pipeline

* fix: change version name

Chage the version name

* refactor(update version number): update the version number to v2.29.0
  • Loading branch information
Josh-HMCTS authored Jul 1, 2024
1 parent df25dbf commit 6de1f62
Show file tree
Hide file tree
Showing 5 changed files with 2,971 additions and 4,519 deletions.
16 changes: 2 additions & 14 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,10 @@ module.exports = {
color: 'magenta',
},
transform: {
'^.+\\.(t|j)sx?$': 'ts-jest',
'^.+\\.(t|j)sx?$': ['ts-jest', { compiler: 'ttypescript' }],
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
// coverageThreshold: {
// global: {
// branches: 80,
// functions: 80,
// lines: 80,
// statements: 80,
// },
// },
restoreMocks: true,
globals: {
'ts-jest': {
compiler: 'ttypescript',
},
},
globals: {},
}
32 changes: 19 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hmcts/rpx-xui-node-lib",
"version": "2.28.0",
"version": "2.29.0",
"description": "Common Nodejs library components for XUI",
"main": "dist/index",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -40,11 +40,11 @@
"dist/**/*"
],
"devDependencies": {
"@commitlint/cli": "^8.2.0",
"@commitlint/cli": "^17.8.1",
"@commitlint/config-conventional": "^8.2.0",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/git": "^9.0.0",
"@semantic-release/github": "^7.0.7",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^8.1.0",
"@types/connect-redis": "^0.0.14",
"@types/csurf": "^1.9.36",
"@types/debug": "^4.1.5",
Expand All @@ -61,19 +61,19 @@
"@typescript-eslint/parser": "^3.10.1",
"commitizen": "^4.0.3",
"commitlint-config-cz": "^0.13.1",
"cz-conventional-changelog": "^3.0.2",
"eslint": "^6.8.0",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-prettier": "^3.3.1",
"husky": ">=4",
"jest": "^27.5.1",
"jest": "^29.7.0",
"jest-environment-jsdom": "^27.5.1",
"lint-staged": "^10.2.2",
"prettier": "^2.0.5",
"semantic-release": "^17.0.8",
"standard-version": "^7.0.1",
"semantic-release": "^19.0.2",
"standard-version": "^9.5.0",
"supports-color": "^7.1.0",
"ts-jest": "^27.1.5",
"ts-jest": "^29.1.4",
"ts-node": "^10.8.1",
"tslint": "^6.1.0",
"tslint-config-prettier": "^1.18.0",
Expand All @@ -94,8 +94,8 @@
"deepmerge": "^4.2.2",
"express": "^4.17.1",
"express-session": "^1.17.0",
"jest-mock-axios": "^4.6.2",
"jest-ts-auto-mock": "^2.0.0",
"jest-mock-axios": "^4.7.3",
"jest-ts-auto-mock": "^2.1.0",
"jwt-decode": "^2.2.0",
"openid-client": "^3.10.0",
"otplib": "^12.0.1",
Expand All @@ -105,5 +105,11 @@
"session-file-store": "^1.3.1",
"ts-auto-mock": "^3.5.0",
"ttypescript": "^1.5.13"
},
"resolutions": {
"@babel/traverse": "7.23.2",
"minimatch": "3.0.5",
"minimist": "1.2.6"
}
}

3 changes: 1 addition & 2 deletions src/auth/oauth2/models/oauth2.class.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('OAUTH2 Auth', () => {
tokenURL: '1234',
clientID: 'clientID12',
clientSecret: 'secret123',
discoveryEndpoint: 'http://localhost/someEndpoint',
discoveryEndpoint: 'http://localhost:/someEndpoint',
issuerURL: 'issuer_url',
logoutURL: 'http://testUrl',
callbackURL: 'http://localhost/callback',
Expand Down Expand Up @@ -62,7 +62,6 @@ describe('OAUTH2 Auth', () => {

test('loginHandler with session and sessionKey', async () => {
const mockRouter = createMock<Router>()
const options = createMock<AuthOptions>()
const logger = ({
log: jest.fn(),
error: jest.fn(),
Expand Down
10 changes: 5 additions & 5 deletions src/auth/oidc/models/openid.class.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ const mockRequestRequired = {
}

const options = {
authorizationURL: 'someAuthorizationURL',
tokenURL: '1234',
authorizationURL: 'http://localhost/someAuthorizationURL',
tokenURL: 'http://localhost/1234',
clientID: 'clientID12',
clientSecret: 'secret123',
discoveryEndpoint: 'someEndpoint',
issuerURL: 'issuer_url',
logoutURL: 'http://testUrl',
discoveryEndpoint: 'http://localhost/someEndpoint',
issuerURL: 'http://localhost/issuer_url',
logoutURL: 'http://localhost/testUrl',
callbackURL: 'http://localhost/callback',
responseTypes: ['none'],
scope: 'some scope',
Expand Down
Loading

0 comments on commit 6de1f62

Please sign in to comment.