diff --git a/.azure/azure-pipelines.pr.yml b/.azure/azure-pipelines.pr.yml index 49271c1d..b8f87ee2 100644 --- a/.azure/azure-pipelines.pr.yml +++ b/.azure/azure-pipelines.pr.yml @@ -24,4 +24,4 @@ pool: steps: - template: templates/test/npm-test.yml@cet-iac parameters: - nodeVersion: '16' + nodeVersion: '18' diff --git a/.azure/azure-pipelines.ref.yml b/.azure/azure-pipelines.ref.yml index 799d8881..2e0ee88f 100644 --- a/.azure/azure-pipelines.ref.yml +++ b/.azure/azure-pipelines.ref.yml @@ -31,7 +31,7 @@ pool: steps: - template: templates/test/npm-test.yml@cet-iac parameters: - nodeVersion: '16' + nodeVersion: '18' - template: templates/docker/push.yml@cet-iac parameters: dockerFilePath: $(dockerfilePath) diff --git a/Dockerfile b/Dockerfile index b68e5c3a..5dc0998d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM kthregistry.azurecr.io/kth-nodejs-16:latest +FROM kthregistry.azurecr.io/kth-nodejs-18:latest LABEL maintainer="KTH-studadm studadm.developers@kth.se" WORKDIR /application diff --git a/README.md b/README.md index 977f7ab7..69bafdad 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Welcome to kursinfo-web 👋 ![Version](https://img.shields.io/badge/version-2.0.0-blue.svg?cacheSeconds=2592000) -![Prerequisite](https://img.shields.io/badge/node-14.0.0-blue.svg) +![Prerequisite](https://img.shields.io/badge/node-18-blue.svg) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](#) ## Introduction @@ -41,7 +41,7 @@ Kursinfo-web fetches data from: ## Prerequisites -- Node.js 14.0.0 +- Node.js 18.0.0 - Ansible Vault ### Secrets for Development diff --git a/package-lock.json b/package-lock.json index 05d41c77..ec49a0e5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@kth/monitor": "^4.1.1", "@kth/server": "^4.0.4", "@kth/session": "^3.0.8", - "@kth/ug-rest-api-helper": "^1.0.24", + "@kth/ug-rest-api-helper": "^1.0.25", "applicationinsights": "^2.7.3", "axios": "^1.4.0", "body-parser": "^1.20.2", @@ -89,7 +89,7 @@ "webpack-cli": "^5.1.4" }, "engines": { - "node": "16" + "node": "18" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -197,24 +197,24 @@ } }, "node_modules/@azure/msal-common": { - "version": "13.2.1", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-13.2.1.tgz", - "integrity": "sha512-9CtyVdDtAOw+raemKg8gdBuE7gleObgSb7p4bzMIlUt8eM69/Gaow7uqr1gK3jLYINSrss32OZW8mBbdgVLiHg==", + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.0.3.tgz", + "integrity": "sha512-Vl5SsC3zvQ8913GnO5Typox+35M6CaXmO/2FXi35LfMAV3ZB/HLCsldLxylI01c3CmtOm7pICWpOjp/DlQ9RWA==", "engines": { "node": ">=0.8.0" } }, "node_modules/@azure/msal-node": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.18.1.tgz", - "integrity": "sha512-B4kUOWJoN4vD8b3pGJ9Q9mIZhaDb8EnQM1aN0x1otlQgTfzDvEk6rWc6fy8uGdtXqcNddBtiXdc4oRiItroVkA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.1.0.tgz", + "integrity": "sha512-RiYnw8VdrFJrgTfHAfiAhRehIYN/H8vQ00DGVTYMOtlOkoEbZneK0qs8DV3p2WKVB5GN0cshVSI79N0fVlgbmg==", "dependencies": { - "@azure/msal-common": "13.2.1", + "@azure/msal-common": "14.0.3", "jsonwebtoken": "^9.0.0", "uuid": "^8.3.0" }, "engines": { - "node": "10 || 12 || 14 || 16 || 18" + "node": "18 || 20" } }, "node_modules/@azure/opentelemetry-instrumentation-azure-sdk": { @@ -3243,11 +3243,11 @@ } }, "node_modules/@kth/ug-rest-api-helper": { - "version": "1.0.24", - "resolved": "https://registry.npmjs.org/@kth/ug-rest-api-helper/-/ug-rest-api-helper-1.0.24.tgz", - "integrity": "sha512-dpV28fDdBFmv3fY+iRn1EP4QQ0g4YbhBhmRF+Y1GesSXptSJvHh/CDnKpAXNY89ozMffIDCnrYSvfhId28US3g==", + "version": "1.0.25", + "resolved": "https://registry.npmjs.org/@kth/ug-rest-api-helper/-/ug-rest-api-helper-1.0.25.tgz", + "integrity": "sha512-kPzlZ8Po2fsfsha2/YViYaR87crvZOTrqN9OchWZ6nI14xiBgtmlAu7X/8qFu5rkk+ZlH0xsnLBxy7q3L9quCA==", "dependencies": { - "@azure/msal-node": "^1.18.0", + "@azure/msal-node": "^2.1.0", "axios": "^1.4.0" } }, @@ -11868,14 +11868,20 @@ } }, "node_modules/jsonwebtoken": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.1.tgz", - "integrity": "sha512-K8wx7eJ5TPvEjuiVSkv167EVboBDv9PZdDoF7BgeQnBLVvZWW9clr2PsQHVJDTKaEIH5JBIwHujGcHp7GgI2eg==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", "dependencies": { "jws": "^3.2.2", - "lodash": "^4.17.21", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", "ms": "^2.1.1", - "semver": "^7.3.8" + "semver": "^7.5.4" }, "engines": { "node": ">=12", @@ -12100,6 +12106,36 @@ "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==" }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" + }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" + }, "node_modules/lodash.memoize": { "version": "4.1.2", "dev": true, @@ -12110,6 +12146,11 @@ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" + }, "node_modules/loglevel": { "version": "1.8.0", "dev": true, @@ -16958,16 +16999,16 @@ } }, "@azure/msal-common": { - "version": "13.2.1", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-13.2.1.tgz", - "integrity": "sha512-9CtyVdDtAOw+raemKg8gdBuE7gleObgSb7p4bzMIlUt8eM69/Gaow7uqr1gK3jLYINSrss32OZW8mBbdgVLiHg==" + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.0.3.tgz", + "integrity": "sha512-Vl5SsC3zvQ8913GnO5Typox+35M6CaXmO/2FXi35LfMAV3ZB/HLCsldLxylI01c3CmtOm7pICWpOjp/DlQ9RWA==" }, "@azure/msal-node": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.18.1.tgz", - "integrity": "sha512-B4kUOWJoN4vD8b3pGJ9Q9mIZhaDb8EnQM1aN0x1otlQgTfzDvEk6rWc6fy8uGdtXqcNddBtiXdc4oRiItroVkA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.1.0.tgz", + "integrity": "sha512-RiYnw8VdrFJrgTfHAfiAhRehIYN/H8vQ00DGVTYMOtlOkoEbZneK0qs8DV3p2WKVB5GN0cshVSI79N0fVlgbmg==", "requires": { - "@azure/msal-common": "13.2.1", + "@azure/msal-common": "14.0.3", "jsonwebtoken": "^9.0.0", "uuid": "^8.3.0" } @@ -19068,11 +19109,11 @@ } }, "@kth/ug-rest-api-helper": { - "version": "1.0.24", - "resolved": "https://registry.npmjs.org/@kth/ug-rest-api-helper/-/ug-rest-api-helper-1.0.24.tgz", - "integrity": "sha512-dpV28fDdBFmv3fY+iRn1EP4QQ0g4YbhBhmRF+Y1GesSXptSJvHh/CDnKpAXNY89ozMffIDCnrYSvfhId28US3g==", + "version": "1.0.25", + "resolved": "https://registry.npmjs.org/@kth/ug-rest-api-helper/-/ug-rest-api-helper-1.0.25.tgz", + "integrity": "sha512-kPzlZ8Po2fsfsha2/YViYaR87crvZOTrqN9OchWZ6nI14xiBgtmlAu7X/8qFu5rkk+ZlH0xsnLBxy7q3L9quCA==", "requires": { - "@azure/msal-node": "^1.18.0", + "@azure/msal-node": "^2.1.0", "axios": "^1.4.0" } }, @@ -25150,14 +25191,20 @@ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==" }, "jsonwebtoken": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.1.tgz", - "integrity": "sha512-K8wx7eJ5TPvEjuiVSkv167EVboBDv9PZdDoF7BgeQnBLVvZWW9clr2PsQHVJDTKaEIH5JBIwHujGcHp7GgI2eg==", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-PRp66vJ865SSqOlgqS8hujT5U4AOgMfhrwYIuIhfKaoSCZcirrmASQr8CX7cUg+RMih+hgznrjp99o+W4pJLHQ==", "requires": { "jws": "^3.2.2", - "lodash": "^4.17.21", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", "ms": "^2.1.1", - "semver": "^7.3.8" + "semver": "^7.5.4" }, "dependencies": { "semver": { @@ -25334,6 +25381,36 @@ "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==" }, + "lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" + }, + "lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" + }, + "lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" + }, + "lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" + }, "lodash.memoize": { "version": "4.1.2", "dev": true @@ -25343,6 +25420,11 @@ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" + }, "loglevel": { "version": "1.8.0", "dev": true diff --git a/package.json b/package.json index 39de44b4..01154b55 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "@kth/monitor": "^4.1.1", "@kth/server": "^4.0.4", "@kth/session": "^3.0.8", - "@kth/ug-rest-api-helper": "^1.0.24", + "@kth/ug-rest-api-helper": "^1.0.25", "applicationinsights": "^2.7.3", "axios": "^1.4.0", "body-parser": "^1.20.2", @@ -107,7 +107,7 @@ "webpack-cli": "^5.1.4" }, "engines": { - "node": "16" + "node": "18" }, "jshintConfig": { "maxerr": 5