From 0d0dd745235cce078d248b49389b16048f11836a Mon Sep 17 00:00:00 2001 From: Andrew Henry Date: Thu, 22 Feb 2024 13:26:58 -0500 Subject: [PATCH 1/6] fix: remove setup tests for jest --- jest.config.js | 1 - package-lock.json | 439 +++++++++++++++++++++------------------------- test/setupJest.ts | 8 - 3 files changed, 198 insertions(+), 250 deletions(-) delete mode 100644 test/setupJest.ts diff --git a/jest.config.js b/jest.config.js index e2cec5a..a0dce0e 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,7 +1,6 @@ /** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ module.exports = { preset: 'ts-jest', - setupFilesAfterEnv: ['./test/setupJest.ts'], testRegex: '(/__tests__/.*|\\.(test|spec))\\.[tj]sx?$', testEnvironment: 'node', moduleDirectories: ['node_modules', 'src'], diff --git a/package-lock.json b/package-lock.json index f31acea..2473ecb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1892,59 +1892,6 @@ "node": ">= 18" } }, - "node_modules/@octokit/app/node_modules/@octokit/auth-unauthenticated": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@octokit/auth-unauthenticated/-/auth-unauthenticated-5.0.1.tgz", - "integrity": "sha512-oxeWzmBFxWd+XolxKTc4zr+h3mt+yofn4r7OfoIkR/Cj/o70eEGmPsFbueyJE2iBAGpjgTnEOKM3pnuEGVmiqg==", - "dependencies": { - "@octokit/request-error": "^5.0.0", - "@octokit/types": "^12.0.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/app/node_modules/@octokit/plugin-paginate-rest": { - "version": "9.1.5", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.1.5.tgz", - "integrity": "sha512-WKTQXxK+bu49qzwv4qKbMMRXej1DU2gq017euWyKVudA6MldaSSQuxtz+vGbhxV4CjxpUxjZu6rM2wfc1FiWVg==", - "dependencies": { - "@octokit/types": "^12.4.0" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "@octokit/core": ">=5" - } - }, - "node_modules/@octokit/app/node_modules/@octokit/webhooks": { - "version": "12.1.1", - "resolved": "https://registry.npmjs.org/@octokit/webhooks/-/webhooks-12.1.1.tgz", - "integrity": "sha512-h7PyYf4VR9kvmm6SYdkmju5BOQmpJ3Fvf1rNQaEsfs70EOu0vspm/Fzr1j5LnP6UGblSW2kuEKiuEwEf5H3OTw==", - "dependencies": { - "@octokit/request-error": "^5.0.0", - "@octokit/webhooks-methods": "^4.0.0", - "@octokit/webhooks-types": "7.3.2", - "aggregate-error": "^3.1.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/app/node_modules/@octokit/webhooks-methods": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@octokit/webhooks-methods/-/webhooks-methods-4.0.0.tgz", - "integrity": "sha512-M8mwmTXp+VeolOS/kfRvsDdW+IO0qJ8kYodM/sAysk093q6ApgmBXwK1ZlUvAwXVrp/YVHp6aArj4auAxUAOFw==", - "engines": { - "node": ">= 18" - } - }, - "node_modules/@octokit/app/node_modules/@octokit/webhooks-types": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/@octokit/webhooks-types/-/webhooks-types-7.3.2.tgz", - "integrity": "sha512-JWOoOgtWTFnTSAamPXXyjTY5/apttvNxF+vPBnwdSu5cj5snrd7FO0fyw4+wTXy8fHduq626JjhO+TwCyyA6vA==" - }, "node_modules/@octokit/auth-app": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/@octokit/auth-app/-/auth-app-6.0.3.tgz", @@ -2020,41 +1967,15 @@ } }, "node_modules/@octokit/auth-unauthenticated": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@octokit/auth-unauthenticated/-/auth-unauthenticated-3.0.5.tgz", - "integrity": "sha512-yH2GPFcjrTvDWPwJWWCh0tPPtTL5SMgivgKPA+6v/XmYN6hGQkAto8JtZibSKOpf8ipmeYhLNWQ2UgW0GYILCw==", - "dependencies": { - "@octokit/request-error": "^3.0.0", - "@octokit/types": "^9.0.0" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/@octokit/auth-unauthenticated/node_modules/@octokit/openapi-types": { - "version": "18.1.1", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.1.1.tgz", - "integrity": "sha512-VRaeH8nCDtF5aXWnjPuEMIYf1itK/s3JYyJcWFJT8X9pSNnBtriDf7wlEWsGuhPLl4QIH4xM8fqTXDwJ3Mu6sw==" - }, - "node_modules/@octokit/auth-unauthenticated/node_modules/@octokit/request-error": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-3.0.3.tgz", - "integrity": "sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-unauthenticated/-/auth-unauthenticated-5.0.1.tgz", + "integrity": "sha512-oxeWzmBFxWd+XolxKTc4zr+h3mt+yofn4r7OfoIkR/Cj/o70eEGmPsFbueyJE2iBAGpjgTnEOKM3pnuEGVmiqg==", "dependencies": { - "@octokit/types": "^9.0.0", - "deprecation": "^2.0.0", - "once": "^1.4.0" + "@octokit/request-error": "^5.0.0", + "@octokit/types": "^12.0.0" }, "engines": { - "node": ">= 14" - } - }, - "node_modules/@octokit/auth-unauthenticated/node_modules/@octokit/types": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.3.2.tgz", - "integrity": "sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA==", - "dependencies": { - "@octokit/openapi-types": "^18.0.0" + "node": ">= 18" } }, "node_modules/@octokit/core": { @@ -2117,18 +2038,6 @@ "node": ">= 18" } }, - "node_modules/@octokit/oauth-app/node_modules/@octokit/auth-unauthenticated": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@octokit/auth-unauthenticated/-/auth-unauthenticated-5.0.1.tgz", - "integrity": "sha512-oxeWzmBFxWd+XolxKTc4zr+h3mt+yofn4r7OfoIkR/Cj/o70eEGmPsFbueyJE2iBAGpjgTnEOKM3pnuEGVmiqg==", - "dependencies": { - "@octokit/request-error": "^5.0.0", - "@octokit/types": "^12.0.0" - }, - "engines": { - "node": ">= 18" - } - }, "node_modules/@octokit/oauth-authorization-url": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/@octokit/oauth-authorization-url/-/oauth-authorization-url-6.0.2.tgz", @@ -2201,74 +2110,47 @@ } }, "node_modules/@octokit/plugin-paginate-rest": { - "version": "2.21.3", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz", - "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==", + "version": "9.1.5", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.1.5.tgz", + "integrity": "sha512-WKTQXxK+bu49qzwv4qKbMMRXej1DU2gq017euWyKVudA6MldaSSQuxtz+vGbhxV4CjxpUxjZu6rM2wfc1FiWVg==", "dependencies": { - "@octokit/types": "^6.40.0" + "@octokit/types": "^12.4.0" + }, + "engines": { + "node": ">= 18" }, "peerDependencies": { - "@octokit/core": ">=2" - } - }, - "node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/openapi-types": { - "version": "12.11.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", - "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==" - }, - "node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": { - "version": "6.41.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", - "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", - "dependencies": { - "@octokit/openapi-types": "^12.11.0" + "@octokit/core": ">=5" } }, "node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "5.16.2", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz", - "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.3.0.tgz", + "integrity": "sha512-c/fjpoHispRvBZuRoTVt/uALg7pXa9RQbXWJiDMk6NDkGNomuAZG7YuYYpZoxeoXv+kVRjIDTsO0e1z0pei+PQ==", "dependencies": { - "@octokit/types": "^6.39.0", - "deprecation": "^2.3.1" + "@octokit/types": "^12.4.0" + }, + "engines": { + "node": ">= 18" }, "peerDependencies": { - "@octokit/core": ">=3" - } - }, - "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types": { - "version": "12.11.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", - "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==" - }, - "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": { - "version": "6.41.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", - "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", - "dependencies": { - "@octokit/openapi-types": "^12.11.0" + "@octokit/core": ">=5" } }, "node_modules/@octokit/plugin-retry": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-3.0.9.tgz", - "integrity": "sha512-r+fArdP5+TG6l1Rv/C9hVoty6tldw6cE2pRHNGmFPdyfrc696R6JjrQ3d7HdVqGwuzfyrcaLAKD7K8TX8aehUQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-6.0.1.tgz", + "integrity": "sha512-SKs+Tz9oj0g4p28qkZwl/topGcb0k0qPNX/i7vBKmDsjoeqnVfFUquqrE/O9oJY7+oLzdCtkiWSXLpLjvl6uog==", "dependencies": { - "@octokit/types": "^6.0.3", + "@octokit/request-error": "^5.0.0", + "@octokit/types": "^12.0.0", "bottleneck": "^2.15.3" - } - }, - "node_modules/@octokit/plugin-retry/node_modules/@octokit/openapi-types": { - "version": "12.11.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", - "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==" - }, - "node_modules/@octokit/plugin-retry/node_modules/@octokit/types": { - "version": "6.41.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", - "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", - "dependencies": { - "@octokit/openapi-types": "^12.11.0" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "@octokit/core": ">=5" } }, "node_modules/@octokit/plugin-throttling": { @@ -2322,48 +2204,31 @@ } }, "node_modules/@octokit/webhooks": { - "version": "9.26.3", - "resolved": "https://registry.npmjs.org/@octokit/webhooks/-/webhooks-9.26.3.tgz", - "integrity": "sha512-DLGk+gzeVq5oK89Bo601txYmyrelMQ7Fi5EnjHE0Xs8CWicy2xkmnJMKptKJrBJpstqbd/9oeDFi/Zj2pudBDQ==", + "version": "12.1.2", + "resolved": "https://registry.npmjs.org/@octokit/webhooks/-/webhooks-12.1.2.tgz", + "integrity": "sha512-+nGS3ReCByF6m+nbNB59x7Aa3CNjCCGuBLFzfkiJP1O3uVKKuJbkP4uO4t46YqH26nlugmOhqjT7nx5D0VPtdA==", "dependencies": { - "@octokit/request-error": "^2.0.2", - "@octokit/webhooks-methods": "^2.0.0", - "@octokit/webhooks-types": "5.8.0", + "@octokit/request-error": "^5.0.0", + "@octokit/webhooks-methods": "^4.1.0", + "@octokit/webhooks-types": "7.3.2", "aggregate-error": "^3.1.0" + }, + "engines": { + "node": ">= 18" } }, "node_modules/@octokit/webhooks-methods": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@octokit/webhooks-methods/-/webhooks-methods-2.0.0.tgz", - "integrity": "sha512-35cfQ4YWlnZnmZKmIxlGPUPLtbkF8lr/A/1Sk1eC0ddLMwQN06dOuLc+dI3YLQS+T+MoNt3DIQ0NynwgKPilig==" - }, - "node_modules/@octokit/webhooks-types": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@octokit/webhooks-types/-/webhooks-types-5.8.0.tgz", - "integrity": "sha512-8adktjIb76A7viIdayQSFuBEwOzwhDC+9yxZpKNHjfzrlostHCw0/N7JWpWMObfElwvJMk2fY2l1noENCk9wmw==" - }, - "node_modules/@octokit/webhooks/node_modules/@octokit/openapi-types": { - "version": "12.11.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", - "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==" - }, - "node_modules/@octokit/webhooks/node_modules/@octokit/request-error": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz", - "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==", - "dependencies": { - "@octokit/types": "^6.0.3", - "deprecation": "^2.0.0", - "once": "^1.4.0" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@octokit/webhooks-methods/-/webhooks-methods-4.1.0.tgz", + "integrity": "sha512-zoQyKw8h9STNPqtm28UGOYFE7O6D4Il8VJwhAtMHFt2C4L0VQT1qGKLeefUOqHNs1mNRYSadVv7x0z8U2yyeWQ==", + "engines": { + "node": ">= 18" } }, - "node_modules/@octokit/webhooks/node_modules/@octokit/types": { - "version": "6.41.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", - "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", - "dependencies": { - "@octokit/openapi-types": "^12.11.0" - } + "node_modules/@octokit/webhooks-types": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/@octokit/webhooks-types/-/webhooks-types-7.3.2.tgz", + "integrity": "sha512-JWOoOgtWTFnTSAamPXXyjTY5/apttvNxF+vPBnwdSu5cj5snrd7FO0fyw4+wTXy8fHduq626JjhO+TwCyyA6vA==" }, "node_modules/@oddbird/popover-polyfill": { "version": "0.2.3", @@ -9609,25 +9474,6 @@ "node": ">= 10.13" } }, - "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -9949,6 +9795,31 @@ "node": ">= 14" } }, + "node_modules/octokit-auth-probot/node_modules/@octokit/auth-unauthenticated": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@octokit/auth-unauthenticated/-/auth-unauthenticated-3.0.5.tgz", + "integrity": "sha512-yH2GPFcjrTvDWPwJWWCh0tPPtTL5SMgivgKPA+6v/XmYN6hGQkAto8JtZibSKOpf8ipmeYhLNWQ2UgW0GYILCw==", + "dependencies": { + "@octokit/request-error": "^3.0.0", + "@octokit/types": "^9.0.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/octokit-auth-probot/node_modules/@octokit/auth-unauthenticated/node_modules/@octokit/openapi-types": { + "version": "18.1.1", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.1.1.tgz", + "integrity": "sha512-VRaeH8nCDtF5aXWnjPuEMIYf1itK/s3JYyJcWFJT8X9pSNnBtriDf7wlEWsGuhPLl4QIH4xM8fqTXDwJ3Mu6sw==" + }, + "node_modules/octokit-auth-probot/node_modules/@octokit/auth-unauthenticated/node_modules/@octokit/types": { + "version": "9.3.2", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.3.2.tgz", + "integrity": "sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA==", + "dependencies": { + "@octokit/openapi-types": "^18.0.0" + } + }, "node_modules/octokit-auth-probot/node_modules/@octokit/endpoint": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.6.tgz", @@ -10087,48 +9958,23 @@ "node": "14 || >=16.14" } }, - "node_modules/octokit/node_modules/@octokit/plugin-paginate-rest": { - "version": "9.1.5", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.1.5.tgz", - "integrity": "sha512-WKTQXxK+bu49qzwv4qKbMMRXej1DU2gq017euWyKVudA6MldaSSQuxtz+vGbhxV4CjxpUxjZu6rM2wfc1FiWVg==", - "dependencies": { - "@octokit/types": "^12.4.0" - }, - "engines": { - "node": ">= 18" - }, - "peerDependencies": { - "@octokit/core": ">=5" - } - }, - "node_modules/octokit/node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.2.0.tgz", - "integrity": "sha512-ePbgBMYtGoRNXDyKGvr9cyHjQ163PbwD0y1MkDJCpkO2YH4OeXX40c4wYHKikHGZcpGPbcRLuy0unPUuafco8Q==", + "node_modules/octokit-auth-probot/node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dependencies": { - "@octokit/types": "^12.3.0" + "whatwg-url": "^5.0.0" }, "engines": { - "node": ">= 18" + "node": "4.x || >=6.0.0" }, "peerDependencies": { - "@octokit/core": ">=5" - } - }, - "node_modules/octokit/node_modules/@octokit/plugin-retry": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-6.0.1.tgz", - "integrity": "sha512-SKs+Tz9oj0g4p28qkZwl/topGcb0k0qPNX/i7vBKmDsjoeqnVfFUquqrE/O9oJY7+oLzdCtkiWSXLpLjvl6uog==", - "dependencies": { - "@octokit/request-error": "^5.0.0", - "@octokit/types": "^12.0.0", - "bottleneck": "^2.15.3" - }, - "engines": { - "node": ">= 18" + "encoding": "^0.1.0" }, - "peerDependencies": { - "@octokit/core": ">=5" + "peerDependenciesMeta": { + "encoding": { + "optional": true + } } }, "node_modules/oidc-token-hash": { @@ -10874,6 +10720,77 @@ "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-14.0.0.tgz", "integrity": "sha512-HNWisMYlR8VCnNurDU6os2ikx0s0VyEjDYHNS/h4cgb8DeOxQ0n72HyinUtdDVxJhFy3FWLGl0DJhfEWk3P5Iw==" }, + "node_modules/probot/node_modules/@octokit/plugin-paginate-rest": { + "version": "2.21.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz", + "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==", + "dependencies": { + "@octokit/types": "^6.40.0" + }, + "peerDependencies": { + "@octokit/core": ">=2" + } + }, + "node_modules/probot/node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/openapi-types": { + "version": "12.11.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", + "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==" + }, + "node_modules/probot/node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": { + "version": "6.41.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", + "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", + "dependencies": { + "@octokit/openapi-types": "^12.11.0" + } + }, + "node_modules/probot/node_modules/@octokit/plugin-rest-endpoint-methods": { + "version": "5.16.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz", + "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==", + "dependencies": { + "@octokit/types": "^6.39.0", + "deprecation": "^2.3.1" + }, + "peerDependencies": { + "@octokit/core": ">=3" + } + }, + "node_modules/probot/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types": { + "version": "12.11.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", + "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==" + }, + "node_modules/probot/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": { + "version": "6.41.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", + "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", + "dependencies": { + "@octokit/openapi-types": "^12.11.0" + } + }, + "node_modules/probot/node_modules/@octokit/plugin-retry": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-3.0.9.tgz", + "integrity": "sha512-r+fArdP5+TG6l1Rv/C9hVoty6tldw6cE2pRHNGmFPdyfrc696R6JjrQ3d7HdVqGwuzfyrcaLAKD7K8TX8aehUQ==", + "dependencies": { + "@octokit/types": "^6.0.3", + "bottleneck": "^2.15.3" + } + }, + "node_modules/probot/node_modules/@octokit/plugin-retry/node_modules/@octokit/openapi-types": { + "version": "12.11.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", + "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==" + }, + "node_modules/probot/node_modules/@octokit/plugin-retry/node_modules/@octokit/types": { + "version": "6.41.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", + "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", + "dependencies": { + "@octokit/openapi-types": "^12.11.0" + } + }, "node_modules/probot/node_modules/@octokit/plugin-throttling": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-3.7.0.tgz", @@ -10956,6 +10873,27 @@ "@octokit/openapi-types": "^14.0.0" } }, + "node_modules/probot/node_modules/@octokit/webhooks": { + "version": "9.26.3", + "resolved": "https://registry.npmjs.org/@octokit/webhooks/-/webhooks-9.26.3.tgz", + "integrity": "sha512-DLGk+gzeVq5oK89Bo601txYmyrelMQ7Fi5EnjHE0Xs8CWicy2xkmnJMKptKJrBJpstqbd/9oeDFi/Zj2pudBDQ==", + "dependencies": { + "@octokit/request-error": "^2.0.2", + "@octokit/webhooks-methods": "^2.0.0", + "@octokit/webhooks-types": "5.8.0", + "aggregate-error": "^3.1.0" + } + }, + "node_modules/probot/node_modules/@octokit/webhooks-methods": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@octokit/webhooks-methods/-/webhooks-methods-2.0.0.tgz", + "integrity": "sha512-35cfQ4YWlnZnmZKmIxlGPUPLtbkF8lr/A/1Sk1eC0ddLMwQN06dOuLc+dI3YLQS+T+MoNt3DIQ0NynwgKPilig==" + }, + "node_modules/probot/node_modules/@octokit/webhooks-types": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@octokit/webhooks-types/-/webhooks-types-5.8.0.tgz", + "integrity": "sha512-8adktjIb76A7viIdayQSFuBEwOzwhDC+9yxZpKNHjfzrlostHCw0/N7JWpWMObfElwvJMk2fY2l1noENCk9wmw==" + }, "node_modules/probot/node_modules/argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -11003,6 +10941,25 @@ "node": ">=10" } }, + "node_modules/probot/node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, "node_modules/probot/node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", diff --git a/test/setupJest.ts b/test/setupJest.ts deleted file mode 100644 index 00a6a1a..0000000 --- a/test/setupJest.ts +++ /dev/null @@ -1,8 +0,0 @@ -import AbortController from 'abort-controller' -import fetch from 'node-fetch' -import ws from 'ws' - -const globalAny = global as any -globalAny.AbortController = AbortController -globalAny.fetch = fetch -globalAny.WebSocket = ws From adc13fef2dc7d71bee113b487a1a9745e9c4ed5e Mon Sep 17 00:00:00 2001 From: Andrew Henry Date: Thu, 22 Feb 2024 13:47:22 -0500 Subject: [PATCH 2/6] fix: in CI environments default to .env.example --- env.mjs | 9 +++++++++ package-lock.json | 12 +++++++++++- package.json | 3 ++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/env.mjs b/env.mjs index f7ce55f..2bdb71b 100644 --- a/env.mjs +++ b/env.mjs @@ -1,6 +1,15 @@ import { createEnv } from '@t3-oss/env-nextjs' +import isCI from 'is-ci' import { z } from 'zod' +// This is to make builds play nicely on CI +if (isCI) { + console.log('Running on CI, using .env.example file.') + require('dotenv').config({ + path: '.env.example', + }) +} + export const env = createEnv({ /* * Serverside Environment variables, not available on the client. diff --git a/package-lock.json b/package-lock.json index 2473ecb..c3695e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,6 +34,7 @@ "zod": "3.22.4" }, "devDependencies": { + "@types/is-ci": "3.0.4", "@types/jest": "29.5.11", "@types/node": "20.11.19", "@types/node-fetch": "2.6.9", @@ -45,7 +46,7 @@ "eslint": "8.56.0", "eslint-config-next": "14.1.0", "husky": "9.0.11", - "is-ci": "^3.0.1", + "is-ci": "3.0.1", "jest": "29.7.0", "lint-staged": "15.2.2", "nock": "13.4.0", @@ -2918,6 +2919,15 @@ "@types/node": "*" } }, + "node_modules/@types/is-ci": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/is-ci/-/is-ci-3.0.4.tgz", + "integrity": "sha512-AkCYCmwlXeuH89DagDCzvCAyltI2v9lh3U3DqSg/GrBYoReAaWwxfXCqMx9UV5MajLZ4ZFwZzV4cABGIxk2XRw==", + "dev": true, + "dependencies": { + "ci-info": "^3.1.0" + } + }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", diff --git a/package.json b/package.json index f7aeb4b..151d5a4 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "zod": "3.22.4" }, "devDependencies": { + "@types/is-ci": "3.0.4", "@types/jest": "29.5.11", "@types/node": "20.11.19", "@types/node-fetch": "2.6.9", @@ -54,7 +55,7 @@ "eslint": "8.56.0", "eslint-config-next": "14.1.0", "husky": "9.0.11", - "is-ci": "^3.0.1", + "is-ci": "3.0.1", "jest": "29.7.0", "lint-staged": "15.2.2", "nock": "13.4.0", From c698391e22dd8c0b82713c1845d1dbc0fce48049 Mon Sep 17 00:00:00 2001 From: Andrew Henry Date: Thu, 22 Feb 2024 14:42:14 -0500 Subject: [PATCH 3/6] fix: add check for env file existence --- env.mjs | 11 +++++++---- package-lock.json | 4 +--- package.json | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/env.mjs b/env.mjs index 2bdb71b..666e025 100644 --- a/env.mjs +++ b/env.mjs @@ -1,13 +1,16 @@ import { createEnv } from '@t3-oss/env-nextjs' +import fs from 'fs' import isCI from 'is-ci' import { z } from 'zod' // This is to make builds play nicely on CI if (isCI) { - console.log('Running on CI, using .env.example file.') - require('dotenv').config({ - path: '.env.example', - }) + if (fs.existsSync('.env.example')) { + console.log('Running on CI, using .env.example file.') + require('dotenv').config({ + path: '.env.example', + }) + } } export const env = createEnv({ diff --git a/package-lock.json b/package-lock.json index c3695e6..1bf43ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,7 @@ "@trpc/next": "10.44.1", "@trpc/react-query": "10.44.1", "@trpc/server": "10.44.1", + "is-ci": "3.0.1", "next": "14.1.0", "next-auth": "4.24.5", "octokit": "3.1.2", @@ -46,7 +47,6 @@ "eslint": "8.56.0", "eslint-config-next": "14.1.0", "husky": "9.0.11", - "is-ci": "3.0.1", "jest": "29.7.0", "lint-staged": "15.2.2", "nock": "13.4.0", @@ -4091,7 +4091,6 @@ "version": "3.9.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", - "dev": true, "funding": [ { "type": "github", @@ -6472,7 +6471,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", - "dev": true, "dependencies": { "ci-info": "^3.2.0" }, diff --git a/package.json b/package.json index 151d5a4..1ea61dd 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "@trpc/next": "10.44.1", "@trpc/react-query": "10.44.1", "@trpc/server": "10.44.1", + "is-ci": "3.0.1", "next": "14.1.0", "next-auth": "4.24.5", "octokit": "3.1.2", @@ -55,7 +56,6 @@ "eslint": "8.56.0", "eslint-config-next": "14.1.0", "husky": "9.0.11", - "is-ci": "3.0.1", "jest": "29.7.0", "lint-staged": "15.2.2", "nock": "13.4.0", From 88b0a8382a2359bb39f1f5675cc3576b2fbd82c8 Mon Sep 17 00:00:00 2001 From: Andrew Henry Date: Thu, 22 Feb 2024 14:44:57 -0500 Subject: [PATCH 4/6] fix: remove unneeded build step --- .github/workflows/build.yml | 3 --- .github/workflows/docker-build.yml | 3 --- .github/workflows/lint.yml | 3 --- .github/workflows/tests.yml | 3 --- 4 files changed, 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d8c7f2e..098c047 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,8 +16,5 @@ jobs: - name: Install Dependencies run: npm install - - name: Setup CI Environment - run: mv .env.example .env - - name: Run Build run: NEXT_TELEMETRY_DISABLED=1 npm run build diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index c684eaf..e4ef981 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -13,8 +13,5 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Setup CI Environment - run: mv .env.example .env - - name: Build Docker image run: docker build -t internal-contribution-forks . diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 80dd230..12d46a7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,8 +16,5 @@ jobs: - name: Install Dependencies run: npm install - - name: Setup CI Environment - run: mv .env.example .env - - name: Run Lint run: npm run lint diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8898907..277393a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,8 +16,5 @@ jobs: - name: Install Dependencies run: npm install - - name: Setup CI Environment - run: mv .env.example .env - - name: Run Jest Tests run: npm test From f0676a89b4511ca49c271ebc830df6ee2d9b70e2 Mon Sep 17 00:00:00 2001 From: Andrew Henry Date: Thu, 22 Feb 2024 15:06:41 -0500 Subject: [PATCH 5/6] feat: skip checks on build step --- env.mjs | 13 +------------ package-lock.json | 13 +------------ package.json | 9 ++++----- 3 files changed, 6 insertions(+), 29 deletions(-) diff --git a/env.mjs b/env.mjs index 666e025..4e1c85f 100644 --- a/env.mjs +++ b/env.mjs @@ -1,18 +1,6 @@ import { createEnv } from '@t3-oss/env-nextjs' -import fs from 'fs' -import isCI from 'is-ci' import { z } from 'zod' -// This is to make builds play nicely on CI -if (isCI) { - if (fs.existsSync('.env.example')) { - console.log('Running on CI, using .env.example file.') - require('dotenv').config({ - path: '.env.example', - }) - } -} - export const env = createEnv({ /* * Serverside Environment variables, not available on the client. @@ -61,4 +49,5 @@ export const env = createEnv({ PUBLIC_ORG: process.env.PUBLIC_ORG, PRIVATE_ORG: process.env.PRIVATE_ORG, }, + skipValidation: process.env.SKIP_ENV_VALIDATIONS === 'true', }) diff --git a/package-lock.json b/package-lock.json index 1bf43ca..3b01753 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,6 @@ "@trpc/next": "10.44.1", "@trpc/react-query": "10.44.1", "@trpc/server": "10.44.1", - "is-ci": "3.0.1", "next": "14.1.0", "next-auth": "4.24.5", "octokit": "3.1.2", @@ -4091,6 +4090,7 @@ "version": "3.9.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, "funding": [ { "type": "github", @@ -6467,17 +6467,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-ci": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", - "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", - "dependencies": { - "ci-info": "^3.2.0" - }, - "bin": { - "is-ci": "bin.js" - } - }, "node_modules/is-core-module": { "version": "2.13.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", diff --git a/package.json b/package.json index 1ea61dd..666d222 100644 --- a/package.json +++ b/package.json @@ -8,14 +8,14 @@ "homepage": "https://github.com/github-community-projects/internal-contribution-forks", "scripts": { "dev": "concurrently \"dotenv-load node scripts/probot-forwarder.js\" \"next dev\"", - "build": "next build", + "build": "SKIP_ENV_VALIDATIONS='true' next build", "start": "next start", - "lint": "next lint && prettier --check .", - "lint:fix": "next lint --fix && prettier --write .", + "lint": "SKIP_ENV_VALIDATIONS='true' next lint && prettier --check .", + "lint:fix": "SKIP_ENV_VALIDATIONS='true' next lint --fix && prettier --write .", "bot:build": "tsc ./src/bot/index.ts --noEmit false --esModuleInterop --outDir ./build", "bot:start": "probot run ./build/index.js", "test": "ts-node -O '{\"module\":\"commonjs\"}' node_modules/jest/bin/jest.js", - "prepare": "test -d node_modules/husky && husky install || echo \"husky is not installed\"" + "prepare": "test -d node_modules/husky && husky || echo \"husky is not installed\"" }, "dependencies": { "@octokit/auth-app": "6.0.3", @@ -29,7 +29,6 @@ "@trpc/next": "10.44.1", "@trpc/react-query": "10.44.1", "@trpc/server": "10.44.1", - "is-ci": "3.0.1", "next": "14.1.0", "next-auth": "4.24.5", "octokit": "3.1.2", From f619dbd9a14828ab42702130dc7eb7f754699e49 Mon Sep 17 00:00:00 2001 From: Andrew Henry Date: Thu, 22 Feb 2024 15:11:58 -0500 Subject: [PATCH 6/6] chore: remove unused is-ci types --- package-lock.json | 10 ---------- package.json | 1 - 2 files changed, 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3b01753..5f697bb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,6 @@ "zod": "3.22.4" }, "devDependencies": { - "@types/is-ci": "3.0.4", "@types/jest": "29.5.11", "@types/node": "20.11.19", "@types/node-fetch": "2.6.9", @@ -2918,15 +2917,6 @@ "@types/node": "*" } }, - "node_modules/@types/is-ci": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/is-ci/-/is-ci-3.0.4.tgz", - "integrity": "sha512-AkCYCmwlXeuH89DagDCzvCAyltI2v9lh3U3DqSg/GrBYoReAaWwxfXCqMx9UV5MajLZ4ZFwZzV4cABGIxk2XRw==", - "dev": true, - "dependencies": { - "ci-info": "^3.1.0" - } - }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", diff --git a/package.json b/package.json index 666d222..0f0a5f9 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,6 @@ "zod": "3.22.4" }, "devDependencies": { - "@types/is-ci": "3.0.4", "@types/jest": "29.5.11", "@types/node": "20.11.19", "@types/node-fetch": "2.6.9",