diff --git a/.eslintrc.js b/.eslintrc.js index 6e4fdac..46ab012 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -21,5 +21,13 @@ module.exports = { 'jsx-a11y/control-has-associated-label': 'off', 'jsx-a11y/no-autofocus': 'off', }, - overrides: [...baseline.overrides], + overrides: [ + ...baseline.overrides, + { + files: ['contributor-dashboard-legacy/**'], + rules: { + 'import/no-unresolved': 'off', // TODO, to fix at one point + }, + }, + ], }; diff --git a/contributor-dashboard-legacy/README.md b/contributor-dashboard-legacy/README.md index 29fec55..a478260 100644 --- a/contributor-dashboard-legacy/README.md +++ b/contributor-dashboard-legacy/README.md @@ -11,6 +11,7 @@ Bugfixes and feature suggestions are greatly appreciated. Though this project is Copy `.env.example` to `.env` and fill in the values as instructed in the file. ```bash +$ pnpm --ignore-workspace install $ npx netlify login $ npx netlify dev ``` diff --git a/contributor-dashboard-legacy/functions/circle-ci-artifacts.js b/contributor-dashboard-legacy/functions/circle-ci-artifacts.js index a8f8d13..e838cda 100644 --- a/contributor-dashboard-legacy/functions/circle-ci-artifacts.js +++ b/contributor-dashboard-legacy/functions/circle-ci-artifacts.js @@ -1,5 +1,3 @@ -const fetch = require("node-fetch"); - async function fetchCircleCIApiV2(endpoint) { const url = `https://circleci.com/api/v2/${endpoint}`; diff --git a/contributor-dashboard-legacy/functions/test-profile-artifact.js b/contributor-dashboard-legacy/functions/test-profile-artifact.js index 20c816a..0a8b66b 100644 --- a/contributor-dashboard-legacy/functions/test-profile-artifact.js +++ b/contributor-dashboard-legacy/functions/test-profile-artifact.js @@ -1,6 +1,5 @@ const crypto = require("crypto"); const zlib = require("zlib"); -const fetch = require("node-fetch"); const { URL } = require("url"); const util = require("util"); diff --git a/contributor-dashboard-legacy/functions/test-profile-details.js b/contributor-dashboard-legacy/functions/test-profile-details.js index f1ec0f9..d5bdb9f 100644 --- a/contributor-dashboard-legacy/functions/test-profile-details.js +++ b/contributor-dashboard-legacy/functions/test-profile-details.js @@ -1,5 +1,3 @@ -const fetch = require("node-fetch"); - /** * Whether we sent Cache-Control headers. * Can't send them from netlify due to https://community.netlify.com/t/netlify-function-responds-with-wrong-body/27138 diff --git a/contributor-dashboard-legacy/netlify.toml b/contributor-dashboard-legacy/netlify.toml index 399bb2e..56b9d45 100644 --- a/contributor-dashboard-legacy/netlify.toml +++ b/contributor-dashboard-legacy/netlify.toml @@ -1,15 +1,17 @@ [build] - functions = "functions" - base = "contributor-dashboard-legacy" # Directory (relative to root of your repo) that contains the deploy-ready # HTML files and assets generated by the build. If a base directory has # been specified, include it in the publish directory path. - publish = "contributor-dashboard-legacy/build" + publish = "build" # Default build command. command = "pnpm build" [build.environment] - NODE_VERSION = "20" + NODE_VERSION = "18" + PNPM_FLAGS = "--ignore-workspace" + +[functions] + directory = "functions" diff --git a/contributor-dashboard-legacy/package.json b/contributor-dashboard-legacy/package.json index 8efe0e8..90ac51f 100644 --- a/contributor-dashboard-legacy/package.json +++ b/contributor-dashboard-legacy/package.json @@ -5,8 +5,8 @@ "dependencies": { "@emotion/react": "^11.1.2", "@emotion/styled": "^11.0.0", - "@mui/material": "^6.0.0", "@mui/icons-material": "^6.0.0", + "@mui/material": "^6.0.0", "pretty-bytes": "^5.3.0", "react": "^18.0.0", "react-dom": "^18.0.0", @@ -20,8 +20,6 @@ "@types/react-dom": "^17.0.0", "@types/react-router-dom": "^5.1.3", "netlify-cli": "^2.69.0", - "node-fetch": "^2.6.1", - "prettier": "^2.0.2", "react-scripts": "^5.0.0", "typescript": "^4.1.0" }, diff --git a/contributor-dashboard-legacy/pnpm-lock.yaml b/contributor-dashboard-legacy/pnpm-lock.yaml index 462eb29..65f3fa4 100644 --- a/contributor-dashboard-legacy/pnpm-lock.yaml +++ b/contributor-dashboard-legacy/pnpm-lock.yaml @@ -54,12 +54,6 @@ importers: netlify-cli: specifier: ^2.69.0 version: 2.71.0(@octokit/core@6.1.2)(@types/babel__core@7.20.5) - node-fetch: - specifier: ^2.6.1 - version: 2.7.0 - prettier: - specifier: ^2.0.2 - version: 2.8.8 react-scripts: specifier: ^5.0.0 version: 5.0.1(@babel/plugin-syntax-flow@7.25.7(@babel/core@7.25.8))(@babel/plugin-transform-react-jsx@7.25.7(@babel/core@7.25.8))(@types/babel__core@7.20.5)(eslint@8.57.1)(react@18.3.1)(type-fest@0.21.3)(typescript@4.9.5) @@ -6745,11 +6739,6 @@ packages: resolution: {integrity: sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==} engines: {node: '>=4'} - prettier@2.8.8: - resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} - engines: {node: '>=10.13.0'} - hasBin: true - pretty-bytes@5.6.0: resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==} engines: {node: '>=6'} @@ -12611,7 +12600,7 @@ snapshots: buffer@4.9.2: dependencies: base64-js: 1.5.1 - ieee754: 1.1.13 + ieee754: 1.2.1 isarray: 1.0.0 buffer@5.7.1: @@ -17658,8 +17647,6 @@ snapshots: prepend-http@2.0.0: {} - prettier@2.8.8: {} - pretty-bytes@5.6.0: {} pretty-error@4.0.0: @@ -19790,7 +19777,7 @@ snapshots: xml2js@0.6.2: dependencies: - sax: 1.2.1 + sax: 1.4.1 xmlbuilder: 11.0.1 xmlbuilder@11.0.1: {} diff --git a/package.json b/package.json index 12cc589..0f1903d 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "eslint-plugin-testing-library": "^6.2.2", "eslint-plugin-typescript-enum": "2.1.0", "prettier": "^3.3.3", - "pretty-quick": "^3.1.3", + "pretty-quick": "^4.0.0", "typescript": "^4.6.4" }, "dependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0f1a9ad..3900790 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -79,8 +79,8 @@ importers: specifier: ^3.3.3 version: 3.3.3 pretty-quick: - specifier: ^3.1.3 - version: 3.3.1(prettier@3.3.3) + specifier: ^4.0.0 + version: 4.0.0(prettier@3.3.3) typescript: specifier: ^4.6.4 version: 4.9.5 @@ -2741,8 +2741,8 @@ packages: resolution: {integrity: sha512-zDWS+Rb1E8BlqqhALSt9kUhss8Qq4nN3iof3gsOdyINksElaPyNBtKUMTR62qhvgVWR0CqCX7sdnKe4MnUbFEA==} engines: {node: '>=4'} - execa@4.1.0: - resolution: {integrity: sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==} + execa@5.1.1: + resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} execa@8.0.1: @@ -2826,10 +2826,6 @@ packages: resolution: {integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==} engines: {node: '>=6'} - find-up@4.1.0: - resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} - engines: {node: '>=8'} - find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} @@ -2969,9 +2965,9 @@ packages: resolution: {integrity: sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==} engines: {node: '>=4'} - get-stream@5.2.0: - resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} - engines: {node: '>=8'} + get-stream@6.0.1: + resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} + engines: {node: '>=10'} get-stream@8.0.1: resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} @@ -3155,9 +3151,9 @@ packages: resolution: {integrity: sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==} engines: {node: '>= 14'} - human-signals@1.1.1: - resolution: {integrity: sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==} - engines: {node: '>=8.12.0'} + human-signals@2.1.0: + resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} + engines: {node: '>=10.17.0'} human-signals@5.0.0: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} @@ -3576,10 +3572,6 @@ packages: resolution: {integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==} engines: {node: '>=6'} - locate-path@5.0.0: - resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} - engines: {node: '>=8'} - locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} @@ -4002,10 +3994,6 @@ packages: resolution: {integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==} engines: {node: '>=6'} - p-locate@4.1.0: - resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} - engines: {node: '>=8'} - p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} @@ -4223,12 +4211,12 @@ packages: resolution: {integrity: sha512-o1piW0n3tgKIKCwk2vpM/vOV13zjJzvP37Ioze54YlTHE06m4tjEbzg9WsKkvTuyYln2DHjo5pY4qrZGI0otpw==} engines: {node: '>=18'} - pretty-quick@3.3.1: - resolution: {integrity: sha512-3b36UXfYQ+IXXqex6mCca89jC8u0mYLqFAN5eTQKoXO6oCQYcIVYZEB/5AlBHI7JPYygReM2Vv6Vom/Gln7fBg==} - engines: {node: '>=10.13'} + pretty-quick@4.0.0: + resolution: {integrity: sha512-M+2MmeufXb/M7Xw3Afh1gxcYpj+sK0AxEfnfF958ktFeAyi5MsKY5brymVURQLgPLV1QaF5P4pb2oFJ54H3yzQ==} + engines: {node: '>=14'} hasBin: true peerDependencies: - prettier: ^2.0.0 + prettier: ^3.0.0 process-nextick-args@2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} @@ -4257,9 +4245,6 @@ packages: pseudomap@1.0.2: resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} - pump@3.0.0: - resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} - punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -8600,11 +8585,11 @@ snapshots: signal-exit: 3.0.7 strip-eof: 1.0.0 - execa@4.1.0: + execa@5.1.1: dependencies: cross-spawn: 7.0.3 - get-stream: 5.2.0 - human-signals: 1.1.1 + get-stream: 6.0.1 + human-signals: 2.1.0 is-stream: 2.0.1 merge-stream: 2.0.0 npm-run-path: 4.0.1 @@ -8802,11 +8787,6 @@ snapshots: dependencies: locate-path: 3.0.0 - find-up@4.1.0: - dependencies: - locate-path: 5.0.0 - path-exists: 4.0.0 - find-up@5.0.0: dependencies: locate-path: 6.0.0 @@ -8960,9 +8940,7 @@ snapshots: get-stream@3.0.0: {} - get-stream@5.2.0: - dependencies: - pump: 3.0.0 + get-stream@6.0.1: {} get-stream@8.0.1: {} @@ -9192,7 +9170,7 @@ snapshots: transitivePeerDependencies: - supports-color - human-signals@1.1.1: {} + human-signals@2.1.0: {} human-signals@5.0.0: {} @@ -9579,10 +9557,6 @@ snapshots: p-locate: 3.0.0 path-exists: 3.0.0 - locate-path@5.0.0: - dependencies: - p-locate: 4.1.0 - locate-path@6.0.0: dependencies: p-locate: 5.0.0 @@ -9971,10 +9945,6 @@ snapshots: dependencies: p-limit: 2.3.0 - p-locate@4.1.0: - dependencies: - p-limit: 2.3.0 - p-locate@5.0.0: dependencies: p-limit: 3.1.0 @@ -10150,10 +10120,10 @@ snapshots: dependencies: parse-ms: 4.0.0 - pretty-quick@3.3.1(prettier@3.3.3): + pretty-quick@4.0.0(prettier@3.3.3): dependencies: - execa: 4.1.0 - find-up: 4.1.0 + execa: 5.1.1 + find-up: 5.0.0 ignore: 5.3.2 mri: 1.2.0 picocolors: 1.1.0 @@ -10194,11 +10164,6 @@ snapshots: pseudomap@1.0.2: {} - pump@3.0.0: - dependencies: - end-of-stream: 1.4.4 - once: 1.4.0 - punycode@2.3.1: {} qs@6.11.0: