diff --git a/.changeset/soft-buses-unite.md b/.changeset/soft-buses-unite.md new file mode 100644 index 00000000..c20bb589 --- /dev/null +++ b/.changeset/soft-buses-unite.md @@ -0,0 +1,5 @@ +--- +"@khanacademy/eslint-config": minor +--- + +Update eslint-khan-config and .eslintrc.js to lint .ts files diff --git a/.eslintrc.js b/.eslintrc.js index 5115a936..12fcb255 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,12 +1,6 @@ /* eslint-disable import/no-commonjs */ module.exports = { extends: ["./packages/eslint-config-khan/index.js"], - parser: "@babel/eslint-parser", - parserOptions: { - babelOptions: { - configFile: "./build-settings/babel.config.js", - }, - }, plugins: ["@babel", "import", "jest", "promise", "monorepo", "disable"], settings: { "eslint-plugin-disable": { @@ -15,6 +9,24 @@ module.exports = { "jsx-a11y": ["./*.js", "src/*.js"], }, }, + "import/parsers": { + "@typescript-eslint/parser": [".ts", ".tsx"], + }, + "import/resolver": { + typescript: { + project: [ + "packages/*/tsconfig.json", + "packages/tsconfig-shared.json", + ], + }, + node: { + project: [ + "packages/*/tsconfig.json", + "packages/tsconfig-shared.json", + ], + }, + }, + "import/extensions": [".js", ".jsx", ".ts", ".tsx"], }, globals: { __IS_BROWSER__: "readonly", @@ -27,17 +39,29 @@ module.exports = { }, }, { - files: ["**/__tests__/**/*.test.js"], + files: ["**/__tests__/**/*.test.ts"], rules: { "max-lines": "off", + "@typescript-eslint/no-empty-function": "off", }, }, { - files: ["**/bin/**/*.js"], + files: ["**/bin/**/*.ts", "build-scripts/*.ts"], rules: { "no-console": "off", }, }, + { + files: [ + "**/__tests__/**/*.test.ts", + "utils/*.js", + "config/**", + "build-settings/**", + ], + rules: { + "@typescript-eslint/no-var-requires": "off", + }, + }, ], rules: { "new-cap": "off", @@ -85,7 +109,10 @@ module.exports = { "promise/no-new-statics": "error", "promise/no-return-in-finally": "error", "monorepo/no-internal-import": "error", - "monorepo/no-relative-import": "error", + // NOTE: This rule reports false positives for cross-module imports using + // `@khanacademy/wonder-stuff-*`. This is likely due to a bad interaction + // with the settings we're using for `import/resolver`. + // "monorepo/no-relative-import": "error", "import/no-restricted-paths": [ "error", { @@ -97,5 +124,7 @@ module.exports = { ], }, ], + + "@typescript-eslint/no-explicit-any": "off", }, }; diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 15fa2f86..45b9f57f 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -83,7 +83,7 @@ jobs: uses: Khan/actions@full-or-limited-v0 with: full-trigger: ${{ steps.eslint-reset.outputs.filtered }} - full: yarn lint:ci packages + full: yarn lint:ci limited-trigger: ${{ steps.js-files.outputs.filtered }} limited: yarn lint:ci {} diff --git a/.vscode/settings.json b/.vscode/settings.json index 75ae1ca0..9e0c8453 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,12 @@ { "editor.renderWhitespace": "boundary", "eslint.codeActionsOnSave.mode": "all", + "eslint.validate": [ + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + ], "files.trimTrailingWhitespace": true, "typescript.format.enable": false, "typescript.validate.enable": true, diff --git a/build-scripts/gen-flow-types.ts b/build-scripts/gen-flow-types.ts index 9d45b52f..40b808ec 100644 --- a/build-scripts/gen-flow-types.ts +++ b/build-scripts/gen-flow-types.ts @@ -1,9 +1,11 @@ import {execSync} from "child_process"; -import * as fg from "fast-glob"; import * as path from "path"; +import * as fglob from "fast-glob"; const rootDir = path.join(__dirname, ".."); -const files = fg.sync("packages/wonder-stuff-*/dist/**/*.d.ts", {cwd: rootDir}); +const files = fglob.sync("packages/wonder-stuff-*/dist/**/*.d.ts", { + cwd: rootDir, +}); for (const inFile of files) { const outFile = inFile.replace(".d.ts", ".js.flow"); diff --git a/build-scripts/remove-test-types-from-dist.ts b/build-scripts/remove-test-types-from-dist.ts index dccc6886..b7d160ea 100644 --- a/build-scripts/remove-test-types-from-dist.ts +++ b/build-scripts/remove-test-types-from-dist.ts @@ -1,9 +1,9 @@ import * as fs from "fs"; -import * as fg from "fast-glob"; import * as path from "path"; +import * as fglob from "fast-glob"; const rootDir = path.join(__dirname, ".."); -const files = fg.sync("packages/wonder-stuff-*/dist/**/__tests__/*.d.ts", { +const files = fglob.sync("packages/wonder-stuff-*/dist/**/__tests__/*.d.ts", { cwd: rootDir, }); @@ -11,7 +11,7 @@ for (const file of files) { fs.unlinkSync(path.join(rootDir, file)); } -const dirs = fg.sync("packages/wonder-stuff-*/dist/**/__tests__", { +const dirs = fglob.sync("packages/wonder-stuff-*/dist/**/__tests__", { cwd: rootDir, onlyFiles: false, }); diff --git a/package.json b/package.json index 8afba146..fd36b679 100644 --- a/package.json +++ b/package.json @@ -34,9 +34,12 @@ "@types/jest": "^29.4.0", "@types/jest-when": "^3.5.2", "@types/winston": "^2.4.4", + "@typescript-eslint/eslint-plugin": "^5.52.0", + "@typescript-eslint/parser": "^5.52.0", "babel-jest": "29.4.2", "eslint": "^8.34.0", "eslint-config-prettier": "^8.6.0", + "eslint-import-resolver-typescript": "^3.5.3", "eslint-plugin-disable": "^2.0.3", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-import": "^2.27.5", @@ -76,8 +79,8 @@ "clean": "rm -rf packages/wonder-stuff-*/dist && rm -rf packages/wonder-stuff-*/node_modules && rm -f packages/*/tsconfig.tsbuildinfo", "coverage": "yarn run jest --coverage", "format": "prettier --write .", - "lint": "eslint --config .eslintrc.js packages", - "lint:ci": "eslint --config .eslintrc.js", + "lint": "yarn lint:ci .", + "lint:ci": "eslint --config .eslintrc.js --ext .ts --ext .js", "publish:ci": "node utils/pre-publish-check-ci.js && git diff --stat --exit-code HEAD && yarn build && yarn build:types && yarn build:flowtypes && changeset publish", "test": "yarn jest", "typecheck": "tsc --project tsconfig-check.json", diff --git a/packages/eslint-config-khan/index.js b/packages/eslint-config-khan/index.js index f73ea8ce..93d69544 100644 --- a/packages/eslint-config-khan/index.js +++ b/packages/eslint-config-khan/index.js @@ -4,9 +4,14 @@ const WARN = "warn"; const ERROR = "error"; module.exports = { - parser: "babel-eslint", - plugins: ["jsx-a11y", "prettier", "react"], - extends: ["eslint:recommended", "prettier"], + parser: "@typescript-eslint/parser", + plugins: ["@typescript-eslint", "jsx-a11y", "prettier", "react"], + extends: [ + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "prettier", + "plugin:@typescript-eslint/recommended", + ], env: { // TODO(csilvers): once we properly use node.js for node // files, get rid of this next line. @@ -56,7 +61,9 @@ module.exports = { "no-unexpected-multiline": ERROR, "no-unreachable": ERROR, "no-unused-expressions": ERROR, - "no-unused-vars": [ERROR, {args: "none", varsIgnorePattern: "^_*$"}], + "no-unused-vars": OFF, + "@typescript-eslint/no-unused-vars": WARN, + // {args: "none", varsIgnorePattern: "^_*$"}], "no-useless-call": ERROR, "no-var": ERROR, "no-with": ERROR, diff --git a/packages/wonder-stuff-core/src/error-info.ts b/packages/wonder-stuff-core/src/error-info.ts index 8ffdccda..9432d3b0 100644 --- a/packages/wonder-stuff-core/src/error-info.ts +++ b/packages/wonder-stuff-core/src/error-info.ts @@ -179,8 +179,8 @@ export class ErrorInfo { */ static normalize( error: Error, - stripFrames: number = 0, - minimumFrameCount: number = 1, + stripFrames = 0, + minimumFrameCount = 1, ): ErrorInfo { if (process.env.NODE_ENV !== "production") { // Verify our arguments. diff --git a/packages/wonder-stuff-i18n/src/plugins/i18n-plugin.ts b/packages/wonder-stuff-i18n/src/plugins/i18n-plugin.ts index ac5977d2..0e7fdde2 100644 --- a/packages/wonder-stuff-i18n/src/plugins/i18n-plugin.ts +++ b/packages/wonder-stuff-i18n/src/plugins/i18n-plugin.ts @@ -143,6 +143,7 @@ export type Assets = { [assetName: string]: Asset; }; +// eslint-disable-next-line import/no-default-export export default class I18nPlugin { options: InternalOptions; diff --git a/packages/wonder-stuff-i18n/src/utils/__tests__/pofile-utils.test.ts b/packages/wonder-stuff-i18n/src/utils/__tests__/pofile-utils.test.ts index d3bbba37..ecdad504 100644 --- a/packages/wonder-stuff-i18n/src/utils/__tests__/pofile-utils.test.ts +++ b/packages/wonder-stuff-i18n/src/utils/__tests__/pofile-utils.test.ts @@ -1,7 +1,7 @@ -import fs from "fs"; -import path from "path"; +import * as fs from "fs"; +import * as path from "path"; -import fglob from "fast-glob"; +import * as fglob from "fast-glob"; import { buildPoItem, @@ -12,6 +12,22 @@ import { } from "../pofile-utils"; import * as I18nUtils from "../i18n-utils"; +jest.mock("fs", () => { + const original = jest.requireActual("fs"); + return { + __esModule: true, + ...original, + }; +}); + +jest.mock("fast-glob", () => { + const original = jest.requireActual("fast-glob"); + return { + __esModule: true, + ...original, + }; +}); + describe("buildPoItem", () => { it("builds a PO item from an extracted string", () => { // Arrange @@ -361,6 +377,7 @@ i18n._("A singular string."); i18n.ngettext("%(num)s singular string.", "%(num)s plural string.", num);`; jest.spyOn(fs, "readFileSync") + .mockImplementation() .mockReturnValueOnce(file1) .mockReturnValueOnce(file2); diff --git a/packages/wonder-stuff-i18n/src/utils/i18n-utils.ts b/packages/wonder-stuff-i18n/src/utils/i18n-utils.ts index 2bc2672d..296f855a 100644 --- a/packages/wonder-stuff-i18n/src/utils/i18n-utils.ts +++ b/packages/wonder-stuff-i18n/src/utils/i18n-utils.ts @@ -22,9 +22,7 @@ export type TranslatedLocaleStrings = { * @param {string} ignoreFile The file to read the glob strings from. * @returns {Array} a list of glob strings to ignore */ -export const getIgnoreGlobs = ( - ignoreFile: string = ".i18nignore", -): Array => { +export const getIgnoreGlobs = (ignoreFile = ".i18nignore"): Array => { try { // Find the ignore file, if it exists // If it doesn't exist then ancesdir throws an exception. diff --git a/packages/wonder-stuff-i18n/src/utils/pofile-utils.ts b/packages/wonder-stuff-i18n/src/utils/pofile-utils.ts index 3f61555a..2ee489ff 100644 --- a/packages/wonder-stuff-i18n/src/utils/pofile-utils.ts +++ b/packages/wonder-stuff-i18n/src/utils/pofile-utils.ts @@ -1,7 +1,7 @@ -import fs from "fs"; -import path from "path"; +import * as fs from "fs"; +import * as path from "path"; -import fglob from "fast-glob"; +import * as fglob from "fast-glob"; import PO from "pofile"; import {extractStrings} from "./extract-i18n"; diff --git a/packages/wonder-stuff-sentry/src/kind-error-data.ts b/packages/wonder-stuff-sentry/src/kind-error-data.ts index 06dd51e7..d2356069 100644 --- a/packages/wonder-stuff-sentry/src/kind-error-data.ts +++ b/packages/wonder-stuff-sentry/src/kind-error-data.ts @@ -20,7 +20,7 @@ type InvalidTags = { }; export class KindErrorData implements SentryIntegration { - static id: string = "KindErrorData"; + static id = "KindErrorData"; name: string = KindErrorData.id; readonly _options: KindErrorDataOptions; diff --git a/packages/wonder-stuff-sentry/src/types.ts b/packages/wonder-stuff-sentry/src/types.ts index fc2bc430..d92c6a4b 100644 --- a/packages/wonder-stuff-sentry/src/types.ts +++ b/packages/wonder-stuff-sentry/src/types.ts @@ -1,8 +1,7 @@ import type {Metadata} from "@khanacademy/wonder-stuff-core"; -namespace Flow { - export type Class = new (...args: any[]) => T; -} +// Copied from https://github.com/Khan/flow-to-typescript-codemod/blob/main/flow.d.ts +type Class = new (...args: any[]) => T; /** * Tags for a Sentry event. @@ -157,7 +156,7 @@ export type SentryEventProcessor = ( export interface SentryHub { getIntegration( - integration: Flow.Class, + integration: Class, ): T | null | undefined; } diff --git a/packages/wonder-stuff-server-google/src/add-app-engine-middleware.ts b/packages/wonder-stuff-server-google/src/add-app-engine-middleware.ts index 9bb239ca..9f016995 100644 --- a/packages/wonder-stuff-server-google/src/add-app-engine-middleware.ts +++ b/packages/wonder-stuff-server-google/src/add-app-engine-middleware.ts @@ -1,5 +1,5 @@ import express from "express"; -import type {Application, Request, Response} from "express"; +import type {Application} from "express"; import {Runtime} from "@khanacademy/wonder-stuff-server"; import type {Logger} from "@khanacademy/wonder-stuff-server"; import * as lw from "@google-cloud/logging-winston"; @@ -8,10 +8,7 @@ import {makeAppEngineRequestIDMiddleware} from "./middleware/make-app-engine-req /** * Apply the middleware that we want to use with Google App Engine (GAE). */ -export async function addAppEngineMiddleware< - TReq extends Request, - TRes extends Response, ->( +export async function addAppEngineMiddleware( app: Application, mode: (typeof Runtime)[keyof typeof Runtime], logger: Logger, diff --git a/packages/wonder-stuff-server-google/src/start-server.ts b/packages/wonder-stuff-server-google/src/start-server.ts index 18f3ba5d..64fdd299 100644 --- a/packages/wonder-stuff-server-google/src/start-server.ts +++ b/packages/wonder-stuff-server-google/src/start-server.ts @@ -1,11 +1,10 @@ import * as http from "http"; -import type {Application, Request, Response} from "express"; +import type {Application} from "express"; import { startServer as startServerCore, Runtime, createLogger, } from "@khanacademy/wonder-stuff-server"; -import type {RequestWithLog} from "@khanacademy/wonder-stuff-server"; import * as lw from "@google-cloud/logging-winston"; import {addAppEngineMiddleware} from "./add-app-engine-middleware"; import {setupIntegrations} from "./setup-integrations"; @@ -19,10 +18,7 @@ import {getDefaultLogMetadata} from "./get-default-log-metadata"; * This takes a server application definition and attaches Goole Cloud * middleware before listening on the appropriate port per the passed options. */ -export async function startServer< - TReq extends RequestWithLog, - TRes extends Response, ->( +export async function startServer( options: ServerOptions, app: Application, ): Promise { @@ -56,7 +52,7 @@ export async function startServer< await setupIntegrations(restOptions.mode, integrations); // Add GAE middleware to the app. - const appWithMiddleware = await addAppEngineMiddleware( + const appWithMiddleware = await addAppEngineMiddleware( app, restOptions.mode, logger, diff --git a/packages/wonder-stuff-server/src/__tests__/create-logger.test.ts b/packages/wonder-stuff-server/src/__tests__/create-logger.test.ts index 4eb20d37..39e55569 100644 --- a/packages/wonder-stuff-server/src/__tests__/create-logger.test.ts +++ b/packages/wonder-stuff-server/src/__tests__/create-logger.test.ts @@ -1,13 +1,17 @@ -import winston from "winston"; +import * as winston from "winston"; import {Errors} from "@khanacademy/wonder-stuff-core"; import * as GetLoggingTransport from "../get-logging-transport"; import {createLogger} from "../create-logger"; -// TODO(somewhatabstract, FEI-4174): Update eslint-plugin-import when they -// have fixed: -// https://github.com/import-js/eslint-plugin-import/issues/2073 -// eslint-disable-next-line import/named import {Runtime} from "../types"; +jest.mock("winston", () => { + const original = jest.requireActual("winston"); + return { + __esModule: true, + ...original, + }; +}); + describe("#createLogger", () => { beforeEach(() => { // We silence winston's console output. @@ -21,6 +25,7 @@ describe("#createLogger", () => { // Arrange const getLoggingTransportMock = jest .spyOn(GetLoggingTransport, "getLoggingTransport") + // @ts-expect-error: mock value is not a valid Transport .mockReturnValue("FAKE_TRANSPORT"); // Act diff --git a/packages/wonder-stuff-server/src/__tests__/get-logging-transport.test.ts b/packages/wonder-stuff-server/src/__tests__/get-logging-transport.test.ts index b8c8c8fa..9d060789 100644 --- a/packages/wonder-stuff-server/src/__tests__/get-logging-transport.test.ts +++ b/packages/wonder-stuff-server/src/__tests__/get-logging-transport.test.ts @@ -1,8 +1,4 @@ -import winston from "winston"; -// TODO(somewhatabstract, FEI-4174): Update eslint-plugin-import when they -// have fixed: -// https://github.com/import-js/eslint-plugin-import/issues/2073 -// eslint-disable-next-line import/named +import * as winston from "winston"; import {Runtime} from "../types"; import {getLoggingTransport} from "../get-logging-transport"; diff --git a/packages/wonder-stuff-server/src/__tests__/get-runtime-mode.test.ts b/packages/wonder-stuff-server/src/__tests__/get-runtime-mode.test.ts index 31d12245..92155c4c 100644 --- a/packages/wonder-stuff-server/src/__tests__/get-runtime-mode.test.ts +++ b/packages/wonder-stuff-server/src/__tests__/get-runtime-mode.test.ts @@ -1,7 +1,3 @@ -// TODO(somewhatabstract, FEI-4174): Update eslint-plugin-import when they -// have fixed: -// https://github.com/import-js/eslint-plugin-import/issues/2073 -// eslint-disable-next-line import/named import {Runtime} from "../types"; import {getRuntimeMode} from "../get-runtime-mode"; diff --git a/packages/wonder-stuff-server/src/__tests__/start-server.test.ts b/packages/wonder-stuff-server/src/__tests__/start-server.test.ts index f52164d1..55fc12c2 100644 --- a/packages/wonder-stuff-server/src/__tests__/start-server.test.ts +++ b/packages/wonder-stuff-server/src/__tests__/start-server.test.ts @@ -2,10 +2,6 @@ import * as Express from "express"; import * as RootLogger from "../root-logger"; import * as DefaultRequestLogging from "../middleware/default-request-logging"; import * as DefaultErrorLogging from "../middleware/default-error-logging"; -// TODO(somewhatabstract, FEI-4174): Update eslint-plugin-import when they -// have fixed: -// https://github.com/import-js/eslint-plugin-import/issues/2073 -// eslint-disable-next-line import/named import {Runtime} from "../types"; import {startServer} from "../start-server"; @@ -204,6 +200,7 @@ describe("#start-server", () => { jest.spyOn( DefaultRequestLogging, "defaultRequestLogging", + // @ts-expect-error: mock is not a valid Logger ).mockReturnValue("FAKE_REQUEST_MIDDLEWARE"); // Act @@ -237,6 +234,7 @@ describe("#start-server", () => { jest.spyOn( DefaultRequestLogging, "defaultRequestLogging", + // @ts-expect-error: mock is not a valid Logger ).mockReturnValue("FAKE_REQUEST_MIDDLEWARE"); // Act @@ -269,6 +267,7 @@ describe("#start-server", () => { }; jest.spyOn(Express, "default").mockImplementation(() => pretendApp); jest.spyOn(DefaultErrorLogging, "defaultErrorLogging").mockReturnValue( + // @ts-expect-error: mock is not a valid Logger "FAKE_ERROR_MIDDLEWARE", ); @@ -301,6 +300,7 @@ describe("#start-server", () => { }; jest.spyOn(Express, "default").mockImplementation(() => pretendApp); jest.spyOn(DefaultErrorLogging, "defaultErrorLogging").mockReturnValue( + // @ts-expect-error: mock is not a valid Logger "FAKE_ERROR_MIDDLEWARE", ); diff --git a/packages/wonder-stuff-server/src/create-logger.ts b/packages/wonder-stuff-server/src/create-logger.ts index 9e9150b5..e3d52c9a 100644 --- a/packages/wonder-stuff-server/src/create-logger.ts +++ b/packages/wonder-stuff-server/src/create-logger.ts @@ -1,6 +1,4 @@ -import winston from "winston"; -// @ts-expect-error [FEI-5011] - TS2305 - Module '"winston"' has no exported member 'NpmLogLevels'. -import type {NpmLogLevels} from "winston"; +import * as winston from "winston"; import {Errors} from "./errors"; import type {LoggingOptions, Logger} from "./types"; @@ -16,8 +14,7 @@ export const createLogger = ({ defaultMetadata, transport, }: LoggingOptions): Logger => { - // @ts-expect-error [FEI-5011] - TS2558 - Expected 0 type arguments, but got 1. - const winstonLogger = winston.createLogger({ + const winstonLogger = winston.createLogger({ level, transports: transport ?? getLoggingTransport(mode, level), format: winston.format((info) => { diff --git a/packages/wonder-stuff-server/src/get-agent-for-url.ts b/packages/wonder-stuff-server/src/get-agent-for-url.ts index 892c4ee7..70ee9a66 100644 --- a/packages/wonder-stuff-server/src/get-agent-for-url.ts +++ b/packages/wonder-stuff-server/src/get-agent-for-url.ts @@ -39,10 +39,12 @@ export const getAgentForURL = (url: URL): HttpAgent | HttpsAgent => { const agentOptions = {keepAlive: true} as const; switch (url.protocol) { case "http:": + // eslint-disable-next-line @typescript-eslint/no-var-requires const http = require("http"); return new http.Agent(agentOptions); case "https:": + // eslint-disable-next-line @typescript-eslint/no-var-requires const https = require("https"); return new https.Agent(agentOptions); diff --git a/packages/wonder-stuff-server/src/get-logging-transport.ts b/packages/wonder-stuff-server/src/get-logging-transport.ts index 28bbcb80..875bc3c7 100644 --- a/packages/wonder-stuff-server/src/get-logging-transport.ts +++ b/packages/wonder-stuff-server/src/get-logging-transport.ts @@ -1,7 +1,6 @@ import stream from "stream"; -import winston from "winston"; -// @ts-expect-error [FEI-5011] - TS2724 - '"winston"' has no exported member named 'Transport'. Did you mean 'transport'? | TS2724 - '"winston"' has no exported member named 'Format'. Did you mean 'format'? -import type {Transport, Format} from "winston"; +import * as winston from "winston"; +import type {transport as Transport, Logform} from "winston"; import {Runtime} from "./types"; import type {LogLevel, Info} from "./types"; @@ -26,8 +25,8 @@ const devFormatter = ({level, message, ...metadata}: Info): string => { */ const getFormatters = ( mode: (typeof Runtime)[keyof typeof Runtime], -): Format => { - const formatters: Array = [ +): Logform.Format => { + const formatters: Array = [ winston.format.splat(), // Allows for %s style substitutions ]; if (mode === Runtime.Development) { @@ -47,6 +46,7 @@ const getFormatters = ( */ export const getLoggingTransport = ( mode: (typeof Runtime)[keyof typeof Runtime], + // eslint-disable-next-line @typescript-eslint/no-unused-vars logLevel: LogLevel, ): Transport => { switch (mode) { @@ -61,6 +61,7 @@ export const getLoggingTransport = ( * If you want to test logging, you can jest.spy on the logger's * log method, or any other of its more specific logging methods. */ + // eslint-disable-next-line @typescript-eslint/no-empty-function const sink = new stream.Writable({write: () => {}}); /** * This is a hack to make our writable stream work diff --git a/packages/wonder-stuff-server/src/get-runtime-mode.ts b/packages/wonder-stuff-server/src/get-runtime-mode.ts index 53c96f0c..d83d4bd0 100644 --- a/packages/wonder-stuff-server/src/get-runtime-mode.ts +++ b/packages/wonder-stuff-server/src/get-runtime-mode.ts @@ -1,7 +1,3 @@ -// TODO(somewhatabstract, FEI-4174): Update eslint-plugin-import when they -// have fixed: -// https://github.com/import-js/eslint-plugin-import/issues/2073 -// eslint-disable-next-line import/named import {Runtime} from "./types"; /** diff --git a/packages/wonder-stuff-server/src/index.ts b/packages/wonder-stuff-server/src/index.ts index 41d4e542..9bf426d6 100644 --- a/packages/wonder-stuff-server/src/index.ts +++ b/packages/wonder-stuff-server/src/index.ts @@ -1,8 +1,4 @@ export type {LogLevel, Logger, ServerOptions, RequestWithLog} from "./types"; -// TODO(somewhatabstract, FEI-4174): Update eslint-plugin-import when they -// have fixed: -// https://github.com/import-js/eslint-plugin-import/issues/2073 -// eslint-disable-next-line import/named export {Runtime} from "./types"; export {Errors} from "./errors"; diff --git a/packages/wonder-stuff-server/src/middleware/default-error-logging.ts b/packages/wonder-stuff-server/src/middleware/default-error-logging.ts index 9b9b9b2b..05053acd 100644 --- a/packages/wonder-stuff-server/src/middleware/default-error-logging.ts +++ b/packages/wonder-stuff-server/src/middleware/default-error-logging.ts @@ -1,18 +1,12 @@ -import expressWinston from "express-winston"; +import * as expressWinston from "express-winston"; -// @ts-expect-error [FEI-5011] - TS2305 - Module '"express"' has no exported member 'Middleware'. -import type {Middleware, Request, Response} from "express"; +import type {ErrorRequestHandler} from "express"; import type {Logger} from "../types"; /** - * Create middleware for reporting errors. + * Create a request handler for reporting errors. */ -export const defaultErrorLogging = < - TReq extends Request, - TRes extends Response, ->( - logger: Logger, -): Middleware => +export const defaultErrorLogging = (logger: Logger): ErrorRequestHandler => /** * Express-winston types aren't parameterized, so we suppress the error. */ diff --git a/packages/wonder-stuff-server/src/middleware/default-request-logging.ts b/packages/wonder-stuff-server/src/middleware/default-request-logging.ts index 1517ebf0..3064e4ba 100644 --- a/packages/wonder-stuff-server/src/middleware/default-request-logging.ts +++ b/packages/wonder-stuff-server/src/middleware/default-request-logging.ts @@ -1,18 +1,12 @@ -import expressWinston from "express-winston"; +import * as expressWinston from "express-winston"; -// @ts-expect-error [FEI-5011] - TS2305 - Module '"express"' has no exported member 'Middleware'. -import type {Middleware, Request, Response} from "express"; +import type {Handler} from "express"; import type {Logger} from "../types"; /** - * Create middleware for tracking requests. + * Create a logger for tracking requests. */ -export const defaultRequestLogging = < - TReq extends Request, - TRes extends Response, ->( - logger: Logger, -): Middleware => +export const defaultRequestLogging = (logger: Logger): Handler => /** * We use express-winston to log requests for us. */ diff --git a/packages/wonder-stuff-server/src/start-server.ts b/packages/wonder-stuff-server/src/start-server.ts index 7424b2c0..4d639340 100644 --- a/packages/wonder-stuff-server/src/start-server.ts +++ b/packages/wonder-stuff-server/src/start-server.ts @@ -3,10 +3,6 @@ import * as net from "net"; import type {Application, Request, Response} from "express"; import express from "express"; import {setRootLogger} from "./root-logger"; -// TODO(somewhatabstract, FEI-4174): Update eslint-plugin-import when they -// have fixed: -// https://github.com/import-js/eslint-plugin-import/issues/2073 -// eslint-disable-next-line import/named import {Runtime} from "./types"; import type {ServerOptions, RequestWithLog} from "./types"; import {Errors} from "./errors"; diff --git a/packages/wonder-stuff-testing/src/jest/internal/unverified-wait.ts b/packages/wonder-stuff-testing/src/jest/internal/unverified-wait.ts index a27c6b06..e007f4d3 100644 --- a/packages/wonder-stuff-testing/src/jest/internal/unverified-wait.ts +++ b/packages/wonder-stuff-testing/src/jest/internal/unverified-wait.ts @@ -2,6 +2,7 @@ export const unverifiedWait = (delay: number, count: number): Promise => new Promise( ( resolve: (result: Promise | undefined) => void, + // eslint-disable-next-line @typescript-eslint/no-unused-vars reject: (error?: any) => void, ) => { // eslint-disable-next-line no-restricted-syntax diff --git a/packages/wonder-stuff-testing/src/jest/internal/verify-real-timers.ts b/packages/wonder-stuff-testing/src/jest/internal/verify-real-timers.ts index 10dd316d..b9fc43ff 100644 --- a/packages/wonder-stuff-testing/src/jest/internal/verify-real-timers.ts +++ b/packages/wonder-stuff-testing/src/jest/internal/verify-real-timers.ts @@ -13,11 +13,12 @@ export const verifyRealTimers = () => { // change this behavior we would silently start just working. // eslint-disable-next-line no-console const oldWarn = console.warn; - console.warn = () => {}; // eslint-disable-line no-console + // eslint-disable-next-line no-console, @typescript-eslint/no-empty-function + console.warn = () => {}; try { const timerCount = jest.getTimerCount(); - // eslint-disable-next-line no-restricted-syntax + // eslint-disable-next-line no-restricted-syntax, @typescript-eslint/no-empty-function const timeoutID = setTimeout(() => {}, 0); const newTimerCount = jest.getTimerCount(); // eslint-disable-next-line no-restricted-syntax diff --git a/yarn.lock b/yarn.lock index fe6c5b95..c92d868f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -509,13 +509,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-syntax-flow@^7.12.1", "@babel/plugin-syntax-flow@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.18.6.tgz#774d825256f2379d06139be0c723c4dd444f3ca1" - integrity sha512-LUbR+KNTBWCUAqRG9ex5Gnzu2IOkt8jRJbHHXFT9q+L9zm7M/QQbEqXyw1n1pohYvOyWC8CjeyjrSaIwiYjK7A== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-import-assertions@^7.20.0": version "7.20.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.20.0.tgz#bb50e0d4bea0957235390641209394e87bdb9cc4" @@ -689,14 +682,6 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.18.6" "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-flow-strip-types@^7.18.6": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.19.0.tgz#e9e8606633287488216028719638cbbb2f2dde8f" - integrity sha512-sgeMlNaQVbCSpgLSKP4ZZKfsJVnFnNQlUSk6gPYzR/q7tzCgQF2t8RBKAP6cKJeZdveei7Q7Jm527xepI8lNLg== - dependencies: - "@babel/helper-plugin-utils" "^7.19.0" - "@babel/plugin-syntax-flow" "^7.18.6" - "@babel/plugin-transform-for-of@^7.18.8": version "7.18.8" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz#6ef8a50b244eb6a0bdbad0c7c61877e4e30097c1" @@ -955,15 +940,6 @@ core-js-compat "^3.25.1" semver "^6.3.0" -"@babel/preset-flow@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/preset-flow/-/preset-flow-7.18.6.tgz#83f7602ba566e72a9918beefafef8ef16d2810cb" - integrity sha512-E7BDhL64W6OUqpuyHnSroLnqyRTcG6ZdOBl1OKI/QK/HJfplqK/S3sq1Cckx7oTodJ5yOXyfw7rEADJ6UjoQDQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-validator-option" "^7.18.6" - "@babel/plugin-transform-flow-strip-types" "^7.18.6" - "@babel/preset-modules@^0.1.5": version "0.1.5" resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.5.tgz#ef939d6e7f268827e1841638dc6ff95515e115d9" @@ -1881,6 +1857,18 @@ hex2dec "^1.0.1" uuid "^8.0.0" +"@pkgr/utils@^2.3.1": + version "2.3.1" + resolved "https://registry.yarnpkg.com/@pkgr/utils/-/utils-2.3.1.tgz#0a9b06ffddee364d6642b3cd562ca76f55b34a03" + integrity sha512-wfzX8kc1PMyUILA+1Z/EqoE4UCXGy0iRGMhPwdfae1+f0OXlLqCk+By+aMzgJBzR9AzS4CDizioG6Ss1gvAFJw== + dependencies: + cross-spawn "^7.0.3" + is-glob "^4.0.3" + open "^8.4.0" + picocolors "^1.0.0" + tiny-glob "^0.2.9" + tslib "^2.4.0" + "@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" @@ -2330,6 +2318,32 @@ dependencies: "@types/yargs-parser" "*" +"@typescript-eslint/eslint-plugin@^5.52.0": + version "5.52.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.52.0.tgz#5fb0d43574c2411f16ea80f5fc335b8eaa7b28a8" + integrity sha512-lHazYdvYVsBokwCdKOppvYJKaJ4S41CgKBcPvyd0xjZNbvQdhn/pnJlGtQksQ/NhInzdaeaSarlBjDXHuclEbg== + dependencies: + "@typescript-eslint/scope-manager" "5.52.0" + "@typescript-eslint/type-utils" "5.52.0" + "@typescript-eslint/utils" "5.52.0" + debug "^4.3.4" + grapheme-splitter "^1.0.4" + ignore "^5.2.0" + natural-compare-lite "^1.4.0" + regexpp "^3.2.0" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/parser@^5.52.0": + version "5.52.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.52.0.tgz#73c136df6c0133f1d7870de7131ccf356f5be5a4" + integrity sha512-e2KiLQOZRo4Y0D/b+3y08i3jsekoSkOYStROYmPUnGMEoA0h+k2qOH5H6tcjIc68WDvGwH+PaOrP1XRzLJ6QlA== + dependencies: + "@typescript-eslint/scope-manager" "5.52.0" + "@typescript-eslint/types" "5.52.0" + "@typescript-eslint/typescript-estree" "5.52.0" + debug "^4.3.4" + "@typescript-eslint/scope-manager@5.44.0": version "5.44.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.44.0.tgz#988c3f34b45b3474eb9ff0674c18309dedfc3e04" @@ -2338,11 +2352,34 @@ "@typescript-eslint/types" "5.44.0" "@typescript-eslint/visitor-keys" "5.44.0" +"@typescript-eslint/scope-manager@5.52.0": + version "5.52.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.52.0.tgz#a993d89a0556ea16811db48eabd7c5b72dcb83d1" + integrity sha512-AR7sxxfBKiNV0FWBSARxM8DmNxrwgnYMPwmpkC1Pl1n+eT8/I2NAUPuwDy/FmDcC6F8pBfmOcaxcxRHspgOBMw== + dependencies: + "@typescript-eslint/types" "5.52.0" + "@typescript-eslint/visitor-keys" "5.52.0" + +"@typescript-eslint/type-utils@5.52.0": + version "5.52.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.52.0.tgz#9fd28cd02e6f21f5109e35496df41893f33167aa" + integrity sha512-tEKuUHfDOv852QGlpPtB3lHOoig5pyFQN/cUiZtpw99D93nEBjexRLre5sQZlkMoHry/lZr8qDAt2oAHLKA6Jw== + dependencies: + "@typescript-eslint/typescript-estree" "5.52.0" + "@typescript-eslint/utils" "5.52.0" + debug "^4.3.4" + tsutils "^3.21.0" + "@typescript-eslint/types@5.44.0": version "5.44.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.44.0.tgz#f3f0b89aaff78f097a2927fe5688c07e786a0241" integrity sha512-Tp+zDnHmGk4qKR1l+Y1rBvpjpm5tGXX339eAlRBDg+kgZkz9Bw+pqi4dyseOZMsGuSH69fYfPJCBKBrbPCxYFQ== +"@typescript-eslint/types@5.52.0": + version "5.52.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.52.0.tgz#19e9abc6afb5bd37a1a9bea877a1a836c0b3241b" + integrity sha512-oV7XU4CHYfBhk78fS7tkum+/Dpgsfi91IIDy7fjCyq2k6KB63M6gMC0YIvy+iABzmXThCRI6xpCEyVObBdWSDQ== + "@typescript-eslint/typescript-estree@5.44.0": version "5.44.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.44.0.tgz#0461b386203e8d383bb1268b1ed1da9bc905b045" @@ -2356,6 +2393,33 @@ semver "^7.3.7" tsutils "^3.21.0" +"@typescript-eslint/typescript-estree@5.52.0": + version "5.52.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.52.0.tgz#6408cb3c2ccc01c03c278cb201cf07e73347dfca" + integrity sha512-WeWnjanyEwt6+fVrSR0MYgEpUAuROxuAH516WPjUblIrClzYJj0kBbjdnbQXLpgAN8qbEuGywiQsXUVDiAoEuQ== + dependencies: + "@typescript-eslint/types" "5.52.0" + "@typescript-eslint/visitor-keys" "5.52.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.52.0": + version "5.52.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.52.0.tgz#b260bb5a8f6b00a0ed51db66bdba4ed5e4845a72" + integrity sha512-As3lChhrbwWQLNk2HC8Ree96hldKIqk98EYvypd3It8Q1f8d5zWyIoaZEp2va5667M4ZyE7X8UUR+azXrFl+NA== + dependencies: + "@types/json-schema" "^7.0.9" + "@types/semver" "^7.3.12" + "@typescript-eslint/scope-manager" "5.52.0" + "@typescript-eslint/types" "5.52.0" + "@typescript-eslint/typescript-estree" "5.52.0" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + semver "^7.3.7" + "@typescript-eslint/utils@^5.10.0": version "5.44.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.44.0.tgz#d733da4d79d6c30f1a68b531cdda1e0c1f00d52d" @@ -2378,6 +2442,14 @@ "@typescript-eslint/types" "5.44.0" eslint-visitor-keys "^3.3.0" +"@typescript-eslint/visitor-keys@5.52.0": + version "5.52.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.52.0.tgz#e38c971259f44f80cfe49d97dbffa38e3e75030f" + integrity sha512-qMwpw6SU5VHCPr99y274xhbm+PRViK/NATY6qzt+Et7+mThGuFSl/ompj2/hrBlRP/kq+BFdgagnOSgw9TB0eA== + dependencies: + "@typescript-eslint/types" "5.52.0" + eslint-visitor-keys "^3.3.0" + abbrev@1, abbrev@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" @@ -2718,13 +2790,6 @@ babel-plugin-polyfill-regenerator@^0.4.1: dependencies: "@babel/helper-define-polyfill-provider" "^0.3.3" -babel-plugin-transform-flow-enums@^0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-enums/-/babel-plugin-transform-flow-enums-0.0.2.tgz#d1d0cc9bdc799c850ca110d0ddc9f21b9ec3ef25" - integrity sha512-g4aaCrDDOsWjbm0PUUeVnkcVd6AKJsVc/MbnPhEotEpkeJQP6b8nzewohQi7+QS8UyPehOhGWn0nOwjvWpmMvQ== - dependencies: - "@babel/plugin-syntax-flow" "^7.12.1" - babel-preset-current-node-syntax@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" @@ -3343,6 +3408,11 @@ defaults@^1.0.3: dependencies: clone "^1.0.2" +define-lazy-prop@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" + integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== + define-properties@^1.1.3, define-properties@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" @@ -3519,6 +3589,14 @@ end-of-stream@^1.1.0, end-of-stream@^1.4.1: dependencies: once "^1.4.0" +enhanced-resolve@^5.10.0: + version "5.12.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz#300e1c90228f5b570c4d35babf263f6da7155634" + integrity sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + enquirer@^2.3.0: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" @@ -3647,6 +3725,19 @@ eslint-import-resolver-node@^0.3.7: is-core-module "^2.11.0" resolve "^1.22.1" +eslint-import-resolver-typescript@^3.5.3: + version "3.5.3" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.5.3.tgz#db5ed9e906651b7a59dd84870aaef0e78c663a05" + integrity sha512-njRcKYBc3isE42LaTcJNVANR3R99H9bAxBDMNDr2W7yq5gYPxbU3MkdhsQukxZ/Xg9C2vcyLlDsbKfRDg0QvCQ== + dependencies: + debug "^4.3.4" + enhanced-resolve "^5.10.0" + get-tsconfig "^4.2.0" + globby "^13.1.2" + is-core-module "^2.10.0" + is-glob "^4.0.3" + synckit "^0.8.4" + eslint-module-utils@^2.1.1, eslint-module-utils@^2.7.4: version "2.7.4" resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz#4f3e41116aaf13a20792261e61d3a2e7e0583974" @@ -3669,22 +3760,6 @@ eslint-plugin-eslint-comments@^3.2.0: escape-string-regexp "^1.0.5" ignore "^5.0.5" -eslint-plugin-flowtype@^8.0.3: - version "8.0.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-8.0.3.tgz#e1557e37118f24734aa3122e7536a038d34a4912" - integrity sha512-dX8l6qUL6O+fYPtpNRideCFSpmWOUVx5QcaGLVqe/vlDiBSe4vYljDWDETwnyFzpl7By/WVIu6rcrniCgH9BqQ== - dependencies: - lodash "^4.17.21" - string-natural-compare "^3.0.1" - -eslint-plugin-ft-flow@^2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-ft-flow/-/eslint-plugin-ft-flow-2.0.3.tgz#3b3c113c41902bcbacf0e22b536debcfc3c819e8" - integrity sha512-Vbsd/b+LYA99jUbsL6viEUWShFaYQt2YQs3QN3f+aeszOhh2sgdcU0mjzDyD4yyBvMc8qy2uwvBBWfMzEX06tg== - dependencies: - lodash "^4.17.21" - string-natural-compare "^3.0.1" - eslint-plugin-import@^2.27.5: version "2.27.5" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz#876a6d03f52608a3e5bb439c2550588e51dd6c65" @@ -4045,7 +4120,7 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== -fast-glob@^3.2.12, fast-glob@^3.2.9: +fast-glob@^3.2.11, fast-glob@^3.2.12, fast-glob@^3.2.9: version "3.2.12" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== @@ -4169,16 +4244,6 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== -flow-bin@^0.199.1: - version "0.199.1" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.199.1.tgz#678eac2303fa898227f4d103264b6ce49f4430c1" - integrity sha512-Ic0Mp9iZ2exbH0mNj/XhzUWPZa9JylHb6uQARZnnYCTRwumOpjNOP0qwyRTltWrbCpfHjnWngNO9VLaVKHz2aQ== - -flow-enums-runtime@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/flow-enums-runtime/-/flow-enums-runtime-0.0.6.tgz#5bb0cd1b0a3e471330f4d109039b7eba5cb3e787" - integrity sha512-3PYnM29RFXwvAN6Pc/scUfkI7RwhQ/xqyLUyPNlXUp9S40zI8nup9tUSrTLSVnWGBN38FNiGWbwZOB6uR4OGdw== - flowgen@^1.21.0: version "1.21.0" resolved "https://registry.yarnpkg.com/flowgen/-/flowgen-1.21.0.tgz#f7ecb693892c4bd069492dbf77db561bbb451aa9" @@ -4363,6 +4428,11 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" +get-tsconfig@^4.2.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.4.0.tgz#64eee64596668a81b8fce18403f94f245ee0d4e5" + integrity sha512-0Gdjo/9+FzsYhXCEFueo2aY1z1tpXrxWZzP7k8ul9qt1U5o8rYJwTJYmaeHdrVosYIVYkOy2iwCJ9FdpocJhPQ== + glob-parent@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -4412,6 +4482,11 @@ globals@^13.19.0: dependencies: type-fest "^0.20.2" +globalyzer@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/globalyzer/-/globalyzer-0.1.0.tgz#cb76da79555669a1519d5a8edf093afaa0bf1465" + integrity sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q== + globby@^11.0.0, globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" @@ -4424,6 +4499,17 @@ globby@^11.0.0, globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" +globby@^13.1.2: + version "13.1.3" + resolved "https://registry.yarnpkg.com/globby/-/globby-13.1.3.tgz#f62baf5720bcb2c1330c8d4ef222ee12318563ff" + integrity sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw== + dependencies: + dir-glob "^3.0.1" + fast-glob "^3.2.11" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^4.0.0" + globby@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/globby/-/globby-7.1.1.tgz#fb2ccff9401f8600945dfada97440cca972b8680" @@ -4436,6 +4522,11 @@ globby@^7.1.1: pify "^3.0.0" slash "^1.0.0" +globrex@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/globrex/-/globrex-0.1.2.tgz#dd5d9ec826232730cd6793a5e33a9302985e6098" + integrity sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg== + google-auth-library@^7.0.0, google-auth-library@^7.14.0: version "7.14.1" resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-7.14.1.tgz#e3483034162f24cc71b95c8a55a210008826213c" @@ -4484,7 +4575,7 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -graceful-fs@^4.1.2, graceful-fs@^4.1.5, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.6, graceful-fs@^4.2.9: +graceful-fs@^4.1.2, graceful-fs@^4.1.5, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: version "4.2.10" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== @@ -4809,7 +4900,7 @@ is-ci@^3.0.1: dependencies: ci-info "^3.2.0" -is-core-module@^2.11.0, is-core-module@^2.9.0: +is-core-module@^2.10.0, is-core-module@^2.11.0, is-core-module@^2.9.0: version "2.11.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== @@ -4823,6 +4914,11 @@ is-date-object@^1.0.1, is-date-object@^1.0.5: dependencies: has-tostringtag "^1.0.0" +is-docker@^2.0.0, is-docker@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" + integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -4979,6 +5075,13 @@ is-windows@^1.0.0: resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== +is-wsl@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" + integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== + dependencies: + is-docker "^2.0.0" + is@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/is/-/is-3.3.0.tgz#61cff6dd3c4193db94a3d62582072b44e5645d79" @@ -6028,6 +6131,11 @@ nan@^2.13.2, nan@^2.14.0: resolved "https://registry.yarnpkg.com/nan/-/nan-2.17.0.tgz#c0150a2368a182f033e9aa5195ec76ea41a199cb" integrity sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ== +natural-compare-lite@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" + integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -6293,6 +6401,15 @@ onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" +open@^8.4.0: + version "8.4.1" + resolved "https://registry.yarnpkg.com/open/-/open-8.4.1.tgz#2ab3754c07f5d1f99a7a8d6a82737c95e3101cff" + integrity sha512-/4b7qZNhv6Uhd7jjnREh1NjnPxlTq+XNWPG88Ydkj5AILcA5m3ajvcg57pB24EQjKv0dK62XnDqk9c/hkIG5Kg== + dependencies: + define-lazy-prop "^2.0.0" + is-docker "^2.1.1" + is-wsl "^2.2.0" + optionator@^0.9.1: version "0.9.1" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" @@ -7198,6 +7315,11 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== +slash@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7" + integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== + smart-buffer@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" @@ -7376,11 +7498,6 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -string-natural-compare@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4" - integrity sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw== - "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -7494,6 +7611,19 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +synckit@^0.8.4: + version "0.8.5" + resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.5.tgz#b7f4358f9bb559437f9f167eb6bc46b3c9818fa3" + integrity sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q== + dependencies: + "@pkgr/utils" "^2.3.1" + tslib "^2.5.0" + +tapable@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== + tar@^6.0.2, tar@^6.1.0, tar@^6.1.11: version "6.1.12" resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.12.tgz#3b742fb05669b55671fb769ab67a7791ea1a62e6" @@ -7568,6 +7698,14 @@ through@2: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== +tiny-glob@^0.2.9: + version "0.2.9" + resolved "https://registry.yarnpkg.com/tiny-glob/-/tiny-glob-0.2.9.tgz#2212d441ac17928033b110f8b3640683129d31e2" + integrity sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg== + dependencies: + globalyzer "0.1.0" + globrex "^0.1.2" + tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -7627,7 +7765,7 @@ tslib@^1.8.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.5.0: +tslib@^2.4.0, tslib@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==