From 836ee0caa0017881c73160cdac691398b9fe0722 Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Thu, 22 Aug 2024 09:09:05 -0700 Subject: [PATCH 01/16] update eslint-config to work as esm modules --- eslint.config.js | 3 + packages/eslint-config/index.js | 77 ++++++++++++++--- packages/eslint-config/lib/ignores.js | 37 ++++++++ packages/eslint-config/lib/index.js | 10 +-- packages/eslint-config/lib/overrides.js | 85 ------------------- packages/eslint-config/lib/patch-eslint6.js | 46 ---------- packages/eslint-config/lib/rules/constants.js | 4 +- packages/eslint-config/lib/rules/index.js | 12 ++- .../eslint-config/lib/rules/javascript.js | 6 +- packages/eslint-config/lib/rules/jest.js | 4 +- packages/eslint-config/lib/rules/react.js | 10 +-- .../eslint-config/lib/rules/typescript.js | 8 +- packages/eslint-config/package.json | 10 +-- 13 files changed, 128 insertions(+), 184 deletions(-) create mode 100644 eslint.config.js create mode 100644 packages/eslint-config/lib/ignores.js delete mode 100644 packages/eslint-config/lib/overrides.js delete mode 100644 packages/eslint-config/lib/patch-eslint6.js diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 00000000000..78b745a146f --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,3 @@ +import eslintConfig from '@terascope/eslint-config'; + +export default eslintConfig diff --git a/packages/eslint-config/index.js b/packages/eslint-config/index.js index 5f95233afb3..d172606e09b 100644 --- a/packages/eslint-config/index.js +++ b/packages/eslint-config/index.js @@ -1,18 +1,67 @@ -'use strict'; +import js from "@eslint/js"; +import globals from "globals"; +import { rules, ignores } from './lib/index.js'; -const { rules, overrides } = require('./lib'); -module.exports = { - extends: ['airbnb-base'], - parserOptions: { - ecmaVersion: 'latest', - sourceType: 'script', +/** @type {import('eslint').Linter.FlatConfig[]} */ +const eslintConfig = [ + { + // In your eslint.config.js file, if an ignores key is used without any other + // keys in the configuration object, then the patterns act as global ignores. + ignores }, - env: { - node: true, - jasmine: true, - jest: true, + { + files: ['**/*.{js,mjs,cjs}'], + rules: rules.javascript }, - rules: rules.javascript, - overrides, -}; + { + // overrides just for react files + files: ['*.jsx', '*.tsx'], + ignores, + plugins: ['@typescript-eslint', '@typescript-eslint/recommended', 'react-hooks/recommended', 'airbnb'], + parser: '@typescript-eslint/parser', + env: { + jest: true, + jasmine: false, + node: false, + browser: true, + }, + languageOptions: { + parserOptions: { + ecmaFeatures: { + jsx: true, + }, + }, + }, + rules: rules.react, + }, + { + // overrides just for typescript files + files: ['*.ts'], + ignores, + plugins: ['@typescript-eslint', '@typescript-eslint/recommended', 'airbnb-base'], + parser: '@typescript-eslint/parser', + rules: rules.typescript, + }, + { + // overrides just for spec files + files: ['*-spec.js', '*-spec.ts', '*-spec.tsx', '*-spec.jsx'], + plugins: ['jest'], + env: { + 'jest/globals': true + }, + rules: rules.jest, + }, + js.configs.recommended, + { + languageOptions: { + globals: { + ...globals.browser, + ...globals.node, + ...globals.jest + } + } + } +] + +export default eslintConfig; diff --git a/packages/eslint-config/lib/ignores.js b/packages/eslint-config/lib/ignores.js new file mode 100644 index 00000000000..a05a20a4238 --- /dev/null +++ b/packages/eslint-config/lib/ignores.js @@ -0,0 +1,37 @@ +export default [ + '.DS_Store', + 'logs', + '*.log', + '.idea', + 'pids', + '*.pid', + '*.seed', + 'lib-cov', + '.coverage/', + '.nyc_output', + '.grunt', + '.lock-wscript', + 'build/Release', + 'builds', + '.cache/', + '.eslintcache/', + '.yarn-cache/', + '.yarn/**', + 'node_modules/', + '.vscode/', + 'assets/**', + 'examples/assets/**', + 'packages/teraslice/assets/**', + 'autoload', + 'e2e/.config/', + 'e2e/.assets/', + 'e2e/dist/', + 'packages/**/dist', + 'packages/**/build', + 'packages/teraslice-cli/generator-templates/**', + 'packages/generator-teraslice/generators/*/templates/**/*.ts', + 'packages/xlucene-parser/src/peg-engine.ts', + 'website/', + 'docs/', + '**/*.d.ts', +] diff --git a/packages/eslint-config/lib/index.js b/packages/eslint-config/lib/index.js index a9f4164628d..f0445405e80 100644 --- a/packages/eslint-config/lib/index.js +++ b/packages/eslint-config/lib/index.js @@ -1,9 +1,7 @@ -'use strict'; +import rules from './rules/index.js'; +import ignores from './ignores.js'; -const rules = require('./rules'); -const overrides = require('./overrides'); - -module.exports = { +export { rules, - overrides, + ignores }; diff --git a/packages/eslint-config/lib/overrides.js b/packages/eslint-config/lib/overrides.js deleted file mode 100644 index ae75b2f09b1..00000000000 --- a/packages/eslint-config/lib/overrides.js +++ /dev/null @@ -1,85 +0,0 @@ -'use strict'; - -const rules = require('./rules'); - -let hasTypescript; -try { - require.resolve('typescript'); - hasTypescript = true; -} catch (err) { - hasTypescript = false; -} - -const overrides = []; - -if (hasTypescript) { - overrides.push( - { - files: ['*.mjs'], - extends: ['airbnb-base'], - parserOptions: { - ecmaVersion: 9, - sourceType: 'module', - ecmaFeatures: { - modules: true, - }, - }, - env: { - node: true, - jasmine: true, - jest: true, - }, - rules: rules.javascript, - }, - { - // overrides just for react files - files: ['*.jsx', '*.tsx'], - extends: ['plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended', 'airbnb'], - plugins: ['@typescript-eslint'], - parser: '@typescript-eslint/parser', - env: { - jest: true, - jasmine: false, - node: false, - browser: true, - }, - parserOptions: { - ecmaVersion: 9, - sourceType: 'module', - ecmaFeatures: { - modules: true, - jsx: true, - }, - useJSXTextNode: true, - }, - rules: rules.react, - }, - { - // overrides just for typescript files - files: ['*.ts'], - extends: ['plugin:@typescript-eslint/recommended', 'airbnb-base'], - plugins: ['@typescript-eslint'], - parser: '@typescript-eslint/parser', - parserOptions: { - ecmaVersion: 9, - sourceType: 'module', - ecmaFeatures: { - modules: true, - jsx: false, - }, - }, - rules: rules.typescript, - }, - { - // overrides just for spec files - files: ['*-spec.js', '*-spec.ts', '*-spec.tsx', '*-spec.jsx'], - plugins: ['jest'], - env: { - 'jest/globals': true - }, - rules: rules.jest, - }, - ); -} - -module.exports = overrides; diff --git a/packages/eslint-config/lib/patch-eslint6.js b/packages/eslint-config/lib/patch-eslint6.js deleted file mode 100644 index 1b7fa89acd6..00000000000 --- a/packages/eslint-config/lib/patch-eslint6.js +++ /dev/null @@ -1,46 +0,0 @@ -/* eslint-disable */ - -// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. -// See LICENSE in the project root for license information. - -// This is a workaround for https://github.com/eslint/eslint/issues/3458 -// -// To correct how ESLint searches for plugin packages, add this line to the top of your project's .eslintrc.js file: -// -// require("@microsoft/eslint-config-scalable-ts/patch-eslint"); -// -const path = require('path'); - -let currentModule = module; -while (!/[\\/]eslint[\\/]lib[\\/]cli-engine[\\/]config-array-factory\.js/i.test(currentModule.filename)) { - if (!currentModule.parent) { - // This was tested with ESLint 6.1.0; other versions may not work - throw new Error('Failed to patch ESLint because the calling module was not recognized'); - } - currentModule = currentModule.parent; -} -const eslintFolder = path.join(path.dirname(currentModule.filename), '../..'); - -const configArrayFactoryPath = path.join(eslintFolder, "lib/cli-engine/config-array-factory"); -const ConfigArrayFactory = require(configArrayFactoryPath).ConfigArrayFactory; - -if (!ConfigArrayFactory.__patched) { - ConfigArrayFactory.__patched = true; - - const moduleResolverPath = path.join(eslintFolder, "lib/shared/relative-module-resolver"); - const ModuleResolver = require(moduleResolverPath); - - const originalLoadPlugin = ConfigArrayFactory.prototype._loadPlugin; - ConfigArrayFactory.prototype._loadPlugin = function(name, importerPath, importerName) { - const originalResolve = ModuleResolver.resolve; - try { - ModuleResolver.resolve = function (moduleName, relativeToPath) { - // resolve using importerPath instead of relativeToPath - return originalResolve.call(this, moduleName, importerPath); - }; - return originalLoadPlugin.apply(this, arguments); - } finally { - ModuleResolver.resolve = originalResolve; - } - } -} diff --git a/packages/eslint-config/lib/rules/constants.js b/packages/eslint-config/lib/rules/constants.js index 306f6c9f65d..92787be0c4b 100644 --- a/packages/eslint-config/lib/rules/constants.js +++ b/packages/eslint-config/lib/rules/constants.js @@ -1,7 +1,5 @@ -'use strict'; - const INDENT = 4; -module.exports = { +export { INDENT }; diff --git a/packages/eslint-config/lib/rules/index.js b/packages/eslint-config/lib/rules/index.js index f5888c29e49..588fe34f366 100644 --- a/packages/eslint-config/lib/rules/index.js +++ b/packages/eslint-config/lib/rules/index.js @@ -1,11 +1,9 @@ -'use strict'; +import javascriptRules from './javascript.js'; +import typescriptRules from './typescript.js'; +import reactRules from './react.js'; +import jestRules from './jest.js'; -const javascriptRules = require('./javascript'); -const typescriptRules = require('./typescript'); -const reactRules = require('./react'); -const jestRules = require('./jest'); - -module.exports = { +export default { javascript: javascriptRules, typescript: typescriptRules, react: reactRules, diff --git a/packages/eslint-config/lib/rules/javascript.js b/packages/eslint-config/lib/rules/javascript.js index ac18bd2abbf..d42c1dfec71 100644 --- a/packages/eslint-config/lib/rules/javascript.js +++ b/packages/eslint-config/lib/rules/javascript.js @@ -1,8 +1,6 @@ -'use strict'; +import { INDENT } from './constants.js'; -const { INDENT } = require('./constants'); - -module.exports = { +export default { // airbnb overrides indent: ['error', INDENT], 'max-len': ['error', { diff --git a/packages/eslint-config/lib/rules/jest.js b/packages/eslint-config/lib/rules/jest.js index 87ce8e0d4a8..efc7e4dd3aa 100644 --- a/packages/eslint-config/lib/rules/jest.js +++ b/packages/eslint-config/lib/rules/jest.js @@ -1,6 +1,4 @@ -'use strict'; - -module.exports = { +export default { 'jest/no-commented-out-tests': 'warn', 'jest/no-disabled-tests': 'warn', 'jest/no-focused-tests': 'warn', diff --git a/packages/eslint-config/lib/rules/react.js b/packages/eslint-config/lib/rules/react.js index efdbe7c5e3b..2d42538c93a 100644 --- a/packages/eslint-config/lib/rules/react.js +++ b/packages/eslint-config/lib/rules/react.js @@ -1,10 +1,8 @@ -'use strict'; +import { INDENT } from './constants.js'; +import tsRules from './typescript.js'; -const { INDENT } = require('./constants'); -const tsRules = require('./typescript'); - -module.exports = Object.assign({}, tsRules, { - // overides +export default Object.assign({}, tsRules, { + // overrides 'no-console': ['error', { allow: ['warn', 'error', 'debug'] }], // react rules 'react/require-default-props': 'off', diff --git a/packages/eslint-config/lib/rules/typescript.js b/packages/eslint-config/lib/rules/typescript.js index 72a0b0c0fb9..e5f2a7440f3 100644 --- a/packages/eslint-config/lib/rules/typescript.js +++ b/packages/eslint-config/lib/rules/typescript.js @@ -1,9 +1,7 @@ -'use strict'; +import { INDENT } from './constants.js'; +import jsRules from './javascript.js'; -const { INDENT } = require('./constants'); -const jsRules = require('./javascript'); - -module.exports = Object.assign({}, jsRules, { +export default Object.assign({}, jsRules, { // typescript preferences '@typescript-eslint/no-object-literal-type-assertion': 'off', '@typescript-eslint/no-explicit-any': 'off', diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index acc3d020582..364a7ed7044 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -10,7 +10,7 @@ "repository": "git@github.com:terascope/teraslice.git", "license": "MIT", "author": "Terascope, LLC ", - "type": "commonjs", + "type": "module", "main": "index.js", "scripts": { "test": "ts-scripts test . --", @@ -23,9 +23,9 @@ "eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-import": "~2.29.1", - "eslint-plugin-jest": "^27.6.3", - "eslint-plugin-jsx-a11y": "^6.8.0", - "eslint-plugin-react": "^7.34.1", + "eslint-plugin-jest": "^28.8.0", + "eslint-plugin-jsx-a11y": "^6.9.0", + "eslint-plugin-react": "^7.35.0", "eslint-plugin-react-hooks": "^4.4.0" }, "peerDependencies": { @@ -41,6 +41,6 @@ }, "terascope": { "enableTypedoc": false, - "testSuite": "unit-esm" + "testSuite": "unit-esm" } } From 3596cd433c2211de12eb8c26a38d25ad8b462b46 Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Fri, 23 Aug 2024 09:05:07 -0700 Subject: [PATCH 02/16] remove eslintrc.json, consolidate tsconfigs --- .eslintignore | 34 -- .eslintrc | 8 - .../{yarn-1.22.19.js => yarn-1.22.19.cjs} | 0 .yarnrc | 2 +- e2e/jest.config.js | 2 +- .../example-asset/asset/example/processor.js | 8 +- .../k8s/example-asset/asset/example/schema.js | 8 +- examples/k8s/example-asset/asset/index.js | 10 +- .../ops/processors/summarize/processor.js | 8 +- examples/ops/processors/summarize/schema.js | 8 +- jest.config.base.js | 16 +- jest.config.js | 16 +- package.json | 10 +- packages/data-mate/.eslintrc.json | 14 - packages/data-mate/tsconfig.json | 2 - packages/data-types/.eslintrc.json | 14 - packages/data-types/tsconfig.json | 2 - packages/docker-compose-js/.eslintrc.json | 14 - packages/docker-compose-js/tsconfig.json | 2 - packages/elasticsearch-api/.eslintrc.json | 14 - packages/elasticsearch-store/.eslintrc.json | 14 - packages/elasticsearch-store/tsconfig.json | 2 - packages/job-components/.eslintrc.json | 14 - packages/job-components/tsconfig.json | 3 - packages/scripts/.eslintrc.json | 14 - packages/scripts/tsconfig.json | 2 - packages/terafoundation/.eslintrc.json | 14 - packages/terafoundation/tsconfig.json | 3 - packages/teraslice-cli/.eslintrc.json | 14 - .../teraslice-cli/src/helpers/asset-src.ts | 13 +- packages/teraslice-cli/tsconfig.json | 3 - packages/teraslice-client-js/.eslintrc.json | 14 - packages/teraslice-client-js/tsconfig.json | 2 - packages/teraslice-messaging/.eslintrc.json | 14 - packages/teraslice-messaging/tsconfig.json | 2 - .../teraslice-state-storage/.eslintrc.json | 14 - .../teraslice-state-storage/tsconfig.json | 2 - .../teraslice-test-harness/.eslintrc.json | 14 - packages/teraslice-test-harness/tsconfig.json | 2 - packages/teraslice/.eslintrc.json | 14 - packages/teraslice/tsconfig.json | 2 - packages/ts-transforms/.eslintrc.json | 14 - packages/ts-transforms/tsconfig.json | 2 - packages/types/.eslintrc | 14 - packages/types/tsconfig.json | 2 - packages/utils/.eslintrc.json | 14 - packages/utils/tsconfig.json | 2 - packages/xlucene-parser/.eslintrc.json | 14 - packages/xlucene-parser/tsconfig.json | 2 - packages/xlucene-translator/.eslintrc.json | 14 - packages/xlucene-translator/tsconfig.json | 2 - packages/xpressions/.eslintrc.json | 14 - packages/xpressions/tsconfig.json | 2 - service.js | 2 +- tsconfig.json | 4 +- yarn.lock | 502 +++++++++--------- 56 files changed, 306 insertions(+), 666 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc rename .yarn/releases/{yarn-1.22.19.js => yarn-1.22.19.cjs} (100%) delete mode 100644 packages/data-mate/.eslintrc.json delete mode 100644 packages/data-types/.eslintrc.json delete mode 100644 packages/docker-compose-js/.eslintrc.json delete mode 100644 packages/elasticsearch-api/.eslintrc.json delete mode 100644 packages/elasticsearch-store/.eslintrc.json delete mode 100644 packages/job-components/.eslintrc.json delete mode 100644 packages/scripts/.eslintrc.json delete mode 100644 packages/terafoundation/.eslintrc.json delete mode 100644 packages/teraslice-cli/.eslintrc.json delete mode 100644 packages/teraslice-client-js/.eslintrc.json delete mode 100644 packages/teraslice-messaging/.eslintrc.json delete mode 100644 packages/teraslice-state-storage/.eslintrc.json delete mode 100644 packages/teraslice-test-harness/.eslintrc.json delete mode 100644 packages/teraslice/.eslintrc.json delete mode 100644 packages/ts-transforms/.eslintrc.json delete mode 100644 packages/types/.eslintrc delete mode 100644 packages/utils/.eslintrc.json delete mode 100644 packages/xlucene-parser/.eslintrc.json delete mode 100644 packages/xlucene-translator/.eslintrc.json delete mode 100644 packages/xpressions/.eslintrc.json diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index d7dbd7db0eb..00000000000 --- a/.eslintignore +++ /dev/null @@ -1,34 +0,0 @@ -.DS_Store -logs -*.log -.idea -pids -*.pid -*.seed -lib-cov -coverage -.nyc_output -.grunt -.lock-wscript -build/Release -builds -.cache -.eslintcache -.yarn-cache -node_modules -.vscode -/assets -/examples/assets/ -/packages/teraslice/assets -autoload -e2e/.config -e2e/dist -/packages/*/dist -/packages/*/build -/packages/teraslice-cli/generator-templates -/packages/generator-teraslice/generators/*/templates/**/*.ts -/packages/xlucene-parser/src/peg-engine.ts - -website -docs -**/*.d.ts diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index c8258f9951e..00000000000 --- a/.eslintrc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "@terascope", - "rules": { - "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/no-duplicate-enum-values": "warn" - }, - "ignorePatterns":[] -} diff --git a/.yarn/releases/yarn-1.22.19.js b/.yarn/releases/yarn-1.22.19.cjs similarity index 100% rename from .yarn/releases/yarn-1.22.19.js rename to .yarn/releases/yarn-1.22.19.cjs diff --git a/.yarnrc b/.yarnrc index 15ed9543330..e3fd5338e23 100644 --- a/.yarnrc +++ b/.yarnrc @@ -6,4 +6,4 @@ lastUpdateCheck 1687468484367 prefer-offline true progress false workspaces-experimental true -yarn-path ".yarn/releases/yarn-1.22.19.js" +yarn-path ".yarn/releases/yarn-1.22.19.cjs" diff --git a/e2e/jest.config.js b/e2e/jest.config.js index 47e7dfd427a..10f1291099b 100644 --- a/e2e/jest.config.js +++ b/e2e/jest.config.js @@ -1,6 +1,6 @@ -/* eslint-disable import/no-import-module-exports */ import { fileURLToPath } from 'node:url'; import path from 'node:path'; +import URL from 'node:url'; const dirPath = fileURLToPath(new URL('.', import.meta.url)); const configModulePath = path.join(dirPath, '../jest.config.base.js'); diff --git a/examples/k8s/example-asset/asset/example/processor.js b/examples/k8s/example-asset/asset/example/processor.js index 0766ae54c49..823c411d8a1 100644 --- a/examples/k8s/example-asset/asset/example/processor.js +++ b/examples/k8s/example-asset/asset/example/processor.js @@ -1,8 +1,6 @@ -'use strict'; +import { BatchProcessor } from '@terascope/job-components'; -const { BatchProcessor } = require('@terascope/job-components'); - -class Example extends BatchProcessor { +export default class Example extends BatchProcessor { onBatch(dataArray) { // example code, processor code goes here dataArray.forEach((doc) => { @@ -11,5 +9,3 @@ class Example extends BatchProcessor { return dataArray; } } - -module.exports = Example; diff --git a/examples/k8s/example-asset/asset/example/schema.js b/examples/k8s/example-asset/asset/example/schema.js index daff0533192..bdac0e1f901 100644 --- a/examples/k8s/example-asset/asset/example/schema.js +++ b/examples/k8s/example-asset/asset/example/schema.js @@ -1,8 +1,6 @@ -'use strict'; +import { ConvictSchema } from '@terascope/job-components'; -const { ConvictSchema } = require('@terascope/job-components'); - -class Schema extends ConvictSchema { +export default class Schema extends ConvictSchema { build() { return { type: { @@ -13,5 +11,3 @@ class Schema extends ConvictSchema { }; } } - -module.exports = Schema; diff --git a/examples/k8s/example-asset/asset/index.js b/examples/k8s/example-asset/asset/index.js index c6c6f744a1f..bee4d70b5df 100644 --- a/examples/k8s/example-asset/asset/index.js +++ b/examples/k8s/example-asset/asset/index.js @@ -1,15 +1,11 @@ -'use strict'; - -/* eslint-disable */ - // NOTE: This code is auto-generated by `teraslice-cli assets init --registry` // any manual changes will be lost next time this gets auto-generated. -module.exports = { +export default { ASSETS: { example: { Processor: require('./example/processor.js'), Schema: require('./example/schema.js'), - }, - } + }, + } }; diff --git a/examples/ops/processors/summarize/processor.js b/examples/ops/processors/summarize/processor.js index 8871bdbd87b..21c4f1541cd 100644 --- a/examples/ops/processors/summarize/processor.js +++ b/examples/ops/processors/summarize/processor.js @@ -1,8 +1,6 @@ -'use strict'; +import { BatchProcessor } from '@terascope/job-components'; -const { BatchProcessor } = require('@terascope/job-components'); - -class Summarize extends BatchProcessor { +export default class Summarize extends BatchProcessor { async initialize() { this.logger.debug('summarizing...'); } @@ -51,5 +49,3 @@ class Summarize extends BatchProcessor { } } } - -module.exports = Summarize; diff --git a/examples/ops/processors/summarize/schema.js b/examples/ops/processors/summarize/schema.js index e2871066ecc..ac3bd997772 100644 --- a/examples/ops/processors/summarize/schema.js +++ b/examples/ops/processors/summarize/schema.js @@ -1,11 +1,7 @@ -'use strict'; +import { ConvictSchema } from '@terascope/job-components'; -const { ConvictSchema } = require('@terascope/job-components'); - -class Schema extends ConvictSchema { +export default class Schema extends ConvictSchema { build() { return {}; } } - -module.exports = Schema; diff --git a/jest.config.base.js b/jest.config.base.js index 99810358222..9804366e85c 100644 --- a/jest.config.base.js +++ b/jest.config.base.js @@ -1,18 +1,18 @@ -'use strict'; +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { isCI } from '@terascope/utils'; -const fs = require('fs'); -const path = require('path'); +const dirname = path.dirname(fileURLToPath(import.meta.url)); -const isCI = process.env.CI === 'true'; - -module.exports = (projectDir) => { +export default (projectDir) => { let parentFolder; let workspaceName; let packageRoot; let rootDir; const name = path.basename(projectDir); - const runInDir = process.cwd() !== __dirname; + const runInDir = process.cwd() !== dirname; if (name === 'e2e') { parentFolder = name; @@ -80,7 +80,7 @@ module.exports = (projectDir) => { } config.globals = { - availableExtensions: ['.js', '.ts', '.mjs'] + availableExtensions: ['.js', '.ts', '.mjs', 'cjs'] }; config.transform = {}; diff --git a/jest.config.js b/jest.config.js index 07c997a11d8..5d9c51969bf 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,10 +1,11 @@ -'use strict'; +import fs from 'node:fs'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { isCI } from '@terascope/utils'; -const fs = require('fs'); -const path = require('path'); -const { isCI } = require('@terascope/utils'); +const dirname = path.dirname(fileURLToPath(import.meta.url)); -const packagesPath = path.join(__dirname, 'packages'); +const packagesPath = path.join(dirname, 'packages'); const projects = fs .readdirSync(packagesPath) .filter((pkgName) => { @@ -26,16 +27,17 @@ const projects = fs .map((pkgName) => `/packages/${pkgName}`); const coverageReporters = ['lcov', 'html']; + if (!isCI) { coverageReporters.push('text-summary'); } -module.exports = { +export default { rootDir: '.', verbose: true, projects, globals: { - availableExtensions: ['.js', '.ts', 'mjs'] + availableExtensions: ['.js', '.ts', '.mjs', '.cjs'] }, testMatch: [ '/packages/*/test/**/*-spec.{ts,js}', diff --git a/package.json b/package.json index daed2588b29..64b6e576c3d 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "k8s:rebuild": "ts-scripts k8s-env --rebuild", "k8s:restart": "ts-scripts k8s-env --rebuild --skip-build", "k8sV2": "TEST_ELASTICSEARCH=true ELASTICSEARCH_PORT=9200 CLUSTERING_TYPE='kubernetesV2' ts-scripts k8s-env", - "lint": "eslint --cache --ext .js,.jsx,.ts,.tsx .", + "lint": "eslint", "lint:fix": "yarn lint --fix && yarn sync", "setup": "yarn $YARN_SETUP_ARGS && yarn run build --force", "start": "node service.js", @@ -47,6 +47,7 @@ "nan": "^2.19.0" }, "devDependencies": { + "@eslint/js": "^9.9.0", "@swc/core": "1.4.0", "@swc/jest": "^0.2.36", "@types/bluebird": "^3.5.42", @@ -57,7 +58,7 @@ "@types/lodash": "^4.14.202", "@types/node": "^18.14.2", "@types/uuid": "^9.0.8", - "eslint": "^8.5.0", + "eslint": "^9.9.0", "jest": "^29.7.0", "jest-extended": "^3.2.4", "jest-watch-typeahead": "^2.2.2", @@ -66,9 +67,10 @@ "ts-jest": "^29.1.4", "typescript": "~5.2.2" }, + "type": "module", "engines": { - "node": ">=14.17.0", - "yarn": ">=1.16.0" + "node": ">=18.18.0", + "yarn": ">=1.22.19" }, "os": [ "darwin", diff --git a/packages/data-mate/.eslintrc.json b/packages/data-mate/.eslintrc.json deleted file mode 100644 index 728df68c592..00000000000 --- a/packages/data-mate/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "@terascope", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "rules": { - "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/no-duplicate-enum-values": "warn", - "import/extensions": "off", - "import/no-import-module-exports": "off" - }, - "ignorePatterns":[] -} diff --git a/packages/data-mate/tsconfig.json b/packages/data-mate/tsconfig.json index 23669a24937..d0c6849850f 100644 --- a/packages/data-mate/tsconfig.json +++ b/packages/data-mate/tsconfig.json @@ -1,8 +1,6 @@ { "extends": "../../tsconfig", "compilerOptions": { - "target": "ESNext", - "module": "ESNext", "outDir": "dist", "rootDir": "." }, diff --git a/packages/data-types/.eslintrc.json b/packages/data-types/.eslintrc.json deleted file mode 100644 index 728df68c592..00000000000 --- a/packages/data-types/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "@terascope", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "rules": { - "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/no-duplicate-enum-values": "warn", - "import/extensions": "off", - "import/no-import-module-exports": "off" - }, - "ignorePatterns":[] -} diff --git a/packages/data-types/tsconfig.json b/packages/data-types/tsconfig.json index 23669a24937..d0c6849850f 100644 --- a/packages/data-types/tsconfig.json +++ b/packages/data-types/tsconfig.json @@ -1,8 +1,6 @@ { "extends": "../../tsconfig", "compilerOptions": { - "target": "ESNext", - "module": "ESNext", "outDir": "dist", "rootDir": "." }, diff --git a/packages/docker-compose-js/.eslintrc.json b/packages/docker-compose-js/.eslintrc.json deleted file mode 100644 index 728df68c592..00000000000 --- a/packages/docker-compose-js/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "@terascope", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "rules": { - "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/no-duplicate-enum-values": "warn", - "import/extensions": "off", - "import/no-import-module-exports": "off" - }, - "ignorePatterns":[] -} diff --git a/packages/docker-compose-js/tsconfig.json b/packages/docker-compose-js/tsconfig.json index 087f046f071..f6860497789 100644 --- a/packages/docker-compose-js/tsconfig.json +++ b/packages/docker-compose-js/tsconfig.json @@ -1,8 +1,6 @@ { "extends": "../../tsconfig", "compilerOptions": { - "target": "ESNext", - "module": "ESNext", "outDir": "dist", "rootDir": "." }, diff --git a/packages/elasticsearch-api/.eslintrc.json b/packages/elasticsearch-api/.eslintrc.json deleted file mode 100644 index 728df68c592..00000000000 --- a/packages/elasticsearch-api/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "@terascope", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "rules": { - "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/no-duplicate-enum-values": "warn", - "import/extensions": "off", - "import/no-import-module-exports": "off" - }, - "ignorePatterns":[] -} diff --git a/packages/elasticsearch-store/.eslintrc.json b/packages/elasticsearch-store/.eslintrc.json deleted file mode 100644 index 728df68c592..00000000000 --- a/packages/elasticsearch-store/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "@terascope", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "rules": { - "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/no-duplicate-enum-values": "warn", - "import/extensions": "off", - "import/no-import-module-exports": "off" - }, - "ignorePatterns":[] -} diff --git a/packages/elasticsearch-store/tsconfig.json b/packages/elasticsearch-store/tsconfig.json index 23669a24937..d0c6849850f 100644 --- a/packages/elasticsearch-store/tsconfig.json +++ b/packages/elasticsearch-store/tsconfig.json @@ -1,8 +1,6 @@ { "extends": "../../tsconfig", "compilerOptions": { - "target": "ESNext", - "module": "ESNext", "outDir": "dist", "rootDir": "." }, diff --git a/packages/job-components/.eslintrc.json b/packages/job-components/.eslintrc.json deleted file mode 100644 index 728df68c592..00000000000 --- a/packages/job-components/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "@terascope", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "rules": { - "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/no-duplicate-enum-values": "warn", - "import/extensions": "off", - "import/no-import-module-exports": "off" - }, - "ignorePatterns":[] -} diff --git a/packages/job-components/tsconfig.json b/packages/job-components/tsconfig.json index 4cffa705400..9f0101dd83f 100644 --- a/packages/job-components/tsconfig.json +++ b/packages/job-components/tsconfig.json @@ -1,11 +1,8 @@ { "extends": "../../tsconfig", "compilerOptions": { - "target": "ESNext", - "module": "ESNext", "outDir": "dist", "rootDir": ".", - "esModuleInterop": true }, "include": ["src", "test"] } diff --git a/packages/scripts/.eslintrc.json b/packages/scripts/.eslintrc.json deleted file mode 100644 index 728df68c592..00000000000 --- a/packages/scripts/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "@terascope", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "rules": { - "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/no-duplicate-enum-values": "warn", - "import/extensions": "off", - "import/no-import-module-exports": "off" - }, - "ignorePatterns":[] -} diff --git a/packages/scripts/tsconfig.json b/packages/scripts/tsconfig.json index 23669a24937..d0c6849850f 100644 --- a/packages/scripts/tsconfig.json +++ b/packages/scripts/tsconfig.json @@ -1,8 +1,6 @@ { "extends": "../../tsconfig", "compilerOptions": { - "target": "ESNext", - "module": "ESNext", "outDir": "dist", "rootDir": "." }, diff --git a/packages/terafoundation/.eslintrc.json b/packages/terafoundation/.eslintrc.json deleted file mode 100644 index 728df68c592..00000000000 --- a/packages/terafoundation/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "@terascope", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "rules": { - "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/no-duplicate-enum-values": "warn", - "import/extensions": "off", - "import/no-import-module-exports": "off" - }, - "ignorePatterns":[] -} diff --git a/packages/terafoundation/tsconfig.json b/packages/terafoundation/tsconfig.json index 4cffa705400..9f0101dd83f 100644 --- a/packages/terafoundation/tsconfig.json +++ b/packages/terafoundation/tsconfig.json @@ -1,11 +1,8 @@ { "extends": "../../tsconfig", "compilerOptions": { - "target": "ESNext", - "module": "ESNext", "outDir": "dist", "rootDir": ".", - "esModuleInterop": true }, "include": ["src", "test"] } diff --git a/packages/teraslice-cli/.eslintrc.json b/packages/teraslice-cli/.eslintrc.json deleted file mode 100644 index 728df68c592..00000000000 --- a/packages/teraslice-cli/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "@terascope", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "rules": { - "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/no-duplicate-enum-values": "warn", - "import/extensions": "off", - "import/no-import-module-exports": "off" - }, - "ignorePatterns":[] -} diff --git a/packages/teraslice-cli/src/helpers/asset-src.ts b/packages/teraslice-cli/src/helpers/asset-src.ts index c34a2dfd0e8..6424033a16a 100644 --- a/packages/teraslice-cli/src/helpers/asset-src.ts +++ b/packages/teraslice-cli/src/helpers/asset-src.ts @@ -246,14 +246,17 @@ export class AssetSrc { spaces: 4, }); + let packageType = { type: 'commonjs'} + if (isESM) { - const esmModule = { type: 'module' }; - // write asset.json into bundleDir - await fs.writeJSON(path.join(bundleDir.name, 'package.json'), esmModule, { - spaces: 4, - }); + packageType = { type: 'module' }; } + // write asset.json into bundleDir + await fs.writeJSON(path.join(bundleDir.name, 'package.json'), packageType, { + spaces: 4, + }); + // run npm --cwd srcDir/asset --prod --silent --no-progress reply.info('* running yarn --prod --no-progress'); await this._yarnCmd(path.join(tmpDir.name, 'asset'), ['--prod', '--no-progress']); diff --git a/packages/teraslice-cli/tsconfig.json b/packages/teraslice-cli/tsconfig.json index 49571cbc713..a2ebcc70daa 100644 --- a/packages/teraslice-cli/tsconfig.json +++ b/packages/teraslice-cli/tsconfig.json @@ -1,11 +1,8 @@ { "extends": "../../tsconfig", "compilerOptions": { - "target": "ESNext", - "module": "ESNext", "outDir": "dist", "rootDir": ".", - "esModuleInterop": true }, "include": [ "src", diff --git a/packages/teraslice-client-js/.eslintrc.json b/packages/teraslice-client-js/.eslintrc.json deleted file mode 100644 index 728df68c592..00000000000 --- a/packages/teraslice-client-js/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "@terascope", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "rules": { - "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/no-duplicate-enum-values": "warn", - "import/extensions": "off", - "import/no-import-module-exports": "off" - }, - "ignorePatterns":[] -} diff --git a/packages/teraslice-client-js/tsconfig.json b/packages/teraslice-client-js/tsconfig.json index b8cbc6f4bd7..234151afc50 100644 --- a/packages/teraslice-client-js/tsconfig.json +++ b/packages/teraslice-client-js/tsconfig.json @@ -1,8 +1,6 @@ { "extends": "../../tsconfig", "compilerOptions": { - "target": "ESNext", - "module": "ESNext", "outDir": "dist", "rootDir": "." }, diff --git a/packages/teraslice-messaging/.eslintrc.json b/packages/teraslice-messaging/.eslintrc.json deleted file mode 100644 index 728df68c592..00000000000 --- a/packages/teraslice-messaging/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "@terascope", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "rules": { - "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/no-duplicate-enum-values": "warn", - "import/extensions": "off", - "import/no-import-module-exports": "off" - }, - "ignorePatterns":[] -} diff --git a/packages/teraslice-messaging/tsconfig.json b/packages/teraslice-messaging/tsconfig.json index 23669a24937..d0c6849850f 100644 --- a/packages/teraslice-messaging/tsconfig.json +++ b/packages/teraslice-messaging/tsconfig.json @@ -1,8 +1,6 @@ { "extends": "../../tsconfig", "compilerOptions": { - "target": "ESNext", - "module": "ESNext", "outDir": "dist", "rootDir": "." }, diff --git a/packages/teraslice-state-storage/.eslintrc.json b/packages/teraslice-state-storage/.eslintrc.json deleted file mode 100644 index 728df68c592..00000000000 --- a/packages/teraslice-state-storage/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "@terascope", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "rules": { - "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/no-duplicate-enum-values": "warn", - "import/extensions": "off", - "import/no-import-module-exports": "off" - }, - "ignorePatterns":[] -} diff --git a/packages/teraslice-state-storage/tsconfig.json b/packages/teraslice-state-storage/tsconfig.json index 23669a24937..d0c6849850f 100644 --- a/packages/teraslice-state-storage/tsconfig.json +++ b/packages/teraslice-state-storage/tsconfig.json @@ -1,8 +1,6 @@ { "extends": "../../tsconfig", "compilerOptions": { - "target": "ESNext", - "module": "ESNext", "outDir": "dist", "rootDir": "." }, diff --git a/packages/teraslice-test-harness/.eslintrc.json b/packages/teraslice-test-harness/.eslintrc.json deleted file mode 100644 index 728df68c592..00000000000 --- a/packages/teraslice-test-harness/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "@terascope", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "rules": { - "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/no-duplicate-enum-values": "warn", - "import/extensions": "off", - "import/no-import-module-exports": "off" - }, - "ignorePatterns":[] -} diff --git a/packages/teraslice-test-harness/tsconfig.json b/packages/teraslice-test-harness/tsconfig.json index 4cffa705400..ae6c116cd19 100644 --- a/packages/teraslice-test-harness/tsconfig.json +++ b/packages/teraslice-test-harness/tsconfig.json @@ -1,8 +1,6 @@ { "extends": "../../tsconfig", "compilerOptions": { - "target": "ESNext", - "module": "ESNext", "outDir": "dist", "rootDir": ".", "esModuleInterop": true diff --git a/packages/teraslice/.eslintrc.json b/packages/teraslice/.eslintrc.json deleted file mode 100644 index 728df68c592..00000000000 --- a/packages/teraslice/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "@terascope", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "rules": { - "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/no-duplicate-enum-values": "warn", - "import/extensions": "off", - "import/no-import-module-exports": "off" - }, - "ignorePatterns":[] -} diff --git a/packages/teraslice/tsconfig.json b/packages/teraslice/tsconfig.json index 14902d46535..dd0fedaf629 100644 --- a/packages/teraslice/tsconfig.json +++ b/packages/teraslice/tsconfig.json @@ -1,8 +1,6 @@ { "extends": "../../tsconfig", "compilerOptions": { - "target": "ESNext", - "module": "ESNext", "outDir": "dist", "rootDir": "." }, diff --git a/packages/ts-transforms/.eslintrc.json b/packages/ts-transforms/.eslintrc.json deleted file mode 100644 index 728df68c592..00000000000 --- a/packages/ts-transforms/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "@terascope", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "rules": { - "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/no-duplicate-enum-values": "warn", - "import/extensions": "off", - "import/no-import-module-exports": "off" - }, - "ignorePatterns":[] -} diff --git a/packages/ts-transforms/tsconfig.json b/packages/ts-transforms/tsconfig.json index 38af98feef7..d0c6849850f 100644 --- a/packages/ts-transforms/tsconfig.json +++ b/packages/ts-transforms/tsconfig.json @@ -2,8 +2,6 @@ "extends": "../../tsconfig", "compilerOptions": { "outDir": "dist", - "target": "ESNext", - "module": "ESNext", "rootDir": "." }, "include": ["src", "test"] diff --git a/packages/types/.eslintrc b/packages/types/.eslintrc deleted file mode 100644 index 728df68c592..00000000000 --- a/packages/types/.eslintrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "@terascope", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "rules": { - "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/no-duplicate-enum-values": "warn", - "import/extensions": "off", - "import/no-import-module-exports": "off" - }, - "ignorePatterns":[] -} diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.json index 23669a24937..d0c6849850f 100644 --- a/packages/types/tsconfig.json +++ b/packages/types/tsconfig.json @@ -1,8 +1,6 @@ { "extends": "../../tsconfig", "compilerOptions": { - "target": "ESNext", - "module": "ESNext", "outDir": "dist", "rootDir": "." }, diff --git a/packages/utils/.eslintrc.json b/packages/utils/.eslintrc.json deleted file mode 100644 index 728df68c592..00000000000 --- a/packages/utils/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "@terascope", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "rules": { - "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/no-duplicate-enum-values": "warn", - "import/extensions": "off", - "import/no-import-module-exports": "off" - }, - "ignorePatterns":[] -} diff --git a/packages/utils/tsconfig.json b/packages/utils/tsconfig.json index 23669a24937..d0c6849850f 100644 --- a/packages/utils/tsconfig.json +++ b/packages/utils/tsconfig.json @@ -1,8 +1,6 @@ { "extends": "../../tsconfig", "compilerOptions": { - "target": "ESNext", - "module": "ESNext", "outDir": "dist", "rootDir": "." }, diff --git a/packages/xlucene-parser/.eslintrc.json b/packages/xlucene-parser/.eslintrc.json deleted file mode 100644 index 728df68c592..00000000000 --- a/packages/xlucene-parser/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "@terascope", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "rules": { - "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/no-duplicate-enum-values": "warn", - "import/extensions": "off", - "import/no-import-module-exports": "off" - }, - "ignorePatterns":[] -} diff --git a/packages/xlucene-parser/tsconfig.json b/packages/xlucene-parser/tsconfig.json index 23669a24937..d0c6849850f 100644 --- a/packages/xlucene-parser/tsconfig.json +++ b/packages/xlucene-parser/tsconfig.json @@ -1,8 +1,6 @@ { "extends": "../../tsconfig", "compilerOptions": { - "target": "ESNext", - "module": "ESNext", "outDir": "dist", "rootDir": "." }, diff --git a/packages/xlucene-translator/.eslintrc.json b/packages/xlucene-translator/.eslintrc.json deleted file mode 100644 index 728df68c592..00000000000 --- a/packages/xlucene-translator/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "@terascope", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "rules": { - "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/no-duplicate-enum-values": "warn", - "import/extensions": "off", - "import/no-import-module-exports": "off" - }, - "ignorePatterns":[] -} diff --git a/packages/xlucene-translator/tsconfig.json b/packages/xlucene-translator/tsconfig.json index 23669a24937..d0c6849850f 100644 --- a/packages/xlucene-translator/tsconfig.json +++ b/packages/xlucene-translator/tsconfig.json @@ -1,8 +1,6 @@ { "extends": "../../tsconfig", "compilerOptions": { - "target": "ESNext", - "module": "ESNext", "outDir": "dist", "rootDir": "." }, diff --git a/packages/xpressions/.eslintrc.json b/packages/xpressions/.eslintrc.json deleted file mode 100644 index 728df68c592..00000000000 --- a/packages/xpressions/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "@terascope", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "rules": { - "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/no-duplicate-enum-values": "warn", - "import/extensions": "off", - "import/no-import-module-exports": "off" - }, - "ignorePatterns":[] -} diff --git a/packages/xpressions/tsconfig.json b/packages/xpressions/tsconfig.json index 38af98feef7..d0c6849850f 100644 --- a/packages/xpressions/tsconfig.json +++ b/packages/xpressions/tsconfig.json @@ -2,8 +2,6 @@ "extends": "../../tsconfig", "compilerOptions": { "outDir": "dist", - "target": "ESNext", - "module": "ESNext", "rootDir": "." }, "include": ["src", "test"] diff --git a/service.js b/service.js index dbd54b80b53..6cf0606c1b1 100755 --- a/service.js +++ b/service.js @@ -3,5 +3,5 @@ // make sure running locally we set timezone to utc // eslint-disable-next-line strict process.env.TZ = 'utc'; -// eslint-disable-next-line import/extensions, import/no-relative-packages + import('./packages/teraslice/service.js'); diff --git a/tsconfig.json b/tsconfig.json index 403bd001c7e..d41daf4a378 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,9 +1,9 @@ { "compilerOptions": { "baseUrl": ".", - "module": "commonjs", "moduleResolution": "node", - "target": "ES2019", + "target": "ESNext", + "module": "ESNext", "skipLibCheck": true, "experimentalDecorators": true, "strict": true, diff --git a/yarn.lock b/yarn.lock index 9369d52a4bd..a920df58a52 100644 --- a/yarn.lock +++ b/yarn.lock @@ -866,7 +866,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.6" -"@babel/runtime@^7.10.2", "@babel/runtime@^7.21.0", "@babel/runtime@^7.23.2", "@babel/runtime@^7.8.4": +"@babel/runtime@^7.10.2", "@babel/runtime@^7.21.0", "@babel/runtime@^7.8.4": version "7.24.6" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.6.tgz#5b76eb89ad45e2e4a0a8db54c456251469a3358e" integrity sha512-Ja18XcETdEl5mzzACGd+DKgaGJzPTCow7EglgwTmHdwokzDFYh/MHua6lU6DV/hjF2IaOJ4oX2nqnjG7RElKOw== @@ -1051,30 +1051,49 @@ dependencies: eslint-visitor-keys "^3.3.0" -"@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": +"@eslint-community/regexpp@^4.11.0": + version "4.11.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae" + integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A== + +"@eslint-community/regexpp@^4.5.1": version "4.10.0" resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== -"@eslint/eslintrc@^2.1.4": - version "2.1.4" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" - integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== +"@eslint/config-array@^0.17.1": + version "0.17.1" + resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.17.1.tgz#d9b8b8b6b946f47388f32bedfd3adf29ca8f8910" + integrity sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA== + dependencies: + "@eslint/object-schema" "^2.1.4" + debug "^4.3.1" + minimatch "^3.1.2" + +"@eslint/eslintrc@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.1.0.tgz#dbd3482bfd91efa663cbe7aa1f506839868207b6" + integrity sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^9.6.0" - globals "^13.19.0" + espree "^10.0.1" + globals "^14.0.0" ignore "^5.2.0" import-fresh "^3.2.1" js-yaml "^4.1.0" minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.57.0": - version "8.57.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f" - integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g== +"@eslint/js@9.9.0", "@eslint/js@^9.9.0": + version "9.9.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.9.0.tgz#d8437adda50b3ed4401964517b64b4f59b0e2638" + integrity sha512-hhetes6ZHP3BlXLxmd8K2SNgkhNSi+UcecbnwWKwpP7kyi/uC75DJ1lOOBO3xrC4jyojtGE3YxKZPHfk4yrgug== + +"@eslint/object-schema@^2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.4.tgz#9e69f8bb4031e11df79e03db09f9dbbae1740843" + integrity sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ== "@fastify/busboy@^2.0.0": version "2.1.1" @@ -1086,24 +1105,15 @@ resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== -"@humanwhocodes/config-array@^0.11.14": - version "0.11.14" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b" - integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg== - dependencies: - "@humanwhocodes/object-schema" "^2.0.2" - debug "^4.3.1" - minimatch "^3.0.5" - "@humanwhocodes/module-importer@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^2.0.2": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" - integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== +"@humanwhocodes/retry@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.0.tgz#6d86b8cb322660f03d3f0aa94b99bdd8e172d570" + integrity sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew== "@isaacs/cliui@^8.0.2": version "8.0.2" @@ -2871,7 +2881,7 @@ resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-4.0.9.tgz#cd82382c4f902fed9691a2ed79ec68c5898af4c2" integrity sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg== -"@types/json-schema@^7.0.12", "@types/json-schema@^7.0.9": +"@types/json-schema@^7.0.12": version "7.0.15" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -3019,7 +3029,7 @@ dependencies: "@types/node" "*" -"@types/semver@^7.3.12", "@types/semver@^7.5.0", "@types/semver@^7.5.6": +"@types/semver@^7.5.0", "@types/semver@^7.5.6": version "7.5.8" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== @@ -3190,14 +3200,6 @@ "@typescript-eslint/visitor-keys" "6.21.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c" - integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w== - dependencies: - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/visitor-keys" "5.62.0" - "@typescript-eslint/scope-manager@6.21.0": version "6.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz#ea8a9bfc8f1504a6ac5d59a6df308d3a0630a2b1" @@ -3206,6 +3208,14 @@ "@typescript-eslint/types" "6.21.0" "@typescript-eslint/visitor-keys" "6.21.0" +"@typescript-eslint/scope-manager@8.1.0": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.1.0.tgz#dd8987d2efebb71d230a1c71d82e84a7aead5c3d" + integrity sha512-DsuOZQji687sQUjm4N6c9xABJa7fjvfIdjqpSIIVOgaENf2jFXiM9hIBZOL3hb6DHK9Nvd2d7zZnoMLf9e0OtQ== + dependencies: + "@typescript-eslint/types" "8.1.0" + "@typescript-eslint/visitor-keys" "8.1.0" + "@typescript-eslint/type-utils@6.21.0": version "6.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz#6473281cfed4dacabe8004e8521cee0bd9d4c01e" @@ -3216,28 +3226,15 @@ debug "^4.3.4" ts-api-utils "^1.0.1" -"@typescript-eslint/types@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" - integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== - "@typescript-eslint/types@6.21.0": version "6.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.21.0.tgz#205724c5123a8fef7ecd195075fa6e85bac3436d" integrity sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg== -"@typescript-eslint/typescript-estree@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" - integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA== - dependencies: - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/visitor-keys" "5.62.0" - debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - semver "^7.3.7" - tsutils "^3.21.0" +"@typescript-eslint/types@8.1.0": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.1.0.tgz#fbf1eaa668a7e444ac507732ca9d3c3468e5db9c" + integrity sha512-q2/Bxa0gMOu/2/AKALI0tCKbG2zppccnRIRCW6BaaTlRVaPKft4oVYPp7WOPpcnsgbr0qROAVCVKCvIQ0tbWog== "@typescript-eslint/typescript-estree@6.21.0": version "6.21.0" @@ -3253,6 +3250,20 @@ semver "^7.5.4" ts-api-utils "^1.0.1" +"@typescript-eslint/typescript-estree@8.1.0": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.1.0.tgz#c44e5667683c0bb5caa43192e27de6a994f4e4c4" + integrity sha512-NTHhmufocEkMiAord/g++gWKb0Fr34e9AExBRdqgWdVBaKoei2dIyYKD9Q0jBnvfbEA5zaf8plUFMUH6kQ0vGg== + dependencies: + "@typescript-eslint/types" "8.1.0" + "@typescript-eslint/visitor-keys" "8.1.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + minimatch "^9.0.4" + semver "^7.6.0" + ts-api-utils "^1.3.0" + "@typescript-eslint/utils@6.21.0": version "6.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.21.0.tgz#4714e7a6b39e773c1c8e97ec587f520840cd8134" @@ -3266,27 +3277,15 @@ "@typescript-eslint/typescript-estree" "6.21.0" semver "^7.5.4" -"@typescript-eslint/utils@^5.10.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" - integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== +"@typescript-eslint/utils@^6.0.0 || ^7.0.0 || ^8.0.0": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.1.0.tgz#a922985a43d2560ce0d293be79148fa80c1325e0" + integrity sha512-ypRueFNKTIFwqPeJBfeIpxZ895PQhNyH4YID6js0UoBImWYoSjBsahUn9KMiJXh94uOjVBgHD9AmkyPsPnFwJA== dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@types/json-schema" "^7.0.9" - "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.62.0" - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/typescript-estree" "5.62.0" - eslint-scope "^5.1.1" - semver "^7.3.7" - -"@typescript-eslint/visitor-keys@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e" - integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw== - dependencies: - "@typescript-eslint/types" "5.62.0" - eslint-visitor-keys "^3.3.0" + "@eslint-community/eslint-utils" "^4.4.0" + "@typescript-eslint/scope-manager" "8.1.0" + "@typescript-eslint/types" "8.1.0" + "@typescript-eslint/typescript-estree" "8.1.0" "@typescript-eslint/visitor-keys@6.21.0": version "6.21.0" @@ -3296,10 +3295,13 @@ "@typescript-eslint/types" "6.21.0" eslint-visitor-keys "^3.4.1" -"@ungap/structured-clone@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" - integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== +"@typescript-eslint/visitor-keys@8.1.0": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.1.0.tgz#ab2b3a9699a8ddebf0c205e133f114c1fed9daad" + integrity sha512-ba0lNI19awqZ5ZNKh6wCModMwoZs457StTebQ0q1NP58zSi2F6MOZRXwfKZy+jB78JNJ/WH8GSh2IQNzXX8Nag== + dependencies: + "@typescript-eslint/types" "8.1.0" + eslint-visitor-keys "^3.4.3" abbrev@1: version "1.1.1" @@ -3334,10 +3336,10 @@ acorn-jsx@^5.3.2: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^8.9.0: - version "8.11.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" - integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== +acorn@^8.12.0: + version "8.12.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" + integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== after@0.8.2: version "0.8.2" @@ -3551,14 +3553,14 @@ argv@0.0.2: resolved "https://registry.yarnpkg.com/argv/-/argv-0.0.2.tgz#ecbd16f8949b157183711b1bda334f37840185ab" integrity sha512-dEamhpPEwRUBpLNHeuCm/v+g0anFByHahxodVO/BbAarHVBBg2MccCwf9K+o1Pof+2btdnkJelYVUWjW/VrATw== -aria-query@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.3.0.tgz#650c569e41ad90b51b3d7df5e5eed1c7549c103e" - integrity sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A== +aria-query@~5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.1.3.tgz#19db27cd101152773631396f7a95a3b58c22c35e" + integrity sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ== dependencies: - dequal "^2.0.3" + deep-equal "^2.0.5" -array-buffer-byte-length@^1.0.1: +array-buffer-byte-length@^1.0.0, array-buffer-byte-length@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz#1e5583ec16763540a27ae52eed99ff899223568f" integrity sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg== @@ -3647,25 +3649,15 @@ array.prototype.flatmap@^1.3.2: es-abstract "^1.22.1" es-shim-unscopables "^1.0.0" -array.prototype.toreversed@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/array.prototype.toreversed/-/array.prototype.toreversed-1.1.2.tgz#b989a6bf35c4c5051e1dc0325151bf8088954eba" - integrity sha512-wwDCoT4Ck4Cz7sLtgUmzR5UV3YF5mFHUlbChCzZBQZ+0m2cl/DH3tKgvphv1nKgFsJ48oCSg6p91q2Vm0I/ZMA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - es-abstract "^1.22.1" - es-shim-unscopables "^1.0.0" - -array.prototype.tosorted@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.3.tgz#c8c89348337e51b8a3c48a9227f9ce93ceedcba8" - integrity sha512-/DdH4TiTmOKzyQbp/eadcCVexiCb36xJg7HshYOYJnNZFDj33GEv0P7GxsynpShhq4OLYJzbGcBDkLsDt7MnNg== +array.prototype.tosorted@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz#fe954678ff53034e717ea3352a03f0b0b86f7ffc" + integrity sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA== dependencies: - call-bind "^1.0.5" + call-bind "^1.0.7" define-properties "^1.2.1" - es-abstract "^1.22.3" - es-errors "^1.1.0" + es-abstract "^1.23.3" + es-errors "^1.3.0" es-shim-unscopables "^1.0.2" arraybuffer.prototype.slice@^1.0.3: @@ -3768,17 +3760,17 @@ aws4@^1.11.0, aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.13.0.tgz#d9b802e9bb9c248d7be5f7f5ef178dc3684e9dcc" integrity sha512-3AungXC4I8kKsS9PuS4JH2nc+0bVY/mjgrephHTIi8fpEeGsTHBUJeosp0Wc1myYMElmD0B3Oc4XL/HVJ4PV2g== -axe-core@=4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.7.0.tgz#34ba5a48a8b564f67e103f0aa5768d76e15bbbbf" - integrity sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ== +axe-core@^4.9.1: + version "4.10.0" + resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.10.0.tgz#d9e56ab0147278272739a000880196cdfe113b59" + integrity sha512-Mr2ZakwQ7XUAjp7pAwQWRhhK8mQQ6JAaNWSjmjxil0R8BPioMtQsTLOolGYkji1rcL++3dCqZA3zWqpT+9Ew6g== -axobject-query@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-3.2.1.tgz#39c378a6e3b06ca679f29138151e45b2b32da62a" - integrity sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg== +axobject-query@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-3.1.1.tgz#3b6e5c6d4e43ca7ba51c5babf99d22a9c68485e1" + integrity sha512-goKlv8DZrK9hUh975fnHzhNIO4jUnFCfv/dszV5VwUGDFjI6vQ2VwoyjYjYNEbBE8AH87TduWP5uyDR1D+Iteg== dependencies: - dequal "^2.0.3" + deep-equal "^2.0.5" b4a@^1.6.4: version "1.6.6" @@ -5135,6 +5127,30 @@ deep-equal@^1.0.0: object-keys "^1.1.1" regexp.prototype.flags "^1.5.1" +deep-equal@^2.0.5: + version "2.2.3" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.2.3.tgz#af89dafb23a396c7da3e862abc0be27cf51d56e1" + integrity sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA== + dependencies: + array-buffer-byte-length "^1.0.0" + call-bind "^1.0.5" + es-get-iterator "^1.1.3" + get-intrinsic "^1.2.2" + is-arguments "^1.1.1" + is-array-buffer "^3.0.2" + is-date-object "^1.0.5" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + isarray "^2.0.5" + object-is "^1.1.5" + object-keys "^1.1.1" + object.assign "^4.1.4" + regexp.prototype.flags "^1.5.1" + side-channel "^1.0.4" + which-boxed-primitive "^1.0.2" + which-collection "^1.0.1" + which-typed-array "^1.1.13" + deep-extend@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" @@ -5186,7 +5202,7 @@ define-lazy-prop@^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.2.0, define-properties@^1.2.1: +define-properties@^1.1.3, define-properties@^1.2.0, define-properties@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== @@ -5210,11 +5226,6 @@ depd@2.0.0, depd@^2.0.0: resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== -dequal@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.3.tgz#2644214f1997d39ed0ee0ece72335490a7ac67be" - integrity sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA== - destroy@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" @@ -5267,13 +5278,6 @@ doctrine@^2.1.0: dependencies: esutils "^2.0.2" -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - dot-prop@^5.0.0, dot-prop@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" @@ -5478,7 +5482,7 @@ error@^10.4.0: resolved "https://registry.yarnpkg.com/error/-/error-10.4.0.tgz#6fcf0fd64bceb1e750f8ed9a3dd880f00e46a487" integrity sha512-YxIFEJuhgcICugOUvRx5th0UM+ActZ9sjY0QJmeVwsQdvosZ7kYzc9QqS0Da3R5iUmgU5meGIxh0xBeZpMVeLw== -es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.1, es-abstract@^1.23.2, es-abstract@^1.23.3: +es-abstract@^1.17.5, es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.1, es-abstract@^1.23.2, es-abstract@^1.23.3: version "1.23.3" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.3.tgz#8f0c5a35cd215312573c5a27c87dfd6c881a0aa0" integrity sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A== @@ -5537,12 +5541,27 @@ es-define-property@^1.0.0: dependencies: get-intrinsic "^1.2.4" -es-errors@^1.1.0, es-errors@^1.2.1, es-errors@^1.3.0: +es-errors@^1.2.1, es-errors@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== -es-iterator-helpers@^1.0.15, es-iterator-helpers@^1.0.19: +es-get-iterator@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.3.tgz#3ef87523c5d464d41084b2c3c9c214f1199763d6" + integrity sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.3" + has-symbols "^1.0.3" + is-arguments "^1.1.1" + is-map "^2.0.2" + is-set "^2.0.2" + is-string "^1.0.7" + isarray "^2.0.5" + stop-iteration-iterator "^1.0.0" + +es-iterator-helpers@^1.0.19: version "1.0.19" resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.0.19.tgz#117003d0e5fec237b4b5c08aded722e0c6d50ca8" integrity sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw== @@ -5716,76 +5735,68 @@ eslint-plugin-import@~2.29.1: semver "^6.3.1" tsconfig-paths "^3.15.0" -eslint-plugin-jest@^27.6.3: - version "27.9.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz#7c98a33605e1d8b8442ace092b60e9919730000b" - integrity sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug== +eslint-plugin-jest@^28.8.0: + version "28.8.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-28.8.0.tgz#54f597b5a3295ad04ec946baa245ad02b9b2bca0" + integrity sha512-Tubj1hooFxCl52G4qQu0edzV/+EZzPUeN8p2NnW5uu4fbDs+Yo7+qDVDc4/oG3FbCqEBmu/OC3LSsyiU22oghw== dependencies: - "@typescript-eslint/utils" "^5.10.0" + "@typescript-eslint/utils" "^6.0.0 || ^7.0.0 || ^8.0.0" -eslint-plugin-jsx-a11y@^6.8.0: - version "6.8.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.8.0.tgz#2fa9c701d44fcd722b7c771ec322432857fcbad2" - integrity sha512-Hdh937BS3KdwwbBaKd5+PLCOmYY6U4f2h9Z2ktwtNKvIdIEu137rjYbcb9ApSbVJfWxANNuiKTD/9tOKjK9qOA== +eslint-plugin-jsx-a11y@^6.9.0: + version "6.9.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.9.0.tgz#67ab8ff460d4d3d6a0b4a570e9c1670a0a8245c8" + integrity sha512-nOFOCaJG2pYqORjK19lqPqxMO/JpvdCZdPtNdxY3kvom3jTvkAbOvQvD8wuD0G8BYR0IGAGYDlzqWJOh/ybn2g== dependencies: - "@babel/runtime" "^7.23.2" - aria-query "^5.3.0" - array-includes "^3.1.7" + aria-query "~5.1.3" + array-includes "^3.1.8" array.prototype.flatmap "^1.3.2" ast-types-flow "^0.0.8" - axe-core "=4.7.0" - axobject-query "^3.2.1" + axe-core "^4.9.1" + axobject-query "~3.1.1" damerau-levenshtein "^1.0.8" emoji-regex "^9.2.2" - es-iterator-helpers "^1.0.15" - hasown "^2.0.0" + es-iterator-helpers "^1.0.19" + hasown "^2.0.2" jsx-ast-utils "^3.3.5" language-tags "^1.0.9" minimatch "^3.1.2" - object.entries "^1.1.7" - object.fromentries "^2.0.7" + object.fromentries "^2.0.8" + safe-regex-test "^1.0.3" + string.prototype.includes "^2.0.0" eslint-plugin-react-hooks@^4.4.0: version "4.6.2" resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz#c829eb06c0e6f484b3fbb85a97e57784f328c596" integrity sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ== -eslint-plugin-react@^7.34.1: - version "7.34.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.34.2.tgz#2780a1a35a51aca379d86d29b9a72adc6bfe6b66" - integrity sha512-2HCmrU+/JNigDN6tg55cRDKCQWicYAPB38JGSFDQt95jDm8rrvSUo7YPkOIm5l6ts1j1zCvysNcasvfTMQzUOw== +eslint-plugin-react@^7.35.0: + version "7.35.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.35.0.tgz#00b1e4559896710e58af6358898f2ff917ea4c41" + integrity sha512-v501SSMOWv8gerHkk+IIQBkcGRGrO2nfybfj5pLxuJNFTPxxA3PSryhXTK+9pNbtkggheDdsC0E9Q8CuPk6JKA== dependencies: array-includes "^3.1.8" array.prototype.findlast "^1.2.5" array.prototype.flatmap "^1.3.2" - array.prototype.toreversed "^1.1.2" - array.prototype.tosorted "^1.1.3" + array.prototype.tosorted "^1.1.4" doctrine "^2.1.0" es-iterator-helpers "^1.0.19" estraverse "^5.3.0" + hasown "^2.0.2" jsx-ast-utils "^2.4.1 || ^3.0.0" minimatch "^3.1.2" object.entries "^1.1.8" object.fromentries "^2.0.8" - object.hasown "^1.1.4" object.values "^1.2.0" prop-types "^15.8.1" resolve "^2.0.0-next.5" semver "^6.3.1" string.prototype.matchall "^4.0.11" + string.prototype.repeat "^1.0.0" -eslint-scope@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" - -eslint-scope@^7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" - integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== +eslint-scope@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.0.2.tgz#5cbb33d4384c9136083a71190d548158fe128f94" + integrity sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" @@ -5795,41 +5806,42 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@^8.5.0: - version "8.57.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668" - integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ== +eslint-visitor-keys@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz#e3adc021aa038a2a8e0b2f8b0ce8f66b9483b1fb" + integrity sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw== + +eslint@^9.9.0: + version "9.9.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.9.0.tgz#8d214e69ae4debeca7ae97daebbefe462072d975" + integrity sha512-JfiKJrbx0506OEerjK2Y1QlldtBxkAlLxT5OEcRF8uaQ86noDe2k31Vw9rnSWv+MXZHj7OOUV/dA0AhdLFcyvA== dependencies: "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^2.1.4" - "@eslint/js" "8.57.0" - "@humanwhocodes/config-array" "^0.11.14" + "@eslint-community/regexpp" "^4.11.0" + "@eslint/config-array" "^0.17.1" + "@eslint/eslintrc" "^3.1.0" + "@eslint/js" "9.9.0" "@humanwhocodes/module-importer" "^1.0.1" + "@humanwhocodes/retry" "^0.3.0" "@nodelib/fs.walk" "^1.2.8" - "@ungap/structured-clone" "^1.2.0" ajv "^6.12.4" chalk "^4.0.0" cross-spawn "^7.0.2" debug "^4.3.2" - doctrine "^3.0.0" escape-string-regexp "^4.0.0" - eslint-scope "^7.2.2" - eslint-visitor-keys "^3.4.3" - espree "^9.6.1" - esquery "^1.4.2" + eslint-scope "^8.0.2" + eslint-visitor-keys "^4.0.0" + espree "^10.1.0" + esquery "^1.5.0" esutils "^2.0.2" fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" + file-entry-cache "^8.0.0" find-up "^5.0.0" glob-parent "^6.0.2" - globals "^13.19.0" - graphemer "^1.4.0" ignore "^5.2.0" imurmurhash "^0.1.4" is-glob "^4.0.0" is-path-inside "^3.0.3" - js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" lodash.merge "^4.6.2" @@ -5839,24 +5851,24 @@ eslint@^8.5.0: strip-ansi "^6.0.1" text-table "^0.2.0" -espree@^9.6.0, espree@^9.6.1: - version "9.6.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" - integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== +espree@^10.0.1, espree@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.1.0.tgz#8788dae611574c0f070691f522e4116c5a11fc56" + integrity sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA== dependencies: - acorn "^8.9.0" + acorn "^8.12.0" acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.4.1" + eslint-visitor-keys "^4.0.0" esprima@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.4.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== +esquery@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" + integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== dependencies: estraverse "^5.1.0" @@ -5867,11 +5879,6 @@ esrecurse@^4.3.0: dependencies: estraverse "^5.2.0" -estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" @@ -6134,12 +6141,12 @@ figures@^3.0.0, figures@^3.2.0: dependencies: escape-string-regexp "^1.0.5" -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== +file-entry-cache@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f" + integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ== dependencies: - flat-cache "^3.0.4" + flat-cache "^4.0.0" file-source@0.6: version "0.6.1" @@ -6247,14 +6254,13 @@ first-chunk-stream@^2.0.0: dependencies: readable-stream "^2.0.2" -flat-cache@^3.0.4: - version "3.2.0" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" - integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== +flat-cache@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c" + integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw== dependencies: flatted "^3.2.9" - keyv "^4.5.3" - rimraf "^3.0.2" + keyv "^4.5.4" flatted@^3.2.9: version "3.3.1" @@ -6506,7 +6512,7 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: +get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2, get-intrinsic@^1.2.3, get-intrinsic@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== @@ -6693,12 +6699,10 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^13.19.0: - version "13.24.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.24.0.tgz#8432a19d78ce0c1e833949c36adb345400bb1171" - integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== - dependencies: - type-fest "^0.20.2" +globals@^14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" + integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== globalthis@^1.0.1, globalthis@^1.0.3: version "1.0.4" @@ -7252,7 +7256,7 @@ inquirer@^8.0.0, inquirer@^8.2.0: through "^2.3.6" wrap-ansi "^6.0.1" -internal-slot@^1.0.7: +internal-slot@^1.0.4, internal-slot@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.7.tgz#c06dcca3ed874249881007b0a5523b172a190802" integrity sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g== @@ -7354,7 +7358,7 @@ is-arguments@^1.1.1: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-array-buffer@^3.0.4: +is-array-buffer@^3.0.2, is-array-buffer@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.4.tgz#7a1f92b3d61edd2bc65d24f130530ea93d7fae98" integrity sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw== @@ -7519,7 +7523,7 @@ is-lambda@^1.0.1: resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ== -is-map@^2.0.3: +is-map@^2.0.2, is-map@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.3.tgz#ede96b7fe1e270b3c4465e3a465658764926d62e" integrity sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw== @@ -7621,7 +7625,7 @@ is-scoped@^2.1.0: dependencies: scoped-regex "^2.0.0" -is-set@^2.0.3: +is-set@^2.0.2, is-set@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.3.tgz#8ab209ea424608141372ded6e0cb200ef1d9d01d" integrity sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg== @@ -8487,7 +8491,7 @@ keyv@^3.0.0: dependencies: json-buffer "3.0.0" -keyv@^4.0.0, keyv@^4.5.3: +keyv@^4.0.0, keyv@^4.5.3, keyv@^4.5.4: version "4.5.4" resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== @@ -9013,7 +9017,7 @@ mimic-response@^4.0.0: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-4.0.0.tgz#35468b19e7c75d10f5165ea25e75a5ceea7cf70f" integrity sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg== -"minimatch@2 || 3", minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: +"minimatch@2 || 3", minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -9632,7 +9636,7 @@ object.assign@^4.1.2, object.assign@^4.1.4, object.assign@^4.1.5: has-symbols "^1.0.3" object-keys "^1.1.1" -object.entries@^1.1.5, object.entries@^1.1.7, object.entries@^1.1.8: +object.entries@^1.1.5, object.entries@^1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.8.tgz#bffe6f282e01f4d17807204a24f8edd823599c41" integrity sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ== @@ -9660,15 +9664,6 @@ object.groupby@^1.0.1: define-properties "^1.2.1" es-abstract "^1.23.2" -object.hasown@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/object.hasown/-/object.hasown-1.1.4.tgz#e270ae377e4c120cdcb7656ce66884a6218283dc" - integrity sha512-FZ9LZt9/RHzGySlBARE3VF+gE26TxR38SdmqOqliuTnl9wrKulaQs+4dee1V+Io8VfxqzAfHu6YuRgUy8OHoTg== - dependencies: - define-properties "^1.2.1" - es-abstract "^1.23.2" - es-object-atoms "^1.0.0" - object.values@^1.1.6, object.values@^1.1.7, object.values@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.2.0.tgz#65405a9d92cee68ac2d303002e0b8470a4d9ab1b" @@ -11079,11 +11074,16 @@ semver@^6.0.0, semver@^6.2.0, semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.1.1, semver@^7.1.3, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4, semver@^7.6.2: +semver@^7.1.1, semver@^7.1.3, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.5.3, semver@^7.5.4, semver@^7.6.2: version "7.6.2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== +semver@^7.6.0: + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== + send@0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" @@ -11531,6 +11531,13 @@ statuses@2.0.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== +stop-iteration-iterator@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz#6a60be0b4ee757d1ed5254858ec66b10c49285e4" + integrity sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ== + dependencies: + internal-slot "^1.0.4" + stream-buffers@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-3.0.2.tgz#5249005a8d5c2d00b3a32e6e0a6ea209dc4f3521" @@ -11621,6 +11628,14 @@ string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" +string.prototype.includes@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/string.prototype.includes/-/string.prototype.includes-2.0.0.tgz#8986d57aee66d5460c144620a6d873778ad7289f" + integrity sha512-E34CkBgyeqNDcrbU76cDjL5JLcVrtSdYq0MEh/B10r17pRP4ciHLwTgnuLV8Ay6cgEMLkcBkFCKyFZ43YldYzg== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + string.prototype.matchall@^4.0.11: version "4.0.11" resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz#1092a72c59268d2abaad76582dccc687c0297e0a" @@ -11639,6 +11654,14 @@ string.prototype.matchall@^4.0.11: set-function-name "^2.0.2" side-channel "^1.0.6" +string.prototype.repeat@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz#e90872ee0308b29435aa26275f6e1b762daee01a" + integrity sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.5" + string.prototype.trim@^1.2.9: version "1.2.9" resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz#b6fa326d72d2c78b6df02f7759c73f8f6274faa4" @@ -12046,7 +12069,7 @@ trim-newlines@^2.0.0: resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-2.0.0.tgz#b403d0b91be50c331dfc4b82eeceb22c3de16d20" integrity sha512-MTBWv3jhVjTU7XR3IQHllbiJs8sc75a80OEhB6or/q7pLTWgQ0bMGQXXYQSrSuXe6WiKWDZ5txXY5P59a/coVA== -ts-api-utils@^1.0.1: +ts-api-utils@^1.0.1, ts-api-utils@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1" integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== @@ -12091,7 +12114,7 @@ tsconfig-paths@^3.15.0: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^1.11.1, tslib@^1.8.1, tslib@^1.9.3: +tslib@^1.11.1, tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -12101,13 +12124,6 @@ tslib@^2.1.0, tslib@^2.3.1, tslib@^2.4.0, tslib@^2.4.1, tslib@^2.6.2: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== -tsutils@^3.21.0: - version "3.21.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" - integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== - dependencies: - tslib "^1.8.1" - tty-table@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/tty-table/-/tty-table-4.2.3.tgz#e33eb4007a0a9c976c97c37fa13ba66329a5c515" @@ -12676,7 +12692,7 @@ which-pm@2.0.0: load-yaml-file "^0.2.0" path-exists "^4.0.0" -which-typed-array@^1.1.14, which-typed-array@^1.1.15, which-typed-array@^1.1.9: +which-typed-array@^1.1.13, which-typed-array@^1.1.14, which-typed-array@^1.1.15, which-typed-array@^1.1.9: version "1.1.15" resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d" integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA== From 6c40e2d50acc65aaa2dd8e3b3669c9cf85b03acb Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Fri, 23 Aug 2024 10:13:35 -0700 Subject: [PATCH 03/16] consolidate the jest configs --- jest.config.base.js | 66 +++++++++++++------ packages/data-mate/jest.config.js | 9 --- packages/data-types/jest.config.js | 9 --- packages/docker-compose-js/jest.config.js | 32 --------- packages/elasticsearch-api/jest.config.js | 9 --- packages/elasticsearch-store/jest.config.js | 9 --- packages/eslint-config/jest.config.js | 12 +++- packages/job-components/jest.config.js | 33 ---------- packages/scripts/jest.config.js | 9 --- packages/terafoundation/jest.config.js | 33 ---------- packages/teraslice-cli/jest.config.js | 33 ---------- packages/teraslice-client-js/jest.config.js | 33 ---------- packages/teraslice-messaging/jest.config.js | 33 ---------- .../teraslice-state-storage/jest.config.js | 9 --- .../teraslice-test-harness/jest.config.js | 33 ---------- packages/teraslice/jest.config.js | 9 --- packages/ts-transforms/jest.config.js | 9 --- packages/types/jest.config.js | 9 --- packages/utils/jest.config.js | 29 -------- packages/xlucene-parser/jest.config.js | 9 --- packages/xlucene-translator/jest.config.js | 9 --- packages/xpressions/jest.config.js | 9 --- 22 files changed, 55 insertions(+), 390 deletions(-) diff --git a/jest.config.base.js b/jest.config.base.js index 9804366e85c..fa40229564d 100644 --- a/jest.config.base.js +++ b/jest.config.base.js @@ -50,15 +50,17 @@ export default (projectDir) => { `/${parentFolder}/*/dist`, `/${parentFolder}/teraslice-cli/test/fixtures/` ], - transformIgnorePatterns: ['^.+\\.js$'], - moduleNameMapper: {}, + transformIgnorePatterns: [], + moduleNameMapper: { + '^(\\.{1,2}/.*)\\.js$': '$1', + }, moduleFileExtensions: ['ts', 'js', 'json', 'node', 'pegjs', 'mjs'], + extensionsToTreatAsEsm: ['.ts'], collectCoverage: true, coveragePathIgnorePatterns: ['/node_modules/', '/test/'], watchPathIgnorePatterns: [], coverageReporters, coverageDirectory: `${packageRoot}/coverage`, - preset: 'ts-jest', watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'], workerIdleMemoryLimit: '200MB' }; @@ -82,24 +84,46 @@ export default (projectDir) => { config.globals = { availableExtensions: ['.js', '.ts', '.mjs', 'cjs'] }; - config.transform = {}; - - if (isTypescript) { - config.transform['\\.[jt]sx?$'] = ['ts-jest', { - isolatedModules: true, - tsconfig: runInDir ? './tsconfig.json' : `./${workspaceName}/tsconfig.json`, - diagnostics: true, - pretty: true, - useESM: true - }]; - } else { - config.transform['\\.[jt]sx?$'] = ['ts-jest', { - isolatedModules: true, - diagnostics: true, - pretty: true, - useESM: true - }]; - } + + config.transform['^.+\\.(t|j)sx?$'] = ['@swc/jest', { + jsc: { + loose: true, + parser: { + syntax: 'typescript', + tsx: false, + decorators: true + }, + transform: { + legacyDecorator: true, + decoratorMetadata: true + }, + target: 'esnext' + }, + module: { + type: 'es6', + strictMode: false, + noInterop: false, + ignoreDynamic: true + } + }]; + config.testTimeout = 60 * 1000; + + // if (isTypescript) { + // config.transform['\\.[jt]sx?$'] = ['ts-jest', { + // isolatedModules: true, + // tsconfig: runInDir ? './tsconfig.json' : `./${workspaceName}/tsconfig.json`, + // diagnostics: true, + // pretty: true, + // useESM: true + // }]; + // } else { + // config.transform['\\.[jt]sx?$'] = ['ts-jest', { + // isolatedModules: true, + // diagnostics: true, + // pretty: true, + // useESM: true + // }]; + // } config.roots = [`${packageRoot}/test`]; diff --git a/packages/data-mate/jest.config.js b/packages/data-mate/jest.config.js index 8cd8bbef4d0..fa6e9f0772b 100644 --- a/packages/data-mate/jest.config.js +++ b/packages/data-mate/jest.config.js @@ -8,13 +8,4 @@ const module = await import(configModulePath); const config = module.default(dirPath); -config.extensionsToTreatAsEsm = ['.ts']; -config.moduleNameMapper = { - '^(\\.{1,2}/.*)\\.js$': '$1', -}; -config.testTimeout = 60 * 1000; -config.transform = {}; - -config.transform['^.+\\.(t|j)sx?$'] = '@swc/jest'; - export default config; diff --git a/packages/data-types/jest.config.js b/packages/data-types/jest.config.js index 8cd8bbef4d0..fa6e9f0772b 100644 --- a/packages/data-types/jest.config.js +++ b/packages/data-types/jest.config.js @@ -8,13 +8,4 @@ const module = await import(configModulePath); const config = module.default(dirPath); -config.extensionsToTreatAsEsm = ['.ts']; -config.moduleNameMapper = { - '^(\\.{1,2}/.*)\\.js$': '$1', -}; -config.testTimeout = 60 * 1000; -config.transform = {}; - -config.transform['^.+\\.(t|j)sx?$'] = '@swc/jest'; - export default config; diff --git a/packages/docker-compose-js/jest.config.js b/packages/docker-compose-js/jest.config.js index b444dfb6c56..fa6e9f0772b 100644 --- a/packages/docker-compose-js/jest.config.js +++ b/packages/docker-compose-js/jest.config.js @@ -8,36 +8,4 @@ const module = await import(configModulePath); const config = module.default(dirPath); -config.extensionsToTreatAsEsm = ['.ts']; -config.moduleNameMapper = { - '^(\\.{1,2}/.*)\\.js$': '$1', -}; -config.testTimeout = 60 * 1000; -config.transform = {}; - -config.transform['^.+\\.(t|j)sx?$'] = ['@swc/jest', { - jsc: { - loose: true, - parser: { - syntax: 'typescript', - tsx: false, - decorators: true - }, - transform: { - legacyDecorator: true, - decoratorMetadata: true - }, - target: 'esnext' - }, - module: { - type: 'es6', - strictMode: false, - noInterop: false, - ignoreDynamic: true - } -}]; - -config.transformIgnorePatterns = []; -config.preset = ''; - export default config; diff --git a/packages/elasticsearch-api/jest.config.js b/packages/elasticsearch-api/jest.config.js index 8cd8bbef4d0..fa6e9f0772b 100644 --- a/packages/elasticsearch-api/jest.config.js +++ b/packages/elasticsearch-api/jest.config.js @@ -8,13 +8,4 @@ const module = await import(configModulePath); const config = module.default(dirPath); -config.extensionsToTreatAsEsm = ['.ts']; -config.moduleNameMapper = { - '^(\\.{1,2}/.*)\\.js$': '$1', -}; -config.testTimeout = 60 * 1000; -config.transform = {}; - -config.transform['^.+\\.(t|j)sx?$'] = '@swc/jest'; - export default config; diff --git a/packages/elasticsearch-store/jest.config.js b/packages/elasticsearch-store/jest.config.js index 8cd8bbef4d0..fa6e9f0772b 100644 --- a/packages/elasticsearch-store/jest.config.js +++ b/packages/elasticsearch-store/jest.config.js @@ -8,13 +8,4 @@ const module = await import(configModulePath); const config = module.default(dirPath); -config.extensionsToTreatAsEsm = ['.ts']; -config.moduleNameMapper = { - '^(\\.{1,2}/.*)\\.js$': '$1', -}; -config.testTimeout = 60 * 1000; -config.transform = {}; - -config.transform['^.+\\.(t|j)sx?$'] = '@swc/jest'; - export default config; diff --git a/packages/eslint-config/jest.config.js b/packages/eslint-config/jest.config.js index af460c27950..fa6e9f0772b 100644 --- a/packages/eslint-config/jest.config.js +++ b/packages/eslint-config/jest.config.js @@ -1,3 +1,11 @@ -'use strict'; +import { fileURLToPath } from 'node:url'; +import path from 'node:path'; -module.exports = require('../../jest.config.base')(__dirname); +const dirPath = fileURLToPath(new URL('.', import.meta.url)); +const configModulePath = path.join(dirPath, '../../jest.config.base.js'); + +const module = await import(configModulePath); + +const config = module.default(dirPath); + +export default config; diff --git a/packages/job-components/jest.config.js b/packages/job-components/jest.config.js index 55d7d9594bf..fa6e9f0772b 100644 --- a/packages/job-components/jest.config.js +++ b/packages/job-components/jest.config.js @@ -8,37 +8,4 @@ const module = await import(configModulePath); const config = module.default(dirPath); -config.extensionsToTreatAsEsm = ['.ts']; -config.moduleNameMapper = { - '^(\\.{1,2}/.*)\\.js$': '$1', -}; -config.testTimeout = 60 * 1000; - -// using swc for some reason throws rust file not found errors, -// seems like a bug on their end, hope to change back later -config.transform = {}; -config.transform['^.+\\.(t|j)sx?$'] = ['@swc/jest', { - jsc: { - loose: true, - parser: { - syntax: 'typescript', - tsx: false, - decorators: true - }, - transform: { - legacyDecorator: true, - decoratorMetadata: true - }, - target: 'esnext' - }, - module: { - type: 'es6', - strictMode: false, - noInterop: false, - ignoreDynamic: true - } -}]; - -config.transformIgnorePatterns = []; -config.preset = ''; export default config; diff --git a/packages/scripts/jest.config.js b/packages/scripts/jest.config.js index 8cd8bbef4d0..fa6e9f0772b 100644 --- a/packages/scripts/jest.config.js +++ b/packages/scripts/jest.config.js @@ -8,13 +8,4 @@ const module = await import(configModulePath); const config = module.default(dirPath); -config.extensionsToTreatAsEsm = ['.ts']; -config.moduleNameMapper = { - '^(\\.{1,2}/.*)\\.js$': '$1', -}; -config.testTimeout = 60 * 1000; -config.transform = {}; - -config.transform['^.+\\.(t|j)sx?$'] = '@swc/jest'; - export default config; diff --git a/packages/terafoundation/jest.config.js b/packages/terafoundation/jest.config.js index 55d7d9594bf..fa6e9f0772b 100644 --- a/packages/terafoundation/jest.config.js +++ b/packages/terafoundation/jest.config.js @@ -8,37 +8,4 @@ const module = await import(configModulePath); const config = module.default(dirPath); -config.extensionsToTreatAsEsm = ['.ts']; -config.moduleNameMapper = { - '^(\\.{1,2}/.*)\\.js$': '$1', -}; -config.testTimeout = 60 * 1000; - -// using swc for some reason throws rust file not found errors, -// seems like a bug on their end, hope to change back later -config.transform = {}; -config.transform['^.+\\.(t|j)sx?$'] = ['@swc/jest', { - jsc: { - loose: true, - parser: { - syntax: 'typescript', - tsx: false, - decorators: true - }, - transform: { - legacyDecorator: true, - decoratorMetadata: true - }, - target: 'esnext' - }, - module: { - type: 'es6', - strictMode: false, - noInterop: false, - ignoreDynamic: true - } -}]; - -config.transformIgnorePatterns = []; -config.preset = ''; export default config; diff --git a/packages/teraslice-cli/jest.config.js b/packages/teraslice-cli/jest.config.js index 55d7d9594bf..fa6e9f0772b 100644 --- a/packages/teraslice-cli/jest.config.js +++ b/packages/teraslice-cli/jest.config.js @@ -8,37 +8,4 @@ const module = await import(configModulePath); const config = module.default(dirPath); -config.extensionsToTreatAsEsm = ['.ts']; -config.moduleNameMapper = { - '^(\\.{1,2}/.*)\\.js$': '$1', -}; -config.testTimeout = 60 * 1000; - -// using swc for some reason throws rust file not found errors, -// seems like a bug on their end, hope to change back later -config.transform = {}; -config.transform['^.+\\.(t|j)sx?$'] = ['@swc/jest', { - jsc: { - loose: true, - parser: { - syntax: 'typescript', - tsx: false, - decorators: true - }, - transform: { - legacyDecorator: true, - decoratorMetadata: true - }, - target: 'esnext' - }, - module: { - type: 'es6', - strictMode: false, - noInterop: false, - ignoreDynamic: true - } -}]; - -config.transformIgnorePatterns = []; -config.preset = ''; export default config; diff --git a/packages/teraslice-client-js/jest.config.js b/packages/teraslice-client-js/jest.config.js index 55d7d9594bf..fa6e9f0772b 100644 --- a/packages/teraslice-client-js/jest.config.js +++ b/packages/teraslice-client-js/jest.config.js @@ -8,37 +8,4 @@ const module = await import(configModulePath); const config = module.default(dirPath); -config.extensionsToTreatAsEsm = ['.ts']; -config.moduleNameMapper = { - '^(\\.{1,2}/.*)\\.js$': '$1', -}; -config.testTimeout = 60 * 1000; - -// using swc for some reason throws rust file not found errors, -// seems like a bug on their end, hope to change back later -config.transform = {}; -config.transform['^.+\\.(t|j)sx?$'] = ['@swc/jest', { - jsc: { - loose: true, - parser: { - syntax: 'typescript', - tsx: false, - decorators: true - }, - transform: { - legacyDecorator: true, - decoratorMetadata: true - }, - target: 'esnext' - }, - module: { - type: 'es6', - strictMode: false, - noInterop: false, - ignoreDynamic: true - } -}]; - -config.transformIgnorePatterns = []; -config.preset = ''; export default config; diff --git a/packages/teraslice-messaging/jest.config.js b/packages/teraslice-messaging/jest.config.js index 55d7d9594bf..fa6e9f0772b 100644 --- a/packages/teraslice-messaging/jest.config.js +++ b/packages/teraslice-messaging/jest.config.js @@ -8,37 +8,4 @@ const module = await import(configModulePath); const config = module.default(dirPath); -config.extensionsToTreatAsEsm = ['.ts']; -config.moduleNameMapper = { - '^(\\.{1,2}/.*)\\.js$': '$1', -}; -config.testTimeout = 60 * 1000; - -// using swc for some reason throws rust file not found errors, -// seems like a bug on their end, hope to change back later -config.transform = {}; -config.transform['^.+\\.(t|j)sx?$'] = ['@swc/jest', { - jsc: { - loose: true, - parser: { - syntax: 'typescript', - tsx: false, - decorators: true - }, - transform: { - legacyDecorator: true, - decoratorMetadata: true - }, - target: 'esnext' - }, - module: { - type: 'es6', - strictMode: false, - noInterop: false, - ignoreDynamic: true - } -}]; - -config.transformIgnorePatterns = []; -config.preset = ''; export default config; diff --git a/packages/teraslice-state-storage/jest.config.js b/packages/teraslice-state-storage/jest.config.js index 8cd8bbef4d0..fa6e9f0772b 100644 --- a/packages/teraslice-state-storage/jest.config.js +++ b/packages/teraslice-state-storage/jest.config.js @@ -8,13 +8,4 @@ const module = await import(configModulePath); const config = module.default(dirPath); -config.extensionsToTreatAsEsm = ['.ts']; -config.moduleNameMapper = { - '^(\\.{1,2}/.*)\\.js$': '$1', -}; -config.testTimeout = 60 * 1000; -config.transform = {}; - -config.transform['^.+\\.(t|j)sx?$'] = '@swc/jest'; - export default config; diff --git a/packages/teraslice-test-harness/jest.config.js b/packages/teraslice-test-harness/jest.config.js index 55d7d9594bf..fa6e9f0772b 100644 --- a/packages/teraslice-test-harness/jest.config.js +++ b/packages/teraslice-test-harness/jest.config.js @@ -8,37 +8,4 @@ const module = await import(configModulePath); const config = module.default(dirPath); -config.extensionsToTreatAsEsm = ['.ts']; -config.moduleNameMapper = { - '^(\\.{1,2}/.*)\\.js$': '$1', -}; -config.testTimeout = 60 * 1000; - -// using swc for some reason throws rust file not found errors, -// seems like a bug on their end, hope to change back later -config.transform = {}; -config.transform['^.+\\.(t|j)sx?$'] = ['@swc/jest', { - jsc: { - loose: true, - parser: { - syntax: 'typescript', - tsx: false, - decorators: true - }, - transform: { - legacyDecorator: true, - decoratorMetadata: true - }, - target: 'esnext' - }, - module: { - type: 'es6', - strictMode: false, - noInterop: false, - ignoreDynamic: true - } -}]; - -config.transformIgnorePatterns = []; -config.preset = ''; export default config; diff --git a/packages/teraslice/jest.config.js b/packages/teraslice/jest.config.js index 8cd8bbef4d0..fa6e9f0772b 100644 --- a/packages/teraslice/jest.config.js +++ b/packages/teraslice/jest.config.js @@ -8,13 +8,4 @@ const module = await import(configModulePath); const config = module.default(dirPath); -config.extensionsToTreatAsEsm = ['.ts']; -config.moduleNameMapper = { - '^(\\.{1,2}/.*)\\.js$': '$1', -}; -config.testTimeout = 60 * 1000; -config.transform = {}; - -config.transform['^.+\\.(t|j)sx?$'] = '@swc/jest'; - export default config; diff --git a/packages/ts-transforms/jest.config.js b/packages/ts-transforms/jest.config.js index 8cd8bbef4d0..fa6e9f0772b 100644 --- a/packages/ts-transforms/jest.config.js +++ b/packages/ts-transforms/jest.config.js @@ -8,13 +8,4 @@ const module = await import(configModulePath); const config = module.default(dirPath); -config.extensionsToTreatAsEsm = ['.ts']; -config.moduleNameMapper = { - '^(\\.{1,2}/.*)\\.js$': '$1', -}; -config.testTimeout = 60 * 1000; -config.transform = {}; - -config.transform['^.+\\.(t|j)sx?$'] = '@swc/jest'; - export default config; diff --git a/packages/types/jest.config.js b/packages/types/jest.config.js index 8cd8bbef4d0..fa6e9f0772b 100644 --- a/packages/types/jest.config.js +++ b/packages/types/jest.config.js @@ -8,13 +8,4 @@ const module = await import(configModulePath); const config = module.default(dirPath); -config.extensionsToTreatAsEsm = ['.ts']; -config.moduleNameMapper = { - '^(\\.{1,2}/.*)\\.js$': '$1', -}; -config.testTimeout = 60 * 1000; -config.transform = {}; - -config.transform['^.+\\.(t|j)sx?$'] = '@swc/jest'; - export default config; diff --git a/packages/utils/jest.config.js b/packages/utils/jest.config.js index 911b270a233..fa6e9f0772b 100644 --- a/packages/utils/jest.config.js +++ b/packages/utils/jest.config.js @@ -8,33 +8,4 @@ const module = await import(configModulePath); const config = module.default(dirPath); -config.extensionsToTreatAsEsm = ['.ts']; -config.moduleNameMapper = { - '^(\\.{1,2}/.*)\\.js$': '$1', -}; -config.testTimeout = 60 * 1000; -config.transform = {}; - -config.transform['^.+\\.(t|j)sx?$'] = ['@swc/jest', { - jsc: { - loose: true, - parser: { - syntax: 'typescript', - tsx: false, - decorators: true - }, - transform: { - legacyDecorator: true, - decoratorMetadata: true - }, - target: 'esnext' - }, - module: { - type: 'es6', - strictMode: false, - noInterop: false, - ignoreDynamic: true - } -}]; - export default config; diff --git a/packages/xlucene-parser/jest.config.js b/packages/xlucene-parser/jest.config.js index 8cd8bbef4d0..fa6e9f0772b 100644 --- a/packages/xlucene-parser/jest.config.js +++ b/packages/xlucene-parser/jest.config.js @@ -8,13 +8,4 @@ const module = await import(configModulePath); const config = module.default(dirPath); -config.extensionsToTreatAsEsm = ['.ts']; -config.moduleNameMapper = { - '^(\\.{1,2}/.*)\\.js$': '$1', -}; -config.testTimeout = 60 * 1000; -config.transform = {}; - -config.transform['^.+\\.(t|j)sx?$'] = '@swc/jest'; - export default config; diff --git a/packages/xlucene-translator/jest.config.js b/packages/xlucene-translator/jest.config.js index 8cd8bbef4d0..fa6e9f0772b 100644 --- a/packages/xlucene-translator/jest.config.js +++ b/packages/xlucene-translator/jest.config.js @@ -8,13 +8,4 @@ const module = await import(configModulePath); const config = module.default(dirPath); -config.extensionsToTreatAsEsm = ['.ts']; -config.moduleNameMapper = { - '^(\\.{1,2}/.*)\\.js$': '$1', -}; -config.testTimeout = 60 * 1000; -config.transform = {}; - -config.transform['^.+\\.(t|j)sx?$'] = '@swc/jest'; - export default config; diff --git a/packages/xpressions/jest.config.js b/packages/xpressions/jest.config.js index 8cd8bbef4d0..fa6e9f0772b 100644 --- a/packages/xpressions/jest.config.js +++ b/packages/xpressions/jest.config.js @@ -8,13 +8,4 @@ const module = await import(configModulePath); const config = module.default(dirPath); -config.extensionsToTreatAsEsm = ['.ts']; -config.moduleNameMapper = { - '^(\\.{1,2}/.*)\\.js$': '$1', -}; -config.testTimeout = 60 * 1000; -config.transform = {}; - -config.transform['^.+\\.(t|j)sx?$'] = '@swc/jest'; - export default config; From 69ddeb42903619230cd1abacc015eb3d143cdfaa Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Fri, 23 Aug 2024 15:06:48 -0700 Subject: [PATCH 04/16] finish updating configs --- jest.config.base.js | 17 ----------------- jest.config.js | 28 +++++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/jest.config.base.js b/jest.config.base.js index fa40229564d..279efd20c93 100644 --- a/jest.config.base.js +++ b/jest.config.base.js @@ -108,23 +108,6 @@ export default (projectDir) => { }]; config.testTimeout = 60 * 1000; - // if (isTypescript) { - // config.transform['\\.[jt]sx?$'] = ['ts-jest', { - // isolatedModules: true, - // tsconfig: runInDir ? './tsconfig.json' : `./${workspaceName}/tsconfig.json`, - // diagnostics: true, - // pretty: true, - // useESM: true - // }]; - // } else { - // config.transform['\\.[jt]sx?$'] = ['ts-jest', { - // isolatedModules: true, - // diagnostics: true, - // pretty: true, - // useESM: true - // }]; - // } - config.roots = [`${packageRoot}/test`]; if (fs.existsSync(path.join(projectDir, 'lib'))) { diff --git a/jest.config.js b/jest.config.js index 5d9c51969bf..d261846840c 100644 --- a/jest.config.js +++ b/jest.config.js @@ -68,5 +68,31 @@ export default { ], coverageReporters, coverageDirectory: '/coverage', - preset: 'ts-jest' + moduleNameMapper: { + '^(\\.{1,2}/.*)\\.js$': '$1', + }, + extensionsToTreatAsEsm: ['.ts'], + transform: { + ['^.+\\.(t|j)sx?$']: ['@swc/jest', { + jsc: { + loose: true, + parser: { + syntax: 'typescript', + tsx: false, + decorators: true + }, + transform: { + legacyDecorator: true, + decoratorMetadata: true + }, + target: 'esnext' + }, + module: { + type: 'es6', + strictMode: false, + noInterop: false, + ignoreDynamic: true + } + }] + } }; From 022dc48f5bea7cc0680068b9879b9b620599f380 Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Mon, 26 Aug 2024 09:19:42 -0700 Subject: [PATCH 05/16] fix config bug --- jest.config.base.js | 59 ++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/jest.config.base.js b/jest.config.base.js index 279efd20c93..240f9b42030 100644 --- a/jest.config.base.js +++ b/jest.config.base.js @@ -62,7 +62,35 @@ export default (projectDir) => { coverageReporters, coverageDirectory: `${packageRoot}/coverage`, watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'], - workerIdleMemoryLimit: '200MB' + workerIdleMemoryLimit: '200MB', + testTimeout: 60 * 1000, + globals: { + availableExtensions: ['.js', '.ts', '.mjs', 'cjs'] + }, + transform: { + ['^.+\\.(t|j)sx?$']: ['@swc/jest', { + jsc: { + loose: true, + parser: { + syntax: 'typescript', + tsx: false, + decorators: true + }, + transform: { + legacyDecorator: true, + decoratorMetadata: true + }, + target: 'esnext' + }, + module: { + type: 'es6', + strictMode: false, + noInterop: false, + ignoreDynamic: true + } + }] + }, + roots: [`${packageRoot}/test`] }; if (fs.existsSync(path.join(projectDir, 'test/global.setup.js'))) { @@ -81,35 +109,6 @@ export default (projectDir) => { config.setupFilesAfterEnv.push(`${packageRoot}/test/test.setup.js`); } - config.globals = { - availableExtensions: ['.js', '.ts', '.mjs', 'cjs'] - }; - - config.transform['^.+\\.(t|j)sx?$'] = ['@swc/jest', { - jsc: { - loose: true, - parser: { - syntax: 'typescript', - tsx: false, - decorators: true - }, - transform: { - legacyDecorator: true, - decoratorMetadata: true - }, - target: 'esnext' - }, - module: { - type: 'es6', - strictMode: false, - noInterop: false, - ignoreDynamic: true - } - }]; - config.testTimeout = 60 * 1000; - - config.roots = [`${packageRoot}/test`]; - if (fs.existsSync(path.join(projectDir, 'lib'))) { config.roots.push(`${packageRoot}/lib`); } else if (fs.existsSync(path.join(projectDir, 'index.js'))) { From 43080a0823d40062f03d59787764ff982ebe6399 Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Mon, 26 Aug 2024 13:22:04 -0700 Subject: [PATCH 06/16] fix tests --- e2e/jest.config.js | 30 +------------------ jest.config.base.js | 4 +-- packages/data-mate/bench/generate-data.js | 2 +- .../src/validations/field-validator.ts | 3 +- packages/data-types/bin/data-types.js | 2 +- packages/elasticsearch-api/index.js | 2 +- packages/elasticsearch-api/test/api-spec.js | 4 +-- packages/eslint-config/index.js | 1 - .../eslint-config/lib/rules/javascript.js | 9 ++++++ packages/eslint-config/test/index-spec.js | 2 -- packages/scripts/bin/ts-scripts.js | 2 +- packages/ts-transforms/bin/ts-transform.js | 2 +- .../xlucene-parser/scripts/generate-engine.js | 1 - service.js | 2 +- 14 files changed, 20 insertions(+), 46 deletions(-) diff --git a/e2e/jest.config.js b/e2e/jest.config.js index 10f1291099b..eba4aa064cd 100644 --- a/e2e/jest.config.js +++ b/e2e/jest.config.js @@ -1,6 +1,6 @@ import { fileURLToPath } from 'node:url'; import path from 'node:path'; -import URL from 'node:url'; +import { URL } from 'node:url'; const dirPath = fileURLToPath(new URL('.', import.meta.url)); const configModulePath = path.join(dirPath, '../jest.config.base.js'); @@ -16,33 +16,5 @@ config.testPathIgnorePatterns = process.env.CLUSTERING_TYPE !== 'native' ? ['dat config.collectCoverage = false; config.testTimeout = 3 * 60 * 1000; -config.extensionsToTreatAsEsm = ['.ts']; -config.moduleNameMapper = { - '^(\\.{1,2}/.*)\\.js$': '$1', -}; -config.transform = {}; -config.transform['^.+\\.(t|j)sx?$'] = ['@swc/jest', { - jsc: { - loose: true, - parser: { - syntax: 'typescript', - tsx: false, - decorators: true - }, - transform: { - legacyDecorator: true, - decoratorMetadata: true - }, - target: 'esnext' - }, - module: { - type: 'es6', - strictMode: false, - noInterop: false, - ignoreDynamic: true - } -}]; -config.transformIgnorePatterns = []; -config.preset = ''; export default config; diff --git a/jest.config.base.js b/jest.config.base.js index 240f9b42030..96a8ecaea58 100644 --- a/jest.config.base.js +++ b/jest.config.base.js @@ -31,8 +31,6 @@ export default (projectDir) => { rootDir = '../../'; } - const isTypescript = fs.existsSync(path.join(projectDir, 'tsconfig.json')); - const coverageReporters = ['lcov', 'html']; if (!isCI) { coverageReporters.push('text-summary'); @@ -69,7 +67,7 @@ export default (projectDir) => { }, transform: { ['^.+\\.(t|j)sx?$']: ['@swc/jest', { - jsc: { + jsc: { loose: true, parser: { syntax: 'typescript', diff --git a/packages/data-mate/bench/generate-data.js b/packages/data-mate/bench/generate-data.js index 141c313753e..46daf36b542 100644 --- a/packages/data-mate/bench/generate-data.js +++ b/packages/data-mate/bench/generate-data.js @@ -149,7 +149,7 @@ console.dir({ data: records }); fs.writeFile(path.join(dirname, 'fixtures/data.json'), data, (err) => { - if (err) reject(); + if (err) reject(err); else resolve(); }); }); diff --git a/packages/data-mate/src/validations/field-validator.ts b/packages/data-mate/src/validations/field-validator.ts index 91764ec6df6..3bfa4f9a6a2 100644 --- a/packages/data-mate/src/validations/field-validator.ts +++ b/packages/data-mate/src/validations/field-validator.ts @@ -4,9 +4,8 @@ import _isIP from 'is-ip'; import ip6addr from 'ip6addr'; import PhoneValidator from 'awesome-phonenumber'; import validator from 'validator'; -import * as url from 'valid-url'; +import url from 'valid-url'; import { FieldType, GeoShapePoint, MACDelimiter } from '@terascope/types'; - import { FQDNOptions, HashConfig, diff --git a/packages/data-types/bin/data-types.js b/packages/data-types/bin/data-types.js index 8e453442f87..f00ac3c2739 100755 --- a/packages/data-types/bin/data-types.js +++ b/packages/data-types/bin/data-types.js @@ -10,7 +10,7 @@ try { path.join(dirname, '../package.json'); import('../dist/src/command.js'); } catch (err) { - // eslint-disable-next-line + console.error('error while attempting to invoke cli command', err.toString()); process.exit(1); } diff --git a/packages/elasticsearch-api/index.js b/packages/elasticsearch-api/index.js index fd1a06f12f6..d8727c0961f 100644 --- a/packages/elasticsearch-api/index.js +++ b/packages/elasticsearch-api/index.js @@ -1177,7 +1177,7 @@ export default function elasticsearchApi(client, logger, _opConfig) { clientName, _time ) { - // eslint-disable-line + const giveupAfter = Date.now() + (_time || 10000); return new Promise((resolve, reject) => { const attemptToCreateIndex = () => { diff --git a/packages/elasticsearch-api/test/api-spec.js b/packages/elasticsearch-api/test/api-spec.js index 6b579ffdf2e..d8282f6d248 100644 --- a/packages/elasticsearch-api/test/api-spec.js +++ b/packages/elasticsearch-api/test/api-spec.js @@ -452,7 +452,7 @@ describe('elasticsearch-api', () => { searchError = { body: { error: { type: 'some_thing_else' } } }; try { await api.search(query); - } catch (e) { + } catch (_err) { queryFailed = true; } return expect(queryFailed).toEqual(true); @@ -485,7 +485,7 @@ describe('elasticsearch-api', () => { failures = []; }) ]); - } catch (e) { + } catch (_err) { queryFailed = true; } return expect(queryFailed).toEqual(true); diff --git a/packages/eslint-config/index.js b/packages/eslint-config/index.js index d172606e09b..00b070d64c9 100644 --- a/packages/eslint-config/index.js +++ b/packages/eslint-config/index.js @@ -2,7 +2,6 @@ import js from "@eslint/js"; import globals from "globals"; import { rules, ignores } from './lib/index.js'; - /** @type {import('eslint').Linter.FlatConfig[]} */ const eslintConfig = [ { diff --git a/packages/eslint-config/lib/rules/javascript.js b/packages/eslint-config/lib/rules/javascript.js index d42c1dfec71..02780994872 100644 --- a/packages/eslint-config/lib/rules/javascript.js +++ b/packages/eslint-config/lib/rules/javascript.js @@ -61,4 +61,13 @@ export default { 'always', { exceptAfterSingleLine: true }, ], + 'no-unused-vars': [ + 'error', + // and variable with an underscore can be ignored + { + "varsIgnorePattern": "^_", + "argsIgnorePattern": "^_", + "caughtErrorsIgnorePattern": "^_", + } + ] }; diff --git a/packages/eslint-config/test/index-spec.js b/packages/eslint-config/test/index-spec.js index 1bff91e7307..c3d2035ea7d 100644 --- a/packages/eslint-config/test/index-spec.js +++ b/packages/eslint-config/test/index-spec.js @@ -1,5 +1,3 @@ -'use strict'; - require('jest-extended'); const Index = require('..'); diff --git a/packages/scripts/bin/ts-scripts.js b/packages/scripts/bin/ts-scripts.js index bd812ccc5f5..479f558fee2 100755 --- a/packages/scripts/bin/ts-scripts.js +++ b/packages/scripts/bin/ts-scripts.js @@ -7,5 +7,5 @@ const dirname = path.dirname(fileURLToPath(import.meta.url)); // this path.join is only used for pkg asset injection path.join(dirname, '../package.json'); -// eslint-disable-next-line import/no-unresolved + import('../dist/src/command.js'); diff --git a/packages/ts-transforms/bin/ts-transform.js b/packages/ts-transforms/bin/ts-transform.js index 8e453442f87..f00ac3c2739 100755 --- a/packages/ts-transforms/bin/ts-transform.js +++ b/packages/ts-transforms/bin/ts-transform.js @@ -10,7 +10,7 @@ try { path.join(dirname, '../package.json'); import('../dist/src/command.js'); } catch (err) { - // eslint-disable-next-line + console.error('error while attempting to invoke cli command', err.toString()); process.exit(1); } diff --git a/packages/xlucene-parser/scripts/generate-engine.js b/packages/xlucene-parser/scripts/generate-engine.js index ec92b0429a3..2c198426001 100755 --- a/packages/xlucene-parser/scripts/generate-engine.js +++ b/packages/xlucene-parser/scripts/generate-engine.js @@ -4,7 +4,6 @@ import fs from 'node:fs'; import path from 'node:path'; import { fileURLToPath } from 'node:url'; import peg from 'peggy'; -// eslint-disable-next-line import/no-unresolved import tspegjs from 'ts-pegjs'; const dirname = path.dirname(fileURLToPath(import.meta.url)); diff --git a/service.js b/service.js index 6cf0606c1b1..d46bd768305 100755 --- a/service.js +++ b/service.js @@ -1,7 +1,7 @@ #!/usr/bin/env node // make sure running locally we set timezone to utc -// eslint-disable-next-line strict + process.env.TZ = 'utc'; import('./packages/teraslice/service.js'); From 21a47eefa8556716b7e77345144cdec4ceb9232a Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Mon, 26 Aug 2024 13:40:54 -0700 Subject: [PATCH 07/16] fix lint and test --- e2e/jest.config.js | 1 - packages/eslint-config/test/index-spec.js | 71 ++--------------------- 2 files changed, 5 insertions(+), 67 deletions(-) diff --git a/e2e/jest.config.js b/e2e/jest.config.js index eba4aa064cd..241865cdcb0 100644 --- a/e2e/jest.config.js +++ b/e2e/jest.config.js @@ -16,5 +16,4 @@ config.testPathIgnorePatterns = process.env.CLUSTERING_TYPE !== 'native' ? ['dat config.collectCoverage = false; config.testTimeout = 3 * 60 * 1000; - export default config; diff --git a/packages/eslint-config/test/index-spec.js b/packages/eslint-config/test/index-spec.js index c3d2035ea7d..39dff861c70 100644 --- a/packages/eslint-config/test/index-spec.js +++ b/packages/eslint-config/test/index-spec.js @@ -1,70 +1,9 @@ -require('jest-extended'); -const Index = require('..'); +import 'jest-extended'; +import eslintConfig from '../index.js'; describe('ESLint Config Index', () => { - it('should export an object of rules', () => { - expect(Index).toHaveProperty('rules'); - expect(Index.rules).toBeObject(); - }); - - it('should export js parserOptions by default', () => { - expect(Index).toHaveProperty('parserOptions'); - expect(Index.parserOptions).toMatchObject({ - ecmaVersion: 'latest', - sourceType: 'script', - },); - }); - - it('should export an array of configs to extends with airbnb-base', () => { - expect(Index).toHaveProperty('extends'); - expect(Index.extends).toBeArray(); - expect(Index.extends).toContain('airbnb-base'); - }); - - it('should export a list overrides with typescript and react support', () => { - expect(Index).toHaveProperty('overrides'); - expect(Index.overrides).toBeArray(); - expect(Index.overrides[1]).toMatchObject({ - files: ['*.jsx', '*.tsx'], - extends: ['plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended', 'airbnb'], - parser: '@typescript-eslint/parser', - env: { - jest: true, - jasmine: false, - node: false, - browser: true, - }, - parserOptions: { - sourceType: 'module', - ecmaFeatures: { - modules: true, - jsx: true, - }, - useJSXTextNode: true, - }, - }); - - expect(Index.overrides[2]).toMatchObject({ - files: ['*.ts'], - extends: ['plugin:@typescript-eslint/recommended', 'airbnb-base'], - plugins: ['@typescript-eslint'], - parser: '@typescript-eslint/parser', - parserOptions: { - sourceType: 'module', - ecmaFeatures: { - modules: true, - jsx: false, - }, - }, - }); - }); - - it('should export an env with at least node and jest', () => { - expect(Index).toHaveProperty('env'); - expect(Index.env).toBeObject(); - expect(Index.env).toMatchObject({ - jest: true, - node: true - }); + it('should export an array of rules', () => { + expect(eslintConfig).toBeArray(); + expect(eslintConfig.length).toBeGreaterThan(3); }); }); From d25f755191dbe76510beebb0a0632bfa4e47b61a Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Mon, 26 Aug 2024 13:44:55 -0700 Subject: [PATCH 08/16] remove limiter on eslint engine --- packages/eslint-config/package.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 364a7ed7044..63ec34ac333 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -28,9 +28,6 @@ "eslint-plugin-react": "^7.35.0", "eslint-plugin-react-hooks": "^4.4.0" }, - "peerDependencies": { - "eslint": ">=8.5.0" - }, "engines": { "node": ">=14.17.0", "yarn": ">=1.16.0" From 85022de8d851e502c1b620c782bffe609eeef7f1 Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Mon, 26 Aug 2024 13:48:16 -0700 Subject: [PATCH 09/16] bump eslint-config and engine versions of packages --- e2e/package.json | 4 ++-- package.json | 2 +- packages/data-mate/package.json | 4 ++-- packages/data-types/package.json | 4 ++-- packages/docker-compose-js/package.json | 4 ++-- packages/elasticsearch-api/package.json | 4 ++-- packages/elasticsearch-store/package.json | 4 ++-- packages/eslint-config/package.json | 4 ++-- packages/job-components/package.json | 4 ++-- packages/scripts/package.json | 4 ++-- packages/terafoundation/package.json | 4 ++-- packages/teraslice-cli/package.json | 4 ++-- packages/teraslice-client-js/package.json | 4 ++-- packages/teraslice-messaging/package.json | 4 ++-- packages/teraslice-state-storage/package.json | 4 ++-- packages/teraslice-test-harness/package.json | 4 ++-- packages/teraslice/package.json | 4 ++-- packages/ts-transforms/package.json | 4 ++-- packages/types/package.json | 4 ++-- packages/utils/package.json | 4 ++-- packages/xlucene-parser/package.json | 4 ++-- packages/xlucene-translator/package.json | 4 ++-- packages/xpressions/package.json | 4 ++-- 23 files changed, 45 insertions(+), 45 deletions(-) diff --git a/e2e/package.json b/e2e/package.json index e6f0d404723..eb157494ae5 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -54,8 +54,8 @@ "uuid": "^9.0.1" }, "engines": { - "node": ">=14.17.0", - "yarn": ">=1.16.0" + "node": ">=18.18.0", + "yarn": ">=1.22.19" }, "terascope": { "testSuite": "e2e" diff --git a/package.json b/package.json index 1a16556bdc8..3763917ec2d 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "bugs": { "url": "https://github.com/terascope/teraslice/issues" }, + "type": "module", "workspaces": [ "packages/*", "e2e" @@ -67,7 +68,6 @@ "ts-jest": "^29.1.4", "typescript": "~5.2.2" }, - "type": "module", "engines": { "node": ">=18.18.0", "yarn": ">=1.22.19" diff --git a/packages/data-mate/package.json b/packages/data-mate/package.json index 6f3e3011579..bcabe99edd2 100644 --- a/packages/data-mate/package.json +++ b/packages/data-mate/package.json @@ -57,8 +57,8 @@ "lodash": "^4.17.21" }, "engines": { - "node": ">=14.17.0", - "yarn": ">=1.16.0" + "node": ">=18.18.0", + "yarn": ">=1.22.19" }, "publishConfig": { "access": "public", diff --git a/packages/data-types/package.json b/packages/data-types/package.json index 298ab7de89b..b6f877c89b9 100644 --- a/packages/data-types/package.json +++ b/packages/data-types/package.json @@ -38,8 +38,8 @@ "@types/yargs": "^17.0.32" }, "engines": { - "node": ">=14.17.0", - "yarn": ">=1.16.0" + "node": ">=18.18.0", + "yarn": ">=1.22.19" }, "publishConfig": { "access": "public", diff --git a/packages/docker-compose-js/package.json b/packages/docker-compose-js/package.json index e11b77723ae..b0ccfb9b950 100644 --- a/packages/docker-compose-js/package.json +++ b/packages/docker-compose-js/package.json @@ -39,8 +39,8 @@ "debug": "^4.3.4" }, "engines": { - "node": ">=14.17.0", - "yarn": ">=1.16.0" + "node": ">=18.18.0", + "yarn": ">=1.22.19" }, "publishConfig": { "access": "public", diff --git a/packages/elasticsearch-api/package.json b/packages/elasticsearch-api/package.json index 2e6e15d059a..3fec6e8cc39 100644 --- a/packages/elasticsearch-api/package.json +++ b/packages/elasticsearch-api/package.json @@ -39,8 +39,8 @@ "elasticsearch8": "npm:@elastic/elasticsearch@^8.0.0" }, "engines": { - "node": ">=14.17.0", - "yarn": ">=1.16.0" + "node": ">=18.18.0", + "yarn": ">=1.22.19" }, "publishConfig": { "access": "public", diff --git a/packages/elasticsearch-store/package.json b/packages/elasticsearch-store/package.json index a041c04e13d..8cd490d3ace 100644 --- a/packages/elasticsearch-store/package.json +++ b/packages/elasticsearch-store/package.json @@ -48,8 +48,8 @@ "@types/uuid": "^9.0.8" }, "engines": { - "node": ">=14.17.0", - "yarn": ">=1.16.0" + "node": ">=18.18.0", + "yarn": ">=1.22.19" }, "publishConfig": { "access": "public", diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 63ec34ac333..cdfa4cc7fc0 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -29,8 +29,8 @@ "eslint-plugin-react-hooks": "^4.4.0" }, "engines": { - "node": ">=14.17.0", - "yarn": ">=1.16.0" + "node": ">=18.18.0", + "yarn": ">=1.22.19" }, "publishConfig": { "access": "public", diff --git a/packages/job-components/package.json b/packages/job-components/package.json index dc9d794cd19..610a37c69f2 100644 --- a/packages/job-components/package.json +++ b/packages/job-components/package.json @@ -48,8 +48,8 @@ "jest-fixtures": "^0.6.0" }, "engines": { - "node": ">=14.17.0", - "yarn": ">=1.16.0" + "node": ">=18.18.0", + "yarn": ">=1.22.19" }, "publishConfig": { "access": "public", diff --git a/packages/scripts/package.json b/packages/scripts/package.json index 5ac5dc4114e..ce7f755e16d 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -74,8 +74,8 @@ } }, "engines": { - "node": ">=14.17.0", - "yarn": ">=1.16.0" + "node": ">=18.18.0", + "yarn": ">=1.22.19" }, "publishConfig": { "access": "public", diff --git a/packages/terafoundation/package.json b/packages/terafoundation/package.json index 07bf716116d..01c78568f9a 100644 --- a/packages/terafoundation/package.json +++ b/packages/terafoundation/package.json @@ -55,8 +55,8 @@ "got": "^11.8.3" }, "engines": { - "node": ">=14.17.0", - "yarn": ">=1.16.0" + "node": ">=18.18.0", + "yarn": ">=1.22.19" }, "publishConfig": { "access": "public", diff --git a/packages/teraslice-cli/package.json b/packages/teraslice-cli/package.json index 8af64674ab0..c0365ac4d9e 100644 --- a/packages/teraslice-cli/package.json +++ b/packages/teraslice-cli/package.json @@ -76,8 +76,8 @@ "nock": "^13.5.1" }, "engines": { - "node": ">=14.17.0", - "yarn": ">=1.16.0" + "node": ">=18.18.0", + "yarn": ">=1.22.19" }, "publishConfig": { "access": "public", diff --git a/packages/teraslice-client-js/package.json b/packages/teraslice-client-js/package.json index dd481bc4f54..4c310b73229 100644 --- a/packages/teraslice-client-js/package.json +++ b/packages/teraslice-client-js/package.json @@ -41,8 +41,8 @@ "nock": "^13.5.1" }, "engines": { - "node": ">=14.17.0", - "yarn": ">=1.16.0" + "node": ">=18.18.0", + "yarn": ">=1.22.19" }, "publishConfig": { "access": "public", diff --git a/packages/teraslice-messaging/package.json b/packages/teraslice-messaging/package.json index 533195d66da..6ee2014e2ad 100644 --- a/packages/teraslice-messaging/package.json +++ b/packages/teraslice-messaging/package.json @@ -50,8 +50,8 @@ "@types/socket.io-client": "^1.4.35" }, "engines": { - "node": ">=14.17.0", - "yarn": ">=1.16.0" + "node": ">=18.18.0", + "yarn": ">=1.22.19" }, "publishConfig": { "access": "public", diff --git a/packages/teraslice-state-storage/package.json b/packages/teraslice-state-storage/package.json index dd8cbeeec71..7cd0e7a938f 100644 --- a/packages/teraslice-state-storage/package.json +++ b/packages/teraslice-state-storage/package.json @@ -28,8 +28,8 @@ "@terascope/utils": "^1.0.0" }, "engines": { - "node": ">=14.17.0", - "yarn": ">=1.16.0" + "node": ">=18.18.0", + "yarn": ">=1.22.19" }, "publishConfig": { "access": "public", diff --git a/packages/teraslice-test-harness/package.json b/packages/teraslice-test-harness/package.json index f474d81d55f..2d369265ee8 100644 --- a/packages/teraslice-test-harness/package.json +++ b/packages/teraslice-test-harness/package.json @@ -42,8 +42,8 @@ "@terascope/job-components": ">=1.2.0" }, "engines": { - "node": ">=14.17.0", - "yarn": ">=1.16.0" + "node": ">=18.18.0", + "yarn": ">=1.22.19" }, "publishConfig": { "access": "public", diff --git a/packages/teraslice/package.json b/packages/teraslice/package.json index 0fc994859d9..7071832efe0 100644 --- a/packages/teraslice/package.json +++ b/packages/teraslice/package.json @@ -80,8 +80,8 @@ "nock": "^13.5.1" }, "engines": { - "node": ">=14.17.0", - "yarn": ">=1.16.0" + "node": ">=18.18.0", + "yarn": ">=1.22.19" }, "publishConfig": { "access": "public", diff --git a/packages/ts-transforms/package.json b/packages/ts-transforms/package.json index 5dff4273796..4b26c126100 100644 --- a/packages/ts-transforms/package.json +++ b/packages/ts-transforms/package.json @@ -57,8 +57,8 @@ "execa": "^5.1.0" }, "engines": { - "node": ">=14.17.0", - "yarn": ">=1.16.0" + "node": ">=18.18.0", + "yarn": ">=1.22.19" }, "publishConfig": { "access": "public", diff --git a/packages/types/package.json b/packages/types/package.json index 610b5f75051..3a8b3598f5e 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -28,8 +28,8 @@ "prom-client": "^15.1.2" }, "engines": { - "node": ">=14.17.0", - "yarn": ">=1.16.0" + "node": ">=18.18.0", + "yarn": ">=1.22.19" }, "publishConfig": { "access": "public", diff --git a/packages/utils/package.json b/packages/utils/package.json index 0abbd0b5f6a..a88d5129570 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -73,8 +73,8 @@ "benchmark": "^2.1.4" }, "engines": { - "node": ">=14.17.0", - "yarn": ">=1.16.0" + "node": ">=18.18.0", + "yarn": ">=1.22.19" }, "publishConfig": { "access": "public", diff --git a/packages/xlucene-parser/package.json b/packages/xlucene-parser/package.json index 9d64a4ed8dc..3952152f6ef 100644 --- a/packages/xlucene-parser/package.json +++ b/packages/xlucene-parser/package.json @@ -43,8 +43,8 @@ "@turf/random": "^6.4.0" }, "engines": { - "node": ">=14.17.0", - "yarn": ">=1.16.0" + "node": ">=18.18.0", + "yarn": ">=1.22.19" }, "publishConfig": { "access": "public", diff --git a/packages/xlucene-translator/package.json b/packages/xlucene-translator/package.json index df3556acbd0..1d98cce1dd3 100644 --- a/packages/xlucene-translator/package.json +++ b/packages/xlucene-translator/package.json @@ -38,8 +38,8 @@ "elasticsearch": "^15.4.1" }, "engines": { - "node": ">=14.17.0", - "yarn": ">=1.16.0" + "node": ">=18.18.0", + "yarn": ">=1.22.19" }, "publishConfig": { "access": "public", diff --git a/packages/xpressions/package.json b/packages/xpressions/package.json index e7bdd0725f7..a7b1e5aa1a9 100644 --- a/packages/xpressions/package.json +++ b/packages/xpressions/package.json @@ -30,8 +30,8 @@ "@terascope/types": "^1.0.0" }, "engines": { - "node": ">=14.17.0", - "yarn": ">=1.16.0" + "node": ">=18.18.0", + "yarn": ">=1.22.19" }, "publishConfig": { "access": "public", From 1a73243213813a1d52756d8b161e0c0ab79b56c6 Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Mon, 26 Aug 2024 13:48:56 -0700 Subject: [PATCH 10/16] bump: (major) @terascope/eslint-config@1.0.0 --- packages/eslint-config/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index cdfa4cc7fc0..8d3b92b1c2f 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -1,7 +1,7 @@ { "name": "@terascope/eslint-config", "displayName": "Terascope ESLint Config", - "version": "0.8.0", + "version": "1.0.0", "description": "A shared eslint config based on eslint-config-airbnb", "homepage": "https://github.com/terascope/teraslice/tree/master/packages/eslint-config#readme", "bugs": { From 882744b22faefa81463ccbbb646d30f564b12a7b Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Mon, 26 Aug 2024 13:51:10 -0700 Subject: [PATCH 11/16] bump for engine changes and config changes --- e2e/package.json | 4 ++-- packages/data-mate/package.json | 10 +++++----- packages/data-types/package.json | 6 +++--- packages/docker-compose-js/package.json | 2 +- packages/elasticsearch-api/package.json | 8 ++++---- packages/elasticsearch-store/package.json | 12 ++++++------ packages/job-components/package.json | 6 +++--- packages/scripts/package.json | 4 ++-- packages/terafoundation/package.json | 8 ++++---- packages/teraslice-cli/package.json | 8 ++++---- packages/teraslice-client-js/package.json | 6 +++--- packages/teraslice-messaging/package.json | 6 +++--- packages/teraslice-state-storage/package.json | 6 +++--- packages/teraslice-test-harness/package.json | 4 ++-- packages/teraslice/package.json | 12 ++++++------ packages/ts-transforms/package.json | 8 ++++---- packages/types/package.json | 2 +- packages/utils/package.json | 4 ++-- packages/xlucene-parser/package.json | 6 +++--- packages/xlucene-translator/package.json | 8 ++++---- packages/xpressions/package.json | 6 +++--- 21 files changed, 68 insertions(+), 68 deletions(-) diff --git a/e2e/package.json b/e2e/package.json index eb157494ae5..290306bb3bc 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -43,9 +43,9 @@ "ms": "^2.1.3" }, "devDependencies": { - "@terascope/types": "^1.0.0", + "@terascope/types": "^1.0.1", "bunyan": "^1.8.15", - "elasticsearch-store": "^1.0.3", + "elasticsearch-store": "^1.0.4", "fs-extra": "^11.2.0", "ms": "^2.1.3", "nanoid": "^3.3.4", diff --git a/packages/data-mate/package.json b/packages/data-mate/package.json index bcabe99edd2..c0670ea81f9 100644 --- a/packages/data-mate/package.json +++ b/packages/data-mate/package.json @@ -1,7 +1,7 @@ { "name": "@terascope/data-mate", "displayName": "Data-Mate", - "version": "1.0.3", + "version": "1.0.4", "description": "Library of data validations/transformations", "homepage": "https://github.com/terascope/teraslice/tree/master/packages/data-mate#readme", "repository": { @@ -30,9 +30,9 @@ "test:watch": "ts-scripts test --watch . --" }, "dependencies": { - "@terascope/data-types": "^1.0.0", - "@terascope/types": "^1.0.0", - "@terascope/utils": "^1.0.0", + "@terascope/data-types": "^1.0.1", + "@terascope/types": "^1.0.1", + "@terascope/utils": "^1.0.1", "@types/validator": "^13.11.10", "awesome-phonenumber": "^2.70.0", "date-fns": "^2.30.0", @@ -47,7 +47,7 @@ "uuid": "^9.0.1", "valid-url": "^1.0.9", "validator": "^13.12.0", - "xlucene-parser": "^1.0.2" + "xlucene-parser": "^1.0.3" }, "devDependencies": { "@types/ip6addr": "^0.2.6", diff --git a/packages/data-types/package.json b/packages/data-types/package.json index b6f877c89b9..b32115b0e36 100644 --- a/packages/data-types/package.json +++ b/packages/data-types/package.json @@ -1,7 +1,7 @@ { "name": "@terascope/data-types", "displayName": "Data Types", - "version": "1.0.0", + "version": "1.0.1", "description": "A library for defining the data structures and mapping", "homepage": "https://github.com/terascope/teraslice/tree/master/packages/data-types#readme", "bugs": { @@ -27,8 +27,8 @@ "test:watch": "ts-scripts test --watch . --" }, "dependencies": { - "@terascope/types": "^1.0.0", - "@terascope/utils": "^1.0.0", + "@terascope/types": "^1.0.1", + "@terascope/utils": "^1.0.1", "graphql": "^14.7.0", "lodash": "^4.17.21", "yargs": "^17.7.2" diff --git a/packages/docker-compose-js/package.json b/packages/docker-compose-js/package.json index b0ccfb9b950..9c30bdb870c 100644 --- a/packages/docker-compose-js/package.json +++ b/packages/docker-compose-js/package.json @@ -1,7 +1,7 @@ { "name": "@terascope/docker-compose-js", "displayName": "Docker Compose Js", - "version": "1.3.2", + "version": "1.3.3", "description": "Node.js driver for controlling docker-compose testing environments.", "keywords": [ "docker", diff --git a/packages/elasticsearch-api/package.json b/packages/elasticsearch-api/package.json index 3fec6e8cc39..e77c9667ef2 100644 --- a/packages/elasticsearch-api/package.json +++ b/packages/elasticsearch-api/package.json @@ -1,7 +1,7 @@ { "name": "@terascope/elasticsearch-api", "displayName": "Elasticsearch API", - "version": "4.0.0", + "version": "4.0.1", "description": "Elasticsearch client api used across multiple services, handles retries and exponential backoff", "homepage": "https://github.com/terascope/teraslice/tree/master/packages/elasticsearch-api#readme", "bugs": { @@ -24,8 +24,8 @@ "test:watch": "TEST_RESTRAINED_ELASTICSEARCH='true' ts-scripts test --watch . --" }, "dependencies": { - "@terascope/types": "^1.0.0", - "@terascope/utils": "^1.0.0", + "@terascope/types": "^1.0.1", + "@terascope/utils": "^1.0.1", "bluebird": "^3.7.2", "setimmediate": "^1.0.5" }, @@ -33,7 +33,7 @@ "@opensearch-project/opensearch": "^1.2.0", "@types/elasticsearch": "^5.0.43", "elasticsearch": "^15.4.1", - "elasticsearch-store": "^1.0.3", + "elasticsearch-store": "^1.0.4", "elasticsearch6": "npm:@elastic/elasticsearch@^6.7.0", "elasticsearch7": "npm:@elastic/elasticsearch@^7.0.0", "elasticsearch8": "npm:@elastic/elasticsearch@^8.0.0" diff --git a/packages/elasticsearch-store/package.json b/packages/elasticsearch-store/package.json index 8cd490d3ace..98551bca669 100644 --- a/packages/elasticsearch-store/package.json +++ b/packages/elasticsearch-store/package.json @@ -1,7 +1,7 @@ { "name": "elasticsearch-store", "displayName": "Elasticsearch Store", - "version": "1.0.3", + "version": "1.0.4", "description": "An API for managing an elasticsearch index, with versioning and migration support.", "homepage": "https://github.com/terascope/teraslice/tree/master/packages/elasticsearch-store#readme", "bugs": { @@ -30,10 +30,10 @@ "test:watch": "ts-scripts test --watch . --" }, "dependencies": { - "@terascope/data-mate": "^1.0.3", - "@terascope/data-types": "^1.0.0", - "@terascope/types": "^1.0.0", - "@terascope/utils": "^1.0.0", + "@terascope/data-mate": "^1.0.4", + "@terascope/data-types": "^1.0.1", + "@terascope/types": "^1.0.1", + "@terascope/utils": "^1.0.1", "ajv": "^6.12.6", "elasticsearch6": "npm:@elastic/elasticsearch@^6.7.0", "elasticsearch7": "npm:@elastic/elasticsearch@^7.0.0", @@ -42,7 +42,7 @@ "opensearch2": "npm:@opensearch-project/opensearch@^2.2.1", "setimmediate": "^1.0.5", "uuid": "^9.0.1", - "xlucene-translator": "^1.0.2" + "xlucene-translator": "^1.0.3" }, "devDependencies": { "@types/uuid": "^9.0.8" diff --git a/packages/job-components/package.json b/packages/job-components/package.json index 610a37c69f2..84b219849ed 100644 --- a/packages/job-components/package.json +++ b/packages/job-components/package.json @@ -1,7 +1,7 @@ { "name": "@terascope/job-components", "displayName": "Job Components", - "version": "1.2.0", + "version": "1.2.1", "description": "A teraslice library for validating jobs schemas, registering apis, and defining and running new Job APIs", "homepage": "https://github.com/terascope/teraslice/tree/master/packages/job-components#readme", "bugs": { @@ -32,8 +32,8 @@ "test:watch": "ts-scripts test --watch . --" }, "dependencies": { - "@terascope/types": "^1.0.0", - "@terascope/utils": "^1.0.0", + "@terascope/types": "^1.0.1", + "@terascope/utils": "^1.0.1", "convict": "^6.2.4", "convict-format-with-moment": "^6.2.0", "convict-format-with-validator": "^6.2.0", diff --git a/packages/scripts/package.json b/packages/scripts/package.json index ce7f755e16d..2f8860edd89 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -1,7 +1,7 @@ { "name": "@terascope/scripts", "displayName": "Scripts", - "version": "1.0.0", + "version": "1.0.1", "description": "A collection of terascope monorepo scripts", "homepage": "https://github.com/terascope/teraslice/tree/master/packages/scripts#readme", "bugs": { @@ -33,7 +33,7 @@ }, "dependencies": { "@kubernetes/client-node": "^0.20.0", - "@terascope/utils": "^1.0.0", + "@terascope/utils": "^1.0.1", "codecov": "^3.8.3", "execa": "^5.1.0", "fs-extra": "^11.2.0", diff --git a/packages/terafoundation/package.json b/packages/terafoundation/package.json index 01c78568f9a..4279adffe70 100644 --- a/packages/terafoundation/package.json +++ b/packages/terafoundation/package.json @@ -1,7 +1,7 @@ { "name": "terafoundation", "displayName": "Terafoundation", - "version": "1.2.3", + "version": "1.2.4", "description": "A Clustering and Foundation tool for Terascope Tools", "homepage": "https://github.com/terascope/teraslice/tree/master/packages/terafoundation#readme", "bugs": { @@ -29,15 +29,15 @@ }, "dependencies": { "@terascope/file-asset-apis": "^0.13.0", - "@terascope/types": "^1.0.0", - "@terascope/utils": "^1.0.0", + "@terascope/types": "^1.0.1", + "@terascope/utils": "^1.0.1", "bluebird": "^3.7.2", "bunyan": "^1.8.15", "convict": "^6.2.4", "convict-format-with-moment": "^6.2.0", "convict-format-with-validator": "^6.2.0", "elasticsearch": "^15.4.1", - "elasticsearch-store": "^1.0.3", + "elasticsearch-store": "^1.0.4", "express": "^4.19.2", "js-yaml": "^4.1.0", "nanoid": "^3.3.4", diff --git a/packages/teraslice-cli/package.json b/packages/teraslice-cli/package.json index c0365ac4d9e..1ef809579d1 100644 --- a/packages/teraslice-cli/package.json +++ b/packages/teraslice-cli/package.json @@ -1,7 +1,7 @@ { "name": "teraslice-cli", "displayName": "Teraslice CLI", - "version": "2.2.0", + "version": "2.2.1", "description": "Command line manager for teraslice jobs, assets, and cluster references.", "keywords": [ "teraslice" @@ -38,8 +38,8 @@ }, "dependencies": { "@terascope/fetch-github-release": "^1.0.0", - "@terascope/types": "^1.0.0", - "@terascope/utils": "^1.0.0", + "@terascope/types": "^1.0.1", + "@terascope/utils": "^1.0.1", "chalk": "^4.1.2", "cli-table3": "^0.6.4", "diff": "^5.2.0", @@ -55,7 +55,7 @@ "pretty-bytes": "^5.6.0", "prompts": "^2.4.2", "signale": "^1.4.0", - "teraslice-client-js": "^1.0.0", + "teraslice-client-js": "^1.0.1", "tmp": "^0.2.0", "tty-table": "^4.2.3", "yargs": "^17.7.2", diff --git a/packages/teraslice-client-js/package.json b/packages/teraslice-client-js/package.json index 4c310b73229..d318ecf437a 100644 --- a/packages/teraslice-client-js/package.json +++ b/packages/teraslice-client-js/package.json @@ -1,7 +1,7 @@ { "name": "teraslice-client-js", "displayName": "Teraslice Client (JavaScript)", - "version": "1.0.0", + "version": "1.0.1", "description": "A Node.js client for teraslice jobs, assets, and cluster references.", "keywords": [ "elasticsearch", @@ -32,8 +32,8 @@ "test:watch": "ts-scripts test --watch . --" }, "dependencies": { - "@terascope/types": "^1.0.0", - "@terascope/utils": "^1.0.0", + "@terascope/types": "^1.0.1", + "@terascope/utils": "^1.0.1", "auto-bind": "^4.0.0", "got": "^11.8.3" }, diff --git a/packages/teraslice-messaging/package.json b/packages/teraslice-messaging/package.json index 6ee2014e2ad..28cdb67d283 100644 --- a/packages/teraslice-messaging/package.json +++ b/packages/teraslice-messaging/package.json @@ -1,7 +1,7 @@ { "name": "@terascope/teraslice-messaging", "displayName": "Teraslice Messaging", - "version": "1.3.0", + "version": "1.3.1", "description": "An internal teraslice messaging library using socket.io", "homepage": "https://github.com/terascope/teraslice/tree/master/packages/teraslice-messaging#readme", "bugs": { @@ -35,8 +35,8 @@ "ms": "^2.1.3" }, "dependencies": { - "@terascope/types": "^1.0.0", - "@terascope/utils": "^1.0.0", + "@terascope/types": "^1.0.1", + "@terascope/utils": "^1.0.1", "ms": "^2.1.3", "nanoid": "^3.3.4", "p-event": "^4.2.0", diff --git a/packages/teraslice-state-storage/package.json b/packages/teraslice-state-storage/package.json index 7cd0e7a938f..5f51dbffc84 100644 --- a/packages/teraslice-state-storage/package.json +++ b/packages/teraslice-state-storage/package.json @@ -1,7 +1,7 @@ { "name": "@terascope/teraslice-state-storage", "displayName": "Teraslice State Storage", - "version": "1.0.0", + "version": "1.0.1", "description": "State storage operation api for teraslice", "homepage": "https://github.com/terascope/teraslice/tree/master/packages/teraslice-state-storage#readme", "bugs": { @@ -24,8 +24,8 @@ "test:watch": "ts-scripts test --watch . --" }, "dependencies": { - "@terascope/elasticsearch-api": "^4.0.0", - "@terascope/utils": "^1.0.0" + "@terascope/elasticsearch-api": "^4.0.1", + "@terascope/utils": "^1.0.1" }, "engines": { "node": ">=18.18.0", diff --git a/packages/teraslice-test-harness/package.json b/packages/teraslice-test-harness/package.json index 2d369265ee8..b1b58fd3e59 100644 --- a/packages/teraslice-test-harness/package.json +++ b/packages/teraslice-test-harness/package.json @@ -36,10 +36,10 @@ "fs-extra": "^11.2.0" }, "devDependencies": { - "@terascope/job-components": "^1.2.0" + "@terascope/job-components": "^1.2.1" }, "peerDependencies": { - "@terascope/job-components": ">=1.2.0" + "@terascope/job-components": ">=1.2.1" }, "engines": { "node": ">=18.18.0", diff --git a/packages/teraslice/package.json b/packages/teraslice/package.json index 7071832efe0..630ad16cf70 100644 --- a/packages/teraslice/package.json +++ b/packages/teraslice/package.json @@ -38,11 +38,11 @@ "ms": "^2.1.3" }, "dependencies": { - "@terascope/elasticsearch-api": "^4.0.0", - "@terascope/job-components": "^1.2.0", - "@terascope/teraslice-messaging": "^1.3.0", - "@terascope/types": "^1.0.0", - "@terascope/utils": "^1.0.0", + "@terascope/elasticsearch-api": "^4.0.1", + "@terascope/job-components": "^1.2.1", + "@terascope/teraslice-messaging": "^1.3.1", + "@terascope/types": "^1.0.1", + "@terascope/utils": "^1.0.1", "async-mutex": "^0.5.0", "barbe": "^3.0.16", "body-parser": "^1.20.2", @@ -63,7 +63,7 @@ "semver": "^7.6.2", "socket.io": "^1.7.4", "socket.io-client": "^1.7.4", - "terafoundation": "^1.2.3", + "terafoundation": "^1.2.4", "uuid": "^9.0.1" }, "devDependencies": { diff --git a/packages/ts-transforms/package.json b/packages/ts-transforms/package.json index 4b26c126100..3942b34c5eb 100644 --- a/packages/ts-transforms/package.json +++ b/packages/ts-transforms/package.json @@ -1,7 +1,7 @@ { "name": "ts-transforms", "displayName": "TS Transforms", - "version": "1.0.3", + "version": "1.0.4", "description": "An ETL framework built upon xlucene-evaluator", "homepage": "https://github.com/terascope/teraslice/tree/master/packages/ts-transforms#readme", "bugs": { @@ -36,9 +36,9 @@ "test:watch": "ts-scripts test --watch . --" }, "dependencies": { - "@terascope/data-mate": "^1.0.3", - "@terascope/types": "^1.0.0", - "@terascope/utils": "^1.0.0", + "@terascope/data-mate": "^1.0.4", + "@terascope/types": "^1.0.1", + "@terascope/utils": "^1.0.1", "awesome-phonenumber": "^2.70.0", "graphlib": "^2.1.8", "is-ip": "^3.1.0", diff --git a/packages/types/package.json b/packages/types/package.json index 3a8b3598f5e..1b202111a2f 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,7 +1,7 @@ { "name": "@terascope/types", "displayName": "Types", - "version": "1.0.0", + "version": "1.0.1", "description": "A collection of typescript interfaces", "homepage": "https://github.com/terascope/teraslice/tree/master/packages/types#readme", "bugs": { diff --git a/packages/utils/package.json b/packages/utils/package.json index a88d5129570..573e9aa5854 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,7 +1,7 @@ { "name": "@terascope/utils", "displayName": "Utils", - "version": "1.0.0", + "version": "1.0.1", "description": "A collection of Teraslice Utilities", "homepage": "https://github.com/terascope/teraslice/tree/master/packages/utils#readme", "bugs": { @@ -29,7 +29,7 @@ "debug": "^4.3.4" }, "dependencies": { - "@terascope/types": "^1.0.0", + "@terascope/types": "^1.0.1", "@turf/bbox": "^6.4.0", "@turf/bbox-polygon": "^6.4.0", "@turf/boolean-contains": "^6.4.0", diff --git a/packages/xlucene-parser/package.json b/packages/xlucene-parser/package.json index 3952152f6ef..c4ee4326548 100644 --- a/packages/xlucene-parser/package.json +++ b/packages/xlucene-parser/package.json @@ -1,7 +1,7 @@ { "name": "xlucene-parser", "displayName": "xLucene Parser", - "version": "1.0.2", + "version": "1.0.3", "description": "Flexible Lucene-like evaluator and language parser", "homepage": "https://github.com/terascope/teraslice/tree/master/packages/xlucene-parser#readme", "repository": { @@ -33,8 +33,8 @@ "test:watch": "ts-scripts test --watch . --" }, "dependencies": { - "@terascope/types": "^1.0.0", - "@terascope/utils": "^1.0.0", + "@terascope/types": "^1.0.1", + "@terascope/utils": "^1.0.1", "peggy": "~4.0.3", "ts-pegjs": "^4.2.1" }, diff --git a/packages/xlucene-translator/package.json b/packages/xlucene-translator/package.json index 1d98cce1dd3..ee88db4913c 100644 --- a/packages/xlucene-translator/package.json +++ b/packages/xlucene-translator/package.json @@ -1,7 +1,7 @@ { "name": "xlucene-translator", "displayName": "xLucene Translator", - "version": "1.0.2", + "version": "1.0.3", "description": "Translate xlucene query to database queries", "homepage": "https://github.com/terascope/teraslice/tree/master/packages/xlucene-translator#readme", "repository": { @@ -29,10 +29,10 @@ "test:watch": "ts-scripts test --watch . --" }, "dependencies": { - "@terascope/types": "^1.0.0", - "@terascope/utils": "^1.0.0", + "@terascope/types": "^1.0.1", + "@terascope/utils": "^1.0.1", "@types/elasticsearch": "^5.0.43", - "xlucene-parser": "^1.0.2" + "xlucene-parser": "^1.0.3" }, "devDependencies": { "elasticsearch": "^15.4.1" diff --git a/packages/xpressions/package.json b/packages/xpressions/package.json index a7b1e5aa1a9..ba539f64478 100644 --- a/packages/xpressions/package.json +++ b/packages/xpressions/package.json @@ -1,7 +1,7 @@ { "name": "xpressions", "displayName": "Xpressions", - "version": "1.0.0", + "version": "1.0.1", "description": "Variable expressions with date-math support", "homepage": "https://github.com/terascope/teraslice/tree/master/packages/xpressions#readme", "bugs": { @@ -24,10 +24,10 @@ "test:watch": "ts-scripts test --watch . --" }, "dependencies": { - "@terascope/utils": "^1.0.0" + "@terascope/utils": "^1.0.1" }, "devDependencies": { - "@terascope/types": "^1.0.0" + "@terascope/types": "^1.0.1" }, "engines": { "node": ">=18.18.0", From a07dcd2b8c2b9d448df0b80e1ea5f8f8490ee2fd Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Mon, 26 Aug 2024 14:58:59 -0700 Subject: [PATCH 12/16] fix reference to url packge --- packages/ts-transforms/src/operations/lib/validations/url.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ts-transforms/src/operations/lib/validations/url.ts b/packages/ts-transforms/src/operations/lib/validations/url.ts index a3d98380333..a99754ab0e8 100644 --- a/packages/ts-transforms/src/operations/lib/validations/url.ts +++ b/packages/ts-transforms/src/operations/lib/validations/url.ts @@ -1,5 +1,5 @@ import { DataEntity } from '@terascope/utils'; -import * as url from 'valid-url'; +import url from 'valid-url'; import { PostProcessConfig } from '../../../interfaces.js'; import ValidationOpBase from './base.js'; From a4a325767fe5519051dd6e1a02cdeba029bc090e Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Wed, 28 Aug 2024 11:36:49 -0700 Subject: [PATCH 13/16] get basics of typescript, jest, react plugins working --- e2e/test/cases/assets/simple-spec.ts | 1 - e2e/test/cases/cluster/api-spec.ts | 2 +- examples/k8s/example-asset/asset/index.js | 6 +- packages/data-mate/bench/index.js | 10 +- packages/data-mate/scripts/docs.js | 20 +- .../src/function-configs/date/index.ts | 8 +- .../src/function-configs/date/toTimeZone.ts | 4 +- .../date/toTimeZoneUsingLocation.ts | 4 +- .../src/function-configs/numeric/pow.ts | 2 +- .../src/transforms/record-transform.ts | 2 +- packages/data-mate/src/vector/Vector.ts | 6 +- packages/elasticsearch-api/index.js | 2 - packages/eslint-config/index.js | 64 +++-- .../eslint-config/lib/rules/javascript.js | 3 +- .../eslint-config/lib/rules/typescript.js | 47 ++-- packages/eslint-config/package.json | 7 +- .../src/execution-context/index.ts | 3 +- .../src/execution-context/interfaces.ts | 6 +- packages/scripts/src/helpers/hooks.ts | 2 +- .../terafoundation/src/cluster-context.ts | 2 +- packages/terafoundation/src/master.ts | 4 +- packages/teraslice-cli/src/cmds/tjm/await.ts | 1 - packages/teraslice-cli/src/helpers/display.ts | 2 +- packages/teraslice-cli/src/helpers/url.ts | 2 +- .../testAssetWithBuild/asset/index.js | 14 +- .../src/messenger/client.ts | 2 + packages/teraslice/src/interfaces.ts | 3 +- .../cluster/backends/kubernetes/k8s.ts | 6 +- .../backends/kubernetes/k8sResource.ts | 4 +- .../cluster/backends/kubernetesV2/k8s.ts | 6 +- .../backends/kubernetesV2/k8sResource.ts | 4 +- .../cluster/backends/native/messaging.ts | 1 + .../teraslice/src/lib/storage/analytics.ts | 1 - packages/teraslice/src/lib/storage/assets.ts | 2 +- .../storage/backends/elasticsearch_store.ts | 1 - .../teraslice/src/lib/utils/file_utils.ts | 6 +- .../lib/workers/execution-controller/index.ts | 2 +- .../src/lib/workers/metrics/index.ts | 1 - .../teraslice/src/lib/workers/worker/index.ts | 2 + packages/ts-transforms/src/command.ts | 11 +- .../ts-transforms/src/operations/index.ts | 2 - .../plugins/data-mate/FieldTransform.ts | 1 - .../plugins/data-mate/FieldValidator.ts | 2 - .../plugins/data-mate/RecordTransform.ts | 1 - .../plugins/data-mate/RecordValidator.ts | 2 - .../src/operations/plugins/mixins.ts | 1 - .../src/operations/plugins/validator/index.ts | 3 +- .../elasticsearch-response.ts | 1 - packages/types/src/utility.ts | 12 +- packages/utils/bench/index.js | 8 +- packages/utils/src/big-lru-map.ts | 4 +- packages/utils/src/deps.ts | 4 +- packages/utils/src/entities/data-entity.ts | 1 - packages/utils/src/entities/interfaces.ts | 5 +- packages/utils/src/functions.ts | 2 +- packages/utils/src/logger.ts | 2 +- packages/utils/src/objects.ts | 2 +- packages/xlucene-parser/bench/index.js | 8 +- packages/xlucene-parser/src/context.ts | 3 +- yarn.lock | 234 +++++++++++++++++- 60 files changed, 403 insertions(+), 171 deletions(-) diff --git a/e2e/test/cases/assets/simple-spec.ts b/e2e/test/cases/assets/simple-spec.ts index d94e8b61fea..632f04d5fe9 100644 --- a/e2e/test/cases/assets/simple-spec.ts +++ b/e2e/test/cases/assets/simple-spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable jest/no-disabled-tests */ import 'jest-extended'; import fs from 'node:fs'; import os from 'os'; diff --git a/e2e/test/cases/cluster/api-spec.ts b/e2e/test/cases/cluster/api-spec.ts index ff12da07869..1f0c7162d4b 100644 --- a/e2e/test/cases/cluster/api-spec.ts +++ b/e2e/test/cases/cluster/api-spec.ts @@ -80,7 +80,7 @@ describe('cluster api', () => { try { await p; return false; - } catch (err) { + } catch (_err) { return true; } } diff --git a/examples/k8s/example-asset/asset/index.js b/examples/k8s/example-asset/asset/index.js index bee4d70b5df..f6c90fcc666 100644 --- a/examples/k8s/example-asset/asset/index.js +++ b/examples/k8s/example-asset/asset/index.js @@ -1,11 +1,13 @@ // NOTE: This code is auto-generated by `teraslice-cli assets init --registry` // any manual changes will be lost next time this gets auto-generated. +import exampleProcessor from './example/processor.js'; +import examplePSchema from './example/schema.js'; export default { ASSETS: { example: { - Processor: require('./example/processor.js'), - Schema: require('./example/schema.js'), + Processor: exampleProcessor, + Schema: examplePSchema, }, } }; diff --git a/packages/data-mate/bench/index.js b/packages/data-mate/bench/index.js index 2746c670b52..e1741722afa 100644 --- a/packages/data-mate/bench/index.js +++ b/packages/data-mate/bench/index.js @@ -4,7 +4,7 @@ import fs from 'node:fs'; import path from 'node:path'; import { fileURLToPath } from 'node:url'; -import { isExecutedFile } from '@terascope/utils'; +import { isExecutedFile, pMap } from '@terascope/utils'; import { printHeader } from './helpers.js'; const dirname = path.dirname(fileURLToPath(import.meta.url)); @@ -17,7 +17,11 @@ function start(name, dir) { console.log(`- ${file}`); }); - async function run(list) { + async function run() { + const list = await pMap(benchmarks, async (file) => { + return import(path.join(dir, file)) + }); + for (const initSuite of list) { const suite = await initSuite(); @@ -29,7 +33,7 @@ function start(name, dir) { } } - run(benchmarks.map((file) => require(path.join(dir, file)))) + run() .then(() => {}) .catch((err) => { console.error(err); diff --git a/packages/data-mate/scripts/docs.js b/packages/data-mate/scripts/docs.js index 97537e7de88..a9d539c04b6 100755 --- a/packages/data-mate/scripts/docs.js +++ b/packages/data-mate/scripts/docs.js @@ -1,17 +1,11 @@ #!/usr/bin/env node - -const { - toTitleCase, - isEmpty, - flatten, - flattenDeep, - firstToUpper, - uniq, - isPlainObject, - trimEnd, -} = require('@terascope/utils'); -const { inspect } = require('util'); -const { functionConfigRepository } = require('..'); +import { + toTitleCase, isEmpty, flatten, + flattenDeep, firstToUpper, uniq, + isPlainObject, trimEnd, +} from '@terascope/utils'; +import { inspect } from 'node:util'; +import { functionConfigRepository } from '../dist/src/index.js'; function prettyPrint(input) { if (isPlainObject(input) && !Object.keys(input).length) { diff --git a/packages/data-mate/src/function-configs/date/index.ts b/packages/data-mate/src/function-configs/date/index.ts index e6019a3bf56..287b9cab3b7 100644 --- a/packages/data-mate/src/function-configs/date/index.ts +++ b/packages/data-mate/src/function-configs/date/index.ts @@ -51,8 +51,8 @@ import { toDailyDateConfig } from './toDailyDate.js'; import { toDateConfig, ToDateArgs } from './toDate.js'; import { toHourlyDateConfig } from './toHourlyDate.js'; import { toMonthlyDateConfig } from './toMonthlyDate.js'; -import { toTimeZoneConfig, toTimeZoneArgs } from './toTimeZone.js'; -import { toTimeZoneUsingLocationConfig, toTimeZoneUsingLocationArgs } from './toTimeZoneUsingLocation.js'; +import { toTimeZoneConfig, TimeZoneArgs } from './toTimeZone.js'; +import { toTimeZoneUsingLocationConfig, TimeZoneUsingLocationArgs } from './toTimeZoneUsingLocation.js'; import { toYearlyDateConfig } from './toYearlyDate.js'; export const dateRepository = { @@ -134,6 +134,6 @@ export type { SetTimezoneArgs, SetYearArgs, ToDateArgs, - toTimeZoneArgs, - toTimeZoneUsingLocationArgs + TimeZoneArgs, + TimeZoneUsingLocationArgs }; diff --git a/packages/data-mate/src/function-configs/date/toTimeZone.ts b/packages/data-mate/src/function-configs/date/toTimeZone.ts index e99a1dc1572..8de7bc85897 100644 --- a/packages/data-mate/src/function-configs/date/toTimeZone.ts +++ b/packages/data-mate/src/function-configs/date/toTimeZone.ts @@ -5,11 +5,11 @@ import { FunctionDefinitionCategory } from '../interfaces.js'; -export interface toTimeZoneArgs { +export interface TimeZoneArgs { timezone: string } -export const toTimeZoneConfig: FieldTransformConfig = { +export const toTimeZoneConfig: FieldTransformConfig = { name: 'toTimeZone', type: FunctionDefinitionType.FIELD_TRANSFORM, process_mode: ProcessMode.INDIVIDUAL_VALUES, diff --git a/packages/data-mate/src/function-configs/date/toTimeZoneUsingLocation.ts b/packages/data-mate/src/function-configs/date/toTimeZoneUsingLocation.ts index 6df1838a5a5..005883de645 100644 --- a/packages/data-mate/src/function-configs/date/toTimeZoneUsingLocation.ts +++ b/packages/data-mate/src/function-configs/date/toTimeZoneUsingLocation.ts @@ -5,11 +5,11 @@ import { FunctionDefinitionCategory } from '../interfaces.js'; -export interface toTimeZoneUsingLocationArgs { +export interface TimeZoneUsingLocationArgs { location: GeoInput; } -export const toTimeZoneUsingLocationConfig: FieldTransformConfig = { +export const toTimeZoneUsingLocationConfig: FieldTransformConfig = { name: 'toTimeZoneUsingLocation', type: FunctionDefinitionType.FIELD_TRANSFORM, process_mode: ProcessMode.INDIVIDUAL_VALUES, diff --git a/packages/data-mate/src/function-configs/numeric/pow.ts b/packages/data-mate/src/function-configs/numeric/pow.ts index 706d22f1406..3c495c8b9ca 100644 --- a/packages/data-mate/src/function-configs/numeric/pow.ts +++ b/packages/data-mate/src/function-configs/numeric/pow.ts @@ -41,7 +41,7 @@ export const powConfig: FieldTransformConfig = { } ], create({ args: { value } }) { - // eslint-disable-next-line no-restricted-properties + return runMathFn(Math.pow, value); }, accepts: [ diff --git a/packages/data-mate/src/transforms/record-transform.ts b/packages/data-mate/src/transforms/record-transform.ts index a7ddfc36d95..2866cfb7bb9 100644 --- a/packages/data-mate/src/transforms/record-transform.ts +++ b/packages/data-mate/src/transforms/record-transform.ts @@ -279,7 +279,7 @@ function _validateArgs(args: ts.AnyObject, fields: string[]) { export function transformRecord( _input: RecordInput, _parentContext: RecordInput, - // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types + _args: any ): ts.AnyObject|null { return null; } diff --git a/packages/data-mate/src/vector/Vector.ts b/packages/data-mate/src/vector/Vector.ts index c092dbb96ec..d68e31a2a2a 100644 --- a/packages/data-mate/src/vector/Vector.ts +++ b/packages/data-mate/src/vector/Vector.ts @@ -114,11 +114,11 @@ export abstract class Vector { ) { this.type = type; const res = getDataBuckets(data); - // eslint-disable-next-line prefer-destructuring + this.data = res[0]; - // eslint-disable-next-line prefer-destructuring + this.__size = res[1]; - // eslint-disable-next-line prefer-destructuring + this.__consistentSize = res[2]; this.name = options.name; this.config = options.config; diff --git a/packages/elasticsearch-api/index.js b/packages/elasticsearch-api/index.js index d8727c0961f..6e96330ce3b 100644 --- a/packages/elasticsearch-api/index.js +++ b/packages/elasticsearch-api/index.js @@ -1,5 +1,3 @@ -/* eslint-disable camelcase */ - // polyfill because opensearch has references to an api that won't exist // on the client side, should be able to remove in the future import Promise from 'bluebird'; diff --git a/packages/eslint-config/index.js b/packages/eslint-config/index.js index 00b070d64c9..b47788cf959 100644 --- a/packages/eslint-config/index.js +++ b/packages/eslint-config/index.js @@ -1,8 +1,23 @@ import js from "@eslint/js"; +import jest from 'eslint-plugin-jest'; import globals from "globals"; +import reactHooks from 'eslint-plugin-react-hooks'; +import react from 'eslint-plugin-react'; import { rules, ignores } from './lib/index.js'; -/** @type {import('eslint').Linter.FlatConfig[]} */ +import tsEslint from 'typescript-eslint'; + +const typescriptLint = tsEslint.config( + js.configs.recommended, + ...tsEslint.configs.recommended, + { + rules: rules.typescript + } + ); + +// TODO: Temporary disabling of plugins checking spec files +typescriptLint[2].ignores = ['**/test/**'] + const eslintConfig = [ { // In your eslint.config.js file, if an ignores key is used without any other @@ -17,13 +32,9 @@ const eslintConfig = [ // overrides just for react files files: ['*.jsx', '*.tsx'], ignores, - plugins: ['@typescript-eslint', '@typescript-eslint/recommended', 'react-hooks/recommended', 'airbnb'], - parser: '@typescript-eslint/parser', - env: { - jest: true, - jasmine: false, - node: false, - browser: true, + plugins: { + 'react-hooks': reactHooks, + react }, languageOptions: { parserOptions: { @@ -32,26 +43,31 @@ const eslintConfig = [ }, }, }, - rules: rules.react, - }, - { - // overrides just for typescript files - files: ['*.ts'], - ignores, - plugins: ['@typescript-eslint', '@typescript-eslint/recommended', 'airbnb-base'], - parser: '@typescript-eslint/parser', - rules: rules.typescript, + rules: { + ...rules.react, + } }, + // { + // // overrides just for spec files + // files: ['*-spec.js', '*-spec.ts', '*-spec.tsx', '*-spec.jsx'], + // plugins: { + // jest + // }, + // rules: { + // ...rules.jest, + // } + // }, + ...typescriptLint, + { // overrides just for spec files - files: ['*-spec.js', '*-spec.ts', '*-spec.tsx', '*-spec.jsx'], - plugins: ['jest'], - env: { - 'jest/globals': true - }, - rules: rules.jest, + files: [ '**/*.-spec.{js,ts,tsx,jsx}'], + ...jest.configs['flat/all'], + rules: { + ...jest.configs['flat/all'].rules, + ...rules.jest, + } }, - js.configs.recommended, { languageOptions: { globals: { diff --git a/packages/eslint-config/lib/rules/javascript.js b/packages/eslint-config/lib/rules/javascript.js index 02780994872..d08d544d8f3 100644 --- a/packages/eslint-config/lib/rules/javascript.js +++ b/packages/eslint-config/lib/rules/javascript.js @@ -2,7 +2,7 @@ import { INDENT } from './constants.js'; export default { // airbnb overrides - indent: ['error', INDENT], + // indent: ['error', INDENT], 'max-len': ['error', { code: 100, tabWidth: INDENT, @@ -68,6 +68,7 @@ export default { "varsIgnorePattern": "^_", "argsIgnorePattern": "^_", "caughtErrorsIgnorePattern": "^_", + "ignoreRestSiblings": true } ] }; diff --git a/packages/eslint-config/lib/rules/typescript.js b/packages/eslint-config/lib/rules/typescript.js index e5f2a7440f3..c70af814b33 100644 --- a/packages/eslint-config/lib/rules/typescript.js +++ b/packages/eslint-config/lib/rules/typescript.js @@ -1,5 +1,6 @@ -import { INDENT } from './constants.js'; import jsRules from './javascript.js'; +// TODO: temporary till we have styles +// import { INDENT } from './constants.js'; export default Object.assign({}, jsRules, { // typescript preferences @@ -27,14 +28,6 @@ export default Object.assign({}, jsRules, { // The following rules make compatibility between eslint rules and typescript rules 'consistent-return': 'off', - 'brace-style': 'off', - '@typescript-eslint/brace-style': [ - 'error', - '1tbs', - { - allowSingleLine: true - } - ], 'no-extra-parens': 'off', '@typescript-eslint/no-extra-parens': [ 'off', @@ -52,10 +45,6 @@ export default Object.assign({}, jsRules, { 'no-undef': 'off', 'no-shadow': 'off', '@typescript-eslint/no-shadow': ['error'], - 'func-call-spacing': 'off', - '@typescript-eslint/func-call-spacing': ['error', 'never'], - indent: 'off', - '@typescript-eslint/indent': ['error', INDENT], 'no-underscore-dangle': 'off', 'no-useless-constructor': 'off', '@typescript-eslint/prefer-for-of': ['error'], @@ -69,7 +58,7 @@ export default Object.assign({}, jsRules, { trailingUnderscore: 'allow', filter: { // you can expand this regex to add more allowed names - regex: '^__', + regex: '^__|', match: false } }, @@ -96,10 +85,30 @@ export default Object.assign({}, jsRules, { '@typescript-eslint/no-unused-vars': [ 'error', { - vars: 'all', - args: 'after-used', - ignoreRestSiblings: true, - argsIgnorePattern: '^_', - }, + "varsIgnorePattern": "^_", + "argsIgnorePattern": "^_", + "caughtErrorsIgnorePattern": "^_", + "ignoreRestSiblings": true, + // TODO: check this again with stylistic checks + "caughtErrors" : "none" + } ], + '@typescript-eslint/no-empty-object-type': 'warn', + // TODO: look into this + '@typescript-eslint/no-unused-expressions': 'warn' + /* + Stylistic rules that will be done in a separate PR + */ + // 'func-call-spacing': 'off', + // '@typescript-eslint/func-call-spacing': ['error', 'never'], + // indent: 'off', + // '@typescript-eslint/indent': ['error', INDENT], + // 'brace-style': 'off', + // '@typescript-eslint/brace-style': [ + // 'error', + // '1tbs', + // { + // allowSingleLine: true + // } + // ], }); diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 8d3b92b1c2f..874be4acd23 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -18,15 +18,20 @@ "test:watch": "ts-scripts test --watch . --" }, "dependencies": { + "@eslint/js": "^9.9.1", + "@types/eslint__js": "^8.42.3", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", + "eslint": "^9.9.1", "eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb-base": "^15.0.0", "eslint-plugin-import": "~2.29.1", "eslint-plugin-jest": "^28.8.0", "eslint-plugin-jsx-a11y": "^6.9.0", "eslint-plugin-react": "^7.35.0", - "eslint-plugin-react-hooks": "^4.4.0" + "eslint-plugin-react-hooks": "^4.4.0", + "typescript": "^5.5.4", + "typescript-eslint": "^8.3.0" }, "engines": { "node": ">=18.18.0", diff --git a/packages/job-components/src/execution-context/index.ts b/packages/job-components/src/execution-context/index.ts index 2a3c9cf42ee..329cb6bb843 100644 --- a/packages/job-components/src/execution-context/index.ts +++ b/packages/job-components/src/execution-context/index.ts @@ -17,8 +17,7 @@ export function isSlicerExecutionContext(context: unknown): context is SlicerExe } export type ExecutionContext = WorkerExecutionContext|SlicerExecutionContext; - -// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types + export async function makeExecutionContext( config: ExecutionContextConfig ): Promise { diff --git a/packages/job-components/src/execution-context/interfaces.ts b/packages/job-components/src/execution-context/interfaces.ts index 161f7060da5..6a8187aaf54 100644 --- a/packages/job-components/src/execution-context/interfaces.ts +++ b/packages/job-components/src/execution-context/interfaces.ts @@ -12,11 +12,9 @@ export interface ExecutionContextConfig { terasliceOpPath?: string; assetIds?: string[]; } - -// eslint-disable-next-line @typescript-eslint/no-empty-interface + export interface SlicerOperations extends Set {} - -// eslint-disable-next-line @typescript-eslint/no-empty-interface + export interface WorkerOperations extends Set {} /** event handlers that should be cleaned up */ diff --git a/packages/scripts/src/helpers/hooks.ts b/packages/scripts/src/helpers/hooks.ts index c91eb7e2865..aa5578ca60e 100644 --- a/packages/scripts/src/helpers/hooks.ts +++ b/packages/scripts/src/helpers/hooks.ts @@ -11,7 +11,7 @@ export async function executeHook(hook: Hook, quiet: boolean, ...args: any[]): P const { terascope: { hook_file } } = getRootInfo(); if (!hook_file) return; - let hookFile = require(path.resolve(hook_file)); + let hookFile = await import(path.resolve(hook_file)); if (hookFile.default) { hookFile = hookFile.default; } diff --git a/packages/terafoundation/src/cluster-context.ts b/packages/terafoundation/src/cluster-context.ts index 8d2612a4db8..c4685698925 100644 --- a/packages/terafoundation/src/cluster-context.ts +++ b/packages/terafoundation/src/cluster-context.ts @@ -65,7 +65,7 @@ export class ClusterContext< } private _errorHandler(err: any) { - // eslint-disable-next-line no-console + const logErr = this.logger ? this.logger.error.bind(this.logger) : console.error; diff --git a/packages/terafoundation/src/master.ts b/packages/terafoundation/src/master.ts index 011a59d19e3..42322d2133e 100644 --- a/packages/terafoundation/src/master.ts +++ b/packages/terafoundation/src/master.ts @@ -36,7 +36,7 @@ export default function masterModule< let workersAlive = 0; let funcRun = 0; - let shutdownInterval: NodeJS.Timeout; + const shutdownInterval = setInterval(shutdownWorkers, 1000); const emitShutdown = once(() => { // optional hook for shutdown sequences @@ -72,8 +72,6 @@ export default function masterModule< } } - shutdownInterval = setInterval(shutdownWorkers, 1000); - function logAndFinish() { logger.info('All workers have exited. Ending.'); logger.flush() diff --git a/packages/teraslice-cli/src/cmds/tjm/await.ts b/packages/teraslice-cli/src/cmds/tjm/await.ts index b06f7d6b83d..bbc30bf6c36 100644 --- a/packages/teraslice-cli/src/cmds/tjm/await.ts +++ b/packages/teraslice-cli/src/cmds/tjm/await.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-import-module-exports */ import { CMD } from '../../interfaces.js'; import YargsOptions from '../../helpers/yargs-options.js'; import Config from '../../helpers/config.js'; diff --git a/packages/teraslice-cli/src/helpers/display.ts b/packages/teraslice-cli/src/helpers/display.ts index 82308049098..7218d7af8e7 100644 --- a/packages/teraslice-cli/src/helpers/display.ts +++ b/packages/teraslice-cli/src/helpers/display.ts @@ -137,7 +137,7 @@ export default class Display { @param id - id value used to filter results by job_id or ex_id */ async display( - // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types + header: any, items: any[] | any, type: string, diff --git a/packages/teraslice-cli/src/helpers/url.ts b/packages/teraslice-cli/src/helpers/url.ts index 37ffcac6cf9..98f32907f60 100644 --- a/packages/teraslice-cli/src/helpers/url.ts +++ b/packages/teraslice-cli/src/helpers/url.ts @@ -5,7 +5,7 @@ export default class Url { check(inUrl: string): boolean { // check that url starts with http:// but allow for https:// - return (startsWith(inUrl, 'http://' || 'https://') || startsWith(inUrl, 'https://')); + return (startsWith(inUrl, 'http://') || startsWith(inUrl, 'https://')); } build(inUrl: string): string { diff --git a/packages/teraslice-cli/test/fixtures/testAssetWithBuild/asset/index.js b/packages/teraslice-cli/test/fixtures/testAssetWithBuild/asset/index.js index 76e4b53ad1b..638c263bbcf 100644 --- a/packages/teraslice-cli/test/fixtures/testAssetWithBuild/asset/index.js +++ b/packages/teraslice-cli/test/fixtures/testAssetWithBuild/asset/index.js @@ -1,12 +1,12 @@ -const procProcessor = require('./proc/processor'); -const procSchema = require('./proc/schema'); -const procSlicer = require('./proc/slicer'); +import procProcessor from './proc/processor.js'; +import procSchema from './proc/schema.js'; +import procSlicer from './proc/slicer.js'; -const proc2API = require('./proc2/api'); -const proc2Schema = require('./proc2/schema'); -const proc2Fetcher = require('./proc2/fetcher'); +import proc2API from './proc2/api.js'; +import proc2Schema from './proc2/schema.js'; +import proc2Fetcher from './proc2/fetcher.js'; -module.exports = { +export default { proc: { Processor: procProcessor, Schema: procSchema, diff --git a/packages/teraslice-messaging/src/messenger/client.ts b/packages/teraslice-messaging/src/messenger/client.ts index ae8f84681a9..46c31355d14 100644 --- a/packages/teraslice-messaging/src/messenger/client.ts +++ b/packages/teraslice-messaging/src/messenger/client.ts @@ -1,3 +1,5 @@ +/*eslint-disable prefer-const*/ + import ms from 'ms'; import SocketIOClient from 'socket.io-client'; import { diff --git a/packages/teraslice/src/interfaces.ts b/packages/teraslice/src/interfaces.ts index 27847a7ae5c..89be79c1567 100644 --- a/packages/teraslice/src/interfaces.ts +++ b/packages/teraslice/src/interfaces.ts @@ -11,8 +11,7 @@ import type { export interface TerasliceRequest extends Request { logger: Logger } - -// eslint-disable-next-line @typescript-eslint/no-empty-interface + export interface TerasliceResponse extends Response {} export interface ClusterMasterContext extends Context { diff --git a/packages/teraslice/src/lib/cluster/services/cluster/backends/kubernetes/k8s.ts b/packages/teraslice/src/lib/cluster/services/cluster/backends/kubernetes/k8s.ts index 6cf18a201d1..f7990b02126 100644 --- a/packages/teraslice/src/lib/cluster/services/cluster/backends/kubernetes/k8s.ts +++ b/packages/teraslice/src/lib/cluster/services/cluster/backends/kubernetes/k8s.ts @@ -98,8 +98,7 @@ export class K8s { const namespace = ns || this.defaultNamespace; let now = Date.now(); const end = now + timeout; - - // eslint-disable-next-line no-constant-condition + while (true) { const result = await pRetry(() => this.client .api.v1.namespaces(namespace).pods() @@ -137,8 +136,7 @@ export class K8s { const namespace = ns || this.defaultNamespace; let now = Date.now(); const end = now + timeout; - - // eslint-disable-next-line no-constant-condition + while (true) { const result = await pRetry(() => this.client .api.v1.namespaces(namespace).pods() diff --git a/packages/teraslice/src/lib/cluster/services/cluster/backends/kubernetes/k8sResource.ts b/packages/teraslice/src/lib/cluster/services/cluster/backends/kubernetes/k8sResource.ts index 6eecc88f754..b00e0cf9ec4 100644 --- a/packages/teraslice/src/lib/cluster/services/cluster/backends/kubernetes/k8sResource.ts +++ b/packages/teraslice/src/lib/cluster/services/cluster/backends/kubernetes/k8sResource.ts @@ -285,14 +285,14 @@ export class K8sResource { // eslint-disable-next-line max-len this.resource.spec.template.spec.priorityClassName = this.terasliceConfig.kubernetes_priority_class_name; if (this.execution.stateful) { - // eslint-disable-next-line max-len + this.resource.spec.template.metadata.labels[`${this.jobPropertyLabelPrefix}/stateful`] = 'true'; } } if (this.nodeType === 'worker' && this.execution.stateful) { // eslint-disable-next-line max-len this.resource.spec.template.spec.priorityClassName = this.terasliceConfig.kubernetes_priority_class_name; - // eslint-disable-next-line max-len + this.resource.spec.template.metadata.labels[`${this.jobPropertyLabelPrefix}/stateful`] = 'true'; } } diff --git a/packages/teraslice/src/lib/cluster/services/cluster/backends/kubernetesV2/k8s.ts b/packages/teraslice/src/lib/cluster/services/cluster/backends/kubernetesV2/k8s.ts index 7691748274f..3e429462c96 100644 --- a/packages/teraslice/src/lib/cluster/services/cluster/backends/kubernetesV2/k8s.ts +++ b/packages/teraslice/src/lib/cluster/services/cluster/backends/kubernetesV2/k8s.ts @@ -6,7 +6,7 @@ import * as k8s from '@kubernetes/client-node'; import { IncomingMessage } from 'node:http'; import { getRetryConfig } from './utils.js'; -interface kubeConfigOptions { +interface KubeConfigOptions { clusters: k8s.Cluster[]; contexts: k8s.Context[]; currentContext: k8s.Context['name']; @@ -29,7 +29,7 @@ export class K8s { constructor( logger: Logger, - clientConfig: kubeConfigOptions | null, + clientConfig: KubeConfigOptions | null, defaultNamespace: string | null, apiPollDelay: number, shutdownTimeout: number @@ -92,7 +92,6 @@ export class K8s { let now = Date.now(); const end = now + timeout; - // eslint-disable-next-line no-constant-condition while (true) { const result = await pRetry(() => this.k8sCoreV1Api .listNamespacedPod(namespace, undefined, undefined, undefined, undefined, selector), @@ -143,7 +142,6 @@ export class K8s { let now = Date.now(); const end = now + timeout; - // eslint-disable-next-line no-constant-condition while (true) { const result = await pRetry(() => this.k8sCoreV1Api .listNamespacedPod(namespace, undefined, undefined, undefined, undefined, selector), diff --git a/packages/teraslice/src/lib/cluster/services/cluster/backends/kubernetesV2/k8sResource.ts b/packages/teraslice/src/lib/cluster/services/cluster/backends/kubernetesV2/k8sResource.ts index c2751c4a87e..bb135e55cf2 100644 --- a/packages/teraslice/src/lib/cluster/services/cluster/backends/kubernetesV2/k8sResource.ts +++ b/packages/teraslice/src/lib/cluster/services/cluster/backends/kubernetesV2/k8sResource.ts @@ -292,14 +292,14 @@ export class K8sResource { // eslint-disable-next-line max-len this.resource.spec.template.spec.priorityClassName = this.terasliceConfig.kubernetes_priority_class_name; if (this.execution.stateful) { - // eslint-disable-next-line max-len + this.resource.spec.template.metadata.labels[`${this.jobPropertyLabelPrefix}/stateful`] = 'true'; } } if (this.nodeType === 'worker' && this.execution.stateful) { // eslint-disable-next-line max-len this.resource.spec.template.spec.priorityClassName = this.terasliceConfig.kubernetes_priority_class_name; - // eslint-disable-next-line max-len + this.resource.spec.template.metadata.labels[`${this.jobPropertyLabelPrefix}/stateful`] = 'true'; } } diff --git a/packages/teraslice/src/lib/cluster/services/cluster/backends/native/messaging.ts b/packages/teraslice/src/lib/cluster/services/cluster/backends/native/messaging.ts index a73f42f89cd..5454e271645 100644 --- a/packages/teraslice/src/lib/cluster/services/cluster/backends/native/messaging.ts +++ b/packages/teraslice/src/lib/cluster/services/cluster/backends/native/messaging.ts @@ -1,3 +1,4 @@ +/*eslint-disable prefer-const*/ import _ from 'lodash'; import type { EventEmitter } from 'node:events'; import { nanoid } from 'nanoid'; diff --git a/packages/teraslice/src/lib/storage/analytics.ts b/packages/teraslice/src/lib/storage/analytics.ts index be6cd4598a8..7877140c0ad 100644 --- a/packages/teraslice/src/lib/storage/analytics.ts +++ b/packages/teraslice/src/lib/storage/analytics.ts @@ -1,4 +1,3 @@ -/* eslint-disable default-param-last */ import { Context, WorkerExecutionContext } from '@terascope/job-components'; import { pMap, Logger } from '@terascope/utils'; import { Slice, SliceAnalyticsData } from '@terascope/types'; diff --git a/packages/teraslice/src/lib/storage/assets.ts b/packages/teraslice/src/lib/storage/assets.ts index 3f5e59f163f..c55530ede82 100644 --- a/packages/teraslice/src/lib/storage/assets.ts +++ b/packages/teraslice/src/lib/storage/assets.ts @@ -111,7 +111,7 @@ export class AssetsStorage { private async _assetExistsInFS(id: string): Promise { try { if (!this.assetsPath) return false; - // eslint-disable-next-line no-bitwise + const access = fse.constants.F_OK | fse.constants.R_OK | fse.constants.W_OK; await fse.access(path.join(this.assetsPath, id), access); diff --git a/packages/teraslice/src/lib/storage/backends/elasticsearch_store.ts b/packages/teraslice/src/lib/storage/backends/elasticsearch_store.ts index e0d02213814..f047df1db9c 100644 --- a/packages/teraslice/src/lib/storage/backends/elasticsearch_store.ts +++ b/packages/teraslice/src/lib/storage/backends/elasticsearch_store.ts @@ -1,4 +1,3 @@ -/* eslint-disable default-param-last */ import ms from 'ms'; import { TSError, parseError, isTest, pDelay, diff --git a/packages/teraslice/src/lib/utils/file_utils.ts b/packages/teraslice/src/lib/utils/file_utils.ts index 79fc8d13c58..cdc4e5e4d32 100644 --- a/packages/teraslice/src/lib/utils/file_utils.ts +++ b/packages/teraslice/src/lib/utils/file_utils.ts @@ -64,7 +64,7 @@ export interface AssetJSON { node_version?: number; } -export type metaCheckFN = (data: AssetMetadata) => Promise +export type MetaCheckFN = (data: AssetMetadata) => Promise export interface AssetMetadata extends AssetJSON { id: string @@ -127,7 +127,7 @@ async function _saveAsset( assetsPath: string, id: string, binaryData: Buffer, - metaCheck?: metaCheckFN + metaCheck?: MetaCheckFN ): Promise { const newPath = path.join(assetsPath, id); @@ -162,7 +162,7 @@ export async function saveAsset( assetsPath: string, id: string, binaryData: Buffer, - metaCheck?: metaCheckFN + metaCheck?: MetaCheckFN ) { return mutex.runExclusive(() => _saveAsset( logger, assetsPath, id, binaryData, metaCheck diff --git a/packages/teraslice/src/lib/workers/execution-controller/index.ts b/packages/teraslice/src/lib/workers/execution-controller/index.ts index 7976f0f4d57..c8dc1fe0e89 100644 --- a/packages/teraslice/src/lib/workers/execution-controller/index.ts +++ b/packages/teraslice/src/lib/workers/execution-controller/index.ts @@ -42,7 +42,7 @@ export class ExecutionController { private isExecutionFinished = false; isExecutionDone = false; private workersHaveConnected = false; - // eslint-disable-next-line no-spaced-func + private _handlers = new Map void>(); executionAnalytics: ExecutionAnalytics; readonly scheduler: Scheduler; diff --git a/packages/teraslice/src/lib/workers/metrics/index.ts b/packages/teraslice/src/lib/workers/metrics/index.ts index f02d13b7abe..d808ad6a303 100644 --- a/packages/teraslice/src/lib/workers/metrics/index.ts +++ b/packages/teraslice/src/lib/workers/metrics/index.ts @@ -1,4 +1,3 @@ -/* eslint-disable no-console */ import { EventEmitter } from 'node:events'; import { debugLogger, isTest, Logger diff --git a/packages/teraslice/src/lib/workers/worker/index.ts b/packages/teraslice/src/lib/workers/worker/index.ts index 195b4e6fed7..0f2c651e383 100644 --- a/packages/teraslice/src/lib/workers/worker/index.ts +++ b/packages/teraslice/src/lib/workers/worker/index.ts @@ -1,3 +1,5 @@ +/*eslint-disable prefer-const*/ + import { get, getFullErrorStack, isFatalError, logError, pWhile, Logger diff --git a/packages/ts-transforms/src/command.ts b/packages/ts-transforms/src/command.ts index 2bc991f9ae4..be66d4b1ca3 100644 --- a/packages/ts-transforms/src/command.ts +++ b/packages/ts-transforms/src/command.ts @@ -5,7 +5,8 @@ import readline from 'node:readline'; import { hideBin } from 'yargs/helpers'; import yargs from 'yargs'; import { - DataEntity, debugLogger, parseList, AnyObject, get + DataEntity, debugLogger, parseList, + AnyObject, get, pMap } from '@terascope/utils'; import { PhaseManager } from './index.js'; import { PhaseConfig } from './interfaces.js'; @@ -67,7 +68,7 @@ try { }); } if (command.T) { - typesConfig = require(command.T as string); + typesConfig = await import(command.T as string); } } catch (err) { console.error('could not load and parse types', err); @@ -231,10 +232,10 @@ async function initCommand() { let plugins = []; if (command.p) { const pluginList = parseList(command.p as string); - plugins = pluginList.map((pluginPath) => { - const mod = require(path.resolve(pluginPath)); + plugins = await pMap(pluginList, async (pluginPath) => { + const mod = await import(path.resolve(pluginPath)); return mod.default || mod; - }); + }) } let manager: PhaseManager; diff --git a/packages/ts-transforms/src/operations/index.ts b/packages/ts-transforms/src/operations/index.ts index 190a349c230..95b6907cf39 100644 --- a/packages/ts-transforms/src/operations/index.ts +++ b/packages/ts-transforms/src/operations/index.ts @@ -1,5 +1,3 @@ -/* eslint-disable max-classes-per-file */ - import { deprecate } from 'util'; import OperationBase from './lib/base.js'; diff --git a/packages/ts-transforms/src/operations/plugins/data-mate/FieldTransform.ts b/packages/ts-transforms/src/operations/plugins/data-mate/FieldTransform.ts index 46f410cf87f..0149bb2a82f 100644 --- a/packages/ts-transforms/src/operations/plugins/data-mate/FieldTransform.ts +++ b/packages/ts-transforms/src/operations/plugins/data-mate/FieldTransform.ts @@ -1,4 +1,3 @@ -/* eslint-disable max-classes-per-file */ import { DataEntity, get, isEmpty } from '@terascope/utils'; import { FieldTransform, RecordTransform } from '@terascope/data-mate'; import { InjectMethod } from '../mixins.js'; diff --git a/packages/ts-transforms/src/operations/plugins/data-mate/FieldValidator.ts b/packages/ts-transforms/src/operations/plugins/data-mate/FieldValidator.ts index e2fd3462d9a..374357b64f8 100644 --- a/packages/ts-transforms/src/operations/plugins/data-mate/FieldValidator.ts +++ b/packages/ts-transforms/src/operations/plugins/data-mate/FieldValidator.ts @@ -1,5 +1,3 @@ -/* eslint-disable max-classes-per-file */ - import { DataEntity, get } from '@terascope/utils'; import { FieldValidator } from '@terascope/data-mate'; import { InjectMethod } from '../mixins.js'; diff --git a/packages/ts-transforms/src/operations/plugins/data-mate/RecordTransform.ts b/packages/ts-transforms/src/operations/plugins/data-mate/RecordTransform.ts index e35f20653b0..24300d29622 100644 --- a/packages/ts-transforms/src/operations/plugins/data-mate/RecordTransform.ts +++ b/packages/ts-transforms/src/operations/plugins/data-mate/RecordTransform.ts @@ -1,4 +1,3 @@ -/* eslint-disable max-classes-per-file */ import { DataEntity } from '@terascope/utils'; import { RecordTransform } from '@terascope/data-mate'; import { InjectMethod } from '../mixins.js'; diff --git a/packages/ts-transforms/src/operations/plugins/data-mate/RecordValidator.ts b/packages/ts-transforms/src/operations/plugins/data-mate/RecordValidator.ts index 5c0f2f5b34d..ee448a124fe 100644 --- a/packages/ts-transforms/src/operations/plugins/data-mate/RecordValidator.ts +++ b/packages/ts-transforms/src/operations/plugins/data-mate/RecordValidator.ts @@ -1,5 +1,3 @@ -/* eslint-disable max-classes-per-file */ - import { DataEntity } from '@terascope/utils'; import { RecordValidator } from '@terascope/data-mate'; import { InjectMethod } from '../mixins.js'; diff --git a/packages/ts-transforms/src/operations/plugins/mixins.ts b/packages/ts-transforms/src/operations/plugins/mixins.ts index 871a2cee0f7..5130acbd4dc 100644 --- a/packages/ts-transforms/src/operations/plugins/mixins.ts +++ b/packages/ts-transforms/src/operations/plugins/mixins.ts @@ -1,4 +1,3 @@ -/* eslint-disable max-classes-per-file */ import { RepoConfig, InputType } from '@terascope/data-mate'; import { InputOutputCardinality } from '../../interfaces.js'; diff --git a/packages/ts-transforms/src/operations/plugins/validator/index.ts b/packages/ts-transforms/src/operations/plugins/validator/index.ts index cf52fd51311..865d23ad73c 100644 --- a/packages/ts-transforms/src/operations/plugins/validator/index.ts +++ b/packages/ts-transforms/src/operations/plugins/validator/index.ts @@ -1,4 +1,3 @@ -/* eslint-disable max-classes-per-file */ import { deprecate } from 'util'; import validator from 'validator'; import ValidationOpBase from '../../lib/validations/base.js'; @@ -25,7 +24,7 @@ function setup(method: string) { static cardinality: InputOutputCardinality = 'one-to-one'; constructor(config: PostProcessConfig) { - // eslint-disable-next-line no-constructor-return + return new Validator(config, method); } }; diff --git a/packages/types/src/elasticsearch-client/elasticsearch-response.ts b/packages/types/src/elasticsearch-client/elasticsearch-response.ts index 6a6963e32ff..85f7505575e 100644 --- a/packages/types/src/elasticsearch-client/elasticsearch-response.ts +++ b/packages/types/src/elasticsearch-client/elasticsearch-response.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-empty-interface */ import * as i from './elasticsearch-types.js'; export interface IndicesStatsResponse { diff --git a/packages/types/src/utility.ts b/packages/types/src/utility.ts index 69ad68d5ab2..32804f23893 100644 --- a/packages/types/src/utility.ts +++ b/packages/types/src/utility.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-shadow */ /** * Omit the properties available to type. * Useful for excluding properties from a type @@ -53,14 +52,13 @@ export type Unwrapped = NonNullable; export type WithoutNil = { [P in keyof T]: T[P] extends Nil ? never : T[P] }; /** A simple definitions of array */ -// eslint-disable-next-line @typescript-eslint/no-empty-interface + export interface Many extends Array {} - -// eslint-disable-next-line @typescript-eslint/no-empty-interface + export interface RecursiveArray extends Many)> {} -// eslint-disable-next-line @typescript-eslint/no-empty-interface + export interface ListOfRecursiveArraysOrValues extends Many> {} -// eslint-disable-next-line @typescript-eslint/no-empty-interface + export interface EmptyObject {} /** A simple object with any values */ @@ -104,7 +102,7 @@ export type FilteredResult = { */ export type Unpacked = T extends (infer U)[] ? U : - // eslint-disable-next-line @typescript-eslint/no-unused-vars + T extends (...args: any[]) => infer U ? U : T extends Promise ? U : T; diff --git a/packages/utils/bench/index.js b/packages/utils/bench/index.js index abd86c03462..7d675adc836 100644 --- a/packages/utils/bench/index.js +++ b/packages/utils/bench/index.js @@ -17,7 +17,11 @@ function start(name, dir) { console.log(`- ${file}`); }); - async function run(list) { + async function run() { + const list = await pMap(benchmarks, async (file) => { + return import(path.join(dir, file)) + }); + for (const initSuite of list) { const suite = await initSuite(); @@ -29,7 +33,7 @@ function start(name, dir) { } } - run(benchmarks.map((file) => require(path.join(dir, file)))) + run() .then(() => {}) .catch((err) => { console.error(err); diff --git a/packages/utils/src/big-lru-map.ts b/packages/utils/src/big-lru-map.ts index a1155777d65..336d09aab9b 100644 --- a/packages/utils/src/big-lru-map.ts +++ b/packages/utils/src/big-lru-map.ts @@ -1,5 +1,3 @@ -/* eslint-disable max-classes-per-file */ - import { TypedArray } from '@terascope/types'; import dataStructurePkg from 'mnemonist'; import { BigMap } from './big-map.js'; @@ -11,7 +9,7 @@ import { BigMap } from './big-map.js'; * */ export class FlexibleArray { constructor() { - // eslint-disable-next-line no-constructor-return + return []; } } diff --git a/packages/utils/src/deps.ts b/packages/utils/src/deps.ts index 28082b1bb07..c231df09ca0 100644 --- a/packages/utils/src/deps.ts +++ b/packages/utils/src/deps.ts @@ -48,7 +48,7 @@ function _isDataEntity(input: any): input is DataEntity { const _cloneTypeHandlers = Object.freeze({ object(input: any): any { const descriptors = Object.getOwnPropertyDescriptors(input); - // eslint-disable-next-line guard-for-in + for (const key in descriptors) { descriptors[key].value = cloneDeep(descriptors[key].value); } @@ -75,7 +75,7 @@ export function cloneDeep(input: T): T { * Determine the type of an input * @return a human friendly string that describes the input */ -// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types + export function getTypeOf(val: any): string { if (val === undefined) return 'undefined'; if (val === null) return 'null'; diff --git a/packages/utils/src/entities/data-entity.ts b/packages/utils/src/entities/data-entity.ts index 166e04532cc..675fd217efa 100644 --- a/packages/utils/src/entities/data-entity.ts +++ b/packages/utils/src/entities/data-entity.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-shadow */ /* eslint-disable max-len */ import { getValidDate, getTime } from '../dates.js'; import { getTypeOf } from '../deps.js'; diff --git a/packages/utils/src/entities/interfaces.ts b/packages/utils/src/entities/interfaces.ts index f03dfafa7b7..74a95fb25fc 100644 --- a/packages/utils/src/entities/interfaces.ts +++ b/packages/utils/src/entities/interfaces.ts @@ -2,10 +2,9 @@ import { AnyObject } from '../interfaces.js'; export type TYPE_IS_DATAENTITY_KEY = '__isDataEntity'; export type TYPE_ENTITY_METADATA_KEY = '___EntityMetadata'; - -// eslint-disable-next-line @typescript-eslint/naming-convention + export const __IS_DATAENTITY_KEY: TYPE_IS_DATAENTITY_KEY = '__isDataEntity'; -// eslint-disable-next-line @typescript-eslint/naming-convention + export const __ENTITY_METADATA_KEY: TYPE_ENTITY_METADATA_KEY = '___EntityMetadata'; export type _DataEntityMetadataType = DataEntityMetadata | AnyObject; diff --git a/packages/utils/src/functions.ts b/packages/utils/src/functions.ts index 65268bf74d4..c54e43b1078 100644 --- a/packages/utils/src/functions.ts +++ b/packages/utils/src/functions.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-unsafe-function-type */ /* eslint-disable no-param-reassign */ import { toString } from './strings.js'; @@ -60,7 +61,6 @@ export function memoize(fn: T): T { } /** Verify an input is a function */ -// eslint-disable-next-line @typescript-eslint/ban-types export function isFunction(input: unknown): input is Function { return !!(input && typeof input === 'function'); } diff --git a/packages/utils/src/logger.ts b/packages/utils/src/logger.ts index 98a4030ae6b..e14d8458471 100644 --- a/packages/utils/src/logger.ts +++ b/packages/utils/src/logger.ts @@ -79,7 +79,7 @@ export function debugLogger(testName: string, param?: DebugParam, otherName?: st } return undefined; } - // eslint-disable-next-line + return logLevels[logLevel] || 20; }; // @ts-expect-error diff --git a/packages/utils/src/objects.ts b/packages/utils/src/objects.ts index c7f357e1b7f..0a8a4680483 100644 --- a/packages/utils/src/objects.ts +++ b/packages/utils/src/objects.ts @@ -202,7 +202,7 @@ export function getField( * Check if a object has property (and not included in the prototype) * Different from has since it doesn't deal with dot notation values. */ -// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types + export function hasOwn(obj: any, prop: string|symbol|number): boolean { return Object.prototype.hasOwnProperty.call(obj, prop); } diff --git a/packages/xlucene-parser/bench/index.js b/packages/xlucene-parser/bench/index.js index 9f0af190d8a..a014dc8154e 100644 --- a/packages/xlucene-parser/bench/index.js +++ b/packages/xlucene-parser/bench/index.js @@ -17,7 +17,11 @@ export default function start(name, dir) { console.log(`- ${file}`); }); - async function run(list) { + async function run() { + const list = await pMap(benchmarks, async (file) => { + return import(path.join(dir, file)) + }); + for (const initSuite of list) { const suite = await initSuite(); @@ -29,7 +33,7 @@ export default function start(name, dir) { } } - run(benchmarks.map((file) => require(path.join(dir, file)))) + run() .then(() => {}) .catch((err) => { console.error(err); diff --git a/packages/xlucene-parser/src/context.ts b/packages/xlucene-parser/src/context.ts index 6a3ea98a419..70cd200bba2 100644 --- a/packages/xlucene-parser/src/context.ts +++ b/packages/xlucene-parser/src/context.ts @@ -6,8 +6,7 @@ import * as utils from './utils.js'; const inferredFieldTypes = Object.freeze({ [xLuceneFieldType.String]: true, }); - -// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types + export function makeContext(arg: i.ContextArg) { let typeConfig: xLuceneTypeConfig; // eslint-disable-next-line diff --git a/yarn.lock b/yarn.lock index baec971652b..0b06df7ca0f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1038,7 +1038,7 @@ dependencies: eslint-visitor-keys "^3.3.0" -"@eslint-community/regexpp@^4.11.0": +"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.11.0": version "4.11.0" resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae" integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A== @@ -1057,6 +1057,15 @@ debug "^4.3.1" minimatch "^3.1.2" +"@eslint/config-array@^0.18.0": + version "0.18.0" + resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.18.0.tgz#37d8fe656e0d5e3dbaea7758ea56540867fd074d" + integrity sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw== + dependencies: + "@eslint/object-schema" "^2.1.4" + debug "^4.3.1" + minimatch "^3.1.2" + "@eslint/eslintrc@^3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.1.0.tgz#dbd3482bfd91efa663cbe7aa1f506839868207b6" @@ -1077,6 +1086,11 @@ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.9.0.tgz#d8437adda50b3ed4401964517b64b4f59b0e2638" integrity sha512-hhetes6ZHP3BlXLxmd8K2SNgkhNSi+UcecbnwWKwpP7kyi/uC75DJ1lOOBO3xrC4jyojtGE3YxKZPHfk4yrgug== +"@eslint/js@9.9.1", "@eslint/js@^9.9.1": + version "9.9.1" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.9.1.tgz#4a97e85e982099d6c7ee8410aacb55adaa576f06" + integrity sha512-xIDQRsfg5hNBqHz04H1R3scSVwmI+KUbqjsQKHKQ1DAUSaUjYPReZZmS/5PNiKu1fUvzDd6H7DEDKACSEhu+TQ== + "@eslint/object-schema@^2.1.4": version "2.1.4" resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.4.tgz#9e69f8bb4031e11df79e03db09f9dbbae1740843" @@ -2668,6 +2682,26 @@ dependencies: "@types/node" "*" +"@types/eslint@*": + version "9.6.1" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-9.6.1.tgz#d5795ad732ce81715f27f75da913004a56751584" + integrity sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag== + dependencies: + "@types/estree" "*" + "@types/json-schema" "*" + +"@types/eslint__js@^8.42.3": + version "8.42.3" + resolved "https://registry.yarnpkg.com/@types/eslint__js/-/eslint__js-8.42.3.tgz#d1fa13e5c1be63a10b4e3afe992779f81c1179a0" + integrity sha512-alfG737uhmPdnvkrLdZLcEKJ/B8s9Y4hrZ+YAdzUeoArBlSUERA2E87ROfOaS4jd/C45fzOoZzidLc1IPwLqOw== + dependencies: + "@types/eslint" "*" + +"@types/estree@*": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" + integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== + "@types/expect@^1.20.4": version "1.20.4" resolved "https://registry.yarnpkg.com/@types/expect/-/expect-1.20.4.tgz#8288e51737bf7e3ab5d7c77bfa695883745264e5" @@ -2811,7 +2845,7 @@ resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-4.0.9.tgz#cd82382c4f902fed9691a2ed79ec68c5898af4c2" integrity sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg== -"@types/json-schema@^7.0.12": +"@types/json-schema@*", "@types/json-schema@^7.0.12": version "7.0.15" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -3109,6 +3143,21 @@ dependencies: "@types/node" "*" +"@typescript-eslint/eslint-plugin@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.3.0.tgz#726627fad16d41d20539637efee8c2329fe6be32" + integrity sha512-FLAIn63G5KH+adZosDYiutqkOkYEx0nvcwNNfJAf+c7Ae/H35qWwTYvPZUKFj5AS+WfHG/WJJfWnDnyNUlp8UA== + dependencies: + "@eslint-community/regexpp" "^4.10.0" + "@typescript-eslint/scope-manager" "8.3.0" + "@typescript-eslint/type-utils" "8.3.0" + "@typescript-eslint/utils" "8.3.0" + "@typescript-eslint/visitor-keys" "8.3.0" + graphemer "^1.4.0" + ignore "^5.3.1" + natural-compare "^1.4.0" + ts-api-utils "^1.3.0" + "@typescript-eslint/eslint-plugin@^6.21.0": version "6.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz#30830c1ca81fd5f3c2714e524c4303e0194f9cd3" @@ -3126,6 +3175,17 @@ semver "^7.5.4" ts-api-utils "^1.0.1" +"@typescript-eslint/parser@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.3.0.tgz#3c72c32bc909cb91ce3569e7d11d729ad84deafa" + integrity sha512-h53RhVyLu6AtpUzVCYLPhZGL5jzTD9fZL+SYf/+hYOx2bDkyQXztXSc4tbvKYHzfMXExMLiL9CWqJmVz6+78IQ== + dependencies: + "@typescript-eslint/scope-manager" "8.3.0" + "@typescript-eslint/types" "8.3.0" + "@typescript-eslint/typescript-estree" "8.3.0" + "@typescript-eslint/visitor-keys" "8.3.0" + debug "^4.3.4" + "@typescript-eslint/parser@^6.21.0": version "6.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.21.0.tgz#af8fcf66feee2edc86bc5d1cf45e33b0630bf35b" @@ -3153,6 +3213,14 @@ "@typescript-eslint/types" "8.1.0" "@typescript-eslint/visitor-keys" "8.1.0" +"@typescript-eslint/scope-manager@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.3.0.tgz#834301d2e70baf924c26818b911bdc40086f7468" + integrity sha512-mz2X8WcN2nVu5Hodku+IR8GgCOl4C0G/Z1ruaWN4dgec64kDBabuXyPAr+/RgJtumv8EEkqIzf3X2U5DUKB2eg== + dependencies: + "@typescript-eslint/types" "8.3.0" + "@typescript-eslint/visitor-keys" "8.3.0" + "@typescript-eslint/type-utils@6.21.0": version "6.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz#6473281cfed4dacabe8004e8521cee0bd9d4c01e" @@ -3163,6 +3231,16 @@ debug "^4.3.4" ts-api-utils "^1.0.1" +"@typescript-eslint/type-utils@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.3.0.tgz#c1ae6af8c21a27254321016b052af67ddb44a9ac" + integrity sha512-wrV6qh//nLbfXZQoj32EXKmwHf4b7L+xXLrP3FZ0GOUU72gSvLjeWUl5J5Ue5IwRxIV1TfF73j/eaBapxx99Lg== + dependencies: + "@typescript-eslint/typescript-estree" "8.3.0" + "@typescript-eslint/utils" "8.3.0" + debug "^4.3.4" + ts-api-utils "^1.3.0" + "@typescript-eslint/types@6.21.0": version "6.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.21.0.tgz#205724c5123a8fef7ecd195075fa6e85bac3436d" @@ -3173,6 +3251,11 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.1.0.tgz#fbf1eaa668a7e444ac507732ca9d3c3468e5db9c" integrity sha512-q2/Bxa0gMOu/2/AKALI0tCKbG2zppccnRIRCW6BaaTlRVaPKft4oVYPp7WOPpcnsgbr0qROAVCVKCvIQ0tbWog== +"@typescript-eslint/types@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.3.0.tgz#378e62447c2d7028236e55a81d3391026600563b" + integrity sha512-y6sSEeK+facMaAyixM36dQ5NVXTnKWunfD1Ft4xraYqxP0lC0POJmIaL/mw72CUMqjY9qfyVfXafMeaUj0noWw== + "@typescript-eslint/typescript-estree@6.21.0": version "6.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz#c47ae7901db3b8bddc3ecd73daff2d0895688c46" @@ -3201,6 +3284,20 @@ semver "^7.6.0" ts-api-utils "^1.3.0" +"@typescript-eslint/typescript-estree@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.3.0.tgz#3e3d38af101ba61a8568f034733b72bfc9f176b9" + integrity sha512-Mq7FTHl0R36EmWlCJWojIC1qn/ZWo2YiWYc1XVtasJ7FIgjo0MVv9rZWXEE7IK2CGrtwe1dVOxWwqXUdNgfRCA== + dependencies: + "@typescript-eslint/types" "8.3.0" + "@typescript-eslint/visitor-keys" "8.3.0" + debug "^4.3.4" + fast-glob "^3.3.2" + is-glob "^4.0.3" + minimatch "^9.0.4" + semver "^7.6.0" + ts-api-utils "^1.3.0" + "@typescript-eslint/utils@6.21.0": version "6.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.21.0.tgz#4714e7a6b39e773c1c8e97ec587f520840cd8134" @@ -3214,6 +3311,16 @@ "@typescript-eslint/typescript-estree" "6.21.0" semver "^7.5.4" +"@typescript-eslint/utils@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.3.0.tgz#b10972319deac5959c7a7075d0cf2b5e1de7ec08" + integrity sha512-F77WwqxIi/qGkIGOGXNBLV7nykwfjLsdauRB/DOFPdv6LTF3BHHkBpq81/b5iMPSF055oO2BiivDJV4ChvNtXA== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@typescript-eslint/scope-manager" "8.3.0" + "@typescript-eslint/types" "8.3.0" + "@typescript-eslint/typescript-estree" "8.3.0" + "@typescript-eslint/utils@^6.0.0 || ^7.0.0 || ^8.0.0": version "8.1.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.1.0.tgz#a922985a43d2560ce0d293be79148fa80c1325e0" @@ -3240,6 +3347,14 @@ "@typescript-eslint/types" "8.1.0" eslint-visitor-keys "^3.4.3" +"@typescript-eslint/visitor-keys@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.3.0.tgz#320d747d107af1eef1eb43fbc4ccdbddda13068b" + integrity sha512-RmZwrTbQ9QveF15m/Cl28n0LXD6ea2CjkhH5rQ55ewz3H24w+AMCJHPVYaZ8/0HoG8Z3cLLFFycRXxeO2tz9FA== + dependencies: + "@typescript-eslint/types" "8.3.0" + eslint-visitor-keys "^3.4.3" + abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" @@ -4941,13 +5056,41 @@ datemath-parser@^1.0.6: dependencies: moment "^2.22.2" -debug@2.2.0, debug@2.3.3, debug@2.6.9, debug@4, debug@4.x, debug@^2.2.0, debug@^3.2.7, debug@^4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@^4.3.6, debug@~4.3.1: +debug@2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" + integrity sha512-X0rGvJcskG1c3TgSCPqHJ0XJgwlcvOC7elJ5Y0hYuKBZoVqWpAMfLOeIh2UI/DCQ5ruodIjvsugZtjUYUw2pUw== + dependencies: + ms "0.7.1" + +debug@2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.3.3.tgz#40c453e67e6e13c901ddec317af8986cda9eff8c" + integrity sha512-dCHp4G+F11zb+RtEu7BE2U8R32AYmM/4bljQfut8LipH3PdwsVBVGh083MXvtKkB7HSQUzSwiXz53c4mzJvYfw== + dependencies: + ms "0.7.2" + +debug@2.6.9, debug@^2.2.0: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@4, debug@4.x, debug@^4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@^4.3.6, debug@~4.3.1: version "4.3.6" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b" integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg== dependencies: ms "2.1.2" +debug@^3.2.7: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" @@ -5793,6 +5936,46 @@ eslint@^9.9.0: strip-ansi "^6.0.1" text-table "^0.2.0" +eslint@^9.9.1: + version "9.9.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.9.1.tgz#147ac9305d56696fb84cf5bdecafd6517ddc77ec" + integrity sha512-dHvhrbfr4xFQ9/dq+jcVneZMyRYLjggWjk6RVsIiHsP8Rz6yZ8LvZ//iU4TrZF+SXWG+JkNF2OyiZRvzgRDqMg== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.11.0" + "@eslint/config-array" "^0.18.0" + "@eslint/eslintrc" "^3.1.0" + "@eslint/js" "9.9.1" + "@humanwhocodes/module-importer" "^1.0.1" + "@humanwhocodes/retry" "^0.3.0" + "@nodelib/fs.walk" "^1.2.8" + ajv "^6.12.4" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + escape-string-regexp "^4.0.0" + eslint-scope "^8.0.2" + eslint-visitor-keys "^4.0.0" + espree "^10.1.0" + esquery "^1.5.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^8.0.0" + find-up "^5.0.0" + glob-parent "^6.0.2" + ignore "^5.2.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + is-path-inside "^3.0.3" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.3" + strip-ansi "^6.0.1" + text-table "^0.2.0" + espree@^10.0.1, espree@^10.1.0: version "10.1.0" resolved "https://registry.yarnpkg.com/espree/-/espree-10.1.0.tgz#8788dae611574c0f070691f522e4116c5a11fc56" @@ -6005,7 +6188,7 @@ fast-fifo@^1.1.0, fast-fifo@^1.2.0: resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.3.2.tgz#286e31de96eb96d38a97899815740ba2a4f3640c" integrity sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ== -fast-glob@^3.0.3, fast-glob@^3.2.12, fast-glob@^3.2.9: +fast-glob@^3.0.3, fast-glob@^3.2.12, fast-glob@^3.2.9, fast-glob@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== @@ -7095,6 +7278,11 @@ ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.4: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== +ignore@^5.3.1: + version "5.3.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== + import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" @@ -9215,7 +9403,27 @@ mquery@5.0.0: dependencies: debug "4.x" -ms@2.1.2, ms@2.1.3, ms@^2.0.0, ms@^2.1.1, ms@^2.1.3: +ms@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" + integrity sha512-lRLiIR9fSNpnP6TC4v8+4OU7oStC01esuNowdQ34L+Gk8e5Puoc88IqJ+XAY/B3Mn2ZKis8l8HX90oU8ivzUHg== + +ms@0.7.2: + version "0.7.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" + integrity sha512-5NnE67nQSQDJHVahPJna1PQ/zCXMnQop3yUCxjKPNzCxuyPSKWTQ/5Gu5CZmjetwGLWRA+PzeF5thlbOdbQldA== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3, ms@^2.0.0, ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -9255,7 +9463,7 @@ mv@~2: ncp "~2.0.0" rimraf "~2.4.0" -nan@^2.14.0, nan@^2.18.0, nan@^2.19.0: +nan@^2.14.0, nan@^2.18.0: version "2.20.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.20.0.tgz#08c5ea813dd54ed16e5bd6505bf42af4f7838ca3" integrity sha512-bk3gXBZDGILuuo/6sKtr0DQmSThYHLtNCdSdXk9YkxD/jK6X2vmCyyXBBxyqZ4XcnzTyYEAThfX3DCEnLf6igw== @@ -12292,6 +12500,20 @@ typedoc@^0.25.13: minimatch "^9.0.3" shiki "^0.14.7" +typescript-eslint@^8.3.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/typescript-eslint/-/typescript-eslint-8.3.0.tgz#f4d9c5ba71f6bead03ec41ecb2bece1de511e49f" + integrity sha512-EvWjwWLwwKDIJuBjk2I6UkV8KEQcwZ0VM10nR1rIunRDIP67QJTZAHBXTX0HW/oI1H10YESF8yWie8fRQxjvFA== + dependencies: + "@typescript-eslint/eslint-plugin" "8.3.0" + "@typescript-eslint/parser" "8.3.0" + "@typescript-eslint/utils" "8.3.0" + +typescript@^5.5.4: + version "5.5.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba" + integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q== + typescript@~5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" From e8ec51b4a99c723f8e8369578e3b33f8b8685d11 Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Wed, 28 Aug 2024 13:29:29 -0700 Subject: [PATCH 14/16] fix typescript package --- packages/eslint-config/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 874be4acd23..d1f621d56ff 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -30,7 +30,7 @@ "eslint-plugin-jsx-a11y": "^6.9.0", "eslint-plugin-react": "^7.35.0", "eslint-plugin-react-hooks": "^4.4.0", - "typescript": "^5.5.4", + "typescript": "^5.2.2", "typescript-eslint": "^8.3.0" }, "engines": { From b694583f14065e4ff2381fd8fdf454433705f95a Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Wed, 28 Aug 2024 13:29:56 -0700 Subject: [PATCH 15/16] run yarn sync --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d9b529b9ab6..2736d8e79c4 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "nan": "^2.19.0" }, "devDependencies": { - "@eslint/js": "^9.9.0", + "@eslint/js": "^9.9.1", "@swc/core": "1.4.0", "@swc/jest": "^0.2.36", "@types/bluebird": "^3.5.42", @@ -59,7 +59,7 @@ "@types/lodash": "^4.17.7", "@types/node": "^18.14.2", "@types/uuid": "^9.0.8", - "eslint": "^9.9.0", + "eslint": "^9.9.1", "jest": "^29.7.0", "jest-extended": "^3.2.4", "jest-watch-typeahead": "^2.2.2", From ef44e42fd8bac9f7076f8ba17141952f0601ea49 Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Wed, 28 Aug 2024 14:19:33 -0700 Subject: [PATCH 16/16] fix yarn --- yarn.lock | 56 +------------------------------------------------------ 1 file changed, 1 insertion(+), 55 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9251052e436..f5be63e0ab9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1048,15 +1048,6 @@ resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== -"@eslint/config-array@^0.17.1": - version "0.17.1" - resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.17.1.tgz#d9b8b8b6b946f47388f32bedfd3adf29ca8f8910" - integrity sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA== - dependencies: - "@eslint/object-schema" "^2.1.4" - debug "^4.3.1" - minimatch "^3.1.2" - "@eslint/config-array@^0.18.0": version "0.18.0" resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.18.0.tgz#37d8fe656e0d5e3dbaea7758ea56540867fd074d" @@ -1081,11 +1072,6 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@9.9.0", "@eslint/js@^9.9.0": - version "9.9.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.9.0.tgz#d8437adda50b3ed4401964517b64b4f59b0e2638" - integrity sha512-hhetes6ZHP3BlXLxmd8K2SNgkhNSi+UcecbnwWKwpP7kyi/uC75DJ1lOOBO3xrC4jyojtGE3YxKZPHfk4yrgug== - "@eslint/js@9.9.1", "@eslint/js@^9.9.1": version "9.9.1" resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.9.1.tgz#4a97e85e982099d6c7ee8410aacb55adaa576f06" @@ -5868,46 +5854,6 @@ eslint-visitor-keys@^4.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz#e3adc021aa038a2a8e0b2f8b0ce8f66b9483b1fb" integrity sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw== -eslint@^9.9.0: - version "9.9.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.9.0.tgz#8d214e69ae4debeca7ae97daebbefe462072d975" - integrity sha512-JfiKJrbx0506OEerjK2Y1QlldtBxkAlLxT5OEcRF8uaQ86noDe2k31Vw9rnSWv+MXZHj7OOUV/dA0AhdLFcyvA== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.11.0" - "@eslint/config-array" "^0.17.1" - "@eslint/eslintrc" "^3.1.0" - "@eslint/js" "9.9.0" - "@humanwhocodes/module-importer" "^1.0.1" - "@humanwhocodes/retry" "^0.3.0" - "@nodelib/fs.walk" "^1.2.8" - ajv "^6.12.4" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.3.2" - escape-string-regexp "^4.0.0" - eslint-scope "^8.0.2" - eslint-visitor-keys "^4.0.0" - espree "^10.1.0" - esquery "^1.5.0" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^8.0.0" - find-up "^5.0.0" - glob-parent "^6.0.2" - ignore "^5.2.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - is-path-inside "^3.0.3" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.1.2" - natural-compare "^1.4.0" - optionator "^0.9.3" - strip-ansi "^6.0.1" - text-table "^0.2.0" - eslint@^9.9.1: version "9.9.1" resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.9.1.tgz#147ac9305d56696fb84cf5bdecafd6517ddc77ec" @@ -12461,7 +12407,7 @@ typescript-eslint@^8.3.0: "@typescript-eslint/parser" "8.3.0" "@typescript-eslint/utils" "8.3.0" -typescript@^5.5.4: +typescript@^5.2.2: version "5.5.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba" integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==