diff --git a/package-lock.json b/package-lock.json index abbc2ca84853d..73f8f505455f6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -59,19 +59,19 @@ } }, "@babel/core": { - "version": "7.11.6", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.11.6.tgz", - "integrity": "sha512-Wpcv03AGnmkgm6uS6k8iwhIwTrcP0m17TL1n1sy7qD0qelDu4XNeW0dN0mHfa+Gei211yDaLoEe/VlbXQzM4Bg==", + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz", + "integrity": "sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.11.6", - "@babel/helper-module-transforms": "^7.11.0", - "@babel/helpers": "^7.10.4", - "@babel/parser": "^7.11.5", + "@babel/generator": "^7.12.1", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helpers": "^7.12.1", + "@babel/parser": "^7.12.3", "@babel/template": "^7.10.4", - "@babel/traverse": "^7.11.5", - "@babel/types": "^7.11.5", + "@babel/traverse": "^7.12.1", + "@babel/types": "^7.12.1", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.1", @@ -92,12 +92,12 @@ } }, "@babel/generator": { - "version": "7.11.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.11.6.tgz", - "integrity": "sha512-DWtQ1PV3r+cLbySoHrwn9RWEgKMBLLma4OBQloPRyDYvc5msJM9kvTLo1YnlJd1P/ZuKbdli3ijr5q3FvAF3uA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.1.tgz", + "integrity": "sha512-DB+6rafIdc9o72Yc3/Ph5h+6hUjeOp66pF0naQBgUFFuPqzQwIlPTm3xZR7YNvduIMtkDIj2t21LSQwnbCrXvg==", "dev": true, "requires": { - "@babel/types": "^7.11.5", + "@babel/types": "^7.12.1", "jsesc": "^2.5.1", "source-map": "^0.5.0" } @@ -122,6 +122,62 @@ "@babel/types": "^7.10.4" } }, + "@babel/helper-member-expression-to-functions": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.1.tgz", + "integrity": "sha512-k0CIe3tXUKTRSoEx1LQEPFU9vRQfqHtl+kf8eNnDqb4AUJEy5pz6aIiog+YWtVm2jpggjS1laH68bPsR+KWWPQ==", + "dev": true, + "requires": { + "@babel/types": "^7.12.1" + } + }, + "@babel/helper-module-imports": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.1.tgz", + "integrity": "sha512-ZeC1TlMSvikvJNy1v/wPIazCu3NdOwgYZLIkmIyAsGhqkNpiDoQQRmaCK8YP4Pq3GPTLPV9WXaPCJKvx06JxKA==", + "dev": true, + "requires": { + "@babel/types": "^7.12.1" + } + }, + "@babel/helper-module-transforms": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz", + "integrity": "sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.12.1", + "@babel/helper-replace-supers": "^7.12.1", + "@babel/helper-simple-access": "^7.12.1", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/helper-validator-identifier": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.12.1", + "@babel/types": "^7.12.1", + "lodash": "^4.17.19" + } + }, + "@babel/helper-replace-supers": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.1.tgz", + "integrity": "sha512-zJjTvtNJnCFsCXVi5rUInstLd/EIVNmIKA1Q9ynESmMBWPWd+7sdR+G4/wdu+Mppfep0XLyG2m7EBPvjCeFyrw==", + "dev": true, + "requires": { + "@babel/helper-member-expression-to-functions": "^7.12.1", + "@babel/helper-optimise-call-expression": "^7.10.4", + "@babel/traverse": "^7.12.1", + "@babel/types": "^7.12.1" + } + }, + "@babel/helper-simple-access": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz", + "integrity": "sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA==", + "dev": true, + "requires": { + "@babel/types": "^7.12.1" + } + }, "@babel/helper-split-export-declaration": { "version": "7.11.0", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", @@ -131,6 +187,17 @@ "@babel/types": "^7.11.0" } }, + "@babel/helpers": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.1.tgz", + "integrity": "sha512-9JoDSBGoWtmbay98efmT2+mySkwjzeFeAL9BuWNoVQpkPFQF8SIIFUfY5os9u8wVzglzoiPRSW7cuJmBDUt43g==", + "dev": true, + "requires": { + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.12.1", + "@babel/types": "^7.12.1" + } + }, "@babel/highlight": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", @@ -143,9 +210,9 @@ } }, "@babel/parser": { - "version": "7.11.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.5.tgz", - "integrity": "sha512-X9rD8qqm695vgmeaQ4fvz/o3+Wk4ZzQvSHkDBgpYKxpD4qTAUm88ZKtHkVqIOsYFFbIQ6wQYhC6q7pjqVK0E0Q==", + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz", + "integrity": "sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==", "dev": true }, "@babel/template": { @@ -160,26 +227,26 @@ } }, "@babel/traverse": { - "version": "7.11.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.11.5.tgz", - "integrity": "sha512-EjiPXt+r7LiCZXEfRpSJd+jUMnBd4/9OUv7Nx3+0u9+eimMwJmG0Q98lw4/289JCoxSE8OolDMNZaaF/JZ69WQ==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.1.tgz", + "integrity": "sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.11.5", + "@babel/generator": "^7.12.1", "@babel/helper-function-name": "^7.10.4", "@babel/helper-split-export-declaration": "^7.11.0", - "@babel/parser": "^7.11.5", - "@babel/types": "^7.11.5", + "@babel/parser": "^7.12.1", + "@babel/types": "^7.12.1", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.19" } }, "@babel/types": { - "version": "7.11.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", - "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", @@ -208,12 +275,12 @@ } }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "escape-string-regexp": { @@ -2684,18 +2751,18 @@ } }, "@babel/plugin-syntax-typescript": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.10.1.tgz", - "integrity": "sha512-X/d8glkrAtra7CaQGMiGs/OGa6XgUzqPcBXCIGFCpCqnfGlT0Wfbzo/B89xHhnInTaItPK8LALblVXcUOEh95Q==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.12.1.tgz", + "integrity": "sha512-UZNEcCY+4Dp9yYRCAHrHDU+9ZXLYaY9MgBXSRLkB9WjYFRR6quJBumfVrEkUxrePPBwFcpWfNKXqVRQQtm7mMA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.3.tgz", - "integrity": "sha512-j/+j8NAWUTxOtx4LKHybpSClxHoq6I91DQ/mKgAXn5oNUPIUiGppjPIX3TDtJWPrdfP9Kfl7e4fgVMiQR9VE/g==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } @@ -4405,175 +4472,158 @@ } }, "@babel/plugin-transform-typescript": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.10.3.tgz", - "integrity": "sha512-qU9Lu7oQyh3PGMQncNjQm8RWkzw6LqsWZQlZPQMgrGt6s3YiBIaQ+3CQV/FA/icGS5XlSWZGwo/l8ErTyelS0Q==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.12.1.tgz", + "integrity": "sha512-VrsBByqAIntM+EYMqSm59SiMEf7qkmI9dqMt6RbD/wlwueWmYcI0FFK5Fj47pP6DRZm+3teXjosKlwcZJ5lIMw==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.10.3", - "@babel/helper-plugin-utils": "^7.10.3", - "@babel/plugin-syntax-typescript": "^7.10.1" + "@babel/helper-create-class-features-plugin": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-typescript": "^7.12.1" }, "dependencies": { "@babel/code-frame": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.3.tgz", - "integrity": "sha512-fDx9eNW0qz0WkUeqL6tXEXzVlPh6Y5aCDEZesl0xBGA8ndRukX91Uk44ZqnkECp01NAZUdCAl+aiQNGi0k88Eg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", "dev": true, "requires": { - "@babel/highlight": "^7.10.3" + "@babel/highlight": "^7.10.4" } }, "@babel/generator": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.3.tgz", - "integrity": "sha512-drt8MUHbEqRzNR0xnF8nMehbY11b1SDkRw03PSNH/3Rb2Z35oxkddVSi3rcaak0YJQ86PCuE7Qx1jSFhbLNBMA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.1.tgz", + "integrity": "sha512-DB+6rafIdc9o72Yc3/Ph5h+6hUjeOp66pF0naQBgUFFuPqzQwIlPTm3xZR7YNvduIMtkDIj2t21LSQwnbCrXvg==", "dev": true, "requires": { - "@babel/types": "^7.10.3", + "@babel/types": "^7.12.1", "jsesc": "^2.5.1", - "lodash": "^4.17.13", "source-map": "^0.5.0" } }, "@babel/helper-create-class-features-plugin": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.10.3.tgz", - "integrity": "sha512-iRT9VwqtdFmv7UheJWthGc/h2s7MqoweBF9RUj77NFZsg9VfISvBTum3k6coAhJ8RWv2tj3yUjA03HxPd0vfpQ==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.12.1.tgz", + "integrity": "sha512-hkL++rWeta/OVOBTRJc9a5Azh5mt5WgZUGAKMD8JM141YsE08K//bp1unBBieO6rUKkIPyUE0USQ30jAy3Sk1w==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.10.3", - "@babel/helper-member-expression-to-functions": "^7.10.3", - "@babel/helper-optimise-call-expression": "^7.10.3", - "@babel/helper-plugin-utils": "^7.10.3", - "@babel/helper-replace-supers": "^7.10.1", - "@babel/helper-split-export-declaration": "^7.10.1" + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-member-expression-to-functions": "^7.12.1", + "@babel/helper-optimise-call-expression": "^7.10.4", + "@babel/helper-replace-supers": "^7.12.1", + "@babel/helper-split-export-declaration": "^7.10.4" } }, "@babel/helper-function-name": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.3.tgz", - "integrity": "sha512-FvSj2aiOd8zbeqijjgqdMDSyxsGHaMt5Tr0XjQsGKHD3/1FP3wksjnLAWzxw7lvXiej8W1Jt47SKTZ6upQNiRw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.10.3", - "@babel/template": "^7.10.3", - "@babel/types": "^7.10.3" + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/helper-get-function-arity": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.3.tgz", - "integrity": "sha512-iUD/gFsR+M6uiy69JA6fzM5seno8oE85IYZdbVVEuQaZlEzMO2MXblh+KSPJgsZAUx0EEbWXU0yJaW7C9CdAVg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", "dev": true, "requires": { - "@babel/types": "^7.10.3" + "@babel/types": "^7.10.4" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.3.tgz", - "integrity": "sha512-q7+37c4EPLSjNb2NmWOjNwj0+BOyYlssuQ58kHEWk1Z78K5i8vTUsteq78HMieRPQSl/NtpQyJfdjt3qZ5V2vw==", - "dev": true, - "requires": { - "@babel/types": "^7.10.3" - } - }, - "@babel/helper-optimise-call-expression": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.3.tgz", - "integrity": "sha512-kT2R3VBH/cnSz+yChKpaKRJQJWxdGoc6SjioRId2wkeV3bK0wLLioFpJROrX0U4xr/NmxSSAWT/9Ih5snwIIzg==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.1.tgz", + "integrity": "sha512-k0CIe3tXUKTRSoEx1LQEPFU9vRQfqHtl+kf8eNnDqb4AUJEy5pz6aIiog+YWtVm2jpggjS1laH68bPsR+KWWPQ==", "dev": true, "requires": { - "@babel/types": "^7.10.3" + "@babel/types": "^7.12.1" } }, "@babel/helper-plugin-utils": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.3.tgz", - "integrity": "sha512-j/+j8NAWUTxOtx4LKHybpSClxHoq6I91DQ/mKgAXn5oNUPIUiGppjPIX3TDtJWPrdfP9Kfl7e4fgVMiQR9VE/g==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true }, "@babel/helper-replace-supers": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.1.tgz", - "integrity": "sha512-SOwJzEfpuQwInzzQJGjGaiG578UYmyi2Xw668klPWV5n07B73S0a9btjLk/52Mlcxa+5AdIYqws1KyXRfMoB7A==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.1.tgz", + "integrity": "sha512-zJjTvtNJnCFsCXVi5rUInstLd/EIVNmIKA1Q9ynESmMBWPWd+7sdR+G4/wdu+Mppfep0XLyG2m7EBPvjCeFyrw==", "dev": true, "requires": { - "@babel/helper-member-expression-to-functions": "^7.10.1", - "@babel/helper-optimise-call-expression": "^7.10.1", - "@babel/traverse": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/helper-member-expression-to-functions": "^7.12.1", + "@babel/helper-optimise-call-expression": "^7.10.4", + "@babel/traverse": "^7.12.1", + "@babel/types": "^7.12.1" } }, "@babel/helper-split-export-declaration": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.1.tgz", - "integrity": "sha512-UQ1LVBPrYdbchNhLwj6fetj46BcFwfS4NllJo/1aJsT+1dLTEnXJL0qHqtY7gPzF8S2fXBJamf1biAXV3X077g==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", + "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "^7.11.0" } }, - "@babel/helper-validator-identifier": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.3.tgz", - "integrity": "sha512-bU8JvtlYpJSBPuj1VUmKpFGaDZuLxASky3LhaKj3bmpSTY6VWooSM8msk+Z0CZoErFye2tlABF6yDkT3FOPAXw==", - "dev": true - }, "@babel/highlight": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.3.tgz", - "integrity": "sha512-Ih9B/u7AtgEnySE2L2F0Xm0GaM729XqqLfHkalTsbjXGyqmf/6M0Cu0WpvqueUlW+xk88BHw9Nkpj49naU+vWw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.3", + "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.3.tgz", - "integrity": "sha512-oJtNJCMFdIMwXGmx+KxuaD7i3b8uS7TTFYW/FNG2BT8m+fmGHoiPYoH0Pe3gya07WuFmM5FCDIr1x0irkD/hyA==", + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz", + "integrity": "sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==", "dev": true }, "@babel/template": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.3.tgz", - "integrity": "sha512-5BjI4gdtD+9fHZUsaxPHPNpwa+xRkDO7c7JbhYn2afvrkDu5SfAAbi9AIMXw2xEhO/BR35TqiW97IqNvCo/GqA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.3", - "@babel/parser": "^7.10.3", - "@babel/types": "^7.10.3" + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/traverse": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.3.tgz", - "integrity": "sha512-qO6623eBFhuPm0TmmrUFMT1FulCmsSeJuVGhiLodk2raUDFhhTECLd9E9jC4LBIWziqt4wgF6KuXE4d+Jz9yug==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.1.tgz", + "integrity": "sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.3", - "@babel/generator": "^7.10.3", - "@babel/helper-function-name": "^7.10.3", - "@babel/helper-split-export-declaration": "^7.10.1", - "@babel/parser": "^7.10.3", - "@babel/types": "^7.10.3", + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.1", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/parser": "^7.12.1", + "@babel/types": "^7.12.1", "debug": "^4.1.0", "globals": "^11.1.0", - "lodash": "^4.17.13" + "lodash": "^4.17.19" } }, "@babel/types": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.3.tgz", - "integrity": "sha512-nZxaJhBXBQ8HVoIcGsf9qWep3Oh3jCENK54V4mRF7qaJabVsAYdbTtmSD8WmAp1R6ytPiu5apMwSXyxB1WlaBA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.3", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" } }, @@ -4598,12 +4648,12 @@ } }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "escape-string-regexp": { @@ -4662,9 +4712,9 @@ } }, "@babel/polyfill": { - "version": "7.11.5", - "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.11.5.tgz", - "integrity": "sha512-FunXnE0Sgpd61pKSj2OSOs1D44rKTD3pGOfGilZ6LGrrIH0QEtJlTjqOqdF8Bs98JmjfGhni2BBkTfv9KcKJ9g==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.12.1.tgz", + "integrity": "sha512-X0pi0V6gxLi6lFZpGmeNa4zxtwEmCs42isWLNjZZDE0Y8yVfgu0T2OAHlzBbdYlqbW/YXVvoBHpATEM+goCj8g==", "dev": true, "requires": { "core-js": "^2.6.5", @@ -5363,19 +5413,19 @@ } }, "@babel/preset-typescript": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.10.1.tgz", - "integrity": "sha512-m6GV3y1ShiqxnyQj10600ZVOFrSSAa8HQ3qIUk2r+gcGtHTIRw0dJnFLt1WNXpKjtVw7yw1DAPU/6ma2ZvgJuA==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.12.1.tgz", + "integrity": "sha512-hNK/DhmoJPsksdHuI/RVrcEws7GN5eamhi28JkO52MqIxU8Z0QpmiSOQxZHWOHV7I3P4UjHV97ay4TcamMA6Kw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1", - "@babel/plugin-transform-typescript": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-transform-typescript": "^7.12.1" }, "dependencies": { "@babel/helper-plugin-utils": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.3.tgz", - "integrity": "sha512-j/+j8NAWUTxOtx4LKHybpSClxHoq6I91DQ/mKgAXn5oNUPIUiGppjPIX3TDtJWPrdfP9Kfl7e4fgVMiQR9VE/g==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true } } @@ -8344,9 +8394,9 @@ "dev": true }, "anafanafo": { - "version": "2.0.0-beta.1", - "resolved": "https://registry.npmjs.org/anafanafo/-/anafanafo-2.0.0-beta.1.tgz", - "integrity": "sha512-v3uSR69R5g/Ou7xDj320//cZKFE6QzEcr+Q9xeYoU/Kln6T8Ziy3Kap1yvdaJW4kSN0Tzvp35O5ETPr+11z+yA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anafanafo/-/anafanafo-2.0.0.tgz", + "integrity": "sha512-Nlfq7NC4AOkTJerWRIZcOAiMNtIDVIGWGvQ98O7Jl6Kr2Dk0dX5u4MqN778kSRTy5KRqchpLdF2RtLFEz9FVkQ==", "requires": { "char-width-table-consumer": "^1.0.0" } @@ -9869,9 +9919,9 @@ "dev": true }, "babel-plugin-remove-graphql-queries": { - "version": "2.9.15", - "resolved": "https://registry.npmjs.org/babel-plugin-remove-graphql-queries/-/babel-plugin-remove-graphql-queries-2.9.15.tgz", - "integrity": "sha512-cGNEEOO32kKcI+ZZBcCIliPOvyd7/Dp8zyJ/ZD1lXKuH1frzdbWG2nbxm+iil8OIxWaeHfxf083IHvb868TY9A==", + "version": "2.9.20", + "resolved": "https://registry.npmjs.org/babel-plugin-remove-graphql-queries/-/babel-plugin-remove-graphql-queries-2.9.20.tgz", + "integrity": "sha512-FB4tIvdXaGFBFhHAzlqB0NxVA5BcjzVYbY8ut7ProStW3cjv208ADMlfzmPdSP/I1Z0wl2MrXgHNCrL1TQ/Mew==", "dev": true }, "babel-plugin-styled-components": { @@ -19333,28 +19383,94 @@ } }, "gatsby-plugin-typescript": { - "version": "2.4.16", - "resolved": "https://registry.npmjs.org/gatsby-plugin-typescript/-/gatsby-plugin-typescript-2.4.16.tgz", - "integrity": "sha512-A95+B10jn7nCBROibfxWe2/jPtXxq4jjZpjhvPcC95xXg8q7J1Zb3USP6oJSYmhQ4EI+JPcvljlnOS6dqn//wg==", + "version": "2.4.22", + "resolved": "https://registry.npmjs.org/gatsby-plugin-typescript/-/gatsby-plugin-typescript-2.4.22.tgz", + "integrity": "sha512-kcFd5oz0M5mFXp/DtEtQ6cdNdbt0+/B+B6OdhKW/FRyVn+WWKbMDzqY8pnspTr2ACC+8iNk/2I7HZeo1ykKUVA==", "dev": true, "requires": { - "@babel/core": "^7.10.3", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.1", - "@babel/plugin-proposal-numeric-separator": "^7.10.1", - "@babel/plugin-proposal-optional-chaining": "^7.10.3", - "@babel/preset-typescript": "^7.10.1", - "@babel/runtime": "^7.10.3", - "babel-plugin-remove-graphql-queries": "^2.9.15" + "@babel/core": "^7.11.6", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.4", + "@babel/plugin-proposal-numeric-separator": "^7.10.4", + "@babel/plugin-proposal-optional-chaining": "^7.11.0", + "@babel/preset-typescript": "^7.10.4", + "@babel/runtime": "^7.11.2", + "babel-plugin-remove-graphql-queries": "^2.9.20" }, "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", + "dev": true + }, + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz", + "integrity": "sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA==", + "dev": true, + "requires": { + "@babel/types": "^7.12.1" + } + }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.12.1.tgz", + "integrity": "sha512-nZY0ESiaQDI1y96+jk6VxMOaL4LPo/QDHBqL+SF3/vl6dHkTwHlOI8L4ZwuRBHgakRBw5zsVylel7QPbbGuYgg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" + } + }, + "@babel/plugin-proposal-numeric-separator": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.1.tgz", + "integrity": "sha512-MR7Ok+Af3OhNTCxYVjJZHS0t97ydnJZt/DbR4WISO39iDnhiD8XHrY12xuSJ90FFEGjir0Fzyyn7g/zY6hxbxA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + } + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.1.tgz", + "integrity": "sha512-c2uRpY6WzaVDzynVY9liyykS+kVU+WRZPMPYpkelXH8KBt1oXoI89kPbZKKG/jDT5UK92FTW2fZkZaJhdiBabw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1", + "@babel/plugin-syntax-optional-chaining": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, "@babel/runtime": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.5.tgz", - "integrity": "sha512-otddXKhdNn7d0ptoFRHtMLa8LqDxLYwTjB4nYgM1yy5N6gU/MUf8zqyyLltCH3yAVitBzmwK4us+DD0l/MauAg==", + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz", + "integrity": "sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==", "dev": true, "requires": { "regenerator-runtime": "^0.13.4" } + }, + "@babel/types": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz", + "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } } } }, diff --git a/package.json b/package.json index 7a9292efc522d..a0338a0d00f09 100644 --- a/package.json +++ b/package.json @@ -141,8 +141,8 @@ ] }, "devDependencies": { - "@babel/core": "^7.11.6", - "@babel/polyfill": "^7.11.5", + "@babel/core": "^7.12.3", + "@babel/polyfill": "^7.12.1", "@babel/register": "7.12.1", "@mapbox/react-click-to-select": "^2.2.0", "@types/chai": "^4.2.12", @@ -197,7 +197,7 @@ "gatsby-plugin-react-helmet": "^3.3.9", "gatsby-plugin-remove-trailing-slashes": "^2.3.10", "gatsby-plugin-styled-components": "^3.3.9", - "gatsby-plugin-typescript": "^2.4.16", + "gatsby-plugin-typescript": "^2.4.22", "got": "11.7.0", "humanize-string": "^2.1.0", "husky": "^4.3.0", diff --git a/services/github/github-search.service.js b/services/github/github-search.service.js index 12b6a89e83347..f8f9d9ddd9d51 100644 --- a/services/github/github-search.service.js +++ b/services/github/github-search.service.js @@ -9,37 +9,29 @@ const { errorMessagesFor, documentation } = require('./github-helpers') const schema = Joi.object({ total_count: nonNegativeInteger }).required() module.exports = class GithubSearch extends GithubAuthV3Service { - static get category() { - return 'analysis' - } + static category = 'analysis' - static get route() { - return { - base: 'github/search', - pattern: ':user/:repo/:query+', - } + static route = { + base: 'github/search', + pattern: ':user/:repo/:query+', } - static get examples() { - return [ - { - title: 'GitHub search hit counter', - pattern: ':user/:repo/:query', - namedParams: { - user: 'torvalds', - repo: 'linux', - query: 'goto', - }, - staticPreview: this.render({ query: 'goto', totalCount: 14000 }), - documentation, + static examples = [ + { + title: 'GitHub search hit counter', + pattern: ':user/:repo/:query', + namedParams: { + user: 'torvalds', + repo: 'linux', + query: 'goto', }, - ] - } + staticPreview: this.render({ query: 'goto', totalCount: 14000 }), + documentation, + }, + ] - static get defaultBadgeData() { - return { - label: 'counter', - } + static defaultBadgeData = { + label: 'counter', } static render({ query, totalCount }) { diff --git a/services/github/github-size.service.js b/services/github/github-size.service.js index ecfb0326bd27f..97237a81579f7 100644 --- a/services/github/github-size.service.js +++ b/services/github/github-size.service.js @@ -15,32 +15,26 @@ const schema = Joi.alternatives( ) module.exports = class GithubSize extends GithubAuthV3Service { - static get category() { - return 'size' - } + static category = 'size' - static get route() { - return { - base: 'github/size', - pattern: ':user/:repo/:path*', - } + static route = { + base: 'github/size', + pattern: ':user/:repo/:path*', } - static get examples() { - return [ - { - title: 'GitHub file size in bytes', - namedParams: { - user: 'webcaetano', - repo: 'craft', - path: 'build/phaser-craft.min.js', - }, - staticPreview: this.render({ size: 9170 }), - keywords: ['repo'], - documentation, + static examples = [ + { + title: 'GitHub file size in bytes', + namedParams: { + user: 'webcaetano', + repo: 'craft', + path: 'build/phaser-craft.min.js', }, - ] - } + staticPreview: this.render({ size: 9170 }), + keywords: ['repo'], + documentation, + }, + ] static render({ size }) { return { diff --git a/services/github/github-stars.service.js b/services/github/github-stars.service.js index d6492603b33ba..49ce512086724 100644 --- a/services/github/github-stars.service.js +++ b/services/github/github-stars.service.js @@ -11,43 +11,35 @@ const schema = Joi.object({ }).required() module.exports = class GithubStars extends GithubAuthV3Service { - static get category() { - return 'social' - } + static category = 'social' - static get route() { - return { - base: 'github/stars', - pattern: ':user/:repo', - } + static route = { + base: 'github/stars', + pattern: ':user/:repo', } - static get examples() { - return [ - { - title: 'GitHub Repo stars', - namedParams: { - user: 'badges', - repo: 'shields', - }, - queryParams: { style: 'social' }, - // TODO: This is currently a literal, as `staticPreview` doesn't - // support `link`. - staticPreview: { - label: 'Stars', - message: '7k', - style: 'social', - }, - documentation, + static examples = [ + { + title: 'GitHub Repo stars', + namedParams: { + user: 'badges', + repo: 'shields', }, - ] - } + queryParams: { style: 'social' }, + // TODO: This is currently a literal, as `staticPreview` doesn't + // support `link`. + staticPreview: { + label: 'Stars', + message: '7k', + style: 'social', + }, + documentation, + }, + ] - static get defaultBadgeData() { - return { - label: 'stars', - namedLogo: 'github', - } + static defaultBadgeData = { + label: 'stars', + namedLogo: 'github', } static render({ stars, user, repo }) { diff --git a/services/github/github-tag.service.js b/services/github/github-tag.service.js index 3d6c655baa8ea..7e66bb293aa72 100644 --- a/services/github/github-tag.service.js +++ b/services/github/github-tag.service.js @@ -27,51 +27,45 @@ const schema = Joi.object({ }).required() class GithubTag extends GithubAuthV4Service { - static get category() { - return 'version' - } + static category = 'version' - static get route() { - return { - base: 'github/v/tag', - pattern: ':user/:repo', - queryParamSchema, - } + static route = { + base: 'github/v/tag', + pattern: ':user/:repo', + queryParamSchema, } - static get examples() { - return [ - { - title: 'GitHub tag (latest by date)', - namedParams: { user: 'expressjs', repo: 'express' }, - staticPreview: this.render({ - version: 'v5.0.0-alpha.7', - sort: 'date', - }), - documentation, - }, - { - title: 'GitHub tag (latest SemVer)', - namedParams: { user: 'expressjs', repo: 'express' }, - queryParams: { sort: 'semver' }, - staticPreview: this.render({ version: 'v4.16.4', sort: 'semver' }), - documentation, - }, - { - title: 'GitHub tag (latest SemVer pre-release)', - namedParams: { user: 'expressjs', repo: 'express' }, - queryParams: { sort: 'semver', include_prereleases: null }, - staticPreview: this.render({ - version: 'v5.0.0-alpha.7', - sort: 'semver', - }), - documentation, - }, - ] - } + static examples = [ + { + title: 'GitHub tag (latest by date)', + namedParams: { user: 'expressjs', repo: 'express' }, + staticPreview: this.render({ + version: 'v5.0.0-alpha.7', + sort: 'date', + }), + documentation, + }, + { + title: 'GitHub tag (latest SemVer)', + namedParams: { user: 'expressjs', repo: 'express' }, + queryParams: { sort: 'semver' }, + staticPreview: this.render({ version: 'v4.16.4', sort: 'semver' }), + documentation, + }, + { + title: 'GitHub tag (latest SemVer pre-release)', + namedParams: { user: 'expressjs', repo: 'express' }, + queryParams: { sort: 'semver', include_prereleases: null }, + staticPreview: this.render({ + version: 'v5.0.0-alpha.7', + sort: 'semver', + }), + documentation, + }, + ] - static get defaultBadgeData() { - return { label: 'tag' } + static defaultBadgeData = { + label: 'tag', } static render({ version, sort }) { diff --git a/services/github/github-top-language.service.js b/services/github/github-top-language.service.js index 1ea1364333083..9c96e95b64b71 100644 --- a/services/github/github-top-language.service.js +++ b/services/github/github-top-language.service.js @@ -4,39 +4,31 @@ const { BaseGithubLanguage } = require('./github-languages-base') const { documentation } = require('./github-helpers') module.exports = class GithubTopLanguage extends BaseGithubLanguage { - static get category() { - return 'analysis' - } + static category = 'analysis' - static get route() { - return { - base: 'github/languages/top', - pattern: ':user/:repo', - } + static route = { + base: 'github/languages/top', + pattern: ':user/:repo', } - static get examples() { - return [ - { - title: 'GitHub top language', - namedParams: { - user: 'badges', - repo: 'shields', - }, - staticPreview: this.render({ - language: 'javascript', - languageSize: 99.5, - totalSize: 100, - }), - documentation, + static examples = [ + { + title: 'GitHub top language', + namedParams: { + user: 'badges', + repo: 'shields', }, - ] - } + staticPreview: this.render({ + language: 'javascript', + languageSize: 99.5, + totalSize: 100, + }), + documentation, + }, + ] - static get defaultBadgeData() { - return { - label: 'language', - } + static defaultBadgeData = { + label: 'language', } static render({ language, languageSize, totalSize }) { diff --git a/services/github/github-watchers.service.js b/services/github/github-watchers.service.js index a3348c06a9888..ee73c6fe69100 100644 --- a/services/github/github-watchers.service.js +++ b/services/github/github-watchers.service.js @@ -11,43 +11,35 @@ const schema = Joi.object({ }).required() module.exports = class GithubWatchers extends GithubAuthV3Service { - static get category() { - return 'social' - } + static category = 'social' - static get route() { - return { - base: 'github/watchers', - pattern: ':user/:repo', - } + static route = { + base: 'github/watchers', + pattern: ':user/:repo', } - static get examples() { - return [ - { - title: 'GitHub watchers', - namedParams: { - user: 'badges', - repo: 'shields', - }, - // TODO: This is currently a literal, as `staticPreview` doesn't - // support `link`. - staticPreview: { - label: 'Watch', - message: '96', - style: 'social', - }, - queryParams: { label: 'Watch' }, - documentation, + static examples = [ + { + title: 'GitHub watchers', + namedParams: { + user: 'badges', + repo: 'shields', }, - ] - } + // TODO: This is currently a literal, as `staticPreview` doesn't + // support `link`. + staticPreview: { + label: 'Watch', + message: '96', + style: 'social', + }, + queryParams: { label: 'Watch' }, + documentation, + }, + ] - static get defaultBadgeData() { - return { - label: 'watchers', - namedLogo: 'github', - } + static defaultBadgeData = { + label: 'watchers', + namedLogo: 'github', } static render({ watchers, user, repo }) { diff --git a/services/github/github-workflow-status.service.js b/services/github/github-workflow-status.service.js index b0e35f0c5d400..bdcbd4056870f 100644 --- a/services/github/github-workflow-status.service.js +++ b/services/github/github-workflow-status.service.js @@ -18,73 +18,65 @@ const queryParamSchema = Joi.object({ const keywords = ['action', 'actions'] module.exports = class GithubWorkflowStatus extends BaseSvgScrapingService { - static get category() { - return 'build' - } + static category = 'build' - static get route() { - return { - base: 'github/workflow/status', - pattern: ':user/:repo/:workflow/:branch*', - queryParamSchema, - } + static route = { + base: 'github/workflow/status', + pattern: ':user/:repo/:workflow/:branch*', + queryParamSchema, } - static get examples() { - return [ - { - title: 'GitHub Workflow Status', - pattern: ':user/:repo/:workflow', - namedParams: { - user: 'actions', - repo: 'toolkit', - workflow: 'toolkit-unit-tests', - }, - staticPreview: renderBuildStatusBadge({ - status: 'passing', - }), - documentation, - keywords, + static examples = [ + { + title: 'GitHub Workflow Status', + pattern: ':user/:repo/:workflow', + namedParams: { + user: 'actions', + repo: 'toolkit', + workflow: 'toolkit-unit-tests', }, - { - title: 'GitHub Workflow Status (branch)', - pattern: ':user/:repo/:workflow/:branch', - namedParams: { - user: 'actions', - repo: 'toolkit', - workflow: 'toolkit-unit-tests', - branch: 'master', - }, - staticPreview: renderBuildStatusBadge({ - status: 'passing', - }), - documentation, - keywords, + staticPreview: renderBuildStatusBadge({ + status: 'passing', + }), + documentation, + keywords, + }, + { + title: 'GitHub Workflow Status (branch)', + pattern: ':user/:repo/:workflow/:branch', + namedParams: { + user: 'actions', + repo: 'toolkit', + workflow: 'toolkit-unit-tests', + branch: 'master', }, - { - title: 'GitHub Workflow Status (event)', - pattern: ':user/:repo/:workflow', - namedParams: { - user: 'actions', - repo: 'toolkit', - workflow: 'toolkit-unit-tests', - }, - queryParams: { - event: 'push', - }, - staticPreview: renderBuildStatusBadge({ - status: 'passing', - }), - documentation, - keywords, + staticPreview: renderBuildStatusBadge({ + status: 'passing', + }), + documentation, + keywords, + }, + { + title: 'GitHub Workflow Status (event)', + pattern: ':user/:repo/:workflow', + namedParams: { + user: 'actions', + repo: 'toolkit', + workflow: 'toolkit-unit-tests', }, - ] - } + queryParams: { + event: 'push', + }, + staticPreview: renderBuildStatusBadge({ + status: 'passing', + }), + documentation, + keywords, + }, + ] - static get defaultBadgeData() { - return { - label: 'build', - } + static defaultBadgeData = { + label: 'build', } async fetch({ user, repo, workflow, branch, event }) { diff --git a/services/wordpress/wordpress-base.js b/services/wordpress/wordpress-base.js index 1b0edb750dd3d..36a04628e4bfd 100644 --- a/services/wordpress/wordpress-base.js +++ b/services/wordpress/wordpress-base.js @@ -13,7 +13,9 @@ const themeSchema = Joi.object() num_ratings: nonNegativeInteger, downloaded: nonNegativeInteger, active_installs: nonNegativeInteger, + last_updated: Joi.string().required(), requires_php: stringOrFalse.required(), + requires: stringOrFalse.required(), }) .required() @@ -26,6 +28,7 @@ const pluginSchema = Joi.object() active_installs: nonNegativeInteger, requires: stringOrFalse.required(), tested: Joi.string().required(), + last_updated: Joi.string().required(), requires_php: stringOrFalse.required(), }) .required() @@ -63,6 +66,7 @@ module.exports = class BaseWordpress extends BaseJsonService { tags: 0, screenshot_url: 0, downloaded: 1, + last_updated: 1, requires_php: 1, }, }, diff --git a/services/wordpress/wordpress-last-update.service.js b/services/wordpress/wordpress-last-update.service.js new file mode 100644 index 0000000000000..d704b516bbc29 --- /dev/null +++ b/services/wordpress/wordpress-last-update.service.js @@ -0,0 +1,79 @@ +'use strict' + +const moment = require('moment') +const { InvalidResponse } = require('..') +const { formatDate } = require('../text-formatters') +const { age: ageColor } = require('../color-formatters') +const BaseWordpress = require('./wordpress-base') + +const extensionData = { + plugin: { + capt: 'Plugin', + exampleSlug: 'bbpress', + lastUpdateFormat: 'YYYY-MM-DD hh:mma GMT', + }, + theme: { + capt: 'Theme', + exampleSlug: 'twentyseventeen', + lastUpdateFormat: 'YYYY-MM-DD', + }, +} + +function LastUpdateForType(extensionType) { + const { capt, exampleSlug, lastUpdateFormat } = extensionData[extensionType] + + return class WordpressLastUpdate extends BaseWordpress { + static name = `Wordpress${capt}LastUpdated` + + static category = 'activity' + + static route = { + base: `wordpress/${extensionType}/last-updated`, + pattern: ':slug', + } + + static examples = [ + { + title: `WordPress ${capt} Last Updated`, + namedParams: { slug: exampleSlug }, + staticPreview: this.render({ last_updated: '2020-08-11' }), + }, + ] + + static defaultBadgeData = { label: 'last updated' } + + static render({ last_updated }) { + return { + label: 'last updated', + message: formatDate(last_updated), + color: ageColor(last_updated), + } + } + + transform(lastUpdate) { + const date = moment(lastUpdate, lastUpdateFormat) + + if (date.isValid()) { + return date.format('YYYY-MM-DD') + } else { + throw new InvalidResponse({ prettyMessage: 'invalid date' }) + } + } + + async handle({ slug }) { + const { last_updated } = await this.fetch({ + extensionType, + slug, + }) + + const newDate = await this.transform(last_updated) + + return this.constructor.render({ + last_updated: newDate, + }) + } + } +} + +const lastupdate = ['plugin', 'theme'].map(LastUpdateForType) +module.exports = [...lastupdate] diff --git a/services/wordpress/wordpress-last-update.tester.js b/services/wordpress/wordpress-last-update.tester.js new file mode 100644 index 0000000000000..9301a0d6267b1 --- /dev/null +++ b/services/wordpress/wordpress-last-update.tester.js @@ -0,0 +1,38 @@ +'use strict' + +const { ServiceTester } = require('../tester') +const { isFormattedDate } = require('../test-validators') + +const t = new ServiceTester({ + id: 'wordpress', + title: 'WordPress Last Update', +}) +module.exports = t + +t.create('Plugin Last Update') + .get('/plugin/last-updated/akismet.json') + .expectBadge({ + label: 'last updated', + message: isFormattedDate, + }) + +t.create('Plugin (Not Found)') + .get('/plugin/last-updated/pleasenevermakethisplugin.json') + .expectBadge({ + label: 'last updated', + message: 'not found', + }) + +t.create('Theme Last Update') + .get('/theme/last-updated/twentytwenty.json') + .expectBadge({ + label: 'last updated', + message: isFormattedDate, + }) + +t.create('Theme (Not Found)') + .get('/theme/last-updated/pleasenevermakethistheme.json') + .expectBadge({ + label: 'last updated', + message: 'not found', + }) diff --git a/services/wordpress/wordpress-platform.service.js b/services/wordpress/wordpress-platform.service.js index 1b4affea26e02..f47641a62ff47 100644 --- a/services/wordpress/wordpress-platform.service.js +++ b/services/wordpress/wordpress-platform.service.js @@ -17,52 +17,48 @@ const extensionData = { }, } -class WordpressPluginRequiresVersion extends BaseWordpress { - static get category() { - return 'platform-support' - } +function WordpressRequiresVersion(extensionType) { + const { capt, exampleSlug } = extensionData[extensionType] - static get route() { - return { - base: `wordpress/plugin/wp-version`, + return class WordpressRequiresVersion extends BaseWordpress { + static name = `Wordpress${capt}RequiresVersion` + + static category = 'platform-support' + + static route = { + base: `wordpress/${extensionType}/wp-version`, pattern: ':slug', } - } - static get examples() { - return [ + static examples = [ { - title: 'WordPress Plugin: Required WP Version', - namedParams: { slug: 'bbpress' }, + title: `WordPress ${capt}: Required WP Version`, + namedParams: { slug: exampleSlug }, staticPreview: this.render({ wordpressVersion: '4.8' }), }, ] - } - static get defaultBadgeData() { - return { label: 'wordpress' } - } + static defaultBadgeData = { label: 'wordpress' } - static render({ wordpressVersion }) { - return { - message: addv(wordpressVersion), - color: versionColor(wordpressVersion), + static render({ wordpressVersion }) { + return { + message: addv(wordpressVersion), + color: versionColor(wordpressVersion), + } } - } - async handle({ slug }) { - const { requires: wordpressVersion } = await this.fetch({ - extensionType: 'plugin', - slug, - }) - return this.constructor.render({ wordpressVersion }) + async handle({ slug }) { + const { requires: wordpressVersion } = await this.fetch({ + extensionType, + slug, + }) + return this.constructor.render({ wordpressVersion }) + } } } class WordpressPluginTestedVersion extends BaseWordpress { - static get category() { - return 'platform-support' - } + static category = 'platform-support' static get route() { return { @@ -83,9 +79,7 @@ class WordpressPluginTestedVersion extends BaseWordpress { ] } - static get defaultBadgeData() { - return { label: 'wordpress' } - } + static defaultBadgeData = { label: 'wordpress' } static renderStaticPreview({ testedVersion }) { // Since this badge has an async `render()` function, but `get examples()` has to @@ -166,8 +160,9 @@ function RequiresPHPVersionForType(extensionType) { } const required_php = ['plugin', 'theme'].map(RequiresPHPVersionForType) -module.exports = { - WordpressPluginRequiresVersion, - WordpressPluginTestedVersion, +const requiresVersion = ['plugin', 'theme'].map(WordpressRequiresVersion) +module.exports = [ ...required_php, -} + ...requiresVersion, + WordpressPluginTestedVersion, +] diff --git a/services/wordpress/wordpress-platform.tester.js b/services/wordpress/wordpress-platform.tester.js index e76cf73017554..d32ab1e82a64f 100644 --- a/services/wordpress/wordpress-platform.tester.js +++ b/services/wordpress/wordpress-platform.tester.js @@ -20,6 +20,13 @@ t.create('Plugin Required WP Version') message: isVPlusDottedVersionAtLeastOne, }) +t.create('Theme Required WP Version') + .get('/theme/wp-version/twentytwenty.json') + .expectBadge({ + label: 'wordpress', + message: isVPlusDottedVersionAtLeastOne, + }) + t.create('Plugin Tested WP Version') .get('/plugin/tested/akismet.json') .expectBadge({ @@ -35,6 +42,7 @@ const mockedQueryFields = { screenshot_url: '0', downloaded: 1, requires_php: 1, + last_updated: 1, } const mockedQuerySelector = { @@ -63,6 +71,7 @@ t.create('Plugin Tested WP Version - current') active_installs: 100, requires: '4.9', tested: '4.9.8', + last_updated: '2020-01-01 7:21am GMT', requires_php: '5.5', }) .get('/core/version-check/1.7/') @@ -88,6 +97,7 @@ t.create('Plugin Tested WP Version - old') active_installs: 100, requires: '4.9', tested: '4.9.6', + last_updated: '2020-01-01 7:21am GMT', requires_php: '5.5', }) .get('/core/version-check/1.7/') @@ -113,6 +123,7 @@ t.create('Plugin Tested WP Version - non-exsistant or unsupported') active_installs: 100, requires: '4.0', tested: '4.0.0', + last_updated: '2020-01-01 7:21am GMT', requires_php: '5.5', }) .get('/core/version-check/1.7/') @@ -131,6 +142,13 @@ t.create('Plugin Required WP Version | Not Found') message: 'not found', }) +t.create('Theme Required WP Version | Not Found') + .get('/theme/wp-version/100.json') + .expectBadge({ + label: 'wordpress', + message: 'not found', + }) + t.create('Plugin Tested WP Version | Not Found') .get('/plugin/tested/100.json') .expectBadge({ @@ -184,6 +202,7 @@ t.create('Theme Required PHP Version (Not Set)') requires: '4.0', tested: '4.0.0', requires_php: false, + last_updated: '2020-01-01', }) ) .expectBadge({