From 634ceec4c99c2fdaf56267c72db1b3bc2c5e590e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 11 Jul 2024 18:15:44 +0000 Subject: [PATCH 1/4] Update dependency @types/lodash to v4.17.6 --- package-lock.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index a40475cb..2930ba1e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1840,7 +1840,9 @@ } }, "node_modules/@types/lodash": { - "version": "4.14.195", + "version": "4.17.6", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.6.tgz", + "integrity": "sha512-OpXEVoCKSS3lQqjx9GGGOapBeuW5eUboYHRlHP9urXPX25IKZ6AnP5ZRxtVf63iieUbsHxLn8NQ5Nlftc6yzAA==", "dev": true, "license": "MIT" }, From eb6280b06598c5372cb0624c11cea5f430e679df Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 11 Jul 2024 18:15:36 +0000 Subject: [PATCH 2/4] Update dependency @stylistic/eslint-plugin to v2.3.0 --- package-lock.json | 48 ++++++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index a40475cb..7e5a864a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1437,15 +1437,16 @@ "dev": true }, "node_modules/@stylistic/eslint-plugin": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-2.2.2.tgz", - "integrity": "sha512-GNRtyhhPsc9I9FNTaU2L0V/4LdSPAciQNEdYo6NBRdAz7sdiaxgEJKLNSXeXSQAuO9JBWWjZBs/57+WvrU0Iug==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-2.3.0.tgz", + "integrity": "sha512-rtiz6u5gRyyEZp36FcF1/gHJbsbT3qAgXZ1qkad6Nr/xJ9wrSJkiSFFQhpYVTIZ7FJNRJurEcumZDCwN9dEI4g==", "dev": true, + "license": "MIT", "dependencies": { - "@stylistic/eslint-plugin-js": "2.2.2", - "@stylistic/eslint-plugin-jsx": "2.2.2", - "@stylistic/eslint-plugin-plus": "2.2.2", - "@stylistic/eslint-plugin-ts": "2.2.2", + "@stylistic/eslint-plugin-js": "2.3.0", + "@stylistic/eslint-plugin-jsx": "2.3.0", + "@stylistic/eslint-plugin-plus": "2.3.0", + "@stylistic/eslint-plugin-ts": "2.3.0", "@types/eslint": "^8.56.10" }, "engines": { @@ -1456,10 +1457,11 @@ } }, "node_modules/@stylistic/eslint-plugin-js": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-2.2.2.tgz", - "integrity": "sha512-Vj2Q1YHVvJw+ThtOvmk5Yx7wZanVrIBRUTT89horLDb4xdP9GA1um9XOYQC6j67VeUC2gjZQnz5/RVJMzaOhtw==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-2.3.0.tgz", + "integrity": "sha512-lQwoiYb0Fs6Yc5QS3uT8+T9CPKK2Eoxc3H8EnYJgM26v/DgtW+1lvy2WNgyBflU+ThShZaHm3a6CdD9QeKx23w==", "dev": true, + "license": "MIT", "dependencies": { "@types/eslint": "^8.56.10", "acorn": "^8.11.3", @@ -1478,6 +1480,7 @@ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", "dev": true, + "license": "Apache-2.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -1486,12 +1489,13 @@ } }, "node_modules/@stylistic/eslint-plugin-jsx": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-jsx/-/eslint-plugin-jsx-2.2.2.tgz", - "integrity": "sha512-xfIMdLivoMV1wV+5Tl0PtkLN/oUwjIt7LuIu48vhrZfJ2jCXwjlTGPGSoM7dnLZYD65XjtrHHIFAvPuvvvjlaw==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-jsx/-/eslint-plugin-jsx-2.3.0.tgz", + "integrity": "sha512-tsQ0IEKB195H6X9A4iUSgLLLKBc8gUBWkBIU8tp1/3g2l8stu+PtMQVV/VmK1+3bem5FJCyvfcZIQ/WF1fsizA==", "dev": true, + "license": "MIT", "dependencies": { - "@stylistic/eslint-plugin-js": "^2.2.2", + "@stylistic/eslint-plugin-js": "^2.3.0", "@types/eslint": "^8.56.10", "estraverse": "^5.3.0", "picomatch": "^4.0.2" @@ -1516,10 +1520,11 @@ } }, "node_modules/@stylistic/eslint-plugin-plus": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-plus/-/eslint-plugin-plus-2.2.2.tgz", - "integrity": "sha512-oeqPs01yAH4ad4bSchGtx8Jf5XTbxRx++A0joNYiOoq3EBTAUHE/ZB7dVv3BhNuCKiwojOQduLkUCXI5UMHoSw==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-plus/-/eslint-plugin-plus-2.3.0.tgz", + "integrity": "sha512-xboPWGUU5yaPlR+WR57GwXEuY4PSlPqA0C3IdNA/+1o2MuBi95XgDJcZiJ9N+aXsqBXAPIpFFb+WQ7QEHo4f7g==", "dev": true, + "license": "MIT", "dependencies": { "@types/eslint": "^8.56.10", "@typescript-eslint/utils": "^7.12.0" @@ -1529,12 +1534,13 @@ } }, "node_modules/@stylistic/eslint-plugin-ts": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-ts/-/eslint-plugin-ts-2.2.2.tgz", - "integrity": "sha512-n6cYMSWTDDcrQLLxEKIrL/ihQ1lyyq6+gGp0g5VdstBElmImSRsQkCq+g3jRoDJIUo7tGO9lwQtGnuJ7oGB4kg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-ts/-/eslint-plugin-ts-2.3.0.tgz", + "integrity": "sha512-wqOR38/uz/0XPnHX68ftp8sNMSAqnYGjovOTN7w00xnjS6Lxr3Sk7q6AaxWWqbMvOj7V2fQiMC5HWAbTruJsCg==", "dev": true, + "license": "MIT", "dependencies": { - "@stylistic/eslint-plugin-js": "2.2.2", + "@stylistic/eslint-plugin-js": "2.3.0", "@types/eslint": "^8.56.10", "@typescript-eslint/utils": "^7.12.0" }, From 008bbc4f90b6802f31d48f3d76aec6c826e32b30 Mon Sep 17 00:00:00 2001 From: tudor <7089284+tudddorrr@users.noreply.github.com> Date: Wed, 24 Jul 2024 23:39:50 +0100 Subject: [PATCH 3/4] rename matching email/password errors --- src/entities/player-auth.ts | 4 ++-- src/services/api/player-auth-api.service.ts | 4 ++-- tests/services/_api/player-auth-api/changeEmail.test.ts | 2 +- tests/services/_api/player-auth-api/changePassword.test.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/entities/player-auth.ts b/src/entities/player-auth.ts index b0c88563..266c722f 100644 --- a/src/entities/player-auth.ts +++ b/src/entities/player-auth.ts @@ -12,8 +12,8 @@ export enum PlayerAuthErrorCode { IDENTIFIER_TAKEN = 'IDENTIFIER_TAKEN', MISSING_SESSION = 'MISSING_SESSION', INVALID_SESSION = 'INVALID_SESSION', - NEW_PASSWORD_MATCHES_OLD_PASSWORD = 'NEW_PASSWORD_MATCHES_OLD_PASSWORD', - NEW_EMAIL_MATCHES_OLD_EMAIL = 'NEW_EMAIL_MATCHES_OLD_EMAIL', + NEW_PASSWORD_MATCHES_CURRENT_PASSWORD = 'NEW_PASSWORD_MATCHES_CURRENT_PASSWORD', + NEW_EMAIL_MATCHES_CURRENT_EMAIL = 'NEW_EMAIL_MATCHES_CURRENT_EMAIL', PASSWORD_RESET_CODE_INVALID = 'PASSWORD_RESET_CODE_INVALID' } diff --git a/src/services/api/player-auth-api.service.ts b/src/services/api/player-auth-api.service.ts index 12eb78c6..bc924ecc 100644 --- a/src/services/api/player-auth-api.service.ts +++ b/src/services/api/player-auth-api.service.ts @@ -254,7 +254,7 @@ export default class PlayerAuthAPIService extends APIService { if (isSamePassword) { req.ctx.throw(400, { message: 'Please choose a different password', - errorCode: PlayerAuthErrorCode.NEW_PASSWORD_MATCHES_OLD_PASSWORD + errorCode: PlayerAuthErrorCode.NEW_PASSWORD_MATCHES_CURRENT_PASSWORD }) } @@ -291,7 +291,7 @@ export default class PlayerAuthAPIService extends APIService { if (isSameEmail) { req.ctx.throw(400, { message: 'Please choose a different email address', - errorCode: PlayerAuthErrorCode.NEW_EMAIL_MATCHES_OLD_EMAIL + errorCode: PlayerAuthErrorCode.NEW_EMAIL_MATCHES_CURRENT_EMAIL }) } diff --git a/tests/services/_api/player-auth-api/changeEmail.test.ts b/tests/services/_api/player-auth-api/changeEmail.test.ts index 08f2e527..66bb560d 100644 --- a/tests/services/_api/player-auth-api/changeEmail.test.ts +++ b/tests/services/_api/player-auth-api/changeEmail.test.ts @@ -120,7 +120,7 @@ describe('Player auth API service - change email', () => { expect(res.body).toStrictEqual({ message: 'Please choose a different email address', - errorCode: 'NEW_EMAIL_MATCHES_OLD_EMAIL' + errorCode: 'NEW_EMAIL_MATCHES_CURRENT_EMAIL' }) }) }) diff --git a/tests/services/_api/player-auth-api/changePassword.test.ts b/tests/services/_api/player-auth-api/changePassword.test.ts index 8493ea81..2c5bb562 100644 --- a/tests/services/_api/player-auth-api/changePassword.test.ts +++ b/tests/services/_api/player-auth-api/changePassword.test.ts @@ -120,7 +120,7 @@ describe('Player auth API service - change password', () => { expect(res.body).toStrictEqual({ message: 'Please choose a different password', - errorCode: 'NEW_PASSWORD_MATCHES_OLD_PASSWORD' + errorCode: 'NEW_PASSWORD_MATCHES_CURRENT_PASSWORD' }) }) }) From 515e5934621f35c18270b12783c31cf9ca74aae9 Mon Sep 17 00:00:00 2001 From: tudor <7089284+tudddorrr@users.noreply.github.com> Date: Wed, 24 Jul 2024 23:46:03 +0100 Subject: [PATCH 4/4] 0.36.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index b024067c..28cbe124 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "game-services", - "version": "0.36.0", + "version": "0.36.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "game-services", - "version": "0.36.0", + "version": "0.36.1", "license": "MIT", "dependencies": { "@dinero.js/currencies": "^2.0.0-alpha.14", diff --git a/package.json b/package.json index ef588652..063d40e2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "game-services", - "version": "0.36.0", + "version": "0.36.1", "description": "", "main": "src/index.ts", "scripts": {