diff --git a/gulp/gulp-tests.js b/gulp/gulp-tests.js index c3445874fa..d61ead1c98 100644 --- a/gulp/gulp-tests.js +++ b/gulp/gulp-tests.js @@ -3,9 +3,7 @@ import { exec } from 'child_process'; import gulp from 'gulp'; import os from 'os'; import nconf from 'nconf'; -import { - pipe, -} from './taskHelper'; +import { pipe } from './taskHelper'; import { getDevelopmentConnectionUrl, getDefaultConnectionOptions, @@ -21,15 +19,16 @@ const TEST_DB_URI = nconf.get('TEST_DB_URI'); const SANITY_TEST_COMMAND = 'npm run test:sanity'; const COMMON_TEST_COMMAND = 'npm run test:common'; const CONTENT_TEST_COMMAND = 'npm run test:content'; -const CONTENT_OPTIONS = { maxBuffer: 1024 * 500 }; +const LIMIT_MAX_BUFFER_OPTIONS = { maxBuffer: 1024 * 500 }; -/* Helper methods for reporting test summary */ +/* Helper method for reporting test summary */ const testResults = []; const testCount = (stdout, regexp) => { const match = stdout.match(regexp); return parseInt(match && (match[1] || 0), 10); }; +/* Helper methods to correctly run child test processes */ const testBin = (string, additionalEnvVariables = '') => { if (os.platform() === 'win32') { if (additionalEnvVariables !== '') { @@ -41,6 +40,15 @@ const testBin = (string, additionalEnvVariables = '') => { return `NODE_ENV=test ${additionalEnvVariables} ${string}`; }; +function runInChildProcess (command, options = {}, envVariables = '') { + return done => pipe(exec(testBin(command, envVariables), options, done)); +} + +function integrationTestCommand (testDir, coverageDir) { + return `istanbul cover --dir coverage/${coverageDir} --report lcovonly node_modules/mocha/bin/_mocha -- ${testDir} --recursive --require ./test/helpers/start-server`; +} + +/* Test task definitions */ gulp.task('test:nodemon', gulp.series(done => { process.env.PORT = TEST_SERVER_PORT; // eslint-disable-line no-process-env process.env.NODE_DB_URI = TEST_DB_URI; // eslint-disable-line no-process-env @@ -82,31 +90,9 @@ gulp.task('test:prepare', gulp.series( done => done(), )); -gulp.task('test:sanity', cb => { - const runner = exec( - testBin(SANITY_TEST_COMMAND), - err => { - if (err) { - process.exit(1); - } - cb(); - }, - ); - pipe(runner); -}); +gulp.task('test:sanity', runInChildProcess(SANITY_TEST_COMMAND)); -gulp.task('test:common', gulp.series('test:prepare:build', cb => { - const runner = exec( - testBin(COMMON_TEST_COMMAND), - err => { - if (err) { - process.exit(1); - } - cb(); - }, - ); - pipe(runner); -})); +gulp.task('test:common', gulp.series('test:prepare:build', runInChildProcess(COMMON_TEST_COMMAND))); gulp.task('test:common:clean', cb => { pipe(exec(testBin(COMMON_TEST_COMMAND), () => cb())); @@ -130,22 +116,11 @@ gulp.task('test:common:safe', gulp.series('test:prepare:build', cb => { pipe(runner); })); -gulp.task('test:content', gulp.series('test:prepare:build', cb => { - const runner = exec( - testBin(CONTENT_TEST_COMMAND), - CONTENT_OPTIONS, - err => { - if (err) { - process.exit(1); - } - cb(); - }, - ); - pipe(runner); -})); +gulp.task('test:content', gulp.series('test:prepare:build', + runInChildProcess(CONTENT_TEST_COMMAND, LIMIT_MAX_BUFFER_OPTIONS))); gulp.task('test:content:clean', cb => { - pipe(exec(testBin(CONTENT_TEST_COMMAND), CONTENT_OPTIONS, () => cb())); + pipe(exec(testBin(CONTENT_TEST_COMMAND), LIMIT_MAX_BUFFER_OPTIONS, () => cb())); }); gulp.task('test:content:watch', gulp.series('test:content:clean', () => gulp.watch(['common/script/content/**', 'test/**'], gulp.series('test:content:clean', done => done())))); @@ -153,7 +128,7 @@ gulp.task('test:content:watch', gulp.series('test:content:clean', () => gulp.wat gulp.task('test:content:safe', gulp.series('test:prepare:build', cb => { const runner = exec( testBin(CONTENT_TEST_COMMAND), - CONTENT_OPTIONS, + LIMIT_MAX_BUFFER_OPTIONS, (err, stdout) => { // eslint-disable-line handle-callback-err testResults.push({ suite: 'Content Specs\t', @@ -167,76 +142,39 @@ gulp.task('test:content:safe', gulp.series('test:prepare:build', cb => { pipe(runner); })); -gulp.task('test:api:unit:run', done => { - const runner = exec( - testBin('istanbul cover --dir coverage/api-unit node_modules/mocha/bin/_mocha -- test/api/unit --recursive --require ./test/helpers/start-server'), - err => { - if (err) { - process.exit(1); - } - done(); - }, - ); - - pipe(runner); -}); +gulp.task('test:api:unit:run', + runInChildProcess(integrationTestCommand('test/api/unit', 'coverage/api-unit'))); gulp.task('test:api:unit:watch', () => gulp.watch(['website/server/libs/*', 'test/api/unit/**/*', 'website/server/controllers/**/*'], gulp.series('test:api:unit:run', done => done()))); -gulp.task('test:api-v3:integration', gulp.series('test:prepare:mongo', done => { - const runner = exec( - testBin('istanbul cover --dir coverage/api-v3-integration --report lcovonly node_modules/mocha/bin/_mocha -- test/api/v3/integration --recursive --require ./test/helpers/start-server'), - { maxBuffer: 500 * 1024 }, - err => { - if (err) { - process.exit(1); - } - done(); - }, - ); - - pipe(runner); -})); +gulp.task('test:api-v3:integration', gulp.series('test:prepare:mongo', + runInChildProcess( + integrationTestCommand('test/api/v3/integration', 'coverage/api-v3-integration'), + LIMIT_MAX_BUFFER_OPTIONS, + ))); gulp.task('test:api-v3:integration:watch', () => gulp.watch([ 'website/server/controllers/api-v3/**/*', 'common/script/ops/*', 'website/server/libs/*.js', 'test/api/v3/integration/**/*', ], gulp.series('test:api-v3:integration', done => done()))); -gulp.task('test:api-v3:integration:separate-server', done => { - const runner = exec( - testBin('mocha test/api/v3/integration --recursive --require ./test/helpers/start-server', 'LOAD_SERVER=0'), - { maxBuffer: 500 * 1024 }, - err => done(err), - ); +gulp.task('test:api-v3:integration:separate-server', runInChildProcess( + 'mocha test/api/v3/integration --recursive --require ./test/helpers/start-server', + LIMIT_MAX_BUFFER_OPTIONS, + 'LOAD_SERVER=0', +)); - pipe(runner); -}); +gulp.task('test:api-v4:integration', gulp.series('test:prepare:mongo', + runInChildProcess( + integrationTestCommand('test/api/v4', 'api-v4-integration'), + LIMIT_MAX_BUFFER_OPTIONS, + ))); -gulp.task('test:api-v4:integration', gulp.series('test:prepare:mongo', done => { - const runner = exec( - testBin('istanbul cover --dir coverage/api-v4-integration --report lcovonly node_modules/mocha/bin/_mocha -- test/api/v4 --recursive --require ./test/helpers/start-server'), - { maxBuffer: 500 * 1024 }, - err => { - if (err) { - process.exit(1); - } - done(); - }, - ); - - pipe(runner); -})); - -gulp.task('test:api-v4:integration:separate-server', done => { - const runner = exec( - testBin('mocha test/api/v4 --recursive --require ./test/helpers/start-server', 'LOAD_SERVER=0'), - { maxBuffer: 500 * 1024 }, - err => done(err), - ); - - pipe(runner); -}); +gulp.task('test:api-v4:integration:separate-server', runInChildProcess( + 'mocha test/api/v4 --recursive --require ./test/helpers/start-server', + LIMIT_MAX_BUFFER_OPTIONS, + 'LOAD_SERVER=0', +)); gulp.task('test:api:unit', gulp.series( 'test:prepare:mongo', diff --git a/package-lock.json b/package-lock.json index 5b98724563..74fbfe3632 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1312,9 +1312,9 @@ "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==" }, "@types/express": { - "version": "4.17.7", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.7.tgz", - "integrity": "sha512-dCOT5lcmV/uC2J9k0rPafATeeyz+99xTt54ReX11/LObZgfzJqZNcW27zGhYyX+9iSEGXGt5qLPwRSvBZcLvtQ==", + "version": "4.17.8", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.8.tgz", + "integrity": "sha512-wLhcKh3PMlyA2cNAB9sjM1BntnhPMiM0JOBwPBqttjHev2428MLEB4AYVN+d8s2iyCVZac+o41Pflm/ZH5vLXQ==", "requires": { "@types/body-parser": "*", "@types/express-serve-static-core": "*", @@ -1332,9 +1332,9 @@ } }, "@types/express-serve-static-core": { - "version": "4.17.9", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.9.tgz", - "integrity": "sha512-DG0BYg6yO+ePW+XoDENYz8zhNGC3jDDEpComMYn7WJc4mY1Us8Rw9ax2YhJXxpyk2SF47PQAoQ0YyVT1a0bEkA==", + "version": "4.17.13", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.13.tgz", + "integrity": "sha512-RgDi5a4nuzam073lRGKTUIaL3eF2+H7LJvJ8eUnCI0wA6SNjXc44DCmWNiTLs/AZ7QlsFWZiw/gTG3nSQGL0fA==", "requires": { "@types/node": "*", "@types/qs": "*", @@ -1445,9 +1445,9 @@ "optional": true }, "@types/qs": { - "version": "6.9.4", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.4.tgz", - "integrity": "sha512-+wYo+L6ZF6BMoEjtf8zB2esQsqdV6WsjRK/GP9WOgLPrq87PbNWgIxS76dS5uvl/QXtHGakZmwTznIfcPXcKlQ==" + "version": "6.9.5", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.5.tgz", + "integrity": "sha512-/JHkVHtx/REVG0VVToGRGH2+23hsYLHdyG+GrvoUGlGAd0ErauXDyvHtRI/7H7mzLm+tBCKA7pfcpkQ1lf58iQ==" }, "@types/range-parser": { "version": "1.2.3", @@ -2141,7 +2141,6 @@ "version": "0.19.2", "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", - "dev": true, "requires": { "follow-redirects": "1.5.10" } @@ -8379,27 +8378,19 @@ } }, "jwks-rsa": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/jwks-rsa/-/jwks-rsa-1.9.0.tgz", - "integrity": "sha512-UPCfQQg0s2kF2Ju6UFJrQH73f7MaVN/hKBnYBYOp+X9KN4y6TLChhLtaXS5nRKbZqshwVdrZ9OY63m/Q9CLqcg==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/jwks-rsa/-/jwks-rsa-1.10.1.tgz", + "integrity": "sha512-UmjOsATVu7eQr17wbBCS+BSoz5LFtl57PtNXHbHFeT1WKomHykCHtn7c8inWVI7tpnsy6CZ1KOMJTgipFwXPig==", "requires": { "@types/express-jwt": "0.0.42", "axios": "^0.19.2", "debug": "^4.1.0", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", "jsonwebtoken": "^8.5.1", "limiter": "^1.1.5", "lru-memoizer": "^2.1.2", "ms": "^2.1.2" - }, - "dependencies": { - "axios": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", - "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", - "requires": { - "follow-redirects": "1.5.10" - } - } } }, "jws": { @@ -9355,9 +9346,9 @@ "integrity": "sha1-EUyUlnPiqKNenTV4hSeqN7Z52is=" }, "moment": { - "version": "2.28.0", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.28.0.tgz", - "integrity": "sha512-Z5KOjYmnHyd/ukynmFd/WwyXHd7L4J9vTI/nn5Ap9AVUgaAE15VvQ9MOGmJJygEUklupqIrFnor/tjTwRU+tQw==" + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.0.tgz", + "integrity": "sha512-z6IJ5HXYiuxvFTI6eiQ9dm77uE0gyy1yXNApVHqTcnIKfY9tIwEjlzsZ6u1LQXvVgKeTnv9Xm7NDvJ7lso3MtA==" }, "moment-recur": { "version": "1.0.7", diff --git a/package.json b/package.json index 1fc63b1d16..c23af064e3 100644 --- a/package.json +++ b/package.json @@ -42,11 +42,11 @@ "in-app-purchase": "^1.11.3", "js2xmlparser": "^4.0.1", "jsonwebtoken": "^8.5.1", - "jwks-rsa": "^1.9.0", + "jwks-rsa": "^1.10.1", "lodash": "^4.17.20", "merge-stream": "^2.0.0", "method-override": "^3.0.0", - "moment": "^2.28.0", + "moment": "^2.29.0", "moment-recur": "^1.0.7", "mongoose": "^5.10.3", "morgan": "^1.10.0", diff --git a/test/api/unit/libs/xmlMarshaller.test.js b/test/api/unit/libs/xmlMarshaller.test.js new file mode 100644 index 0000000000..73633a4c30 --- /dev/null +++ b/test/api/unit/libs/xmlMarshaller.test.js @@ -0,0 +1,44 @@ +import * as xmlMarshaller from '../../../../website/server/libs/xmlMarshaller'; + +describe('xml marshaller marshalls user data', () => { + const minimumUser = { + pinnedItems: [], + unpinnedItems: [], + inbox: {}, + }; + + function userDataWith (fields) { + return { ...minimumUser, ...fields }; + } + + it('maps the newMessages field to have id as a value in a list.', () => { + const userData = userDataWith({ + newMessages: { + '283171a5-422c-4991-bc78-95b1b5b51629': { + name: 'The Language Hackers', + value: true, + }, + '283171a6-422c-4991-bc78-95b1b5b51629': { + name: 'The Bug Hackers', + value: false, + }, + }, + }); + + const xml = xmlMarshaller.marshallUserData(userData); + + expect(xml).to.equal(` + + + 283171a5-422c-4991-bc78-95b1b5b51629 + The Language Hackers + true + + + 283171a6-422c-4991-bc78-95b1b5b51629 + The Bug Hackers + false + +`); + }); +}); diff --git a/website/client/package-lock.json b/website/client/package-lock.json index e08da3895c..e361048946 100644 --- a/website/client/package-lock.json +++ b/website/client/package-lock.json @@ -4891,14 +4891,6 @@ "resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.3.tgz", "integrity": "sha512-Jus9s4CDbqwocc5pOAnh8ShfrnMcPHuJYzVcSUU7lrh8Ni5HuIqX3oilL86p3dlTrk0LzHRCgA/GQ7uNCw6l2Q==" }, - "@types/mini-css-extract-plugin": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/@types/mini-css-extract-plugin/-/mini-css-extract-plugin-0.9.1.tgz", - "integrity": "sha512-+mN04Oszdz9tGjUP/c1ReVwJXxSniLd7lF++sv+8dkABxVNthg6uccei+4ssKxRHGoMmPxdn7uBdJWONSJGTGQ==", - "requires": { - "@types/webpack": "*" - } - }, "@types/minimatch": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", @@ -6444,6 +6436,11 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, + "emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -6547,22 +6544,19 @@ } }, "vue-loader-v16": { - "version": "npm:vue-loader@16.0.0-beta.7", - "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.0.0-beta.7.tgz", - "integrity": "sha512-xQ8/GZmRPdQ3EinnE0IXwdVoDzh7Dowo0MowoyBuScEBXrRabw6At5/IdtD3waKklKW5PGokPsm8KRN6rvQ1cw==", + "version": "npm:vue-loader@16.0.0-beta.8", + "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.0.0-beta.8.tgz", + "integrity": "sha512-oouKUQWWHbSihqSD7mhymGPX1OQ4hedzAHyvm8RdyHh6m3oIvoRF+NM45i/bhNOlo8jCnuJhaSUf/6oDjv978g==", "requires": { - "@types/mini-css-extract-plugin": "^0.9.1", - "chalk": "^3.0.0", + "chalk": "^4.1.0", "hash-sum": "^2.0.0", - "loader-utils": "^1.2.3", - "merge-source-map": "^1.1.0", - "source-map": "^0.6.1" + "loader-utils": "^2.0.0" }, "dependencies": { "chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -6573,6 +6567,16 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -6965,9 +6969,9 @@ "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=" }, "amplitude-js": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/amplitude-js/-/amplitude-js-7.1.1.tgz", - "integrity": "sha512-grEQf0p4V/q4aIcGYdGEJ6EquBXu91R/RorsYTQvh9O6sxjpwHf5vSDICQJq7twEElBrSHoSF77GUvC9ZTBj4A==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/amplitude-js/-/amplitude-js-7.2.2.tgz", + "integrity": "sha512-Y1/kw/NaxMdqwBnkbjPywpjPbSmuVuszFLQ9tw56P6YraljvbMC93afHQvLC/3zG5SImDnykbg/8HxrWFDhsLg==", "requires": { "@amplitude/ua-parser-js": "0.7.24", "blueimp-md5": "^2.10.0", @@ -8193,9 +8197,9 @@ "integrity": "sha512-aBQ1FxIa7kSWCcmKHlcHFlT2jt6J/l4FzC7KcPELkOJOsPOb/bccdhmIrKDfXhwFrmc7vDoDrrepFvGqjyXGJg==" }, "blueimp-md5": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.17.0.tgz", - "integrity": "sha512-x5PKJHY5rHQYaADj6NwPUR2QRCUVSggPzrUKkeENpj871o9l9IefJbO2jkT5UvYykeOK9dx0VmkIo6dZ+vThYw==" + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.18.0.tgz", + "integrity": "sha512-vE52okJvzsVWhcgUHOv+69OG3Mdg151xyn41aVQN/5W5S+S43qZhxECtYLAEHMSFWX6Mv5IZrzj3T5+JqXfj5Q==" }, "bn.js": { "version": "5.1.3", @@ -15242,9 +15246,9 @@ } }, "moment": { - "version": "2.28.0", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.28.0.tgz", - "integrity": "sha512-Z5KOjYmnHyd/ukynmFd/WwyXHd7L4J9vTI/nn5Ap9AVUgaAE15VvQ9MOGmJJygEUklupqIrFnor/tjTwRU+tQw==" + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.0.tgz", + "integrity": "sha512-z6IJ5HXYiuxvFTI6eiQ9dm77uE0gyy1yXNApVHqTcnIKfY9tIwEjlzsZ6u1LQXvVgKeTnv9Xm7NDvJ7lso3MtA==" }, "move-concurrently": { "version": "1.0.1", @@ -20977,9 +20981,9 @@ } }, "vue-router": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.4.3.tgz", - "integrity": "sha512-BADg1mjGWX18Dpmy6bOGzGNnk7B/ZA0RxuA6qedY/YJwirMfKXIDzcccmHbQI0A6k5PzMdMloc0ElHfyOoX35A==" + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.4.5.tgz", + "integrity": "sha512-ioRY5QyDpXM9TDjOX6hX79gtaMXSVDDzSlbIlyAmbHNteIL81WIVB2e+jbzV23vzxtoV0krdS2XHm+GxFg+Nxg==" }, "vue-style-loader": { "version": "4.1.2", diff --git a/website/client/package.json b/website/client/package.json index 07b0b7b704..1ddeda86d7 100644 --- a/website/client/package.json +++ b/website/client/package.json @@ -24,7 +24,7 @@ "@vue/cli-plugin-unit-mocha": "^4.5.6", "@vue/cli-service": "^4.5.6", "@vue/test-utils": "1.0.0-beta.29", - "amplitude-js": "^7.1.1", + "amplitude-js": "^7.2.2", "axios": "^0.19.2", "axios-progress-bar": "^1.2.0", "babel-eslint": "^10.1.0", @@ -42,7 +42,7 @@ "intro.js": "^2.9.3", "jquery": "^3.5.1", "lodash": "^4.17.20", - "moment": "^2.28.0", + "moment": "^2.29.0", "nconf": "^0.10.0", "sass": "^1.26.11", "sass-loader": "^8.0.2", @@ -56,7 +56,7 @@ "vue": "^2.6.12", "vue-cli-plugin-storybook": "^0.6.1", "vue-mugen-scroll": "^0.2.6", - "vue-router": "^3.4.3", + "vue-router": "^3.4.5", "vue-template-compiler": "^2.6.12", "vuedraggable": "^2.24.1", "vuejs-datepicker": "git://github.com/habitrpg/vuejs-datepicker.git#153d339e4dbebb73733658aeda1d5b7fcc55b0a0", diff --git a/website/client/src/assets/scss/task.scss b/website/client/src/assets/scss/task.scss index 66f6f35bf7..853d589897 100644 --- a/website/client/src/assets/scss/task.scss +++ b/website/client/src/assets/scss/task.scss @@ -295,7 +295,10 @@ &-control { &-bg { background: $gray-600; } &-inner { - border: 1px solid $gray-300; + &:not(:focus) { + border: 1px solid $gray-300 !important; + } + opacity: 0.75; .negative, .positive { diff --git a/website/client/src/components/avatar.vue b/website/client/src/components/avatar.vue index 3ca2483d3d..9e70cd3ea4 100644 --- a/website/client/src/components/avatar.vue +++ b/website/client/src/components/avatar.vue @@ -227,7 +227,7 @@ export default { return this.member.preferences.costume ? 'costume' : 'equipped'; }, specialMountClass () { - if (!this.avatarOnly && this.member.items.currentMount && this.member.items.currentMount.indexOf('Kangaroo') !== -1) { + if (!this.avatarOnly && this.member.items.currentMount && this.member.items.currentMount.includes('Kangaroo')) { return 'offset-kangaroo'; } diff --git a/website/client/src/components/shops/buyModal.vue b/website/client/src/components/shops/buyModal.vue index 532b170a19..df11994c8f 100644 --- a/website/client/src/components/shops/buyModal.vue +++ b/website/client/src/components/shops/buyModal.vue @@ -8,6 +8,8 @@ v-if="withPin" class="badge-dialog" @click.prevent.stop="togglePinned()" + @keypress.enter.prevent.stop="togglePinned()" + tabindex="0" >