From 02b04b4be8263ab6d7bf8bc7fda746d9887a9fa6 Mon Sep 17 00:00:00 2001 From: Craig Spence Date: Sun, 16 Jul 2023 23:23:21 +1200 Subject: [PATCH 1/2] =?UTF-8?q?refactor(betterer=20=F0=9F=94=A7):=20add=20?= =?UTF-8?q?.js=20extensions=20to=20imports?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.js | 35 +- .github/workflows/build-extension.yaml | 2 +- .github/workflows/build.yaml | 2 +- .vscode/settings.json | 1 + package.json | 6 +- packages/angular/src/index.ts | 2 +- packages/betterer/src/betterer.ts | 12 +- packages/betterer/src/config/config.ts | 22 +- packages/betterer/src/config/index.ts | 4 +- packages/betterer/src/config/public.ts | 2 +- packages/betterer/src/config/types.ts | 2 +- .../betterer/src/context/context-summary.ts | 6 +- packages/betterer/src/context/context.ts | 32 +- packages/betterer/src/context/index.ts | 4 +- packages/betterer/src/context/public.ts | 2 +- packages/betterer/src/context/types.ts | 4 +- packages/betterer/src/fs/file-cache.ts | 12 +- packages/betterer/src/fs/file-resolver.ts | 8 +- packages/betterer/src/fs/git.ts | 20 +- packages/betterer/src/fs/index.ts | 10 +- packages/betterer/src/fs/public.ts | 2 +- packages/betterer/src/fs/reader.ts | 4 +- .../betterer/src/fs/version-control-worker.ts | 2 +- packages/betterer/src/fs/version-control.ts | 2 +- packages/betterer/src/fs/writer.ts | 6 +- packages/betterer/src/globals.ts | 10 +- packages/betterer/src/hasher.ts | 2 +- packages/betterer/src/index.ts | 20 +- packages/betterer/src/reporters/index.ts | 6 +- packages/betterer/src/reporters/loader.ts | 12 +- packages/betterer/src/reporters/public.ts | 2 +- packages/betterer/src/reporters/reporter.ts | 10 +- packages/betterer/src/reporters/types.ts | 6 +- packages/betterer/src/require.ts | 2 +- packages/betterer/src/results/index.ts | 10 +- packages/betterer/src/results/merge.ts | 4 +- packages/betterer/src/results/merger.ts | 14 +- packages/betterer/src/results/parse.ts | 10 +- packages/betterer/src/results/print.ts | 2 +- packages/betterer/src/results/public.ts | 2 +- packages/betterer/src/results/result.ts | 2 +- packages/betterer/src/results/results-file.ts | 18 +- .../betterer/src/results/results-summary.ts | 12 +- packages/betterer/src/results/types.ts | 2 +- packages/betterer/src/run/index.ts | 10 +- packages/betterer/src/run/public.ts | 2 +- packages/betterer/src/run/run-summary.ts | 8 +- packages/betterer/src/run/run-worker-pool.ts | 4 +- packages/betterer/src/run/run-worker.ts | 10 +- packages/betterer/src/run/run.ts | 14 +- packages/betterer/src/run/types.ts | 6 +- .../betterer/src/run/worker-run-config.ts | 2 +- packages/betterer/src/run/worker-run.ts | 25 +- packages/betterer/src/runner/index.ts | 4 +- packages/betterer/src/runner/public.ts | 2 +- packages/betterer/src/runner/runner.ts | 16 +- packages/betterer/src/runner/types.ts | 6 +- packages/betterer/src/runner/watcher.ts | 6 +- packages/betterer/src/suite/index.ts | 8 +- packages/betterer/src/suite/public.ts | 2 +- packages/betterer/src/suite/suite-summary.ts | 8 +- packages/betterer/src/suite/suite.ts | 20 +- packages/betterer/src/suite/types.ts | 6 +- packages/betterer/src/test/config.ts | 4 +- .../betterer/src/test/file-test/constraint.ts | 4 +- .../betterer/src/test/file-test/differ.ts | 8 +- .../src/test/file-test/file-test-result.ts | 10 +- .../betterer/src/test/file-test/file-test.ts | 34 +- packages/betterer/src/test/file-test/file.ts | 8 +- packages/betterer/src/test/file-test/goal.ts | 4 +- packages/betterer/src/test/file-test/index.ts | 6 +- .../betterer/src/test/file-test/printer.ts | 2 +- .../betterer/src/test/file-test/progress.ts | 6 +- .../betterer/src/test/file-test/public.ts | 4 +- .../betterer/src/test/file-test/serialiser.ts | 8 +- packages/betterer/src/test/file-test/types.ts | 8 +- packages/betterer/src/test/index.ts | 10 +- packages/betterer/src/test/loader.ts | 8 +- packages/betterer/src/test/public.ts | 6 +- packages/betterer/src/test/test.ts | 4 +- packages/betterer/src/test/types.ts | 4 +- packages/betterer/src/types.ts | 6 +- packages/betterer/src/utils.ts | 4 +- packages/cli/src/ci.ts | 6 +- packages/cli/src/cli.ts | 22 +- packages/cli/src/index.ts | 4 +- packages/cli/src/init.tsx | 12 +- packages/cli/src/init/create-test-file.ts | 4 +- packages/cli/src/init/enable-automerge.ts | 4 +- packages/cli/src/init/update-package-json.ts | 6 +- packages/cli/src/merge.ts | 4 +- packages/cli/src/options.ts | 4 +- packages/cli/src/precommit.ts | 6 +- packages/cli/src/results.tsx | 12 +- packages/cli/src/start.ts | 6 +- packages/cli/src/upgrade.tsx | 10 +- packages/cli/src/upgrade/upgrade-cjs.ts | 2 +- .../cli/src/upgrade/upgrade-config-file.ts | 8 +- packages/cli/src/upgrade/upgrade-esm.ts | 2 +- packages/cli/src/upgrade/upgrade.tsx | 2 +- packages/cli/src/version.ts | 6 +- packages/cli/src/watch.ts | 6 +- packages/constraints/src/bigger.ts | 2 +- packages/constraints/src/index.ts | 6 +- packages/constraints/src/smaller.ts | 2 +- packages/coverage/src/constraint.ts | 4 +- packages/coverage/src/coverage-test.ts | 12 +- packages/coverage/src/coverage.ts | 4 +- packages/coverage/src/differ.ts | 2 +- packages/coverage/src/goal.ts | 2 +- packages/coverage/src/index.ts | 6 +- packages/coverage/src/test.ts | 8 +- packages/coverage/src/utils.ts | 2 +- packages/docgen/src/index.ts | 2 +- packages/errors/src/error.ts | 2 +- packages/errors/src/index.ts | 4 +- packages/errors/src/types.ts | 2 +- packages/eslint/src/eslint.ts | 4 +- packages/eslint/src/index.ts | 4 +- .../extension/src/client/commands/disable.ts | 12 +- .../extension/src/client/commands/enable.ts | 12 +- .../src/client/commands/folder-picker.ts | 2 + .../extension/src/client/commands/index.ts | 8 +- .../extension/src/client/commands/init.ts | 14 +- .../extension/src/client/error-messages.ts | 5 +- packages/extension/src/client/extension.ts | 18 +- packages/extension/src/client/logger.ts | 2 + packages/extension/src/client/options.ts | 8 +- .../extension/src/client/requests/index.ts | 4 +- .../src/client/requests/invalid-config.ts | 10 +- .../src/client/requests/no-library.ts | 10 +- .../extension/src/client/requests/state.ts | 2 + packages/extension/src/client/settings.ts | 2 + packages/extension/src/client/status.ts | 14 +- packages/extension/src/server/betterer.ts | 4 +- packages/extension/src/server/config.ts | 4 +- packages/extension/src/server/diagnostics.ts | 8 +- .../extension/src/server/error-handler.ts | 6 +- packages/extension/src/server/path.ts | 2 +- .../extension/src/server/requests/index.ts | 4 +- .../src/server/requests/invalid-config.ts | 2 +- .../src/server/requests/no-library.ts | 2 +- packages/extension/src/server/server.ts | 8 +- packages/extension/src/server/status.ts | 4 +- .../extension/src/server/validation-queue.ts | 4 +- packages/extension/src/server/validator.ts | 16 +- packages/extension/test/runner/environment.ts | 5 +- packages/extension/test/runner/fixture.ts | 6 +- packages/extension/test/runner/index.ts | 2 +- packages/extension/test/runner/run.ts | 2 +- packages/extension/test/runner/vscode.ts | 2 + packages/extension/test/test.e2e-spec.ts | 8 +- packages/fixture/src/fixture.ts | 8 +- packages/fixture/src/fs.ts | 4 +- packages/fixture/src/index.ts | 8 +- packages/fixture/src/logging.ts | 4 +- packages/fixture/src/persist.ts | 4 +- packages/fixture/src/stubs.ts | 2 +- packages/logger/src/code.ts | 4 +- packages/logger/src/index.ts | 8 +- packages/logger/src/log.ts | 2 +- packages/regexp/src/index.ts | 2 +- packages/regexp/src/regexp.ts | 2 +- .../reporter/src/components/config/index.ts | 2 +- .../reporter/src/components/default/index.ts | 2 +- packages/reporter/src/components/index.ts | 4 +- .../src/components/suite/deltas/delta.ts | 2 +- .../src/components/suite/deltas/index.ts | 2 +- .../reporter/src/components/suite/index.ts | 2 +- .../reporter/src/components/suite/tasks.ts | 8 +- .../reporter/src/components/watch/index.ts | 2 +- .../src/components/watch/useControls.ts | 2 +- packages/reporter/src/index.ts | 2 +- packages/reporter/src/state/actions.ts | 3 +- packages/reporter/src/state/index.ts | 6 +- packages/reporter/src/state/store.ts | 6 +- packages/reporter/src/state/types.ts | 2 +- packages/reporter/src/types.ts | 2 +- packages/stylelint/src/index.ts | 2 +- packages/stylelint/src/stylelint.ts | 2 +- packages/tasks/src/index.ts | 6 +- packages/tasks/src/tasks/public.ts | 8 +- packages/tasks/src/tasks/types.ts | 2 +- packages/tasks/src/tasks/useTaskState.ts | 4 +- packages/tasks/src/tasks/useTasksState.ts | 2 +- packages/tasks/src/tasks/useTimer.ts | 2 +- packages/tasks/src/utils.ts | 2 +- packages/tsquery/src/index.ts | 2 +- packages/tsquery/src/tsquery.ts | 2 +- packages/typescript/src/index.ts | 2 +- packages/typescript/src/typescript.ts | 2 +- test/angular.spec.ts | 1 + test/api/src/index.tsx | 2 +- test/api/src/test-package-api.ts | 4 +- test/better-result.spec.ts | 1 + test/better-test-change.spec.ts | 1 + test/cache-ci.spec.ts | 1 + test/cache-deleted-file.spec.ts | 1 + test/cache-faster.spec.ts | 1 + test/cache-path.spec.ts | 1 + test/cache-worse.spec.ts | 1 + test/cache.spec.ts | 1 + test/cli/ci-complete.spec.ts | 1 + test/cli/ci-diff.spec.ts | 1 + test/cli/ci-env-variable.spec.ts | 1 + test/cli/ci-worse.spec.ts | 1 + test/cli/filter-negative.spec.ts | 1 + test/cli/filter.spec.ts | 1 + test/cli/init-js.spec.ts | 1 + test/cli/init-mulitple.spec.ts | 1 + test/cli/init-ts.spec.ts | 1 + test/cli/logo-show.spec.ts | 1 + test/cli/merge-contents.spec.ts | 1 + test/cli/merge-path.spec.ts | 1 + test/cli/precommit-add.spec.ts | 5 +- test/cli/precommit-specific-file.spec.ts | 3 +- test/cli/precommit-worse.spec.ts | 3 +- test/cli/results-file-test.spec.ts | 1 + test/cli/results-test.spec.ts | 1 + test/cli/upgrade.spec.ts | 1 + test/cli/version.spec.ts | 6 +- test/complete.spec.ts | 1 + test/config-invalid.spec.ts | 1 + test/config-missing.spec.ts | 1 + test/config-modes.spec.ts | 3 +- test/config-named-exports.spec.ts | 1 + test/config-ts-esm.spec.ts | 1 + test/config-ts.spec.ts | 1 + test/config-tsconfig.spec.ts | 1 + test/config-validation.spec.ts | 5 +- test/conflict.spec.ts | 1 + test/coverage-files-better.spec.ts | 1 + test/coverage-files-exclude.spec.ts | 1 + test/coverage-files-include.spec.ts | 1 + test/coverage-files-same.spec.ts | 1 + test/coverage-files-worse.spec.ts | 1 + test/coverage-report-invalid.spec.ts | 1 + test/coverage-report-missing.spec.ts | 1 + test/coverage-total.spec.ts | 1 + test/deadline-file-test-expired.spec.ts | 5 +- test/deadline-future.spec.ts | 5 +- test/deadline-test-expired.spec.ts | 1 + test/dependencies/src/index.tsx | 2 +- .../src/test-package-dependencies.ts | 7 +- test/eslint-complex-project.spec.ts | 1 + test/eslint-complex-rule.spec.ts | 1 + test/eslint-no-config.spec.ts | 1 + test/eslint.spec.ts | 1 + test/exclude-files.spec.ts | 1 + test/exclude-global.spec.ts | 1 + test/failed-test-error.spec.ts | 1 + test/file-test-constraint.spec.ts | 1 + test/file-test-goal.spec.ts | 1 + test/file-test-line-endings.spec.ts | 1 + test/file-test-sort-absolute.spec.ts | 1 + test/file-test-sort-all.spec.ts | 1 + test/file-test-sort-subset.spec.ts | 1 + test/filter-only.spec.ts | 1 + test/filter-skip.spec.ts | 1 + test/fixture.ts | 2 +- test/include-global.spec.ts | 1 + test/printer-pathological.spec.ts | 1 + test/regexp-message.spec.ts | 1 + test/regexp-no-regexp.spec.ts | 1 + test/regexp.spec.ts | 1 + test/reporter-inline.spec.ts | 1 + test/reporter-invalid-hook-function.spec.ts | 1 + test/reporter-invalid-hook-name.spec.ts | 1 + test/reporter-lifecycle.spec.ts | 1 + test/reporter-local-ts.spec.ts | 1 + test/reporter-local.spec.ts | 1 + test/reporter-no-export.spec.ts | 1 + test/reporter-npm.spec.ts | 1 + test/results-escape.spec.ts | 1 + test/results-filter.spec.ts | 1 + test/results-includes.spec.ts | 1 + test/results-path.spec.ts | 1 + test/results-read-error.spec.ts | 1 + test/results.spec.ts | 1 + test/runner/runner-excluded.spec.ts | 1 + test/runner/runner-included.spec.ts | 1 + test/same-move-file.spec.ts | 1 + test/same-move-issue.spec.ts | 1 + test/same-move-issues.spec.ts | 1 + test/same-result.spec.ts | 1 + test/setup-testdouble.ts | 3 +- test/setup.ts | 6 +- test/silent-mute.spec.ts | 1 + test/silent-unmute.spec.ts | 1 + test/styelint.spec.ts | 1 + test/stylelint-no-config.spec.ts | 1 + test/test-no-constraint.spec.ts | 1 + test/test-no-test.spec.ts | 1 + test/test-not-a-betterer-test.spec.ts | 1 + test/test-not-a-function.spec.ts | 1 + test/tsquery-message.spec.ts | 1 + test/tsquery-no-query.spec.ts | 1 + test/tsquery.spec.ts | 1 + test/typescript-dependency.spec.ts | 1 + test/typescript-incremental.spec.ts | 1 + test/typescript-no-config-file.spec.ts | 1 + test/typescript-strict.spec.ts | 1 + test/typescript.spec.ts | 1 + test/watch/watch-debounced.spec.ts | 3 +- test/watch/watch-force-stop.spec.ts | 1 + test/watch/watch-ignored.spec.ts | 3 +- test/watch/watch-quit.e2e.spec.ts | 3 +- test/watch/watch.spec.ts | 3 +- test/workers.spec.ts | 1 + test/worse-result.spec.ts | 1 + test/worse-strict.spec.ts | 1 + test/worse-update.spec.ts | 1 + tools/docs-filter.ts | 4 +- .../blog/2021-03-01-betterer-and-stylelint.md | 6 +- website/docs/reporters.md | 2 +- yarn.lock | 841 +++++++++++++++++- 316 files changed, 1618 insertions(+), 606 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 324a7c933..691d6030e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -4,35 +4,41 @@ const BASE_EXTENDS = [ 'eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/recommended-requiring-type-checking', - 'plugin:prettier/recommended' + 'plugin:prettier/recommended', + 'plugin:import/recommended', + 'plugin:import/typescript', + 'plugin:eslint-comments/recommended', + 'plugin:require-extensions/recommended' ]; const BASE_RULES = { - 'eol-last': [2, 'always'], - '@typescript-eslint/return-await': [2, 'always'] + 'eol-last': ['error', 'always'], + '@typescript-eslint/return-await': ['error', 'always'], + '@typescript-eslint/no-use-before-define': ['error', { functions: false }], + '@typescript-eslint/member-ordering': 'error', + '@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports', disallowTypeAnnotations: false }], + 'eslint-comments/require-description': ['error', { ignore: ['eslint-enable'] }], + 'import/no-unresolved': 'off' }; const OVERRIDE_RULES = { ...BASE_RULES, - 'no-console': 2, - '@typescript-eslint/unbound-method': 0, - '@typescript-eslint/no-use-before-define': [2, { functions: false }], - '@typescript-eslint/member-ordering': 2, - '@typescript-eslint/consistent-type-imports': [2, { prefer: 'type-imports', disallowTypeAnnotations: false }] + 'no-console': 'error', + '@typescript-eslint/unbound-method': 'off' }; module.exports = { env: { - es6: true, + es2021: true, node: true }, parser: '@typescript-eslint/parser', parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2021, project: path.resolve(__dirname, './tsconfig.eslint.json'), sourceType: 'module' }, - plugins: ['@typescript-eslint'], + plugins: ['@typescript-eslint', 'require-extensions'], rules: { ...BASE_RULES }, @@ -57,5 +63,10 @@ module.exports = { browser: true } } - ] + ], + settings: { + 'import/resolver': { + typescript: true + } + } }; diff --git a/.github/workflows/build-extension.yaml b/.github/workflows/build-extension.yaml index 765b8af54..05c582c07 100644 --- a/.github/workflows/build-extension.yaml +++ b/.github/workflows/build-extension.yaml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - node-version: [14.x] + node-version: [16.x] operating-system: [macOS-latest] steps: diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e7017a46f..270713463 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - node-version: [14.x, 16.x, 18.x] + node-version: [16.x, 18.x, 20.x] operating-system: [windows-latest, macOS-latest, ubuntu-latest] steps: diff --git a/.vscode/settings.json b/.vscode/settings.json index 43e644621..5568abbb3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -14,6 +14,7 @@ "GOLDENS", "hasher", "initialise", + "initialised", "Initialising", "Lifecycles", "loglevel", diff --git a/package.json b/package.json index 5cfac4e29..a6c2f006d 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "prepare": "ngcc && husky install" }, "engines": { - "node": ">=12" + "node": ">=16" }, "types": "test/betterer-public-api.d.ts", "devDependencies": { @@ -68,6 +68,10 @@ "dependency-check": "^4.1.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.1.0", + "eslint-import-resolver-typescript": "^3.5.5", + "eslint-plugin-eslint-comments": "^3.2.0", + "eslint-plugin-require-extensions": "^0.1.3", + "eslint-plugin-import": "^2.27.5", "eslint-plugin-jest": "^24.4.0", "eslint-plugin-prettier": "^4.0.0", "husky": "^7.0.4", diff --git a/packages/angular/src/index.ts b/packages/angular/src/index.ts index b9494122f..5015834a5 100644 --- a/packages/angular/src/index.ts +++ b/packages/angular/src/index.ts @@ -4,4 +4,4 @@ * @packageDocumentation */ -export { angular } from './angular'; +export { angular } from './angular.js'; diff --git a/packages/betterer/src/betterer.ts b/packages/betterer/src/betterer.ts index e3c0dc6fb..95414798e 100644 --- a/packages/betterer/src/betterer.ts +++ b/packages/betterer/src/betterer.ts @@ -6,13 +6,13 @@ import type { BettererOptionsResults, BettererOptionsWatch, BettererOptionsMerge -} from './config'; -import type { BettererRunner } from './runner'; -import type { BettererResultsSummary } from './results'; -import type { BettererSuiteSummary } from './suite'; +} from './config/index.js'; +import type { BettererRunner } from './runner/index.js'; +import type { BettererResultsSummary } from './results/index.js'; +import type { BettererSuiteSummary } from './suite/index.js'; -import { BettererRunnerΩ } from './runner'; -import { BettererMergerΩ, BettererResultsSummaryΩ } from './results'; +import { BettererRunnerΩ } from './runner/index.js'; +import { BettererMergerΩ, BettererResultsSummaryΩ } from './results/index.js'; /** * @public Run **Betterer** with the given options. diff --git a/packages/betterer/src/config/config.ts b/packages/betterer/src/config/config.ts index f1b1d962a..fdffc4577 100644 --- a/packages/betterer/src/config/config.ts +++ b/packages/betterer/src/config/config.ts @@ -1,5 +1,5 @@ -import type { BettererVersionControlWorker } from '../fs'; -import type { BettererReporter } from '../reporters'; +import type { BettererVersionControlWorker } from '../fs/index.js'; +import type { BettererReporter } from '../reporters/index.js'; import type { BettererConfig, BettererConfigBase, @@ -12,17 +12,17 @@ import type { BettererOptionsStart, BettererOptionsWatch, BettererWorkerRunConfig -} from './types'; +} from './types.js'; import { BettererError } from '@betterer/errors'; -import assert from 'assert'; -import * as os from 'os'; -import * as path from 'path'; - -import { read } from '../fs'; -import { registerExtensions } from './register'; -import { loadReporters, loadSilentReporter } from '../reporters'; -import { isBoolean, isNumber, isRegExp, isString, isUndefined } from '../utils'; +import assert from 'node:assert'; +import os from 'node:os'; +import path from 'node:path'; + +import { read } from '../fs/index.js'; +import { registerExtensions } from './register.js'; +import { loadReporters, loadSilentReporter } from '../reporters/index.js'; +import { isBoolean, isNumber, isRegExp, isString, isUndefined } from '../utils.js'; const TOTAL_CPUS = os.cpus().length; diff --git a/packages/betterer/src/config/index.ts b/packages/betterer/src/config/index.ts index e2e2eb1c9..61519bba6 100644 --- a/packages/betterer/src/config/index.ts +++ b/packages/betterer/src/config/index.ts @@ -1,4 +1,4 @@ -export { createConfig, createMergeConfig, createWorkerConfig, overrideConfig } from './config'; +export { createConfig, createMergeConfig, createWorkerConfig, overrideConfig } from './config.js'; export { BettererConfig, BettererConfigBase, @@ -30,4 +30,4 @@ export { BettererOptionsStart, BettererOptionsWatch, BettererWorkerRunConfig -} from './types'; +} from './types.js'; diff --git a/packages/betterer/src/config/public.ts b/packages/betterer/src/config/public.ts index 436381052..e2690beb1 100644 --- a/packages/betterer/src/config/public.ts +++ b/packages/betterer/src/config/public.ts @@ -27,4 +27,4 @@ export { BettererOptionsStartUpdate, BettererOptionsStart, BettererOptionsWatch -} from './types'; +} from './types.js'; diff --git a/packages/betterer/src/config/types.ts b/packages/betterer/src/config/types.ts index 95fe0dab0..d572f3098 100644 --- a/packages/betterer/src/config/types.ts +++ b/packages/betterer/src/config/types.ts @@ -1,4 +1,4 @@ -import type { BettererReporter } from '../reporters'; +import type { BettererReporter } from '../reporters/index.js'; /** * @public An array of {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions | Regular Expressions } diff --git a/packages/betterer/src/context/context-summary.ts b/packages/betterer/src/context/context-summary.ts index 0830817b7..0ab7d3905 100644 --- a/packages/betterer/src/context/context-summary.ts +++ b/packages/betterer/src/context/context-summary.ts @@ -1,6 +1,6 @@ -import type { BettererConfig } from '../config'; -import type { BettererSuiteSummariesΩ, BettererSuiteSummaryΩ } from '../suite'; -import type { BettererContextSummary } from './types'; +import type { BettererConfig } from '../config/index.js'; +import type { BettererSuiteSummariesΩ, BettererSuiteSummaryΩ } from '../suite/index.js'; +import type { BettererContextSummary } from './types.js'; export class BettererContextSummaryΩ implements BettererContextSummary { constructor(public readonly config: BettererConfig, public readonly suites: BettererSuiteSummariesΩ) {} diff --git a/packages/betterer/src/context/context.ts b/packages/betterer/src/context/context.ts index dd02afac2..0cdbcd6fc 100644 --- a/packages/betterer/src/context/context.ts +++ b/packages/betterer/src/context/context.ts @@ -1,21 +1,21 @@ import type { BettererError } from '@betterer/errors'; import type { FSWatcher } from 'chokidar'; -import type { BettererConfig, BettererOptionsOverride } from '../config'; -import type { BettererFilePaths, BettererVersionControlWorker } from '../fs'; -import type { BettererReporterΩ } from '../reporters'; -import type { BettererResultsFileΩ } from '../results'; -import type { BettererSuiteSummariesΩ, BettererSuiteSummary } from '../suite'; -import type { BettererGlobals } from '../types'; -import type { BettererContext, BettererContextStarted, BettererContextSummary } from './types'; - -import { overrideConfig } from '../config'; -import { BettererFileResolverΩ } from '../fs'; -import { BettererRunWorkerPoolΩ, BettererRunΩ, createWorkerRunConfig } from '../run'; -import { BettererSuiteΩ } from '../suite'; -import { loadTestMeta } from '../test'; -import { defer } from '../utils'; -import { BettererContextSummaryΩ } from './context-summary'; +import type { BettererConfig, BettererOptionsOverride } from '../config/index.js'; +import type { BettererFilePaths, BettererVersionControlWorker } from '../fs/index.js'; +import type { BettererReporterΩ } from '../reporters/index.js'; +import type { BettererResultsFileΩ } from '../results/index.js'; +import type { BettererSuiteSummariesΩ, BettererSuiteSummary } from '../suite/index.js'; +import type { BettererGlobals } from '../types.js'; +import type { BettererContext, BettererContextStarted, BettererContextSummary } from './types.js'; + +import { overrideConfig } from '../config/index.js'; +import { BettererFileResolverΩ } from '../fs/index.js'; +import { BettererRunWorkerPoolΩ, BettererRunΩ, createWorkerRunConfig } from '../run/index.js'; +import { BettererSuiteΩ } from '../suite/index.js'; +import { loadTestMeta } from '../test/index.js'; +import { defer } from '../utils.js'; +import { BettererContextSummaryΩ } from './context-summary.js'; export class BettererContextΩ implements BettererContext { public readonly config: BettererConfig; @@ -51,7 +51,7 @@ export class BettererContextΩ implements BettererContext { // Start everything again, and trigger a new reporter: this._started = this._start(); - // eslint-disable-next-line @typescript-eslint/no-misused-promises + // eslint-disable-next-line @typescript-eslint/no-misused-promises -- SIGTERM doesn't care about Promises process.on('SIGTERM', () => this.stop()); } diff --git a/packages/betterer/src/context/index.ts b/packages/betterer/src/context/index.ts index 6478637a4..9aa6995c5 100644 --- a/packages/betterer/src/context/index.ts +++ b/packages/betterer/src/context/index.ts @@ -1,2 +1,2 @@ -export { BettererContextΩ } from './context'; -export { BettererContext, BettererContextSummary } from './types'; +export { BettererContextΩ } from './context.js'; +export { BettererContext, BettererContextSummary } from './types.js'; diff --git a/packages/betterer/src/context/public.ts b/packages/betterer/src/context/public.ts index 8ff2f8f9a..e45e3137f 100644 --- a/packages/betterer/src/context/public.ts +++ b/packages/betterer/src/context/public.ts @@ -1 +1 @@ -export { BettererContext, BettererContextSummary } from './types'; +export { BettererContext, BettererContextSummary } from './types.js'; diff --git a/packages/betterer/src/context/types.ts b/packages/betterer/src/context/types.ts index a407860f7..118f6d291 100644 --- a/packages/betterer/src/context/types.ts +++ b/packages/betterer/src/context/types.ts @@ -1,7 +1,7 @@ import type { BettererError } from '@betterer/errors'; -import type { BettererConfig, BettererOptionsOverride } from '../config'; -import type { BettererSuiteSummaries, BettererSuiteSummary } from '../suite'; +import type { BettererConfig, BettererOptionsOverride } from '../config/index.js'; +import type { BettererSuiteSummaries, BettererSuiteSummary } from '../suite/index.js'; /** * @public The context of a set of test suite runs. diff --git a/packages/betterer/src/fs/file-cache.ts b/packages/betterer/src/fs/file-cache.ts index 3d4edbb3e..3c64fe67a 100644 --- a/packages/betterer/src/fs/file-cache.ts +++ b/packages/betterer/src/fs/file-cache.ts @@ -4,13 +4,13 @@ import type { BettererFileCache, BettererFileHashMap, BettererCacheFile -} from './types'; +} from './types.js'; -import assert from 'assert'; -import path from 'path'; -import { normalisedPath } from '../utils'; -import { read } from './reader'; -import { write } from './writer'; +import assert from 'node:assert'; +import path from 'node:path'; +import { normalisedPath } from '../utils.js'; +import { read } from './reader.js'; +import { write } from './writer.js'; const BETTERER_CACHE_VERSION = 2; diff --git a/packages/betterer/src/fs/file-resolver.ts b/packages/betterer/src/fs/file-resolver.ts index 5b205d70a..38380144c 100644 --- a/packages/betterer/src/fs/file-resolver.ts +++ b/packages/betterer/src/fs/file-resolver.ts @@ -4,13 +4,13 @@ import type { BettererFilePatterns, BettererFileResolver, BettererVersionControlWorker -} from './types'; +} from './types.js'; -import assert from 'assert'; +import assert from 'node:assert'; import minimatch from 'minimatch'; -import * as path from 'path'; +import path from 'node:path'; -import { flatten, normalisedPath } from '../utils'; +import { flatten, normalisedPath } from '../utils.js'; export class BettererFileResolverΩ implements BettererFileResolver { private _excluded: Array = []; diff --git a/packages/betterer/src/fs/git.ts b/packages/betterer/src/fs/git.ts index c8dd890fe..6808fd786 100644 --- a/packages/betterer/src/fs/git.ts +++ b/packages/betterer/src/fs/git.ts @@ -1,17 +1,17 @@ import type { SimpleGit } from 'simple-git'; -import type { BettererFilePaths, BettererVersionControl } from './types'; +import type { BettererFilePaths, BettererVersionControl } from './types.js'; import { BettererError } from '@betterer/errors'; -import assert from 'assert'; -import { promises as fs } from 'fs'; -import path from 'path'; -import simpleGit from 'simple-git'; - -import { createHash } from '../hasher'; -import { normalisedPath } from '../utils'; -import { BettererFileCacheΩ } from './file-cache'; -import { read } from './reader'; +import assert from 'node:assert'; +import { promises as fs } from 'node:fs'; +import path from 'node:path'; +import { simpleGit } from 'simple-git'; + +import { createHash } from '../hasher.js'; +import { normalisedPath } from '../utils.js'; +import { BettererFileCacheΩ } from './file-cache.js'; +import { read } from './reader.js'; export class BettererGitΩ implements BettererVersionControl { private _cache: BettererFileCacheΩ | null = null; diff --git a/packages/betterer/src/fs/index.ts b/packages/betterer/src/fs/index.ts index 95b81ab31..d9cdef723 100644 --- a/packages/betterer/src/fs/index.ts +++ b/packages/betterer/src/fs/index.ts @@ -1,11 +1,11 @@ -export { BettererFileResolverΩ } from './file-resolver'; -export { read } from './reader'; +export { BettererFileResolverΩ } from './file-resolver.js'; +export { read } from './reader.js'; export { BettererFileGlobs, BettererFilePaths, BettererFilePatterns, BettererFileResolver, BettererVersionControlWorker -} from './types'; -export { createVersionControl } from './version-control'; -export { forceRelativePaths, write } from './writer'; +} from './types.js'; +export { createVersionControl } from './version-control.js'; +export { forceRelativePaths, write } from './writer.js'; diff --git a/packages/betterer/src/fs/public.ts b/packages/betterer/src/fs/public.ts index 8d874aaf0..cd346c548 100644 --- a/packages/betterer/src/fs/public.ts +++ b/packages/betterer/src/fs/public.ts @@ -4,4 +4,4 @@ export { BettererFilePaths, BettererFilePatterns, BettererFileResolver -} from './types'; +} from './types.js'; diff --git a/packages/betterer/src/fs/reader.ts b/packages/betterer/src/fs/reader.ts index 0e1b4be9d..8c31951ca 100644 --- a/packages/betterer/src/fs/reader.ts +++ b/packages/betterer/src/fs/reader.ts @@ -1,6 +1,6 @@ -import { promises as fs } from 'fs'; +import { promises as fs } from 'node:fs'; -import { normaliseNewlines } from '../utils'; +import { normaliseNewlines } from '../utils.js'; const READ_CACHE: Record = {}; const READ_CACHE_TIME: Record = {}; diff --git a/packages/betterer/src/fs/version-control-worker.ts b/packages/betterer/src/fs/version-control-worker.ts index b7095163e..9b4e74919 100644 --- a/packages/betterer/src/fs/version-control-worker.ts +++ b/packages/betterer/src/fs/version-control-worker.ts @@ -1,3 +1,3 @@ -import { BettererGitΩ } from './git'; +import { BettererGitΩ } from './git.js'; export const versionControl = new BettererGitΩ(); diff --git a/packages/betterer/src/fs/version-control.ts b/packages/betterer/src/fs/version-control.ts index dafc13614..f63c6fd64 100644 --- a/packages/betterer/src/fs/version-control.ts +++ b/packages/betterer/src/fs/version-control.ts @@ -1,4 +1,4 @@ -import type { BettererVersionControlWorker, BettererVersionControlWorkerModule } from './types'; +import type { BettererVersionControlWorker, BettererVersionControlWorkerModule } from './types.js'; import { workerRequire } from '@phenomnomnominal/worker-require'; diff --git a/packages/betterer/src/fs/writer.ts b/packages/betterer/src/fs/writer.ts index 387eb8cdf..cbba03544 100644 --- a/packages/betterer/src/fs/writer.ts +++ b/packages/betterer/src/fs/writer.ts @@ -1,8 +1,8 @@ import { BettererError } from '@betterer/errors'; -import path from 'path'; -import { promises as fs } from 'fs'; +import path from 'node:path'; +import { promises as fs } from 'node:fs'; -import { normalisedPath } from '../utils'; +import { normalisedPath } from '../utils.js'; export function forceRelativePaths(toWrite: string, basePath: string): string { const directory = `${normalisedPath(path.dirname(basePath))}/`; diff --git a/packages/betterer/src/globals.ts b/packages/betterer/src/globals.ts index f1e720fa6..9b2780540 100644 --- a/packages/betterer/src/globals.ts +++ b/packages/betterer/src/globals.ts @@ -1,10 +1,10 @@ import type { BettererError } from '@betterer/errors'; -import type { BettererGlobals } from './types'; +import type { BettererGlobals } from './types.js'; -import { createConfig } from './config'; -import { createVersionControl } from './fs'; -import { loadDefaultReporter } from './reporters'; -import { BettererResultsFileΩ } from './results'; +import { createConfig } from './config/index.js'; +import { createVersionControl } from './fs/index.js'; +import { loadDefaultReporter } from './reporters/index.js'; +import { BettererResultsFileΩ } from './results/index.js'; export async function createGlobals(options: unknown = {}): Promise { const reporter = loadDefaultReporter(); diff --git a/packages/betterer/src/hasher.ts b/packages/betterer/src/hasher.ts index 69150606a..b3dad68a5 100644 --- a/packages/betterer/src/hasher.ts +++ b/packages/betterer/src/hasher.ts @@ -1,7 +1,7 @@ import djb2a from 'djb2a'; import memoize from 'fast-memoize'; -import { normaliseNewlines } from './utils'; +import { normaliseNewlines } from './utils.js'; export const createHash = memoize(function createHash(value: string): string { return djb2a(normaliseNewlines(value)).toString(); diff --git a/packages/betterer/src/index.ts b/packages/betterer/src/index.ts index 7b7175105..3fd349804 100644 --- a/packages/betterer/src/index.ts +++ b/packages/betterer/src/index.ts @@ -4,7 +4,7 @@ * @packageDocumentation */ -export { betterer, merge, results, runner, watch } from './betterer'; +export { betterer, merge, results, runner, watch } from './betterer.js'; export { BettererConfig, BettererConfigBase, @@ -34,16 +34,16 @@ export { BettererOptionsStartUpdate, BettererOptionsStart, BettererOptionsWatch -} from './config/public'; -export { BettererContext, BettererContextSummary } from './context/public'; +} from './config/public.js'; +export { BettererContext, BettererContextSummary } from './context/public.js'; export { BettererFileGlobs, BettererFilePath, BettererFilePaths, BettererFilePatterns, BettererFileResolver -} from './fs/public'; -export { BettererReporter } from './reporters/public'; +} from './fs/public.js'; +export { BettererReporter } from './reporters/public.js'; export { BettererFileTestResultSummary, BettererFileTestResultSummaryDetails, @@ -53,10 +53,10 @@ export { BettererResultSummary, BettererResultSummaries, BettererResultsSummary -} from './results/public'; -export { BettererDelta, BettererRun, BettererRuns, BettererRunSummary, BettererRunSummaries } from './run/public'; -export { BettererRunner } from './runner/public'; -export { BettererSuite, BettererSuiteSummary, BettererSuiteSummaries } from './suite/public'; +} from './results/public.js'; +export { BettererDelta, BettererRun, BettererRuns, BettererRunSummary, BettererRunSummaries } from './run/public.js'; +export { BettererRunner } from './runner/public.js'; +export { BettererSuite, BettererSuiteSummary, BettererSuiteSummaries } from './suite/public.js'; export { BettererDeserialise, BettererDiff, @@ -89,4 +89,4 @@ export { BettererTestOptionsBasic, BettererTestOptionsComplex, BettererTestNames -} from './test/public'; +} from './test/public.js'; diff --git a/packages/betterer/src/reporters/index.ts b/packages/betterer/src/reporters/index.ts index 8e48712e0..bd66d2a0b 100644 --- a/packages/betterer/src/reporters/index.ts +++ b/packages/betterer/src/reporters/index.ts @@ -1,3 +1,3 @@ -export type { BettererReporterΩ } from './reporter'; -export { loadDefaultReporter, loadSilentReporter, loadReporters } from './loader'; -export { BettererReporter, BettererReporterModule } from './types'; +export type { BettererReporterΩ } from './reporter.js'; +export { loadDefaultReporter, loadSilentReporter, loadReporters } from './loader.js'; +export { BettererReporter, BettererReporterModule } from './types.js'; diff --git a/packages/betterer/src/reporters/loader.ts b/packages/betterer/src/reporters/loader.ts index b4cccda62..539a1cdde 100644 --- a/packages/betterer/src/reporters/loader.ts +++ b/packages/betterer/src/reporters/loader.ts @@ -1,12 +1,12 @@ -import type { BettererOptionsReporters } from '../config'; -import type { BettererReporter, BettererReporterModule } from './types'; +import type { BettererOptionsReporters } from '../config/index.js'; +import type { BettererReporter, BettererReporterModule } from './types.js'; import { BettererError } from '@betterer/errors'; -import * as path from 'path'; +import path from 'node:path'; -import { requireUncached } from '../require'; -import { isFunction, isString } from '../utils'; -import { BettererReporterΩ } from './reporter'; +import { requireUncached } from '../require.js'; +import { isFunction, isString } from '../utils.js'; +import { BettererReporterΩ } from './reporter.js'; const DEFAULT_REPORTER = '@betterer/reporter'; const HOOK_NAMES = Object.getOwnPropertyNames(BettererReporterΩ.prototype) as ReadonlyArray; diff --git a/packages/betterer/src/reporters/public.ts b/packages/betterer/src/reporters/public.ts index 890d89602..e2732209e 100644 --- a/packages/betterer/src/reporters/public.ts +++ b/packages/betterer/src/reporters/public.ts @@ -1 +1 @@ -export { BettererReporter } from './types'; +export { BettererReporter } from './types.js'; diff --git a/packages/betterer/src/reporters/reporter.ts b/packages/betterer/src/reporters/reporter.ts index f8294735d..c1fc1238a 100644 --- a/packages/betterer/src/reporters/reporter.ts +++ b/packages/betterer/src/reporters/reporter.ts @@ -1,10 +1,10 @@ import type { BettererError } from '@betterer/errors'; -import type { BettererContext } from '../context'; -import type { BettererContextSummary } from '../context/types'; -import type { BettererRun, BettererRunSummary } from '../run'; -import type { BettererSuite, BettererSuiteSummary } from '../suite'; -import type { BettererReporter } from './types'; +import type { BettererContext } from '../context/index.js'; +import type { BettererContextSummary } from '../context/types.js'; +import type { BettererRun, BettererRunSummary } from '../run/index.js'; +import type { BettererSuite, BettererSuiteSummary } from '../suite/index.js'; +import type { BettererReporter } from './types.js'; export class BettererReporterΩ implements BettererReporter { constructor(private _reporters: Array) {} diff --git a/packages/betterer/src/reporters/types.ts b/packages/betterer/src/reporters/types.ts index 23404a58a..d78ea439f 100644 --- a/packages/betterer/src/reporters/types.ts +++ b/packages/betterer/src/reporters/types.ts @@ -1,8 +1,8 @@ import type { BettererError } from '@betterer/errors'; -import type { BettererContext, BettererContextSummary } from '../context'; -import type { BettererRun, BettererRunSummary } from '../run'; -import type { BettererSuiteSummary, BettererSuite } from '../suite'; +import type { BettererContext, BettererContextSummary } from '../context/index.js'; +import type { BettererRun, BettererRunSummary } from '../run/index.js'; +import type { BettererSuiteSummary, BettererSuite } from '../suite/index.js'; /** * @public The interface for hooking into **Betterer**'s reporter system. diff --git a/packages/betterer/src/require.ts b/packages/betterer/src/require.ts index fa3cf174d..a608bd863 100644 --- a/packages/betterer/src/require.ts +++ b/packages/betterer/src/require.ts @@ -4,7 +4,7 @@ interface ESModule { export function requireUncached(requirePath: string): T { delete require.cache[require.resolve(requirePath)]; - // eslint-disable-next-line @typescript-eslint/no-var-requires + // eslint-disable-next-line @typescript-eslint/no-var-requires -- migrating away from CJS requires const m = require(requirePath) as unknown; return getDefaultExport(m); } diff --git a/packages/betterer/src/results/index.ts b/packages/betterer/src/results/index.ts index c0da51d75..130f96b94 100644 --- a/packages/betterer/src/results/index.ts +++ b/packages/betterer/src/results/index.ts @@ -1,7 +1,7 @@ -export { BettererMergerΩ } from './merger'; -export { BettererResultsSummaryΩ } from './results-summary'; -export { BettererResultΩ } from './result'; -export { BettererResultsFileΩ } from './results-file'; +export { BettererMergerΩ } from './merger.js'; +export { BettererResultsSummaryΩ } from './results-summary.js'; +export { BettererResultΩ } from './result.js'; +export { BettererResultsFileΩ } from './results-file.js'; export { BettererResult, BettererResultSerialised, @@ -11,4 +11,4 @@ export { BettererResultSummary, BettererResultSummaries, BettererResultsSummary -} from './types'; +} from './types.js'; diff --git a/packages/betterer/src/results/merge.ts b/packages/betterer/src/results/merge.ts index 015586b8a..376fc12ce 100644 --- a/packages/betterer/src/results/merge.ts +++ b/packages/betterer/src/results/merge.ts @@ -1,6 +1,6 @@ -import type { BettererResultsSerialised } from './types'; +import type { BettererResultsSerialised } from './types.js'; -import { requireText } from './require'; +import { requireText } from './require.js'; /** * Takes two strings of JavaScript, evaluates their contents, and merges the results, diff --git a/packages/betterer/src/results/merger.ts b/packages/betterer/src/results/merger.ts index c306ac7c7..adc33d9a0 100644 --- a/packages/betterer/src/results/merger.ts +++ b/packages/betterer/src/results/merger.ts @@ -1,11 +1,11 @@ -import type { BettererOptionsMerge } from '../config'; -import type { BettererResultsSerialised } from './types'; +import type { BettererOptionsMerge } from '../config/index.js'; +import type { BettererResultsSerialised } from './types.js'; -import { createMergeConfig } from '../config'; -import { write } from '../fs'; -import { mergeResults } from './merge'; -import { parseResults } from './parse'; -import { printResults } from './print'; +import { createMergeConfig } from '../config/index.js'; +import { write } from '../fs/index.js'; +import { mergeResults } from './merge.js'; +import { parseResults } from './parse.js'; +import { printResults } from './print.js'; export class BettererMergerΩ { private constructor(private _contents: Array, private _resultsPath: string) {} diff --git a/packages/betterer/src/results/parse.ts b/packages/betterer/src/results/parse.ts index 242576fce..94f074e7c 100644 --- a/packages/betterer/src/results/parse.ts +++ b/packages/betterer/src/results/parse.ts @@ -1,11 +1,11 @@ -import type { BettererResultsSerialised } from './types'; +import type { BettererResultsSerialised } from './types.js'; import { BettererError } from '@betterer/errors'; -import assert from 'assert'; +import assert from 'node:assert'; -import { read } from '../fs'; -import { mergeResults } from './merge'; -import { requireText } from './require'; +import { read } from '../fs/index.js'; +import { mergeResults } from './merge.js'; +import { requireText } from './require.js'; const MERGE_CONFLICT_ANCESTOR = '|||||||'; const MERGE_CONFLICT_END = '>>>>>>>'; diff --git a/packages/betterer/src/results/print.ts b/packages/betterer/src/results/print.ts index 1920cf919..6228c2c28 100644 --- a/packages/betterer/src/results/print.ts +++ b/packages/betterer/src/results/print.ts @@ -1,4 +1,4 @@ -import type { BettererResultsSerialised } from './types'; +import type { BettererResultsSerialised } from './types.js'; // JS template string interpolation tokens const JS_INTERP_ESCAPED = '$\\{'; diff --git a/packages/betterer/src/results/public.ts b/packages/betterer/src/results/public.ts index 94543acb1..dafe18619 100644 --- a/packages/betterer/src/results/public.ts +++ b/packages/betterer/src/results/public.ts @@ -7,4 +7,4 @@ export { BettererResultSummary, BettererResultSummaries, BettererResultsSummary -} from './types'; +} from './types.js'; diff --git a/packages/betterer/src/results/result.ts b/packages/betterer/src/results/result.ts index b4cf00e95..b4d7164bc 100644 --- a/packages/betterer/src/results/result.ts +++ b/packages/betterer/src/results/result.ts @@ -1,4 +1,4 @@ -import type { BettererResult } from './types'; +import type { BettererResult } from './types.js'; export class BettererResultΩ implements BettererResult { constructor(public value: unknown) {} diff --git a/packages/betterer/src/results/results-file.ts b/packages/betterer/src/results/results-file.ts index 4ad097e2f..5ab0ef6ac 100644 --- a/packages/betterer/src/results/results-file.ts +++ b/packages/betterer/src/results/results-file.ts @@ -1,14 +1,14 @@ -import type { BettererVersionControlWorker } from '../fs'; -import type { BettererRunSummary, BettererRunSummaries } from '../run'; -import type { BettererSuiteSummary } from '../suite'; -import type { BettererTestNames } from '../test'; -import type { BettererResultsSerialised } from './types'; +import type { BettererVersionControlWorker } from '../fs/index.js'; +import type { BettererRunSummary, BettererRunSummaries } from '../run/index.js'; +import type { BettererSuiteSummary } from '../suite/index.js'; +import type { BettererTestNames } from '../test/index.js'; +import type { BettererResultsSerialised } from './types.js'; -import assert from 'assert'; +import assert from 'node:assert'; -import { write } from '../fs'; -import { parseResults } from './parse'; -import { printResults } from './print'; +import { write } from '../fs/index.js'; +import { parseResults } from './parse.js'; +import { printResults } from './print.js'; export class BettererResultsFileΩ { private constructor( diff --git a/packages/betterer/src/results/results-summary.ts b/packages/betterer/src/results/results-summary.ts index eaed6f53c..c7b57064e 100644 --- a/packages/betterer/src/results/results-summary.ts +++ b/packages/betterer/src/results/results-summary.ts @@ -1,9 +1,9 @@ -import type { BettererOptionsResults } from '../config'; -import { BettererFileResolverΩ } from '../fs'; -import { createGlobals } from '../globals'; -import type { BettererFileTestResultΩ } from '../test'; -import { isBettererFileTest, loadTestMeta } from '../test'; -import type { BettererFileTestResultSummaryDetails, BettererResultsSummary, BettererResultSummaries } from './types'; +import type { BettererOptionsResults } from '../config/index.js'; +import { BettererFileResolverΩ } from '../fs/index.js'; +import { createGlobals } from '../globals.js'; +import type { BettererFileTestResultΩ } from '../test/index.js'; +import { isBettererFileTest, loadTestMeta } from '../test/index.js'; +import type { BettererFileTestResultSummaryDetails, BettererResultsSummary, BettererResultSummaries } from './types.js'; export class BettererResultsSummaryΩ implements BettererResultsSummary { public readonly resultSummaries: BettererResultSummaries; diff --git a/packages/betterer/src/results/types.ts b/packages/betterer/src/results/types.ts index d60263544..63af0f297 100644 --- a/packages/betterer/src/results/types.ts +++ b/packages/betterer/src/results/types.ts @@ -1,4 +1,4 @@ -import type { BettererFileIssues } from '../test'; +import type { BettererFileIssues } from '../test/index.js'; /** * @public The deserialised result object for a single run of a single {@link @betterer/betterer#BettererTest | `BettererTest`}. diff --git a/packages/betterer/src/run/index.ts b/packages/betterer/src/run/index.ts index 9b5fdaec8..c26176613 100644 --- a/packages/betterer/src/run/index.ts +++ b/packages/betterer/src/run/index.ts @@ -1,5 +1,5 @@ -export { BettererRunΩ, BettererRunsΩ } from './run'; -export { BettererRunWorkerPoolΩ } from './run-worker-pool'; +export { BettererRunΩ, BettererRunsΩ } from './run.js'; +export { BettererRunWorkerPoolΩ } from './run-worker-pool.js'; export { BettererDelta, BettererRun, @@ -7,6 +7,6 @@ export { BettererReporterRun, BettererRunSummary, BettererRunSummaries -} from './types'; -export { createWorkerRunConfig } from './worker-run-config'; -export type { BettererWorkerRunΩ } from './worker-run'; +} from './types.js'; +export { createWorkerRunConfig } from './worker-run-config.js'; +export type { BettererWorkerRunΩ } from './worker-run.js'; diff --git a/packages/betterer/src/run/public.ts b/packages/betterer/src/run/public.ts index ef4c82d6b..034a3f4d6 100644 --- a/packages/betterer/src/run/public.ts +++ b/packages/betterer/src/run/public.ts @@ -1 +1 @@ -export { BettererDelta, BettererRun, BettererRuns, BettererRunSummary, BettererRunSummaries } from './types'; +export { BettererDelta, BettererRun, BettererRuns, BettererRunSummary, BettererRunSummaries } from './types.js'; diff --git a/packages/betterer/src/run/run-summary.ts b/packages/betterer/src/run/run-summary.ts index 7a280c84e..42f1d3a7a 100644 --- a/packages/betterer/src/run/run-summary.ts +++ b/packages/betterer/src/run/run-summary.ts @@ -1,9 +1,9 @@ import type { BettererError } from '@betterer/errors'; -import type { BettererFilePaths } from '../fs'; -import type { BettererResult } from '../results'; -import type { BettererDiff } from '../test'; -import type { BettererDelta, BettererRun, BettererRunSummary } from './types'; +import type { BettererFilePaths } from '../fs/index.js'; +import type { BettererResult } from '../results/index.js'; +import type { BettererDiff } from '../test/index.js'; +import type { BettererDelta, BettererRun, BettererRunSummary } from './types.js'; export enum BettererRunStatus { better, diff --git a/packages/betterer/src/run/run-worker-pool.ts b/packages/betterer/src/run/run-worker-pool.ts index 3dc123786..8e15ff507 100644 --- a/packages/betterer/src/run/run-worker-pool.ts +++ b/packages/betterer/src/run/run-worker-pool.ts @@ -1,6 +1,6 @@ -import type { BettererWorker, BettererWorkerModule } from './types'; +import type { BettererWorker, BettererWorkerModule } from './types.js'; -import assert from 'assert'; +import assert from 'node:assert'; import { workerRequire } from '@phenomnomnominal/worker-require'; export class BettererRunWorkerHandleΩ { diff --git a/packages/betterer/src/run/run-worker.ts b/packages/betterer/src/run/run-worker.ts index dcce6dad8..a108c8636 100644 --- a/packages/betterer/src/run/run-worker.ts +++ b/packages/betterer/src/run/run-worker.ts @@ -1,9 +1,9 @@ -import type { BettererWorkerRunConfig } from '../config'; -import type { BettererFilePaths, BettererVersionControlWorker } from '../fs'; -import type { BettererTestMeta } from '../test'; -import type { BettererRunSummary } from './types'; +import type { BettererWorkerRunConfig } from '../config/index.js'; +import type { BettererFilePaths, BettererVersionControlWorker } from '../fs/index.js'; +import type { BettererTestMeta } from '../test/index.js'; +import type { BettererRunSummary } from './types.js'; -import { BettererWorkerRunΩ } from './worker-run'; +import { BettererWorkerRunΩ } from './worker-run.js'; const TEST_NAME_RUN: Record = {}; diff --git a/packages/betterer/src/run/run.ts b/packages/betterer/src/run/run.ts index d5bf0598c..cf81887ca 100644 --- a/packages/betterer/src/run/run.ts +++ b/packages/betterer/src/run/run.ts @@ -1,11 +1,11 @@ -import type { BettererWorkerRunConfig } from '../config'; -import type { BettererFilePaths, BettererVersionControlWorker } from '../fs'; -import type { BettererTestMeta } from '../test'; -import type { BettererRunWorkerHandleΩ, BettererRunWorkerPoolΩ } from './run-worker-pool'; -import type { BettererRun, BettererRunSummary } from './types'; +import type { BettererWorkerRunConfig } from '../config/index.js'; +import type { BettererFilePaths, BettererVersionControlWorker } from '../fs/index.js'; +import type { BettererTestMeta } from '../test/index.js'; +import type { BettererRunWorkerHandleΩ, BettererRunWorkerPoolΩ } from './run-worker-pool.js'; +import type { BettererRun, BettererRunSummary } from './types.js'; -import { BettererResultΩ } from '../results'; -import { getTime } from '../utils'; +import { BettererResultΩ } from '../results/index.js'; +import { getTime } from '../utils.js'; export class BettererRunΩ implements BettererRun { public readonly isNew: boolean; diff --git a/packages/betterer/src/run/types.ts b/packages/betterer/src/run/types.ts index 91e006521..bb15f27aa 100644 --- a/packages/betterer/src/run/types.ts +++ b/packages/betterer/src/run/types.ts @@ -1,9 +1,9 @@ import type { BettererError } from '@betterer/errors'; import type { WorkerRequireModule, WorkerRequireModuleAsync } from '@phenomnomnominal/worker-require'; -import type { BettererFilePaths } from '../fs'; -import type { BettererResult } from '../results'; -import type { BettererDiff } from '../test'; +import type { BettererFilePaths } from '../fs/index.js'; +import type { BettererResult } from '../results/index.js'; +import type { BettererDiff } from '../test/index.js'; /** * @public The change between a test runs and its baseline. A {@link @betterer/betterer#BettererRun | `BettererRun`} diff --git a/packages/betterer/src/run/worker-run-config.ts b/packages/betterer/src/run/worker-run-config.ts index 6f7289f51..49e69ee7c 100644 --- a/packages/betterer/src/run/worker-run-config.ts +++ b/packages/betterer/src/run/worker-run-config.ts @@ -1,4 +1,4 @@ -import type { BettererConfig, BettererWorkerRunConfig } from '../config'; +import type { BettererConfig, BettererWorkerRunConfig } from '../config/index.js'; export function createWorkerRunConfig(config: BettererConfig): BettererWorkerRunConfig { return { diff --git a/packages/betterer/src/run/worker-run.ts b/packages/betterer/src/run/worker-run.ts index 48d011a31..cec333898 100644 --- a/packages/betterer/src/run/worker-run.ts +++ b/packages/betterer/src/run/worker-run.ts @@ -1,19 +1,18 @@ -import type { BettererConfig, BettererWorkerRunConfig } from '../config'; -import type { BettererFilePaths, BettererVersionControlWorker } from '../fs'; -import type { BettererDiff, BettererTestConfig, BettererTestMeta } from '../test'; -import type { BettererGlobals } from '../types'; -import type { BettererRun, BettererRunning, BettererRunSummary } from './types'; +import type { BettererConfig, BettererWorkerRunConfig } from '../config/index.js'; +import type { BettererFilePaths, BettererVersionControlWorker } from '../fs/index.js'; +import type { BettererDiff, BettererTestConfig, BettererTestMeta } from '../test/index.js'; +import type { BettererGlobals } from '../types.js'; +import type { BettererRun, BettererRunning, BettererRunSummary } from './types.js'; import { BettererConstraintResult } from '@betterer/constraints'; import { BettererError } from '@betterer/errors'; -import assert from 'assert'; - -import { createWorkerConfig } from '../config'; -import { forceRelativePaths } from '../fs'; -import { BettererResultsFileΩ, BettererResultΩ } from '../results'; -import { isBettererFileTest, loadTestMeta } from '../test'; -import { isBettererTest } from '../test'; -import { BettererRunStatus, BettererRunSummaryΩ } from './run-summary'; +import assert from 'node:assert'; + +import { createWorkerConfig } from '../config/index.js'; +import { forceRelativePaths } from '../fs/index.js'; +import { BettererResultsFileΩ, BettererResultΩ } from '../results/index.js'; +import { isBettererFileTest, loadTestMeta, isBettererTest } from '../test/index.js'; +import { BettererRunStatus, BettererRunSummaryΩ } from './run-summary.js'; export class BettererWorkerRunΩ implements BettererRun { public readonly config: BettererConfig; diff --git a/packages/betterer/src/runner/index.ts b/packages/betterer/src/runner/index.ts index 3e8a36b14..f9e987626 100644 --- a/packages/betterer/src/runner/index.ts +++ b/packages/betterer/src/runner/index.ts @@ -1,2 +1,2 @@ -export { BettererRunnerΩ } from './runner'; -export { BettererRunner } from './types'; +export { BettererRunnerΩ } from './runner.js'; +export { BettererRunner } from './types.js'; diff --git a/packages/betterer/src/runner/public.ts b/packages/betterer/src/runner/public.ts index c3b4d4dd6..024579c27 100644 --- a/packages/betterer/src/runner/public.ts +++ b/packages/betterer/src/runner/public.ts @@ -1 +1 @@ -export { BettererRunner } from './types'; +export { BettererRunner } from './types.js'; diff --git a/packages/betterer/src/runner/runner.ts b/packages/betterer/src/runner/runner.ts index 02858a623..b7c785e66 100644 --- a/packages/betterer/src/runner/runner.ts +++ b/packages/betterer/src/runner/runner.ts @@ -1,14 +1,14 @@ -import type { BettererOptionsOverride } from '../config'; -import type { BettererFilePaths } from '../fs'; -import type { BettererSuiteSummary } from '../suite'; -import type { BettererRunner } from './types'; +import type { BettererOptionsOverride } from '../config/index.js'; +import type { BettererFilePaths } from '../fs/index.js'; +import type { BettererSuiteSummary } from '../suite/index.js'; +import type { BettererRunner } from './types.js'; import { BettererError } from '@betterer/errors'; -import { BettererContextΩ } from '../context'; -import { createGlobals } from '../globals'; -import { normalisedPath } from '../utils'; -import { createWatcher, WATCHER_EVENTS } from './watcher'; +import { BettererContextΩ } from '../context/index.js'; +import { createGlobals } from '../globals.js'; +import { normalisedPath } from '../utils.js'; +import { createWatcher, WATCHER_EVENTS } from './watcher.js'; const DEBOUNCE_TIME = 200; diff --git a/packages/betterer/src/runner/types.ts b/packages/betterer/src/runner/types.ts index b573e6aa0..cb401bbfa 100644 --- a/packages/betterer/src/runner/types.ts +++ b/packages/betterer/src/runner/types.ts @@ -1,6 +1,6 @@ -import type { BettererOptionsOverride } from '../config'; -import type { BettererFilePaths } from '../fs'; -import type { BettererSuiteSummary } from '../suite'; +import type { BettererOptionsOverride } from '../config/index.js'; +import type { BettererFilePaths } from '../fs/index.js'; +import type { BettererSuiteSummary } from '../suite/index.js'; /** * @public The JS API for controlling **Betterer** runs. diff --git a/packages/betterer/src/runner/watcher.ts b/packages/betterer/src/runner/watcher.ts index f2170d00e..1b1e6ceae 100644 --- a/packages/betterer/src/runner/watcher.ts +++ b/packages/betterer/src/runner/watcher.ts @@ -1,12 +1,12 @@ import type { FSWatcher } from 'chokidar'; -import type { BettererGlobals } from '../types'; +import type { BettererGlobals } from '../types.js'; import { watch } from 'chokidar'; import minimatch from 'minimatch'; -import * as path from 'path'; +import path from 'node:path'; -import { normalisedPath } from '../utils'; +import { normalisedPath } from '../utils.js'; export const WATCHER_EVENTS = ['add', 'change']; diff --git a/packages/betterer/src/suite/index.ts b/packages/betterer/src/suite/index.ts index ff9e68b04..b80a7d57c 100644 --- a/packages/betterer/src/suite/index.ts +++ b/packages/betterer/src/suite/index.ts @@ -1,4 +1,4 @@ -export { BettererSuiteΩ } from './suite'; -export { BettererSuiteSummaryΩ } from './suite-summary'; -export type { BettererSuiteSummariesΩ } from './suite-summary'; -export { BettererSuite, BettererSuiteSummaries, BettererSuiteSummary } from './types'; +export { BettererSuiteΩ } from './suite.js'; +export { BettererSuiteSummaryΩ } from './suite-summary.js'; +export type { BettererSuiteSummariesΩ } from './suite-summary.js'; +export { BettererSuite, BettererSuiteSummaries, BettererSuiteSummary } from './types.js'; diff --git a/packages/betterer/src/suite/public.ts b/packages/betterer/src/suite/public.ts index 22360fc20..822164cc7 100644 --- a/packages/betterer/src/suite/public.ts +++ b/packages/betterer/src/suite/public.ts @@ -1 +1 @@ -export { BettererSuite, BettererSuiteSummaries, BettererSuiteSummary } from './types'; +export { BettererSuite, BettererSuiteSummaries, BettererSuiteSummary } from './types.js'; diff --git a/packages/betterer/src/suite/suite-summary.ts b/packages/betterer/src/suite/suite-summary.ts index 5b40b341b..d79afa26e 100644 --- a/packages/betterer/src/suite/suite-summary.ts +++ b/packages/betterer/src/suite/suite-summary.ts @@ -1,7 +1,7 @@ -import type { BettererFilePaths } from '../fs'; -import type { BettererRuns, BettererRunSummaries } from '../run'; -import type { BettererTestNames } from '../test'; -import type { BettererSuiteSummary } from './types'; +import type { BettererFilePaths } from '../fs/index.js'; +import type { BettererRuns, BettererRunSummaries } from '../run/index.js'; +import type { BettererTestNames } from '../test/index.js'; +import type { BettererSuiteSummary } from './types.js'; export class BettererSuiteSummaryΩ implements BettererSuiteSummary { constructor( diff --git a/packages/betterer/src/suite/suite.ts b/packages/betterer/src/suite/suite.ts index cf815b0e6..302e286f5 100644 --- a/packages/betterer/src/suite/suite.ts +++ b/packages/betterer/src/suite/suite.ts @@ -1,23 +1,23 @@ import type { BettererError } from '@betterer/errors'; -import type { BettererConfig } from '../config'; -import type { BettererFilePaths } from '../fs'; -import type { BettererReporterΩ } from '../reporters'; -import type { BettererResultsFileΩ } from '../results'; +import type { BettererConfig } from '../config/index.js'; +import type { BettererFilePaths } from '../fs/index.js'; +import type { BettererReporterΩ } from '../reporters/index.js'; +import type { BettererResultsFileΩ } from '../results/index.js'; import type { BettererReporterRun, BettererRuns, BettererRunSummaries, BettererRunSummary, BettererRunsΩ -} from '../run'; -import type { Defer } from '../utils'; -import type { BettererSuite } from './types'; +} from '../run/index.js'; +import type { Defer } from '../utils.js'; +import type { BettererSuite } from './types.js'; -import assert from 'assert'; +import assert from 'node:assert'; -import { defer } from '../utils'; -import { BettererSuiteSummaryΩ } from './suite-summary'; +import { defer } from '../utils.js'; +import { BettererSuiteSummaryΩ } from './suite-summary.js'; const NEGATIVE_FILTER_TOKEN = '!'; diff --git a/packages/betterer/src/suite/types.ts b/packages/betterer/src/suite/types.ts index 142912481..29d2a203c 100644 --- a/packages/betterer/src/suite/types.ts +++ b/packages/betterer/src/suite/types.ts @@ -1,6 +1,6 @@ -import type { BettererFilePaths } from '../fs'; -import type { BettererRuns, BettererRunSummaries } from '../run'; -import type { BettererTestNames } from '../test'; +import type { BettererFilePaths } from '../fs/index.js'; +import type { BettererRuns, BettererRunSummaries } from '../run/index.js'; +import type { BettererTestNames } from '../test/index.js'; /** * @public A set of {@link @betterer/betterer#BettererTest | `BettererTest`} runs. Will become a diff --git a/packages/betterer/src/test/config.ts b/packages/betterer/src/test/config.ts index d16096bb9..bf6b66dcd 100644 --- a/packages/betterer/src/test/config.ts +++ b/packages/betterer/src/test/config.ts @@ -6,13 +6,13 @@ import type { BettererTestOptionsComplex, BettererTestGoal, BettererDiff -} from './types'; +} from './types.js'; import { BettererError } from '@betterer/errors'; import { diff__ } from '@betterer/logger'; import { format } from 'prettier'; -import { isFunction } from '../utils'; +import { isFunction } from '../utils.js'; export function createTestConfig( options: BettererTestOptions diff --git a/packages/betterer/src/test/file-test/constraint.ts b/packages/betterer/src/test/file-test/constraint.ts index 4bf6d63a9..7ae826355 100644 --- a/packages/betterer/src/test/file-test/constraint.ts +++ b/packages/betterer/src/test/file-test/constraint.ts @@ -1,8 +1,8 @@ -import type { BettererFileTestResult } from './types'; +import type { BettererFileTestResult } from './types.js'; import { BettererConstraintResult } from '@betterer/constraints'; -import { differ } from './differ'; +import { differ } from './differ.js'; export function constraint(result: BettererFileTestResult, expected: BettererFileTestResult): BettererConstraintResult { const { diff } = differ(expected, result); diff --git a/packages/betterer/src/test/file-test/differ.ts b/packages/betterer/src/test/file-test/differ.ts index 2b16f0acd..fbfc695fe 100644 --- a/packages/betterer/src/test/file-test/differ.ts +++ b/packages/betterer/src/test/file-test/differ.ts @@ -1,7 +1,7 @@ import type { BettererLogs } from '@betterer/logger'; -import type { BettererFileΩ } from './file'; -import type { BettererFileTestResultΩ } from './file-test-result'; +import type { BettererFileΩ } from './file.js'; +import type { BettererFileTestResultΩ } from './file-test-result.js'; import type { BettererFileTestDiff, BettererFileIssue, @@ -9,9 +9,9 @@ import type { BettererFilesDiff, BettererFileTestResult, BettererFileBase -} from './types'; +} from './types.js'; -import assert from 'assert'; +import assert from 'node:assert'; const FORMATTER = Intl.NumberFormat(); diff --git a/packages/betterer/src/test/file-test/file-test-result.ts b/packages/betterer/src/test/file-test/file-test-result.ts index b6016094c..a6fc124bb 100644 --- a/packages/betterer/src/test/file-test/file-test-result.ts +++ b/packages/betterer/src/test/file-test/file-test-result.ts @@ -1,10 +1,10 @@ -import type { BettererFilePaths, BettererFileResolver } from '../../fs'; -import type { BettererFileTestResult, BettererFileIssues, BettererFile, BettererFileBase } from './types'; +import type { BettererFilePaths, BettererFileResolver } from '../../fs/index.js'; +import type { BettererFileTestResult, BettererFileIssues, BettererFile, BettererFileBase } from './types.js'; -import assert from 'assert'; -import path from 'path'; +import assert from 'node:assert'; +import path from 'node:path'; -import { BettererFileΩ } from './file'; +import { BettererFileΩ } from './file.js'; export class BettererFileTestResultΩ implements BettererFileTestResult { private _fileMap: Record = {}; diff --git a/packages/betterer/src/test/file-test/file-test.ts b/packages/betterer/src/test/file-test/file-test.ts index d8a389464..8434f4f9c 100644 --- a/packages/betterer/src/test/file-test/file-test.ts +++ b/packages/betterer/src/test/file-test/file-test.ts @@ -1,25 +1,25 @@ -import type { BettererFileGlobs, BettererFilePatterns, BettererFilePaths } from '../../fs'; -import type { BettererRun, BettererWorkerRunΩ } from '../../run'; -import type { BettererTestConstraint, BettererTestDeadline, BettererTestFunction, BettererTestGoal } from '../types'; +import type { BettererFileGlobs, BettererFilePatterns, BettererFilePaths } from '../../fs/index.js'; +import type { BettererRun, BettererWorkerRunΩ } from '../../run/index.js'; +import type { BettererTestConstraint, BettererTestDeadline, BettererTestFunction, BettererTestGoal } from '../types.js'; import type { BettererFileTestBase, BettererFileTestConfig, BettererFileTestFunction, BettererFileTestResult -} from './types'; - -import assert from 'assert'; -import path from 'path'; - -import { BettererFileResolverΩ } from '../../fs'; -import { createDeadline, createGoal, createTestConfig } from '../config'; -import { constraint } from './constraint'; -import { differ } from './differ'; -import { BettererFileTestResultΩ } from './file-test-result'; -import { goal } from './goal'; -import { printer } from './printer'; -import { progress } from './progress'; -import { deserialise, serialise } from './serialiser'; +} from './types.js'; + +import assert from 'node:assert'; +import path from 'node:path'; + +import { BettererFileResolverΩ } from '../../fs/index.js'; +import { createDeadline, createGoal, createTestConfig } from '../config.js'; +import { constraint } from './constraint.js'; +import { differ } from './differ.js'; +import { BettererFileTestResultΩ } from './file-test-result.js'; +import { goal } from './goal.js'; +import { printer } from './printer.js'; +import { progress } from './progress.js'; +import { deserialise, serialise } from './serialiser.js'; /** * @public A very common usecase for **Betterer** is to track issues across all the files in a diff --git a/packages/betterer/src/test/file-test/file.ts b/packages/betterer/src/test/file-test/file.ts index c235c90b6..9866c8d50 100644 --- a/packages/betterer/src/test/file-test/file.ts +++ b/packages/betterer/src/test/file-test/file.ts @@ -1,10 +1,10 @@ -import type { BettererFileIssue, BettererFileIssues, BettererFile } from './types'; +import type { BettererFileIssue, BettererFileIssues, BettererFile } from './types.js'; -import assert from 'assert'; +import assert from 'node:assert'; import { LinesAndColumns } from 'lines-and-columns'; -import { createHash } from '../../hasher'; -import { isString, normalisedPath, normaliseNewlines } from '../../utils'; +import { createHash } from '../../hasher.js'; +import { isString, normalisedPath, normaliseNewlines } from '../../utils.js'; const UNKNOWN_LOCATION = { line: 0, diff --git a/packages/betterer/src/test/file-test/goal.ts b/packages/betterer/src/test/file-test/goal.ts index b571627c0..38403cbef 100644 --- a/packages/betterer/src/test/file-test/goal.ts +++ b/packages/betterer/src/test/file-test/goal.ts @@ -1,5 +1,5 @@ -import type { BettererFileTestResultΩ } from './file-test-result'; -import type { BettererFileTestResult } from './types'; +import type { BettererFileTestResultΩ } from './file-test-result.js'; +import type { BettererFileTestResult } from './types.js'; export function goal(result: BettererFileTestResult): boolean { const resultΩ = result as BettererFileTestResultΩ; diff --git a/packages/betterer/src/test/file-test/index.ts b/packages/betterer/src/test/file-test/index.ts index 2671d034d..ac7e27692 100644 --- a/packages/betterer/src/test/file-test/index.ts +++ b/packages/betterer/src/test/file-test/index.ts @@ -1,5 +1,5 @@ -export { BettererFileTest, isBettererFileTest } from './file-test'; -export type { BettererFileTestResultΩ } from './file-test-result'; +export { BettererFileTest, isBettererFileTest } from './file-test.js'; +export type { BettererFileTestResultΩ } from './file-test-result.js'; export { BettererFileTestResult, BettererFileTestResultSerialised, @@ -13,4 +13,4 @@ export { BettererFileIssueSerialised, BettererFileIssues, BettererFileIssuesSerialised -} from './types'; +} from './types.js'; diff --git a/packages/betterer/src/test/file-test/printer.ts b/packages/betterer/src/test/file-test/printer.ts index 111d5d5a6..bad4f44c4 100644 --- a/packages/betterer/src/test/file-test/printer.ts +++ b/packages/betterer/src/test/file-test/printer.ts @@ -1,4 +1,4 @@ -import type { BettererFileTestResultSerialised } from './types'; +import type { BettererFileTestResultSerialised } from './types.js'; export function printer(serialised: BettererFileTestResultSerialised): string { let printed = '{\n'; diff --git a/packages/betterer/src/test/file-test/progress.ts b/packages/betterer/src/test/file-test/progress.ts index d52967206..25ae58025 100644 --- a/packages/betterer/src/test/file-test/progress.ts +++ b/packages/betterer/src/test/file-test/progress.ts @@ -1,6 +1,6 @@ -import type { BettererDelta } from '../../run'; -import type { BettererFileTestResultΩ } from './file-test-result'; -import type { BettererFileTestResult } from './types'; +import type { BettererDelta } from '../../run/index.js'; +import type { BettererFileTestResultΩ } from './file-test-result.js'; +import type { BettererFileTestResult } from './types.js'; export function progress( baseline: BettererFileTestResult | null, diff --git a/packages/betterer/src/test/file-test/public.ts b/packages/betterer/src/test/file-test/public.ts index 391941bc5..057c1e784 100644 --- a/packages/betterer/src/test/file-test/public.ts +++ b/packages/betterer/src/test/file-test/public.ts @@ -1,4 +1,4 @@ -export { BettererFileTest } from './file-test'; +export { BettererFileTest } from './file-test.js'; export { BettererFileBase, BettererFile, @@ -12,4 +12,4 @@ export { BettererFileIssueSerialised, BettererFileIssues, BettererFileIssuesSerialised -} from './types'; +} from './types.js'; diff --git a/packages/betterer/src/test/file-test/serialiser.ts b/packages/betterer/src/test/file-test/serialiser.ts index 791edaaa8..2b77797b7 100644 --- a/packages/betterer/src/test/file-test/serialiser.ts +++ b/packages/betterer/src/test/file-test/serialiser.ts @@ -3,12 +3,12 @@ import type { BettererFileIssues, BettererFileTestResultSerialised, BettererFileBase -} from './types'; +} from './types.js'; -import * as path from 'path'; +import path from 'node:path'; -import { BettererFileResolverΩ } from '../../fs'; -import { BettererFileTestResultΩ } from './file-test-result'; +import { BettererFileResolverΩ } from '../../fs/index.js'; +import { BettererFileTestResultΩ } from './file-test-result.js'; export function deserialise(serialised: BettererFileTestResultSerialised, resultsPath: string): BettererFileTestResult { const resolver = new BettererFileResolverΩ(path.dirname(resultsPath)); diff --git a/packages/betterer/src/test/file-test/types.ts b/packages/betterer/src/test/file-test/types.ts index 8087cb983..2add5a6dd 100644 --- a/packages/betterer/src/test/file-test/types.ts +++ b/packages/betterer/src/test/file-test/types.ts @@ -1,7 +1,7 @@ -import type { BettererFilePaths, BettererFileResolver } from '../../fs'; -import type { BettererDiff } from '../../test'; -import type { MaybeAsync } from '../../types'; -import type { BettererTestBase, BettererTestConfig } from '../types'; +import type { BettererFilePaths, BettererFileResolver } from '../../fs/index.js'; +import type { BettererDiff } from '../../test/index.js'; +import type { MaybeAsync } from '../../types.js'; +import type { BettererTestBase, BettererTestConfig } from '../types.js'; /** * @public A serialised {@link @betterer/betterer#BettererFileIssue | `BettererFileIssue`}. diff --git a/packages/betterer/src/test/index.ts b/packages/betterer/src/test/index.ts index 27d4138c8..f34764598 100644 --- a/packages/betterer/src/test/index.ts +++ b/packages/betterer/src/test/index.ts @@ -10,10 +10,10 @@ export { BettererFileIssue, BettererFileIssues, isBettererFileTest -} from './file-test'; -export type { BettererFileTestResultΩ } from './file-test'; -export { loadTestMeta } from './loader'; -export { BettererTest, isBettererTest } from './test'; +} from './file-test/index.js'; +export type { BettererFileTestResultΩ } from './file-test/index.js'; +export { loadTestMeta } from './loader.js'; +export { BettererTest, isBettererTest } from './test.js'; export { BettererDeserialise, BettererDiff, @@ -37,4 +37,4 @@ export { BettererTestConfig, BettererTestMeta, BettererTestNames -} from './types'; +} from './types.js'; diff --git a/packages/betterer/src/test/loader.ts b/packages/betterer/src/test/loader.ts index db8251c37..d9d27966a 100644 --- a/packages/betterer/src/test/loader.ts +++ b/packages/betterer/src/test/loader.ts @@ -1,10 +1,10 @@ -import type { BettererConfig } from '../config'; -import type { BettererTestMap, BettererTestFactoryMetaMap } from './types'; +import type { BettererConfig } from '../config/index.js'; +import type { BettererTestMap, BettererTestFactoryMetaMap } from './types.js'; import { BettererError } from '@betterer/errors'; -import { requireUncached } from '../require'; -import { isFunction } from '../utils'; +import { requireUncached } from '../require.js'; +import { isFunction } from '../utils.js'; export function loadTestMeta(config: BettererConfig): BettererTestFactoryMetaMap { let testMetaMap: BettererTestFactoryMetaMap = {}; diff --git a/packages/betterer/src/test/public.ts b/packages/betterer/src/test/public.ts index 4b38fae66..adf9d9649 100644 --- a/packages/betterer/src/test/public.ts +++ b/packages/betterer/src/test/public.ts @@ -12,8 +12,8 @@ export { BettererFileIssueSerialised, BettererFileIssues, BettererFileIssuesSerialised -} from './file-test/public'; -export { BettererTest } from './test'; +} from './file-test/public.js'; +export { BettererTest } from './test.js'; export { BettererDeserialise, BettererDiff, @@ -32,4 +32,4 @@ export { BettererTestOptionsBasic, BettererTestOptionsComplex, BettererTestNames -} from './types'; +} from './types.js'; diff --git a/packages/betterer/src/test/test.ts b/packages/betterer/src/test/test.ts index 5317d81ff..ae5b41604 100644 --- a/packages/betterer/src/test/test.ts +++ b/packages/betterer/src/test/test.ts @@ -5,9 +5,9 @@ import type { BettererTestDeadline, BettererTestGoal, BettererTestOptions -} from './types'; +} from './types.js'; -import { createDeadline, createGoal, createTestConfig } from './config'; +import { createDeadline, createGoal, createTestConfig } from './config.js'; /** * @public The main interface to the **Betterer** {@link https://phenomnomnominal.github.io/betterer/docs/tests | test system}. diff --git a/packages/betterer/src/test/types.ts b/packages/betterer/src/test/types.ts index 6bff65f1b..1fd8a4a67 100644 --- a/packages/betterer/src/test/types.ts +++ b/packages/betterer/src/test/types.ts @@ -1,8 +1,8 @@ import type { BettererConstraintResult } from '@betterer/constraints'; import type { BettererLogs } from '@betterer/logger'; -import type { BettererDelta, BettererRun } from '../run'; -import type { MaybeAsync } from '../types'; +import type { BettererDelta, BettererRun } from '../run/index.js'; +import type { MaybeAsync } from '../types.js'; /** * @public A function that checks if a test result is {@link @betterer/constraints#BettererConstraintResult | `better`, `worse`, or the `same`} diff --git a/packages/betterer/src/types.ts b/packages/betterer/src/types.ts index fe1191a4d..c1bb6bc2b 100644 --- a/packages/betterer/src/types.ts +++ b/packages/betterer/src/types.ts @@ -1,6 +1,6 @@ -import type { BettererConfig } from './config'; -import type { BettererVersionControlWorker } from './fs'; -import type { BettererResultsFileΩ } from './results'; +import type { BettererConfig } from './config/index.js'; +import type { BettererVersionControlWorker } from './fs/index.js'; +import type { BettererResultsFileΩ } from './results/index.js'; export type MaybeAsync = T | Promise; diff --git a/packages/betterer/src/utils.ts b/packages/betterer/src/utils.ts index 69b6e65f3..4902717e8 100644 --- a/packages/betterer/src/utils.ts +++ b/packages/betterer/src/utils.ts @@ -1,5 +1,5 @@ -import assert from 'assert'; -import * as path from 'path'; +import assert from 'node:assert'; +import path from 'node:path'; export function isBoolean(value: unknown): value is boolean { return typeof value === 'boolean'; diff --git a/packages/cli/src/ci.ts b/packages/cli/src/ci.ts index e995810dc..3c2676617 100644 --- a/packages/cli/src/ci.ts +++ b/packages/cli/src/ci.ts @@ -1,12 +1,12 @@ import type { BettererOptionsStart } from '@betterer/betterer'; import type { Command } from 'commander'; -import type { BettererCLIConfig } from './types'; +import type { BettererCLIConfig } from './types.js'; import { betterer } from '@betterer/betterer'; -import { cliCommand, setEnv } from './options'; -import { BettererCommand } from './types'; +import { cliCommand, setEnv } from './options.js'; +import { BettererCommand } from './types.js'; /** * Run **Betterer** in `ci` mode. diff --git a/packages/cli/src/cli.ts b/packages/cli/src/cli.ts index 5d48c5c2a..84ec97879 100644 --- a/packages/cli/src/cli.ts +++ b/packages/cli/src/cli.ts @@ -1,17 +1,17 @@ -import type { BettererCLIArguments, BettererCommandName } from './types'; +import type { BettererCLIArguments, BettererCommandName } from './types.js'; import { Command } from 'commander'; -import { ci } from './ci'; -import { init } from './init'; -import { merge } from './merge'; -import { precommit } from './precommit'; -import { start } from './start'; -import { results } from './results'; -import { BettererCommand } from './types'; -import { watch } from './watch'; -import { upgrade } from './upgrade'; -import { getVersion } from './version'; +import { ci } from './ci.js'; +import { init } from './init.js'; +import { merge } from './merge.js'; +import { precommit } from './precommit.js'; +import { start } from './start.js'; +import { results } from './results.js'; +import { BettererCommand } from './types.js'; +import { watch } from './watch.js'; +import { upgrade } from './upgrade.js'; +import { getVersion } from './version.js'; /** * @internal This could change at any point! Please don't use! diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index d4bebc6fd..9711c2530 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -8,5 +8,5 @@ * @packageDocumentation */ -export { cli__ } from './cli'; -export { BettererCLIArguments, BettererPackageJSON } from './types'; +export { cli__ } from './cli.js'; +export { BettererCLIArguments, BettererPackageJSON } from './types.js'; diff --git a/packages/cli/src/init.tsx b/packages/cli/src/init.tsx index c0fc4cf20..45f5cbe5b 100644 --- a/packages/cli/src/init.tsx +++ b/packages/cli/src/init.tsx @@ -1,10 +1,12 @@ +import type { Command } from 'commander'; + +import type { BettererCLIInitConfig } from './types.js'; + import { React, render } from '@betterer/render'; -import { Command } from 'commander'; -import path from 'path'; +import path from 'node:path'; -import { Init } from './init/init'; -import { initCommand, setEnv } from './options'; -import { BettererCLIInitConfig } from './types'; +import { Init } from './init/init.js'; +import { initCommand, setEnv } from './options.js'; const BETTERER_TS = './.betterer.ts'; const BETTERER_RESULTS = './.betterer.results'; diff --git a/packages/cli/src/init/create-test-file.ts b/packages/cli/src/init/create-test-file.ts index a3d4cd3f7..7fd99429f 100644 --- a/packages/cli/src/init/create-test-file.ts +++ b/packages/cli/src/init/create-test-file.ts @@ -1,8 +1,8 @@ import type { BettererLogger } from '@betterer/logger'; import { BettererError } from '@betterer/errors'; -import { promises as fs } from 'fs'; -import * as path from 'path'; +import { promises as fs } from 'node:fs'; +import path from 'node:path'; const TEMPLATE_JS = `module.exports = { // Add tests here ☀️ diff --git a/packages/cli/src/init/enable-automerge.ts b/packages/cli/src/init/enable-automerge.ts index 11437486d..4af3db599 100644 --- a/packages/cli/src/init/enable-automerge.ts +++ b/packages/cli/src/init/enable-automerge.ts @@ -1,8 +1,8 @@ import type { BettererLogger } from '@betterer/logger'; import { BettererError } from '@betterer/errors'; -import { promises as fs } from 'fs'; -import * as path from 'path'; +import { promises as fs } from 'node:fs'; +import path from 'node:path'; const GITATTRIBUTES_COMMENT = '# Betterer merge'; const NEW_LINE = '\n'; diff --git a/packages/cli/src/init/update-package-json.ts b/packages/cli/src/init/update-package-json.ts index e3be04d6c..b234a1d69 100644 --- a/packages/cli/src/init/update-package-json.ts +++ b/packages/cli/src/init/update-package-json.ts @@ -1,12 +1,12 @@ import type { BettererLogger } from '@betterer/logger'; -import type { BettererPackageJSON } from '../types'; +import type { BettererPackageJSON } from '../types.js'; import { BettererError } from '@betterer/errors'; import findUp from 'find-up'; -import { promises as fs } from 'fs'; +import { promises as fs } from 'node:fs'; -import { getVersion } from '../version'; +import { getVersion } from '../version.js'; export async function run(logger: BettererLogger, cwd: string, ts: boolean): Promise { await logger.progress('adding "betterer" to package.json file...'); diff --git a/packages/cli/src/merge.ts b/packages/cli/src/merge.ts index 67582a3f8..de77c42d5 100644 --- a/packages/cli/src/merge.ts +++ b/packages/cli/src/merge.ts @@ -1,11 +1,11 @@ import type { BettererOptionsMerge } from '@betterer/betterer'; import type { Command } from 'commander'; -import type { BettererCLIMergeConfig } from './types'; +import type { BettererCLIMergeConfig } from './types.js'; import { betterer } from '@betterer/betterer'; -import { mergeCommand, setEnv } from './options'; +import { mergeCommand, setEnv } from './options.js'; /** * Run the **Betterer** `merge` command to resolve any merge conflicts in the diff --git a/packages/cli/src/options.ts b/packages/cli/src/options.ts index fb7b9f15c..083df375e 100644 --- a/packages/cli/src/options.ts +++ b/packages/cli/src/options.ts @@ -1,8 +1,8 @@ -import type { BettererCLIArguments, BettererCLIEnvConfig } from './types'; +import type { BettererCLIArguments, BettererCLIEnvConfig } from './types.js'; import { Command } from 'commander'; -import { BettererCommand } from './types'; +import { BettererCommand } from './types.js'; let command: Command; diff --git a/packages/cli/src/precommit.ts b/packages/cli/src/precommit.ts index 01587d65b..dd8f47ca0 100644 --- a/packages/cli/src/precommit.ts +++ b/packages/cli/src/precommit.ts @@ -1,12 +1,12 @@ import type { BettererOptionsStart } from '@betterer/betterer'; import type { Command } from 'commander'; -import type { BettererCLIConfig } from './types'; +import type { BettererCLIConfig } from './types.js'; import { betterer } from '@betterer/betterer'; -import { cliCommand, setEnv } from './options'; -import { BettererCommand } from './types'; +import { cliCommand, setEnv } from './options.js'; +import { BettererCommand } from './types.js'; /** * Run **Betterer** in `precommit` mode. diff --git a/packages/cli/src/results.tsx b/packages/cli/src/results.tsx index 45829befe..83b30b82e 100644 --- a/packages/cli/src/results.tsx +++ b/packages/cli/src/results.tsx @@ -1,10 +1,12 @@ -import { BettererOptionsResults } from '@betterer/betterer'; +import type { BettererOptionsResults } from '@betterer/betterer'; +import type { Command } from 'commander'; + +import type { BettererCLIResultsConfig } from './types.js'; + import { React, render } from '@betterer/render'; -import { Command } from 'commander'; -import { resultsCommand, setEnv } from './options'; -import { Results } from './results/results'; -import { BettererCLIResultsConfig } from './types'; +import { resultsCommand, setEnv } from './options.js'; +import { Results } from './results/results.js'; /** * Run the **Betterer** `results` command to see the status of the {@link @betterer/betterer#BettererTest | `BettererTest`s} diff --git a/packages/cli/src/start.ts b/packages/cli/src/start.ts index afaf14506..2607ffe1d 100644 --- a/packages/cli/src/start.ts +++ b/packages/cli/src/start.ts @@ -1,12 +1,12 @@ import type { BettererOptionsStart } from '@betterer/betterer'; import type { Command } from 'commander'; -import type { BettererCLIConfig } from './types'; +import type { BettererCLIConfig } from './types.js'; import { betterer } from '@betterer/betterer'; -import { cliCommand, setEnv } from './options'; -import { BettererCommand } from './types'; +import { cliCommand, setEnv } from './options.js'; +import { BettererCommand } from './types.js'; /** * Run **Betterer** in the default mode. diff --git a/packages/cli/src/upgrade.tsx b/packages/cli/src/upgrade.tsx index 0ec762746..9f257e9a1 100644 --- a/packages/cli/src/upgrade.tsx +++ b/packages/cli/src/upgrade.tsx @@ -1,9 +1,11 @@ +import type { Command } from 'commander'; + +import type { BettererCLIUpgradeConfig } from './types.js'; + import { React, render } from '@betterer/render'; -import { Command } from 'commander'; -import { Upgrade } from './upgrade/upgrade'; -import { setEnv, upgradeCommand } from './options'; -import { BettererCLIUpgradeConfig } from './types'; +import { Upgrade } from './upgrade/upgrade.js'; +import { setEnv, upgradeCommand } from './options.js'; /** * Run the **Betterer** `upgrade` command to upgrade **Betterer** in an existing project. diff --git a/packages/cli/src/upgrade/upgrade-cjs.ts b/packages/cli/src/upgrade/upgrade-cjs.ts index bf66c3606..9bb85e807 100644 --- a/packages/cli/src/upgrade/upgrade-cjs.ts +++ b/packages/cli/src/upgrade/upgrade-cjs.ts @@ -3,7 +3,7 @@ import type { BinaryExpression, SourceFile } from 'typescript'; import { tsquery } from '@phenomnomnominal/tsquery'; import { factory, isObjectLiteralExpression } from 'typescript'; -import { reparse, wrapTest, wrapTests } from './utils'; +import { reparse, wrapTest, wrapTests } from './utils.js'; // foo const TEST_NAME_QUERY = 'Identifier[name!=/module/][name!=/exports/]'; diff --git a/packages/cli/src/upgrade/upgrade-config-file.ts b/packages/cli/src/upgrade/upgrade-config-file.ts index 2ae730441..096149334 100644 --- a/packages/cli/src/upgrade/upgrade-config-file.ts +++ b/packages/cli/src/upgrade/upgrade-config-file.ts @@ -3,13 +3,13 @@ import type { SourceFile } from 'typescript'; import { BettererError } from '@betterer/errors'; import { tsquery } from '@phenomnomnominal/tsquery'; -import { promises as fs } from 'fs'; +import { promises as fs } from 'node:fs'; import { format, resolveConfig } from 'prettier'; import { createPrinter, ModuleKind } from 'typescript'; -import { diff } from './diff'; -import { upgradeCJS } from './upgrade-cjs'; -import { upgradeESM } from './upgrade-esm'; +import { diff } from './diff.js'; +import { upgradeCJS } from './upgrade-cjs.js'; +import { upgradeESM } from './upgrade-esm.js'; const printer = createPrinter(); diff --git a/packages/cli/src/upgrade/upgrade-esm.ts b/packages/cli/src/upgrade/upgrade-esm.ts index 97956c8aa..69644a8b9 100644 --- a/packages/cli/src/upgrade/upgrade-esm.ts +++ b/packages/cli/src/upgrade/upgrade-esm.ts @@ -3,7 +3,7 @@ import type { ExportAssignment, SourceFile, VariableDeclaration } from 'typescri import { tsquery } from '@phenomnomnominal/tsquery'; import { factory, isObjectLiteralExpression } from 'typescript'; -import { reparse, wrapTest, wrapTests } from './utils'; +import { reparse, wrapTest, wrapTests } from './utils.js'; // export const foo const EXPORT_TEST_QUERY = 'VariableStatement:has(ExportKeyword) VariableDeclaration'; diff --git a/packages/cli/src/upgrade/upgrade.tsx b/packages/cli/src/upgrade/upgrade.tsx index b84197638..8e3536ce6 100644 --- a/packages/cli/src/upgrade/upgrade.tsx +++ b/packages/cli/src/upgrade/upgrade.tsx @@ -2,7 +2,7 @@ import { BettererConfigPaths } from '@betterer/betterer'; import { React, Box, FC, useCallback } from '@betterer/render'; import { BettererLogo, BettererTaskLogger, BettererTasksLogger } from '@betterer/tasks'; import { workerRequire } from '@phenomnomnominal/worker-require'; -import * as path from 'path'; +import path from 'node:path'; import { UpgradeConfigFileWorker } from './types'; import { BettererLogger } from '@betterer/logger'; diff --git a/packages/cli/src/version.ts b/packages/cli/src/version.ts index 96b478b01..e57e7943a 100644 --- a/packages/cli/src/version.ts +++ b/packages/cli/src/version.ts @@ -1,7 +1,7 @@ -import type { BettererPackageJSON } from './types'; +import type { BettererPackageJSON } from './types.js'; -import { promises as fs } from 'fs'; -import path from 'path'; +import { promises as fs } from 'node:fs'; +import path from 'node:path'; export async function getVersion(): Promise { const packageJSONPath = path.resolve(__dirname, '../package.json'); diff --git a/packages/cli/src/watch.ts b/packages/cli/src/watch.ts index 6b873d27d..1295f1f51 100644 --- a/packages/cli/src/watch.ts +++ b/packages/cli/src/watch.ts @@ -1,12 +1,12 @@ import type { BettererOptionsWatch } from '@betterer/betterer'; import type { Command } from 'commander'; -import type { BettererCLIConfig } from './types'; +import type { BettererCLIConfig } from './types.js'; import { betterer } from '@betterer/betterer'; -import { cliCommand, setEnv } from './options'; -import { BettererCommand } from './types'; +import { cliCommand, setEnv } from './options.js'; +import { BettererCommand } from './types.js'; /** * Run **Betterer** in `watch` mode. diff --git a/packages/constraints/src/bigger.ts b/packages/constraints/src/bigger.ts index 8756c2ded..e0ce908da 100644 --- a/packages/constraints/src/bigger.ts +++ b/packages/constraints/src/bigger.ts @@ -1,4 +1,4 @@ -import { BettererConstraintResult } from './constraint-result'; +import { BettererConstraintResult } from './constraint-result.js'; /** * @public `Betterer` {@link @betterer/betterer#BettererTestConstraint | constraint function} for when diff --git a/packages/constraints/src/index.ts b/packages/constraints/src/index.ts index 4d100194b..e4049d9fe 100644 --- a/packages/constraints/src/index.ts +++ b/packages/constraints/src/index.ts @@ -9,7 +9,7 @@ * @packageDocumentation */ -export { BettererConstraintResult } from './constraint-result'; +export { BettererConstraintResult } from './constraint-result.js'; -export { bigger } from './bigger'; -export { smaller } from './smaller'; +export { bigger } from './bigger.js'; +export { smaller } from './smaller.js'; diff --git a/packages/constraints/src/smaller.ts b/packages/constraints/src/smaller.ts index 88d49aaac..87b5a2442 100644 --- a/packages/constraints/src/smaller.ts +++ b/packages/constraints/src/smaller.ts @@ -1,4 +1,4 @@ -import { BettererConstraintResult } from './constraint-result'; +import { BettererConstraintResult } from './constraint-result.js'; /** * @public `Betterer` {@link @betterer/betterer#BettererTestConstraint | constraint function} for diff --git a/packages/coverage/src/constraint.ts b/packages/coverage/src/constraint.ts index 36d423b99..45d1b2ac7 100644 --- a/packages/coverage/src/constraint.ts +++ b/packages/coverage/src/constraint.ts @@ -1,8 +1,8 @@ -import type { BettererCoverageDiff, BettererCoverageIssues } from './types'; +import type { BettererCoverageDiff, BettererCoverageIssues } from './types.js'; import { BettererConstraintResult } from '@betterer/constraints'; -import { differ } from './differ'; +import { differ } from './differ.js'; export function constraint(result: BettererCoverageIssues, expected: BettererCoverageIssues): BettererConstraintResult { const { diff } = differ(result, expected); diff --git a/packages/coverage/src/coverage-test.ts b/packages/coverage/src/coverage-test.ts index d267af4c4..a8c63ebb0 100644 --- a/packages/coverage/src/coverage-test.ts +++ b/packages/coverage/src/coverage-test.ts @@ -1,14 +1,14 @@ import type { BettererFileGlobs, BettererFilePatterns, BettererRun } from '@betterer/betterer'; -import type { BettererCoverageDiff, BettererCoverageIssues, BettererCoverageTestFunction } from './types'; +import type { BettererCoverageDiff, BettererCoverageIssues, BettererCoverageTestFunction } from './types.js'; import { BettererTest } from '@betterer/betterer'; -import { constraint } from './constraint'; -import { differ } from './differ'; -import { goal } from './goal'; -import { deserialise, serialise } from './serialiser'; -import { flatten } from './utils'; +import { constraint } from './constraint.js'; +import { differ } from './differ.js'; +import { goal } from './goal.js'; +import { deserialise, serialise } from './serialiser.js'; +import { flatten } from './utils.js'; /** * @public `BettererCoverageTest` provides a wrapper around {@link @betterer/betterer#BettererTest | `BettererTest` } diff --git a/packages/coverage/src/coverage.ts b/packages/coverage/src/coverage.ts index 5a6e927ce..5b7a250a5 100644 --- a/packages/coverage/src/coverage.ts +++ b/packages/coverage/src/coverage.ts @@ -1,5 +1,5 @@ -import { BettererCoverageTest } from './coverage-test'; -import { test, testTotal } from './test'; +import { BettererCoverageTest } from './coverage-test.js'; +import { test, testTotal } from './test.js'; /** * @public diff --git a/packages/coverage/src/differ.ts b/packages/coverage/src/differ.ts index 52bd55434..1d1f6ff90 100644 --- a/packages/coverage/src/differ.ts +++ b/packages/coverage/src/differ.ts @@ -1,6 +1,6 @@ import type { BettererDiff } from '@betterer/betterer'; import type { BettererLog, BettererLogs } from '@betterer/logger'; -import type { BettererCoverageDiff, BettererCoverageIssue, BettererCoverageIssues } from './types'; +import type { BettererCoverageDiff, BettererCoverageIssue, BettererCoverageIssues } from './types.js'; export function differ( expected: BettererCoverageIssues, diff --git a/packages/coverage/src/goal.ts b/packages/coverage/src/goal.ts index 13f929b20..c7d99dc8b 100644 --- a/packages/coverage/src/goal.ts +++ b/packages/coverage/src/goal.ts @@ -1,4 +1,4 @@ -import type { BettererCoverageIssues } from './types'; +import type { BettererCoverageIssues } from './types.js'; export function goal(result: BettererCoverageIssues): boolean { return Object.keys(result).every((filePath) => { diff --git a/packages/coverage/src/index.ts b/packages/coverage/src/index.ts index 83c3c6dc7..f9b0111ce 100644 --- a/packages/coverage/src/index.ts +++ b/packages/coverage/src/index.ts @@ -4,6 +4,6 @@ * @packageDocumentation */ -export { coverage, coverageTotal } from './coverage'; -export type { BettererCoverageTest } from './coverage-test'; -export { BettererCoverageDiff, BettererCoverageIssue, BettererCoverageIssues, BettererCoverageTypes } from './types'; +export { coverage, coverageTotal } from './coverage.js'; +export type { BettererCoverageTest } from './coverage-test.js'; +export { BettererCoverageDiff, BettererCoverageIssue, BettererCoverageIssues, BettererCoverageTypes } from './types.js'; diff --git a/packages/coverage/src/test.ts b/packages/coverage/src/test.ts index ccd6dd156..adc3a97d0 100644 --- a/packages/coverage/src/test.ts +++ b/packages/coverage/src/test.ts @@ -6,14 +6,14 @@ import type { IstanbulCoverage, IstanbulCoverageSummary, IstanbulFileCoverage -} from './types'; +} from './types.js'; import { BettererError } from '@betterer/errors'; -import { promises as fs } from 'fs'; +import { promises as fs } from 'node:fs'; import minimatch from 'minimatch'; -import path from 'path'; +import path from 'node:path'; -import { isNumber, normalisedPath } from './utils'; +import { isNumber, normalisedPath } from './utils.js'; export async function test( run: BettererRun, diff --git a/packages/coverage/src/utils.ts b/packages/coverage/src/utils.ts index 6c4c53c5f..e989c0006 100644 --- a/packages/coverage/src/utils.ts +++ b/packages/coverage/src/utils.ts @@ -1,4 +1,4 @@ -import path from 'path'; +import path from 'node:path'; export function flatten(toFlatten: ReadonlyArray>): Array { const flattened: Array = []; diff --git a/packages/docgen/src/index.ts b/packages/docgen/src/index.ts index 1ba37a2af..3fe8a8c99 100644 --- a/packages/docgen/src/index.ts +++ b/packages/docgen/src/index.ts @@ -5,7 +5,7 @@ import type { import { MarkdownDocumenterFeature } from '@microsoft/api-documenter'; import dedent from 'dedent'; -import path from 'path'; +import path from 'node:path'; const REPLACERS = new Map([ [/\\\*/g, '*'], diff --git a/packages/errors/src/error.ts b/packages/errors/src/error.ts index b25b1d53b..7994e2f29 100644 --- a/packages/errors/src/error.ts +++ b/packages/errors/src/error.ts @@ -1,4 +1,4 @@ -import type { BettererErrorDetails } from './types'; +import type { BettererErrorDetails } from './types.js'; /** * @public A custom Error for use in **Betterer**. It attaches some extra details to a standard diff --git a/packages/errors/src/index.ts b/packages/errors/src/index.ts index 64397fc84..bf7a42263 100644 --- a/packages/errors/src/index.ts +++ b/packages/errors/src/index.ts @@ -4,5 +4,5 @@ * @packageDocumentation */ -export { BettererError, isBettererError } from './error'; -export { BettererErrorDetail, BettererErrorDetails } from './types'; +export { BettererError, isBettererError } from './error.js'; +export { BettererErrorDetail, BettererErrorDetails } from './types.js'; diff --git a/packages/errors/src/types.ts b/packages/errors/src/types.ts index 670b47236..cf5e218d3 100644 --- a/packages/errors/src/types.ts +++ b/packages/errors/src/types.ts @@ -1,4 +1,4 @@ -import type { BettererError } from './error'; +import type { BettererError } from './error.js'; /** * @public An additional piece of information attached to a {@link BettererError | `BettererError`}. diff --git a/packages/eslint/src/eslint.ts b/packages/eslint/src/eslint.ts index cca71e7d7..0611e2c14 100644 --- a/packages/eslint/src/eslint.ts +++ b/packages/eslint/src/eslint.ts @@ -1,10 +1,10 @@ import type { Linter } from 'eslint'; -import type { BettererESLintRulesConfig } from './types'; +import type { BettererESLintRulesConfig } from './types.js'; import { BettererFileTest } from '@betterer/betterer'; import { BettererError } from '@betterer/errors'; -import assert from 'assert'; +import assert from 'node:assert'; import { ESLint } from 'eslint'; /** diff --git a/packages/eslint/src/index.ts b/packages/eslint/src/index.ts index 6d5a96c0b..8e4162964 100644 --- a/packages/eslint/src/index.ts +++ b/packages/eslint/src/index.ts @@ -4,5 +4,5 @@ * @packageDocumentation */ -export { eslint } from './eslint'; -export { BettererESLintRulesConfig } from './types'; +export { eslint } from './eslint.js'; +export { BettererESLintRulesConfig } from './types.js'; diff --git a/packages/extension/src/client/commands/disable.ts b/packages/extension/src/client/commands/disable.ts index 76c056c36..1b758291e 100644 --- a/packages/extension/src/client/commands/disable.ts +++ b/packages/extension/src/client/commands/disable.ts @@ -1,12 +1,14 @@ +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import type { WorkspaceFolder } from 'vscode'; +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import { workspace } from 'vscode'; -import { EXTENSION_NAME } from '../../constants'; -import { ALREADY_DISABLED, DISABLE_COMMAND_REQUIRES_WORKSPACE } from '../error-messages'; -import { error, info } from '../logger'; -import { disable, getEnabled } from '../settings'; -import { pickFolder } from './folder-picker'; +import { EXTENSION_NAME } from '../../constants.js'; +import { ALREADY_DISABLED, DISABLE_COMMAND_REQUIRES_WORKSPACE } from '../error-messages.js'; +import { error, info } from '../logger.js'; +import { disable, getEnabled } from '../settings.js'; +import { pickFolder } from './folder-picker.js'; export async function disableBetterer(): Promise { const { workspaceFolders } = workspace; diff --git a/packages/extension/src/client/commands/enable.ts b/packages/extension/src/client/commands/enable.ts index 6e228e765..2805c3478 100644 --- a/packages/extension/src/client/commands/enable.ts +++ b/packages/extension/src/client/commands/enable.ts @@ -1,12 +1,14 @@ +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import type { WorkspaceFolder } from 'vscode'; +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import { workspace } from 'vscode'; -import { EXTENSION_NAME } from '../../constants'; -import { ALREADY_ENABLED, ENABLE_COMMAND_REQUIRES_WORKSPACE } from '../error-messages'; -import { error, info } from '../logger'; -import { enable, getEnabled } from '../settings'; -import { pickFolder } from './folder-picker'; +import { EXTENSION_NAME } from '../../constants.js'; +import { ALREADY_ENABLED, ENABLE_COMMAND_REQUIRES_WORKSPACE } from '../error-messages.js'; +import { error, info } from '../logger.js'; +import { enable, getEnabled } from '../settings.js'; +import { pickFolder } from './folder-picker.js'; export async function enableBetterer(): Promise { const { workspaceFolders } = workspace; diff --git a/packages/extension/src/client/commands/folder-picker.ts b/packages/extension/src/client/commands/folder-picker.ts index bded36eb7..e99bf07fe 100644 --- a/packages/extension/src/client/commands/folder-picker.ts +++ b/packages/extension/src/client/commands/folder-picker.ts @@ -1,5 +1,7 @@ +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import type { WorkspaceFolder } from 'vscode'; +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import { window } from 'vscode'; export async function pickFolder( diff --git a/packages/extension/src/client/commands/index.ts b/packages/extension/src/client/commands/index.ts index e0b023b38..53d37ef61 100644 --- a/packages/extension/src/client/commands/index.ts +++ b/packages/extension/src/client/commands/index.ts @@ -1,5 +1,5 @@ -export { disableBetterer } from './disable'; -export { enableBetterer } from './enable'; -export { initBetterer } from './init'; +export { disableBetterer } from './disable.js'; +export { enableBetterer } from './enable.js'; +export { initBetterer } from './init.js'; -export { COMMAND_NAMES } from './names'; +export { COMMAND_NAMES } from './names.js'; diff --git a/packages/extension/src/client/commands/init.ts b/packages/extension/src/client/commands/init.ts index 8944ddbd1..fc7c9512e 100644 --- a/packages/extension/src/client/commands/init.ts +++ b/packages/extension/src/client/commands/init.ts @@ -1,13 +1,15 @@ +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import type { WorkspaceFolder } from 'vscode'; -import * as fs from 'fs'; -import * as path from 'path'; +import fs from 'node:fs'; +import path from 'node:path'; +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import { window, workspace } from 'vscode'; -import { EXTENSION_NAME } from '../../constants'; -import { ALREADY_CONFIGURED, INIT_COMMAND_REQUIRES_WORKSPACE } from '../error-messages'; -import { error, info } from '../logger'; -import { pickFolder } from './folder-picker'; +import { EXTENSION_NAME } from '../../constants.js'; +import { ALREADY_CONFIGURED, INIT_COMMAND_REQUIRES_WORKSPACE } from '../error-messages.js'; +import { error, info } from '../logger.js'; +import { pickFolder } from './folder-picker.js'; const CONFIG_FILES = ['.betterer.ts', '.betterer.js']; diff --git a/packages/extension/src/client/error-messages.ts b/packages/extension/src/client/error-messages.ts index 7c92c5609..1dad81a6d 100644 --- a/packages/extension/src/client/error-messages.ts +++ b/packages/extension/src/client/error-messages.ts @@ -1,6 +1,7 @@ +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import type { WorkspaceFolder } from 'vscode'; -import { EXTENSION_NAME } from '../constants'; +import { EXTENSION_NAME } from '../constants.js'; const NAME = EXTENSION_NAME; const DEFAULT_CONFIG_FILE = `.betterer.ts`; @@ -33,7 +34,7 @@ export const BETTERER_CONFIG_FILE_INVALID = `Failed to load ${NAME} config. ${SE export const BETTERER_CONFIG_FILE_INVALID_DETAILS = (workspaceFolder: WorkspaceFolder): string => { return ` -Invlaid ${NAME} configuration file (e.g. ${DEFAULT_CONFIG_FILE}) found for workspace: ${workspaceFolder.name} +Invalid ${NAME} configuration file (e.g. ${DEFAULT_CONFIG_FILE}) found for workspace: ${workspaceFolder.name} The workspace will not be validated. Consider executing the 'Initialise ${NAME}' command to add ${NAME} to the workspace. ${DISABLE_FOR_WORKSPACE(workspaceFolder)} diff --git a/packages/extension/src/client/extension.ts b/packages/extension/src/client/extension.ts index 4c2a08a49..5e99b16f8 100644 --- a/packages/extension/src/client/extension.ts +++ b/packages/extension/src/client/extension.ts @@ -1,16 +1,18 @@ +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import type { ExtensionContext } from 'vscode'; import type { ErrorAction, ErrorHandler } from 'vscode-languageclient/node'; -import assert from 'assert'; +import assert from 'node:assert'; +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import { commands } from 'vscode'; import { CloseAction, LanguageClient } from 'vscode-languageclient/node'; -import { EXTENSION_NAME } from '../constants'; -import { COMMAND_NAMES, disableBetterer, enableBetterer, initBetterer } from './commands'; -import { CLIENT_START_FAILED, SERVER_START_FAILED } from './error-messages'; -import { error } from './logger'; -import { getClientOptions, getServerOptions } from './options'; -import { BettererInvalidConfigRequest, BettererNoLibraryRequest, invalidConfig, noLibrary } from './requests'; -import { BettererStatusBar } from './status'; +import { EXTENSION_NAME } from '../constants.js'; +import { COMMAND_NAMES, disableBetterer, enableBetterer, initBetterer } from './commands/index.js'; +import { CLIENT_START_FAILED, SERVER_START_FAILED } from './error-messages.js'; +import { error } from './logger.js'; +import { getClientOptions, getServerOptions } from './options.js'; +import { BettererInvalidConfigRequest, BettererNoLibraryRequest, invalidConfig, noLibrary } from './requests/index.js'; +import { BettererStatusBar } from './status.js'; export async function activate(context: ExtensionContext): Promise { context.subscriptions.push( diff --git a/packages/extension/src/client/logger.ts b/packages/extension/src/client/logger.ts index 33880b4cf..0e814b7f7 100644 --- a/packages/extension/src/client/logger.ts +++ b/packages/extension/src/client/logger.ts @@ -1,5 +1,7 @@ +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import type { MessageItem } from 'vscode'; +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import { window } from 'vscode'; export function error(message: string): Thenable { diff --git a/packages/extension/src/client/options.ts b/packages/extension/src/client/options.ts index b81144614..17014c088 100644 --- a/packages/extension/src/client/options.ts +++ b/packages/extension/src/client/options.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import type { ExtensionContext } from 'vscode'; import type { ErrorHandler, @@ -6,12 +7,13 @@ import type { ServerOptions } from 'vscode-languageclient/node'; -import * as path from 'path'; +import path from 'node:path'; +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import { workspace } from 'vscode'; import { RevealOutputChannelOn, TransportKind } from 'vscode-languageclient/node'; -import { EXTENSION_NAME } from '../constants'; -import { getRuntime } from './settings'; +import { EXTENSION_NAME } from '../constants.js'; +import { getRuntime } from './settings.js'; export function getServerOptions(context: ExtensionContext): ServerOptions { const serverModule = context.asAbsolutePath(path.join('dist', 'server', 'server.js')); diff --git a/packages/extension/src/client/requests/index.ts b/packages/extension/src/client/requests/index.ts index 0f12ea4d9..f33c3c54a 100644 --- a/packages/extension/src/client/requests/index.ts +++ b/packages/extension/src/client/requests/index.ts @@ -1,2 +1,2 @@ -export { BettererInvalidConfigRequest, invalidConfig } from './invalid-config'; -export { BettererNoLibraryRequest, noLibrary } from './no-library'; +export { BettererInvalidConfigRequest, invalidConfig } from './invalid-config.js'; +export { BettererNoLibraryRequest, noLibrary } from './no-library.js'; diff --git a/packages/extension/src/client/requests/invalid-config.ts b/packages/extension/src/client/requests/invalid-config.ts index b4bb01125..1f830aab2 100644 --- a/packages/extension/src/client/requests/invalid-config.ts +++ b/packages/extension/src/client/requests/invalid-config.ts @@ -1,17 +1,19 @@ import type { LanguageClient } from 'vscode-languageclient/node'; +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import type { ExtensionContext } from 'vscode'; import { RequestType } from 'vscode-languageclient/node'; +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import { Uri, workspace } from 'vscode'; import { BETTERER_CONFIG_FILE_INVALID, BETTERER_CONFIG_FILE_INVALID_DETAILS, BETTERER_OUTPUT_CHANNEL -} from '../error-messages'; -import { info } from '../logger'; -import type { BettererRequestParams } from './types'; -import { getInvalidConfigState } from './state'; +} from '../error-messages.js'; +import { info } from '../logger.js'; +import type { BettererRequestParams } from './types.js'; +import { getInvalidConfigState } from './state.js'; export const BettererInvalidConfigRequest = new RequestType( 'betterer/invalidConfig' diff --git a/packages/extension/src/client/requests/no-library.ts b/packages/extension/src/client/requests/no-library.ts index 00398dec9..b6406358a 100644 --- a/packages/extension/src/client/requests/no-library.ts +++ b/packages/extension/src/client/requests/no-library.ts @@ -1,8 +1,10 @@ +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import type { ExtensionContext } from 'vscode'; import type { LanguageClient } from 'vscode-languageclient/node'; -import type { BettererRequestParams } from './types'; +import type { BettererRequestParams } from './types.js'; +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import { Uri, workspace } from 'vscode'; import { RequestType } from 'vscode-languageclient/node'; @@ -10,9 +12,9 @@ import { BETTERER_LIBRARY_NOT_INSTALLED, BETTERER_LIBRARY_NOT_INSTALLED_DETAILS, BETTERER_OUTPUT_CHANNEL -} from '../error-messages'; -import { info } from '../logger'; -import { getNoLibraryState } from './state'; +} from '../error-messages.js'; +import { info } from '../logger.js'; +import { getNoLibraryState } from './state.js'; export const BettererNoLibraryRequest = new RequestType('betterer/noLibrary'); diff --git a/packages/extension/src/client/requests/state.ts b/packages/extension/src/client/requests/state.ts index 193597139..9ee161c2d 100644 --- a/packages/extension/src/client/requests/state.ts +++ b/packages/extension/src/client/requests/state.ts @@ -1,5 +1,7 @@ +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import type { ExtensionContext, Uri } from 'vscode'; +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import { workspace } from 'vscode'; const NO_LIBRARY_STATE_KEY = 'noLibraryMessageAlreadyShown'; diff --git a/packages/extension/src/client/settings.ts b/packages/extension/src/client/settings.ts index 421dfab1e..86c206030 100644 --- a/packages/extension/src/client/settings.ts +++ b/packages/extension/src/client/settings.ts @@ -1,5 +1,7 @@ +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import type { Uri, WorkspaceConfiguration } from 'vscode'; +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import { workspace } from 'vscode'; export function getAlwaysShowStatus(): boolean { diff --git a/packages/extension/src/client/status.ts b/packages/extension/src/client/status.ts index cf723ad81..f4bfba5cd 100644 --- a/packages/extension/src/client/status.ts +++ b/packages/extension/src/client/status.ts @@ -1,14 +1,16 @@ +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import type { StatusBarItem } from 'vscode'; import type { LanguageClient } from 'vscode-languageclient/node'; +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import { StatusBarAlignment, window } from 'vscode'; import { NotificationType, State } from 'vscode-languageclient/node'; -import { EXTENSION_NAME } from '../constants'; -import { BettererStatus } from '../status'; -import { COMMAND_NAMES } from './commands'; -import { SERVER_PROCESS_ENDED, SERVER_PROCESS_SHUT_DOWN } from './error-messages'; -import { error } from './logger'; -import { getAlwaysShowStatus } from './settings'; +import { EXTENSION_NAME } from '../constants.js'; +import { BettererStatus } from '../status.js'; +import { COMMAND_NAMES } from './commands/index.js'; +import { SERVER_PROCESS_ENDED, SERVER_PROCESS_SHUT_DOWN } from './error-messages.js'; +import { error } from './logger.js'; +import { getAlwaysShowStatus } from './settings.js'; const SERVER_RUNNING = `${EXTENSION_NAME} is running.`; const SERVER_STOPPED = `${EXTENSION_NAME} stopped.`; diff --git a/packages/extension/src/server/betterer.ts b/packages/extension/src/server/betterer.ts index beaee2047..5959aeeb1 100644 --- a/packages/extension/src/server/betterer.ts +++ b/packages/extension/src/server/betterer.ts @@ -2,8 +2,8 @@ import type { betterer, BettererOptionsRunner, BettererRunner } from '@betterer/ import { Files } from 'vscode-languageserver/node'; -import { nodeRequire } from '../utils'; -import { trace } from './trace'; +import { nodeRequire } from '../utils.js'; +import { trace } from './trace.js'; type BettererLibrary = typeof betterer; interface BettererModule { diff --git a/packages/extension/src/server/config.ts b/packages/extension/src/server/config.ts index 2a87e2780..d052880f2 100644 --- a/packages/extension/src/server/config.ts +++ b/packages/extension/src/server/config.ts @@ -1,8 +1,8 @@ import type { BettererOptionsRunner } from '@betterer/betterer'; import type { RemoteWorkspace } from 'vscode-languageserver/node'; -import { promises as fs } from 'fs'; -import path from 'path'; +import { promises as fs } from 'node:fs'; +import path from 'node:path'; interface BettererExtensionConfig { cachePath: string; diff --git a/packages/extension/src/server/diagnostics.ts b/packages/extension/src/server/diagnostics.ts index 836669775..54adba688 100644 --- a/packages/extension/src/server/diagnostics.ts +++ b/packages/extension/src/server/diagnostics.ts @@ -10,12 +10,12 @@ import type { BettererConfig } from '@betterer/betterer'; -import path from 'path'; +import path from 'node:path'; import { DiagnosticSeverity } from 'vscode-languageserver/node'; -import { EXTENSION_NAME } from '../constants'; -import { info } from './console'; -import { getFilePath } from './path'; +import { EXTENSION_NAME } from '../constants.js'; +import { info } from './console.js'; +import { getFilePath } from './path.js'; type BettererFileDiagnostics = Record>; diff --git a/packages/extension/src/server/error-handler.ts b/packages/extension/src/server/error-handler.ts index 8764bf213..584e4f83b 100644 --- a/packages/extension/src/server/error-handler.ts +++ b/packages/extension/src/server/error-handler.ts @@ -2,7 +2,7 @@ import type { Connection } from 'vscode-languageserver/node'; import { NotificationType } from 'vscode-languageserver/node'; -import { isString } from '../utils'; +import { isString } from '../utils.js'; const BettererExitCalled = new NotificationType<[number, string]>('betterer/exitCalled'); @@ -31,12 +31,12 @@ export function createErrorHandler(connection: Connection): void { } } - // eslint-disable-next-line no-console + /* eslint-disable no-console -- fallback logging for test errors */ console.error('Uncaught exception received.'); if (message) { - // eslint-disable-next-line no-console console.error(message); } + /* eslint-enable no-console */ } catch { // Error handle died, uh oh. } diff --git a/packages/extension/src/server/path.ts b/packages/extension/src/server/path.ts index 4f072c8f2..1d0b463dc 100644 --- a/packages/extension/src/server/path.ts +++ b/packages/extension/src/server/path.ts @@ -2,7 +2,7 @@ import type { TextDocument } from 'vscode-languageserver-textdocument'; import { URI } from 'vscode-uri'; -import { isString } from '../utils'; +import { isString } from '../utils.js'; export function getFilePath(documentOrUri: URI | TextDocument | string): string | null { if (!documentOrUri) { diff --git a/packages/extension/src/server/requests/index.ts b/packages/extension/src/server/requests/index.ts index 97f20962b..ef44743ae 100644 --- a/packages/extension/src/server/requests/index.ts +++ b/packages/extension/src/server/requests/index.ts @@ -1,2 +1,2 @@ -export { BettererInvalidConfigRequest, isNoConfigError } from './invalid-config'; -export { BettererNoLibraryRequest } from './no-library'; +export { BettererInvalidConfigRequest, isNoConfigError } from './invalid-config.js'; +export { BettererNoLibraryRequest } from './no-library.js'; diff --git a/packages/extension/src/server/requests/invalid-config.ts b/packages/extension/src/server/requests/invalid-config.ts index e52deffa3..768ad05ec 100644 --- a/packages/extension/src/server/requests/invalid-config.ts +++ b/packages/extension/src/server/requests/invalid-config.ts @@ -1,6 +1,6 @@ import type { BettererError } from '@betterer/errors'; -import type { BettererRequestParams } from './types'; +import type { BettererRequestParams } from './types.js'; import { RequestType } from 'vscode-languageserver/node'; diff --git a/packages/extension/src/server/requests/no-library.ts b/packages/extension/src/server/requests/no-library.ts index 56c29a881..caf11463d 100644 --- a/packages/extension/src/server/requests/no-library.ts +++ b/packages/extension/src/server/requests/no-library.ts @@ -1,4 +1,4 @@ -import type { BettererRequestParams } from './types'; +import type { BettererRequestParams } from './types.js'; import { RequestType } from 'vscode-languageserver/node'; diff --git a/packages/extension/src/server/server.ts b/packages/extension/src/server/server.ts index 38c88d6c1..07a592a9e 100644 --- a/packages/extension/src/server/server.ts +++ b/packages/extension/src/server/server.ts @@ -11,10 +11,10 @@ import { import { TextDocument } from 'vscode-languageserver-textdocument'; import { debounce } from 'lodash'; -import { info, initConsole } from './console'; -import { createErrorHandler } from './error-handler'; -import { BettererValidationQueue } from './validation-queue'; -import { initTrace } from './trace'; +import { info, initConsole } from './console.js'; +import { createErrorHandler } from './error-handler.js'; +import { BettererValidationQueue } from './validation-queue.js'; +import { initTrace } from './trace.js'; const ENVIRONMENT_CHANGE_TIMEOUT = 100; diff --git a/packages/extension/src/server/status.ts b/packages/extension/src/server/status.ts index 016a53e34..be8addef4 100644 --- a/packages/extension/src/server/status.ts +++ b/packages/extension/src/server/status.ts @@ -1,7 +1,7 @@ -import type { BettererStatus } from '../status'; +import type { BettererStatus } from '../status.js'; import { NotificationType } from 'vscode-languageserver/node'; -import { EXTENSION_NAME } from '../constants'; +import { EXTENSION_NAME } from '../constants.js'; export const BettererStatusNotification = new NotificationType(`${EXTENSION_NAME}/status`); diff --git a/packages/extension/src/server/validation-queue.ts b/packages/extension/src/server/validation-queue.ts index de84123e5..ed3d52736 100644 --- a/packages/extension/src/server/validation-queue.ts +++ b/packages/extension/src/server/validation-queue.ts @@ -3,8 +3,8 @@ import type { TextDocument } from 'vscode-languageserver-textdocument'; import debounce from 'lodash.debounce'; -import { info } from './console'; -import { BettererValidator } from './validator'; +import { info } from './console.js'; +import { BettererValidator } from './validator.js'; const VALIDATE_TIMEOUT = 100; diff --git a/packages/extension/src/server/validator.ts b/packages/extension/src/server/validator.ts index 53208e423..3856d5947 100644 --- a/packages/extension/src/server/validator.ts +++ b/packages/extension/src/server/validator.ts @@ -9,14 +9,14 @@ import type { BettererError } from '@betterer/errors'; import type { Connection, TextDocuments } from 'vscode-languageserver/node'; import type { TextDocument } from 'vscode-languageserver-textdocument'; -import { BettererStatus } from '../status'; -import { getRunner, hasBetterer } from './betterer'; -import { getBettererOptions, getDebug, getEnabled } from './config'; -import { error, info } from './console'; -import { BettererInvalidConfigRequest, BettererNoLibraryRequest, isNoConfigError } from './requests'; -import { BettererStatusNotification } from './status'; -import { BettererDiagnostics } from './diagnostics'; -import { getFilePath } from './path'; +import { BettererStatus } from '../status.js'; +import { getRunner, hasBetterer } from './betterer.js'; +import { getBettererOptions, getDebug, getEnabled } from './config.js'; +import { error, info } from './console.js'; +import { BettererInvalidConfigRequest, BettererNoLibraryRequest, isNoConfigError } from './requests/index.js'; +import { BettererStatusNotification } from './status.js'; +import { BettererDiagnostics } from './diagnostics.js'; +import { getFilePath } from './path.js'; export class BettererValidator { private _diagnostics = new BettererDiagnostics(); diff --git a/packages/extension/test/runner/environment.ts b/packages/extension/test/runner/environment.ts index f22085c66..caeb39fab 100644 --- a/packages/extension/test/runner/environment.ts +++ b/packages/extension/test/runner/environment.ts @@ -1,8 +1,9 @@ import NodeEnvironment from 'jest-environment-node'; -import { VSCodeJestGlobal } from './vscode'; +import type { VSCodeJestGlobal } from './vscode'; -import * as vscode from 'vscode'; +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions +import vscode from 'vscode'; export default class VsCodeEnvironment extends NodeEnvironment { constructor(...args: ConstructorParameters) { diff --git a/packages/extension/test/runner/fixture.ts b/packages/extension/test/runner/fixture.ts index bd2f2504d..e95222c77 100644 --- a/packages/extension/test/runner/fixture.ts +++ b/packages/extension/test/runner/fixture.ts @@ -1,5 +1,7 @@ -import { createFixtureDirectoryΔ, FixtureFileSystemFiles, Fixture } from '@betterer/fixture'; -import assert from 'assert'; +import type { FixtureFileSystemFiles, Fixture } from '@betterer/fixture'; + +import { createFixtureDirectoryΔ } from '@betterer/fixture'; +import assert from 'node:assert'; import { vscode } from './vscode'; diff --git a/packages/extension/test/runner/index.ts b/packages/extension/test/runner/index.ts index 23aaaa857..7ff09992b 100644 --- a/packages/extension/test/runner/index.ts +++ b/packages/extension/test/runner/index.ts @@ -1,5 +1,5 @@ import { createFixtureDirectoryΔ } from '@betterer/fixture'; -import * as path from 'path'; +import path from 'node:path'; import { runTests } from 'vscode-test'; async function main() { diff --git a/packages/extension/test/runner/run.ts b/packages/extension/test/runner/run.ts index 68e472b55..d6f065fb2 100644 --- a/packages/extension/test/runner/run.ts +++ b/packages/extension/test/runner/run.ts @@ -1,6 +1,6 @@ import { BettererError } from '@betterer/errors'; import { runCLI } from '@jest/core'; -import * as path from 'path'; +import path from 'node:path'; const ARGS = { _: [], $0: '' }; diff --git a/packages/extension/test/runner/vscode.ts b/packages/extension/test/runner/vscode.ts index f1f35131c..85c53c5d5 100644 --- a/packages/extension/test/runner/vscode.ts +++ b/packages/extension/test/runner/vscode.ts @@ -1,4 +1,6 @@ import type { Global } from '@jest/types'; + +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions import type * as vscodeNamespace from 'vscode'; export type VSCodeJestGlobal = typeof Global & { diff --git a/packages/extension/test/test.e2e-spec.ts b/packages/extension/test/test.e2e-spec.ts index 722db0ccf..efc6ee3bf 100644 --- a/packages/extension/test/test.e2e-spec.ts +++ b/packages/extension/test/test.e2e-spec.ts @@ -1,6 +1,8 @@ -import { BettererPackageJSON } from '@betterer/cli'; -import assert from 'assert'; -import { Diagnostic, Uri } from 'vscode'; +import type { BettererPackageJSON } from '@betterer/cli'; +// eslint-disable-next-line import/no-unresolved -- vscode is an implicit dependency for extensions +import type { Diagnostic, Uri } from 'vscode'; + +import assert from 'node:assert'; import { vscode, createFixture } from './runner'; diff --git a/packages/fixture/src/fixture.ts b/packages/fixture/src/fixture.ts index ebd6d0c20..70678d228 100644 --- a/packages/fixture/src/fixture.ts +++ b/packages/fixture/src/fixture.ts @@ -1,12 +1,12 @@ import type { BettererRunSummaries, BettererTestNames } from '@betterer/betterer'; -import type { Fixture, FixtureFactory, FixtureFileSystemFiles, FixtureOptions } from './types'; +import type { Fixture, FixtureFactory, FixtureFileSystemFiles, FixtureOptions } from './types.js'; import { promises as fs } from 'graceful-fs'; -import * as path from 'path'; +import path from 'node:path'; -import { createFixtureFS } from './fs'; -import { createFixtureLogs } from './logging'; +import { createFixtureFS } from './fs.js'; +import { createFixtureLogs } from './logging.js'; /** @internal Definitely not stable! Please don't use! */ export async function createFixtureDirectoryΔ(fixturesPath: string): Promise { diff --git a/packages/fixture/src/fs.ts b/packages/fixture/src/fs.ts index 3b0f1b82b..0890db91b 100644 --- a/packages/fixture/src/fs.ts +++ b/packages/fixture/src/fs.ts @@ -1,8 +1,8 @@ -import type { FixtureFileSystem, FixtureFileSystemFiles, Paths } from './types'; +import type { FixtureFileSystem, FixtureFileSystemFiles, Paths } from './types.js'; import { ensureDir, ensureFile, remove } from 'fs-extra'; import { promises as fs } from 'graceful-fs'; -import * as path from 'path'; +import path from 'node:path'; const DEFAULT_CACHE_PATH = './.betterer.cache'; const DEFAULT_CONFIG_PATH = './.betterer'; diff --git a/packages/fixture/src/index.ts b/packages/fixture/src/index.ts index feeeace5f..1b9ca5dce 100644 --- a/packages/fixture/src/index.ts +++ b/packages/fixture/src/index.ts @@ -1,6 +1,6 @@ -export { createFixtureDirectoryΔ } from './fixture'; -export { Fixture, FixtureFactory, FixtureFileSystem, FixtureFileSystemFiles, FixtureOptions, Paths } from './types'; +export { createFixtureDirectoryΔ } from './fixture.js'; +export { Fixture, FixtureFactory, FixtureFileSystem, FixtureFileSystemFiles, FixtureOptions, Paths } from './types.js'; -import './stubs'; +import './stubs.js'; -export { persist } from './persist'; +export { persist } from './persist.js'; diff --git a/packages/fixture/src/logging.ts b/packages/fixture/src/logging.ts index 89728e1f6..194a220fb 100644 --- a/packages/fixture/src/logging.ts +++ b/packages/fixture/src/logging.ts @@ -1,7 +1,7 @@ -import type { FixtureLogs, FixtureOptions } from './types'; +import type { FixtureLogs, FixtureOptions } from './types.js'; import ansiRegex from 'ansi-regex'; -import * as path from 'path'; +import path from 'node:path'; const ANSI_REGEX = ansiRegex(); const PROJECT_REGEXP = new RegExp(normalisePaths(process.cwd()), 'g'); diff --git a/packages/fixture/src/persist.ts b/packages/fixture/src/persist.ts index 427aeda58..5f94d9481 100644 --- a/packages/fixture/src/persist.ts +++ b/packages/fixture/src/persist.ts @@ -1,5 +1,5 @@ -import path from 'path'; -import { promises as fs } from 'fs'; +import path from 'node:path'; +import { promises as fs } from 'node:fs'; export interface FixturePersist { increment(): Promise; diff --git a/packages/fixture/src/stubs.ts b/packages/fixture/src/stubs.ts index 13dfd1ef7..ae382b273 100644 --- a/packages/fixture/src/stubs.ts +++ b/packages/fixture/src/stubs.ts @@ -1,4 +1,4 @@ -import util from 'util'; +import util from 'node:util'; util.inspect = Object.assign( function (): string { diff --git a/packages/logger/src/code.ts b/packages/logger/src/code.ts index f7536de23..4513a3cdb 100644 --- a/packages/logger/src/code.ts +++ b/packages/logger/src/code.ts @@ -1,8 +1,8 @@ -import type { BettererLoggerCodeInfo } from './types'; +import type { BettererLoggerCodeInfo } from './types.js'; import { codeFrameColumns } from '@babel/code-frame'; import { LinesAndColumns } from 'lines-and-columns'; -import * as path from 'path'; +import path from 'node:path'; const IS_JS_REGEXP = /.t|jsx?$/; diff --git a/packages/logger/src/index.ts b/packages/logger/src/index.ts index a1b0171eb..a25827734 100644 --- a/packages/logger/src/index.ts +++ b/packages/logger/src/index.ts @@ -4,9 +4,9 @@ * @packageDocumentation */ -export { code__ } from './code'; -export { diff__, diffStrings__ } from './diff'; -export { log__ } from './log'; +export { code__ } from './code.js'; +export { diff__, diffStrings__ } from './diff.js'; +export { log__ } from './log.js'; export { BettererLogger, BettererLog, @@ -16,4 +16,4 @@ export { BettererLoggerCodeInfo, BettererLoggerMessage, BettererLoggerMessages -} from './types'; +} from './types.js'; diff --git a/packages/logger/src/log.ts b/packages/logger/src/log.ts index b502d4250..d165747ef 100644 --- a/packages/logger/src/log.ts +++ b/packages/logger/src/log.ts @@ -1,4 +1,4 @@ -import type { BettererLoggerCodeInfo, BettererLoggerMessage, BettererLogger, BettererLogs } from './types'; +import type { BettererLoggerCodeInfo, BettererLoggerMessage, BettererLogger, BettererLogs } from './types.js'; /** * @internal This could change at any point! Please don't use! diff --git a/packages/regexp/src/index.ts b/packages/regexp/src/index.ts index 612f3b264..87d64b356 100644 --- a/packages/regexp/src/index.ts +++ b/packages/regexp/src/index.ts @@ -5,4 +5,4 @@ * @packageDocumentation */ -export { regexp } from './regexp'; +export { regexp } from './regexp.js'; diff --git a/packages/regexp/src/regexp.ts b/packages/regexp/src/regexp.ts index 7f57ff9bc..9f4e20f95 100644 --- a/packages/regexp/src/regexp.ts +++ b/packages/regexp/src/regexp.ts @@ -1,6 +1,6 @@ import { BettererFileTest } from '@betterer/betterer'; import { BettererError } from '@betterer/errors'; -import { promises as fs } from 'fs'; +import { promises as fs } from 'node:fs'; /** * @public Use this test to incrementally remove {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp | `RegExp` } diff --git a/packages/reporter/src/components/config/index.ts b/packages/reporter/src/components/config/index.ts index d2f9d0633..6e09ed482 100644 --- a/packages/reporter/src/components/config/index.ts +++ b/packages/reporter/src/components/config/index.ts @@ -1 +1 @@ -export { Config, ConfigEditField, ConfigProps } from './Config'; +export { Config, ConfigEditField, ConfigProps } from './Config.js'; diff --git a/packages/reporter/src/components/default/index.ts b/packages/reporter/src/components/default/index.ts index c4a386c11..282a63e6a 100644 --- a/packages/reporter/src/components/default/index.ts +++ b/packages/reporter/src/components/default/index.ts @@ -1 +1 @@ -export { DefaultReporter } from './DefaultReporter'; +export { DefaultReporter } from './DefaultReporter.js'; diff --git a/packages/reporter/src/components/index.ts b/packages/reporter/src/components/index.ts index db21a1da4..84a15dcfd 100644 --- a/packages/reporter/src/components/index.ts +++ b/packages/reporter/src/components/index.ts @@ -1,2 +1,2 @@ -export { Error, ErrorProps } from './Error'; -export { Reporter } from './Reporter'; +export { Error, ErrorProps } from './Error.js'; +export { Reporter } from './Reporter.js'; diff --git a/packages/reporter/src/components/suite/deltas/delta.ts b/packages/reporter/src/components/suite/deltas/delta.ts index d42d18b27..26469cd08 100644 --- a/packages/reporter/src/components/suite/deltas/delta.ts +++ b/packages/reporter/src/components/suite/deltas/delta.ts @@ -1,6 +1,6 @@ import type { BettererRunSummary } from '@betterer/betterer'; -import { fileTestDelta } from './file-test-delta'; +import { fileTestDelta } from './file-test-delta.js'; export function getDelta(runSummary: BettererRunSummary): string { if (runSummary.filePaths != null) { diff --git a/packages/reporter/src/components/suite/deltas/index.ts b/packages/reporter/src/components/suite/deltas/index.ts index c9d795c27..b2583aba3 100644 --- a/packages/reporter/src/components/suite/deltas/index.ts +++ b/packages/reporter/src/components/suite/deltas/index.ts @@ -1 +1 @@ -export { getDelta } from './delta'; +export { getDelta } from './delta.js'; diff --git a/packages/reporter/src/components/suite/index.ts b/packages/reporter/src/components/suite/index.ts index 13cbfe670..1cfdfafb7 100644 --- a/packages/reporter/src/components/suite/index.ts +++ b/packages/reporter/src/components/suite/index.ts @@ -1 +1 @@ -export { Suite, SuiteProps } from './Suite'; +export { Suite, SuiteProps } from './Suite.js'; diff --git a/packages/reporter/src/components/suite/tasks.ts b/packages/reporter/src/components/suite/tasks.ts index e3a91846d..c8c9527b3 100644 --- a/packages/reporter/src/components/suite/tasks.ts +++ b/packages/reporter/src/components/suite/tasks.ts @@ -16,10 +16,10 @@ import { testSkipped, testUpdated, testWorse -} from '../../messages'; -import type { BettererReporterRun } from '../../types'; -import { quote } from '../../utils'; -import { getDelta } from './deltas'; +} from '../../messages.js'; +import type { BettererReporterRun } from '../../types.js'; +import { quote } from '../../utils.js'; +import { getDelta } from './deltas/index.js'; const TASKS = new Map(); diff --git a/packages/reporter/src/components/watch/index.ts b/packages/reporter/src/components/watch/index.ts index 4afb91621..c52544b56 100644 --- a/packages/reporter/src/components/watch/index.ts +++ b/packages/reporter/src/components/watch/index.ts @@ -1 +1 @@ -export { WatchReporter } from './WatchReporter'; +export { WatchReporter } from './WatchReporter.js'; diff --git a/packages/reporter/src/components/watch/useControls.ts b/packages/reporter/src/components/watch/useControls.ts index 6b7a1945a..3b05c75b4 100644 --- a/packages/reporter/src/components/watch/useControls.ts +++ b/packages/reporter/src/components/watch/useControls.ts @@ -1,6 +1,6 @@ import type { BettererContext } from '@betterer/betterer'; -import type { ConfigEditField } from '../config'; +import type { ConfigEditField } from '../config/index.js'; import { useInput, useState, useStdin } from '@betterer/render'; diff --git a/packages/reporter/src/index.ts b/packages/reporter/src/index.ts index ab72401af..1aee47015 100644 --- a/packages/reporter/src/index.ts +++ b/packages/reporter/src/index.ts @@ -4,4 +4,4 @@ * @packageDocumentation */ -export { reporter } from './reporter'; +export { reporter } from './reporter.js'; diff --git a/packages/reporter/src/state/actions.ts b/packages/reporter/src/state/actions.ts index 6acd7ec37..494bc7f38 100644 --- a/packages/reporter/src/state/actions.ts +++ b/packages/reporter/src/state/actions.ts @@ -1,5 +1,4 @@ -import type { BettererSuiteSummary, BettererContextSummary } from '@betterer/betterer'; -import type { BettererSuite } from '@betterer/betterer'; +import type { BettererSuiteSummary, BettererContextSummary, BettererSuite } from '@betterer/betterer'; export const CONTEXT_END = 'contextEnd'; export const SUITE_START = 'suiteStart'; diff --git a/packages/reporter/src/state/index.ts b/packages/reporter/src/state/index.ts index 60fd9d3d2..fddf0c3fd 100644 --- a/packages/reporter/src/state/index.ts +++ b/packages/reporter/src/state/index.ts @@ -9,6 +9,6 @@ export { contextEnd, suiteStart, suiteEnd -} from './actions'; -export { createStore } from './store'; -export { BettererReporterState } from './types'; +} from './actions.js'; +export { createStore } from './store.js'; +export { BettererReporterState } from './types.js'; diff --git a/packages/reporter/src/state/store.ts b/packages/reporter/src/state/store.ts index 390c3e15e..e946eca0b 100644 --- a/packages/reporter/src/state/store.ts +++ b/packages/reporter/src/state/store.ts @@ -1,9 +1,9 @@ import type { BettererContext } from '@betterer/betterer'; -import type { BettererReporterAction } from './actions'; -import type { BettererReporterDispatch, BettererReporterState } from './types'; +import type { BettererReporterAction } from './actions.js'; +import type { BettererReporterDispatch, BettererReporterState } from './types.js'; -import { CONTEXT_END, SUITE_END, SUITE_START } from './actions'; +import { CONTEXT_END, SUITE_END, SUITE_START } from './actions.js'; export function createStore(context: BettererContext): BettererReporterDispatch { const reducer = (state: BettererReporterState, action: BettererReporterAction): BettererReporterState => { diff --git a/packages/reporter/src/state/types.ts b/packages/reporter/src/state/types.ts index a38ea12ee..afa937e45 100644 --- a/packages/reporter/src/state/types.ts +++ b/packages/reporter/src/state/types.ts @@ -1,7 +1,7 @@ import type { BettererContext, BettererSuite, BettererSuiteSummary, BettererContextSummary } from '@betterer/betterer'; import type { BettererTasksDone } from '@betterer/tasks'; -import type { BettererReporterAction } from './actions'; +import type { BettererReporterAction } from './actions.js'; export interface BettererReporterState { context: BettererContext; diff --git a/packages/reporter/src/types.ts b/packages/reporter/src/types.ts index a553d9bfb..e591c2610 100644 --- a/packages/reporter/src/types.ts +++ b/packages/reporter/src/types.ts @@ -1,7 +1,7 @@ import type { BettererRun, BettererRunSummary } from '@betterer/betterer'; import type { BettererTasksDone } from '@betterer/tasks'; -import type { BettererReporterAction } from './state'; +import type { BettererReporterAction } from './state/index.js'; export interface BettererReporterRenderer { render: (action?: BettererReporterAction, done?: BettererTasksDone) => void; diff --git a/packages/stylelint/src/index.ts b/packages/stylelint/src/index.ts index 6f8b2d908..a6f9d06c1 100644 --- a/packages/stylelint/src/index.ts +++ b/packages/stylelint/src/index.ts @@ -4,4 +4,4 @@ * @packageDocumentation */ -export { stylelint } from './stylelint'; +export { stylelint } from './stylelint.js'; diff --git a/packages/stylelint/src/stylelint.ts b/packages/stylelint/src/stylelint.ts index 3d9a29573..ba47e81b3 100644 --- a/packages/stylelint/src/stylelint.ts +++ b/packages/stylelint/src/stylelint.ts @@ -2,7 +2,7 @@ import type { Configuration } from 'stylelint'; import { BettererFileTest } from '@betterer/betterer'; import { BettererError } from '@betterer/errors'; -import { promises as fs } from 'fs'; +import { promises as fs } from 'node:fs'; import { lint } from 'stylelint'; /** diff --git a/packages/tasks/src/index.ts b/packages/tasks/src/index.ts index 8823d3d93..b022bb03e 100644 --- a/packages/tasks/src/index.ts +++ b/packages/tasks/src/index.ts @@ -6,8 +6,8 @@ * @packageDocumentation */ -export { BettererErrorLog, BettererErrorLogProps } from './error-log'; -export { BettererLogo } from './logo'; +export { BettererErrorLog, BettererErrorLogProps } from './error-log.js'; +export { BettererLogo } from './logo.js'; export { BettererTask, BettererTaskLogger, @@ -17,4 +17,4 @@ export { BettererTasksLoggerProps, BettererTasksState, BettererTasksStatusUpdate -} from './tasks/public'; +} from './tasks/public.js'; diff --git a/packages/tasks/src/tasks/public.ts b/packages/tasks/src/tasks/public.ts index 93b562d56..7404958ee 100644 --- a/packages/tasks/src/tasks/public.ts +++ b/packages/tasks/src/tasks/public.ts @@ -1,4 +1,4 @@ -export { BettererTasksState } from './useTasksState'; -export { BettererTaskLogger, BettererTaskLoggerProps } from './TaskLogger'; -export { BettererTasksLogger, BettererTasksLoggerProps } from './TasksLogger'; -export { BettererTask, BettererTasksDone, BettererTasksStatusUpdate } from './types'; +export { BettererTasksState } from './useTasksState.js'; +export { BettererTaskLogger, BettererTaskLoggerProps } from './TaskLogger.js'; +export { BettererTasksLogger, BettererTasksLoggerProps } from './TasksLogger.js'; +export { BettererTask, BettererTasksDone, BettererTasksStatusUpdate } from './types.js'; diff --git a/packages/tasks/src/tasks/types.ts b/packages/tasks/src/tasks/types.ts index a65097ac0..cc3e98313 100644 --- a/packages/tasks/src/tasks/types.ts +++ b/packages/tasks/src/tasks/types.ts @@ -1,7 +1,7 @@ import type { BettererLogger } from '@betterer/logger'; import type { ForegroundColor } from 'chalk'; -import type { BettererTasksState } from './useTasksState'; +import type { BettererTasksState } from './useTasksState.js'; export type BettererTaskColour = typeof ForegroundColor; diff --git a/packages/tasks/src/tasks/useTaskState.ts b/packages/tasks/src/tasks/useTaskState.ts index 371490700..86a7d6368 100644 --- a/packages/tasks/src/tasks/useTaskState.ts +++ b/packages/tasks/src/tasks/useTaskState.ts @@ -1,8 +1,8 @@ -import type { BettererTaskLog, BettererTaskLogs } from './types'; +import type { BettererTaskLog, BettererTaskLogs } from './types.js'; import { useReducer, useRef } from '@betterer/render'; -import { useTasks } from './useTasksState'; +import { useTasks } from './useTasksState.js'; interface BettererTaskState { done: boolean; diff --git a/packages/tasks/src/tasks/useTasksState.ts b/packages/tasks/src/tasks/useTasksState.ts index fd620f28e..a94238f67 100644 --- a/packages/tasks/src/tasks/useTasksState.ts +++ b/packages/tasks/src/tasks/useTasksState.ts @@ -1,7 +1,7 @@ import { BettererError } from '@betterer/errors'; import { createContext, useContext, useReducer, useRef } from '@betterer/render'; -import { getPreciseTime } from '../utils'; +import { getPreciseTime } from '../utils.js'; /** * @public The state of the running tasks. `endTime` will only be present when there are no more diff --git a/packages/tasks/src/tasks/useTimer.ts b/packages/tasks/src/tasks/useTimer.ts index e46bd42b6..f303ace4a 100644 --- a/packages/tasks/src/tasks/useTimer.ts +++ b/packages/tasks/src/tasks/useTimer.ts @@ -1,5 +1,5 @@ import { useCallback, useEffect, useRef, useState } from '@betterer/render'; -import { getPreciseTime } from '../utils'; +import { getPreciseTime } from '../utils.js'; const DEFAULT_TASK_TIME_INTERVAL = 100; diff --git a/packages/tasks/src/utils.ts b/packages/tasks/src/utils.ts index 5292fb97a..5c75150af 100644 --- a/packages/tasks/src/utils.ts +++ b/packages/tasks/src/utils.ts @@ -1,4 +1,4 @@ -import { performance } from 'perf_hooks'; +import { performance } from 'node:perf_hooks'; export function getTime(): number { return Date.now(); diff --git a/packages/tsquery/src/index.ts b/packages/tsquery/src/index.ts index bf706e289..9d19b2ba0 100644 --- a/packages/tsquery/src/index.ts +++ b/packages/tsquery/src/index.ts @@ -4,4 +4,4 @@ * @packageDocumentation */ -export { tsquery } from './tsquery'; +export { tsquery } from './tsquery.js'; diff --git a/packages/tsquery/src/tsquery.ts b/packages/tsquery/src/tsquery.ts index 34c95154b..c6322d982 100644 --- a/packages/tsquery/src/tsquery.ts +++ b/packages/tsquery/src/tsquery.ts @@ -1,7 +1,7 @@ import { BettererFileTest } from '@betterer/betterer'; import { BettererError } from '@betterer/errors'; import { tsquery as tsq } from '@phenomnomnominal/tsquery'; -import { promises as fs } from 'fs'; +import { promises as fs } from 'node:fs'; /** * @public Use this test to incrementally remove **TSQuery** matches from your codebase. See the {@link https://github.com/phenomnomnominal/tsquery | **TSQuery** documentation } diff --git a/packages/typescript/src/index.ts b/packages/typescript/src/index.ts index dd913edf7..b1170bf16 100644 --- a/packages/typescript/src/index.ts +++ b/packages/typescript/src/index.ts @@ -4,4 +4,4 @@ * @packageDocumentation */ -export { typescript } from './typescript'; +export { typescript } from './typescript.js'; diff --git a/packages/typescript/src/typescript.ts b/packages/typescript/src/typescript.ts index 4d9e81445..676ba0d86 100644 --- a/packages/typescript/src/typescript.ts +++ b/packages/typescript/src/typescript.ts @@ -2,7 +2,7 @@ import type { BettererFileGlobs, BettererFilePaths } from '@betterer/betterer'; import { BettererFileTest } from '@betterer/betterer'; import { BettererError } from '@betterer/errors'; -import * as path from 'path'; +import path from 'node:path'; import * as ts from 'typescript'; const NEW_LINE = '\n'; diff --git a/test/angular.spec.ts b/test/angular.spec.ts index f0029e852..9d256df6a 100644 --- a/test/angular.spec.ts +++ b/test/angular.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/api/src/index.tsx b/test/api/src/index.tsx index c4d0d30bb..6790a8050 100644 --- a/test/api/src/index.tsx +++ b/test/api/src/index.tsx @@ -6,7 +6,7 @@ import { React, render, useCallback } from '@betterer/render'; import { BettererTaskLogger, BettererTasksLogger } from '@betterer/tasks'; import { createWorkerRequire } from '@phenomnomnominal/worker-require'; -import type { TestPackageAPIWorker } from './types'; +import type { TestPackageAPIWorker } from './types.js'; const testPackageApi = createWorkerRequire('./test-package-api', { cache: false }); diff --git a/test/api/src/test-package-api.ts b/test/api/src/test-package-api.ts index cf1ac2f4e..a1869fd10 100644 --- a/test/api/src/test-package-api.ts +++ b/test/api/src/test-package-api.ts @@ -2,8 +2,8 @@ import { BettererError } from '@betterer/errors'; import type { BettererLogger } from '@betterer/logger'; import { diffStrings__ } from '@betterer/logger'; import { Extractor, ExtractorConfig } from '@microsoft/api-extractor'; -import { promises as fs } from 'fs'; -import * as path from 'path'; +import { promises as fs } from 'node:fs'; +import path from 'node:path'; const EXCLUDED_PACKAGES = ['docgen', 'extension', 'fixture', 'render']; const EXTRACTION_EXTENSION = '.api.md'; diff --git a/test/better-result.spec.ts b/test/better-result.spec.ts index 682e8312d..e0f912343 100644 --- a/test/better-result.spec.ts +++ b/test/better-result.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/better-test-change.spec.ts b/test/better-test-change.spec.ts index db199b2c0..714bac584 100644 --- a/test/better-test-change.spec.ts +++ b/test/better-test-change.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/cache-ci.spec.ts b/test/cache-ci.spec.ts index 757f6a2ce..e71da36f4 100644 --- a/test/cache-ci.spec.ts +++ b/test/cache-ci.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/cache-deleted-file.spec.ts b/test/cache-deleted-file.spec.ts index 4f5653b23..7de2bdb9d 100644 --- a/test/cache-deleted-file.spec.ts +++ b/test/cache-deleted-file.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/cache-faster.spec.ts b/test/cache-faster.spec.ts index 553c7d5ca..d90e8c5f8 100644 --- a/test/cache-faster.spec.ts +++ b/test/cache-faster.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/cache-path.spec.ts b/test/cache-path.spec.ts index 3786231bc..e4fe9262c 100644 --- a/test/cache-path.spec.ts +++ b/test/cache-path.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/cache-worse.spec.ts b/test/cache-worse.spec.ts index f5a379bfd..8282f1ee7 100644 --- a/test/cache-worse.spec.ts +++ b/test/cache-worse.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/cache.spec.ts b/test/cache.spec.ts index 7e94fa709..8dc6dc5ad 100644 --- a/test/cache.spec.ts +++ b/test/cache.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/cli/ci-complete.spec.ts b/test/cli/ci-complete.spec.ts index 6279fda27..5735cd158 100644 --- a/test/cli/ci-complete.spec.ts +++ b/test/cli/ci-complete.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; const ARGV = ['node', './bin/betterer']; diff --git a/test/cli/ci-diff.spec.ts b/test/cli/ci-diff.spec.ts index fa6cc2f90..22b33abfa 100644 --- a/test/cli/ci-diff.spec.ts +++ b/test/cli/ci-diff.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; const ARGV = ['node', './bin/betterer']; diff --git a/test/cli/ci-env-variable.spec.ts b/test/cli/ci-env-variable.spec.ts index abbb3c590..311a933c7 100644 --- a/test/cli/ci-env-variable.spec.ts +++ b/test/cli/ci-env-variable.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; const ARGV = ['node', './bin/betterer']; diff --git a/test/cli/ci-worse.spec.ts b/test/cli/ci-worse.spec.ts index 4bbfde102..38b25a1a2 100644 --- a/test/cli/ci-worse.spec.ts +++ b/test/cli/ci-worse.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; const ARGV = ['node', './bin/betterer']; diff --git a/test/cli/filter-negative.spec.ts b/test/cli/filter-negative.spec.ts index abbe40add..0e182bcb6 100644 --- a/test/cli/filter-negative.spec.ts +++ b/test/cli/filter-negative.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; const ARGV = ['node', './bin/betterer']; diff --git a/test/cli/filter.spec.ts b/test/cli/filter.spec.ts index 61bd340bb..60dfd1827 100644 --- a/test/cli/filter.spec.ts +++ b/test/cli/filter.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; const ARGV = ['node', './bin/betterer']; diff --git a/test/cli/init-js.spec.ts b/test/cli/init-js.spec.ts index 72be171cb..36563d477 100644 --- a/test/cli/init-js.spec.ts +++ b/test/cli/init-js.spec.ts @@ -1,5 +1,6 @@ import type { BettererPackageJSON } from '@betterer/cli'; +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; const ARGV = ['node', './bin/betterer']; diff --git a/test/cli/init-mulitple.spec.ts b/test/cli/init-mulitple.spec.ts index ca8af48b4..ee92d0c88 100644 --- a/test/cli/init-mulitple.spec.ts +++ b/test/cli/init-mulitple.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; const ARGV = ['node', './bin/betterer']; diff --git a/test/cli/init-ts.spec.ts b/test/cli/init-ts.spec.ts index d7918f024..a4313713f 100644 --- a/test/cli/init-ts.spec.ts +++ b/test/cli/init-ts.spec.ts @@ -1,5 +1,6 @@ import type { BettererPackageJSON } from '@betterer/cli'; +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; const ARGV = ['node', './bin/betterer']; diff --git a/test/cli/logo-show.spec.ts b/test/cli/logo-show.spec.ts index 0a7724468..72561f65a 100644 --- a/test/cli/logo-show.spec.ts +++ b/test/cli/logo-show.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; const ARGV = ['node', './bin/betterer']; diff --git a/test/cli/merge-contents.spec.ts b/test/cli/merge-contents.spec.ts index 33bd7c1e1..c83bb1058 100644 --- a/test/cli/merge-contents.spec.ts +++ b/test/cli/merge-contents.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; const ARGV = ['node', './bin/betterer']; diff --git a/test/cli/merge-path.spec.ts b/test/cli/merge-path.spec.ts index 7bb2b9699..54adee464 100644 --- a/test/cli/merge-path.spec.ts +++ b/test/cli/merge-path.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; const ARGV = ['node', './bin/betterer']; diff --git a/test/cli/precommit-add.spec.ts b/test/cli/precommit-add.spec.ts index 51a69fe76..a472bcbb1 100644 --- a/test/cli/precommit-add.spec.ts +++ b/test/cli/precommit-add.spec.ts @@ -1,5 +1,6 @@ -import simpleGit from 'simple-git'; +import { simpleGit } from 'simple-git'; +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; const ARGV = ['node', './bin/betterer']; @@ -46,6 +47,8 @@ export default { await cli__(fixturePath, [...ARGV, 'start'], false); + expect(process.exitCode).toBeUndefined(); + await writeFile(indexPath, `const a = 'a';\nconst one = 1;\nconsole.log(one + one);`); await cli__(fixturePath, [...ARGV, 'precommit']); diff --git a/test/cli/precommit-specific-file.spec.ts b/test/cli/precommit-specific-file.spec.ts index 7e3c3ca7e..7d52f7e57 100644 --- a/test/cli/precommit-specific-file.spec.ts +++ b/test/cli/precommit-specific-file.spec.ts @@ -1,5 +1,6 @@ -import simpleGit from 'simple-git'; +import { simpleGit } from 'simple-git'; +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; const ARGV = ['node', './bin/betterer']; diff --git a/test/cli/precommit-worse.spec.ts b/test/cli/precommit-worse.spec.ts index 16e1fec5b..aa10b56b9 100644 --- a/test/cli/precommit-worse.spec.ts +++ b/test/cli/precommit-worse.spec.ts @@ -1,5 +1,6 @@ -import simpleGit from 'simple-git'; +import { simpleGit } from 'simple-git'; +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; const ARGV = ['node', './bin/betterer']; diff --git a/test/cli/results-file-test.spec.ts b/test/cli/results-file-test.spec.ts index 7fa423462..3bcb97ee6 100644 --- a/test/cli/results-file-test.spec.ts +++ b/test/cli/results-file-test.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; const ARGV = ['node', './bin/betterer']; diff --git a/test/cli/results-test.spec.ts b/test/cli/results-test.spec.ts index 396837720..0fed955ae 100644 --- a/test/cli/results-test.spec.ts +++ b/test/cli/results-test.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; const ARGV = ['node', './bin/betterer']; diff --git a/test/cli/upgrade.spec.ts b/test/cli/upgrade.spec.ts index 8ff4523ee..1bf1e52a2 100644 --- a/test/cli/upgrade.spec.ts +++ b/test/cli/upgrade.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; const ARGV = ['node', './bin/betterer', 'upgrade']; diff --git a/test/cli/version.spec.ts b/test/cli/version.spec.ts index 9b6a2d6d8..8aa66e766 100644 --- a/test/cli/version.spec.ts +++ b/test/cli/version.spec.ts @@ -1,11 +1,11 @@ import type { BettererPackageJSON } from '@betterer/cli'; -import { execSync } from 'child_process'; -import * as path from 'path'; +import { execSync } from 'node:child_process'; +import path from 'node:path'; describe('betterer cli', () => { it('should print the version', () => { - // eslint-disable-next-line @typescript-eslint/no-var-requires + // eslint-disable-next-line @typescript-eslint/no-var-requires -- migrating away from CJS requires const { version } = require('../../packages/cli/package.json') as BettererPackageJSON; const binPath = path.resolve(__dirname, '../../packages/cli/bin/betterer'); diff --git a/test/complete.spec.ts b/test/complete.spec.ts index cb82bfb7c..b29401864 100644 --- a/test/complete.spec.ts +++ b/test/complete.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/config-invalid.spec.ts b/test/config-invalid.spec.ts index 7fb7ab279..d4022201c 100644 --- a/test/config-invalid.spec.ts +++ b/test/config-invalid.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/config-missing.spec.ts b/test/config-missing.spec.ts index 99c1c8f68..5d4dc3c35 100644 --- a/test/config-missing.spec.ts +++ b/test/config-missing.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/config-modes.spec.ts b/test/config-modes.spec.ts index 8daed4412..2d575fdb8 100644 --- a/test/config-modes.spec.ts +++ b/test/config-modes.spec.ts @@ -5,8 +5,7 @@ function noop(options: unknown): unknown { } describe('betterer modes', () => { - // No need to assert, just testing the types: - // eslint-disable-next-line jest/expect-expect + // eslint-disable-next-line jest/expect-expect -- no need to assert, just testing the types it('handles options for running Betterer', () => { const ci: BettererOptionsStart = { ci: true, precommit: false, strict: true, update: false, watch: false }; noop(ci); diff --git a/test/config-named-exports.spec.ts b/test/config-named-exports.spec.ts index 565c20663..5215c2025 100644 --- a/test/config-named-exports.spec.ts +++ b/test/config-named-exports.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/config-ts-esm.spec.ts b/test/config-ts-esm.spec.ts index 23baed1ca..a537576b0 100644 --- a/test/config-ts-esm.spec.ts +++ b/test/config-ts-esm.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/config-ts.spec.ts b/test/config-ts.spec.ts index cd5dc1920..bf5f051b1 100644 --- a/test/config-ts.spec.ts +++ b/test/config-ts.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/config-tsconfig.spec.ts b/test/config-tsconfig.spec.ts index 1538d8af3..6d794403a 100644 --- a/test/config-tsconfig.spec.ts +++ b/test/config-tsconfig.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/config-validation.spec.ts b/test/config-validation.spec.ts index 0962dcf04..41dedb5ac 100644 --- a/test/config-validation.spec.ts +++ b/test/config-validation.spec.ts @@ -1,10 +1,11 @@ -import * as os from 'os'; +import os from 'node:os'; import { replace } from 'testdouble'; +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; const [cpu] = os.cpus(); -replace('os', { +replace('node:os', { ...os, cpus: () => [cpu] }); diff --git a/test/conflict.spec.ts b/test/conflict.spec.ts index 7968e368b..7ac6de7c9 100644 --- a/test/conflict.spec.ts +++ b/test/conflict.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/coverage-files-better.spec.ts b/test/coverage-files-better.spec.ts index a10c8dbc2..9995bfb53 100644 --- a/test/coverage-files-better.spec.ts +++ b/test/coverage-files-better.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/coverage-files-exclude.spec.ts b/test/coverage-files-exclude.spec.ts index ba8d907e2..eda6eb019 100644 --- a/test/coverage-files-exclude.spec.ts +++ b/test/coverage-files-exclude.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/coverage-files-include.spec.ts b/test/coverage-files-include.spec.ts index 7e0400424..5c12156bf 100644 --- a/test/coverage-files-include.spec.ts +++ b/test/coverage-files-include.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/coverage-files-same.spec.ts b/test/coverage-files-same.spec.ts index 400fdbf1a..8b8281757 100644 --- a/test/coverage-files-same.spec.ts +++ b/test/coverage-files-same.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/coverage-files-worse.spec.ts b/test/coverage-files-worse.spec.ts index 998446419..6cdaf6cfb 100644 --- a/test/coverage-files-worse.spec.ts +++ b/test/coverage-files-worse.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/coverage-report-invalid.spec.ts b/test/coverage-report-invalid.spec.ts index 192682864..8de7e9e86 100644 --- a/test/coverage-report-invalid.spec.ts +++ b/test/coverage-report-invalid.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/coverage-report-missing.spec.ts b/test/coverage-report-missing.spec.ts index 381e2e494..8af0bf47b 100644 --- a/test/coverage-report-missing.spec.ts +++ b/test/coverage-report-missing.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/coverage-total.spec.ts b/test/coverage-total.spec.ts index ad8cc10e7..c6089fdcd 100644 --- a/test/coverage-total.spec.ts +++ b/test/coverage-total.spec.ts @@ -1,5 +1,6 @@ import type { BettererCoverageIssues } from '@betterer/coverage'; +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/deadline-file-test-expired.spec.ts b/test/deadline-file-test-expired.spec.ts index 80afd6150..e51053631 100644 --- a/test/deadline-file-test-expired.spec.ts +++ b/test/deadline-file-test-expired.spec.ts @@ -1,7 +1,10 @@ import { replace } from 'testdouble'; -import * as bettererUtils from '../packages/betterer/dist/utils.js'; +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet +import * as bettererUtils from '../packages/betterer/dist/utils'; +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { setupTestdouble } from './setup-testdouble'; // Use real getTime() function diff --git a/test/deadline-future.spec.ts b/test/deadline-future.spec.ts index 83abe947a..469d38a38 100644 --- a/test/deadline-future.spec.ts +++ b/test/deadline-future.spec.ts @@ -1,7 +1,10 @@ import { replace } from 'testdouble'; -import * as bettererUtils from '../packages/betterer/dist/utils.js'; +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet +import * as bettererUtils from '../packages/betterer/dist/utils'; +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { setupTestdouble } from './setup-testdouble'; jest.resetModules(); diff --git a/test/deadline-test-expired.spec.ts b/test/deadline-test-expired.spec.ts index f278a4976..a6d8b3ebc 100644 --- a/test/deadline-test-expired.spec.ts +++ b/test/deadline-test-expired.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/dependencies/src/index.tsx b/test/dependencies/src/index.tsx index d44f7e1c2..d0941ca3b 100644 --- a/test/dependencies/src/index.tsx +++ b/test/dependencies/src/index.tsx @@ -6,7 +6,7 @@ import { React, render, useCallback } from '@betterer/render'; import { BettererTaskLogger, BettererTasksLogger } from '@betterer/tasks'; import { createWorkerRequire } from '@phenomnomnominal/worker-require'; -import type { TestPackageDependenciesWorker } from './types'; +import type { TestPackageDependenciesWorker } from './types.js'; const testPackageDependencies = createWorkerRequire('./test-package-dependencies', { cache: false diff --git a/test/dependencies/src/test-package-dependencies.ts b/test/dependencies/src/test-package-dependencies.ts index 54cf9437e..1f718cc86 100644 --- a/test/dependencies/src/test-package-dependencies.ts +++ b/test/dependencies/src/test-package-dependencies.ts @@ -2,8 +2,8 @@ import type { BettererLogger } from '@betterer/logger'; import { BettererError } from '@betterer/errors'; import dependencyCheck from 'dependency-check'; -import { promises as fs } from 'fs'; -import * as path from 'path'; +import { promises as fs } from 'node:fs'; +import path from 'node:path'; const EXCLUDED_PACKAGES = ['docgen', 'extension', 'fixture']; const PACKAGES_DIR = path.resolve(__dirname, '../../../packages'); @@ -38,7 +38,8 @@ export async function run(logger: BettererLogger, packageName: string): Promise< }); const missing = await dependencyCheck.missing(parsed.package, parsed.used); - const errors = missing.filter((dependency) => !IGNORED[packageName].includes(dependency)); + const removeBuiltIns = missing.filter((dependency) => !dependency.startsWith('node:')); + const errors = removeBuiltIns.filter((dependency) => !IGNORED[packageName]?.includes(dependency)); if (!errors.length) { return `No missing dependencies found in "${packageNameFull}".`; diff --git a/test/eslint-complex-project.spec.ts b/test/eslint-complex-project.spec.ts index 2310d7ce3..252a0fbcd 100644 --- a/test/eslint-complex-project.spec.ts +++ b/test/eslint-complex-project.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/eslint-complex-rule.spec.ts b/test/eslint-complex-rule.spec.ts index 4433e0a98..b295e9af3 100644 --- a/test/eslint-complex-rule.spec.ts +++ b/test/eslint-complex-rule.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/eslint-no-config.spec.ts b/test/eslint-no-config.spec.ts index c9a0a9930..51791833f 100644 --- a/test/eslint-no-config.spec.ts +++ b/test/eslint-no-config.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/eslint.spec.ts b/test/eslint.spec.ts index ca79ebc87..2b7913985 100644 --- a/test/eslint.spec.ts +++ b/test/eslint.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/exclude-files.spec.ts b/test/exclude-files.spec.ts index 775814a13..773528485 100644 --- a/test/exclude-files.spec.ts +++ b/test/exclude-files.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/exclude-global.spec.ts b/test/exclude-global.spec.ts index 072b153ba..3dcb77cf0 100644 --- a/test/exclude-global.spec.ts +++ b/test/exclude-global.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/failed-test-error.spec.ts b/test/failed-test-error.spec.ts index c3222bc11..9364daadf 100644 --- a/test/failed-test-error.spec.ts +++ b/test/failed-test-error.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/file-test-constraint.spec.ts b/test/file-test-constraint.spec.ts index 61a8a5942..f7e6ddbde 100644 --- a/test/file-test-constraint.spec.ts +++ b/test/file-test-constraint.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/file-test-goal.spec.ts b/test/file-test-goal.spec.ts index 33c40c7b1..e692c5f89 100644 --- a/test/file-test-goal.spec.ts +++ b/test/file-test-goal.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/file-test-line-endings.spec.ts b/test/file-test-line-endings.spec.ts index f3a4d5b8c..ae9bd81f7 100644 --- a/test/file-test-line-endings.spec.ts +++ b/test/file-test-line-endings.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/file-test-sort-absolute.spec.ts b/test/file-test-sort-absolute.spec.ts index f3fedbfa6..6aad263c6 100644 --- a/test/file-test-sort-absolute.spec.ts +++ b/test/file-test-sort-absolute.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/file-test-sort-all.spec.ts b/test/file-test-sort-all.spec.ts index b096d7b78..5a8f125dc 100644 --- a/test/file-test-sort-all.spec.ts +++ b/test/file-test-sort-all.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/file-test-sort-subset.spec.ts b/test/file-test-sort-subset.spec.ts index 2d5bd2871..492b4409c 100644 --- a/test/file-test-sort-subset.spec.ts +++ b/test/file-test-sort-subset.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/filter-only.spec.ts b/test/filter-only.spec.ts index 8a1ed002f..2b78e5e47 100644 --- a/test/filter-only.spec.ts +++ b/test/filter-only.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/filter-skip.spec.ts b/test/filter-skip.spec.ts index ddb34102f..88baf2289 100644 --- a/test/filter-skip.spec.ts +++ b/test/filter-skip.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/fixture.ts b/test/fixture.ts index 04eaef64e..2919b9b3d 100644 --- a/test/fixture.ts +++ b/test/fixture.ts @@ -1,6 +1,6 @@ import type { Fixture, FixtureFileSystemFiles, FixtureOptions } from '@betterer/fixture'; import { createFixtureDirectoryΔ } from '@betterer/fixture'; -import * as path from 'path'; +import path from 'node:path'; const fixtureFactory = createFixtureDirectoryΔ(path.resolve(__dirname, '../fixtures')); diff --git a/test/include-global.spec.ts b/test/include-global.spec.ts index eb7fc46bc..0f6d5b6c0 100644 --- a/test/include-global.spec.ts +++ b/test/include-global.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/printer-pathological.spec.ts b/test/printer-pathological.spec.ts index 3d634ca7f..e8a1d3705 100644 --- a/test/printer-pathological.spec.ts +++ b/test/printer-pathological.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/regexp-message.spec.ts b/test/regexp-message.spec.ts index 5008da8a1..0b2ecd1ef 100644 --- a/test/regexp-message.spec.ts +++ b/test/regexp-message.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/regexp-no-regexp.spec.ts b/test/regexp-no-regexp.spec.ts index e5f033009..717bd44a1 100644 --- a/test/regexp-no-regexp.spec.ts +++ b/test/regexp-no-regexp.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/regexp.spec.ts b/test/regexp.spec.ts index 718895007..02ba2ce7a 100644 --- a/test/regexp.spec.ts +++ b/test/regexp.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/reporter-inline.spec.ts b/test/reporter-inline.spec.ts index 1625dd6d2..a12e7269c 100644 --- a/test/reporter-inline.spec.ts +++ b/test/reporter-inline.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer --reporter', () => { diff --git a/test/reporter-invalid-hook-function.spec.ts b/test/reporter-invalid-hook-function.spec.ts index 797a0fac6..30673091e 100644 --- a/test/reporter-invalid-hook-function.spec.ts +++ b/test/reporter-invalid-hook-function.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer --reporter', () => { diff --git a/test/reporter-invalid-hook-name.spec.ts b/test/reporter-invalid-hook-name.spec.ts index 45b90efec..c7705a06c 100644 --- a/test/reporter-invalid-hook-name.spec.ts +++ b/test/reporter-invalid-hook-name.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer --reporter', () => { diff --git a/test/reporter-lifecycle.spec.ts b/test/reporter-lifecycle.spec.ts index 15d05154f..033b563cf 100644 --- a/test/reporter-lifecycle.spec.ts +++ b/test/reporter-lifecycle.spec.ts @@ -7,6 +7,7 @@ import type { BettererSuiteSummary } from '@betterer/betterer'; +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer --reporter', () => { diff --git a/test/reporter-local-ts.spec.ts b/test/reporter-local-ts.spec.ts index 30b5e0008..4176acc99 100644 --- a/test/reporter-local-ts.spec.ts +++ b/test/reporter-local-ts.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer --reporter', () => { diff --git a/test/reporter-local.spec.ts b/test/reporter-local.spec.ts index eed23d375..4a3da2202 100644 --- a/test/reporter-local.spec.ts +++ b/test/reporter-local.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer --reporter', () => { diff --git a/test/reporter-no-export.spec.ts b/test/reporter-no-export.spec.ts index 79411b6b1..360586f27 100644 --- a/test/reporter-no-export.spec.ts +++ b/test/reporter-no-export.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer --reporter', () => { diff --git a/test/reporter-npm.spec.ts b/test/reporter-npm.spec.ts index a4b460c0b..7346ca6d9 100644 --- a/test/reporter-npm.spec.ts +++ b/test/reporter-npm.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer --reporter', () => { diff --git a/test/results-escape.spec.ts b/test/results-escape.spec.ts index 667d2e4ff..88a507549 100644 --- a/test/results-escape.spec.ts +++ b/test/results-escape.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/results-filter.spec.ts b/test/results-filter.spec.ts index e4269b2ec..fcf687228 100644 --- a/test/results-filter.spec.ts +++ b/test/results-filter.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/results-includes.spec.ts b/test/results-includes.spec.ts index d7e0315ef..f2212b4ff 100644 --- a/test/results-includes.spec.ts +++ b/test/results-includes.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/results-path.spec.ts b/test/results-path.spec.ts index 6bcd23d54..2bd67fb08 100644 --- a/test/results-path.spec.ts +++ b/test/results-path.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/results-read-error.spec.ts b/test/results-read-error.spec.ts index d83327e7a..b575a2bd9 100644 --- a/test/results-read-error.spec.ts +++ b/test/results-read-error.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/results.spec.ts b/test/results.spec.ts index 4d7bd5dec..7a247f4d6 100644 --- a/test/results.spec.ts +++ b/test/results.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/runner/runner-excluded.spec.ts b/test/runner/runner-excluded.spec.ts index 6db23691a..14350f767 100644 --- a/test/runner/runner-excluded.spec.ts +++ b/test/runner/runner-excluded.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; describe('betterer.runner', () => { diff --git a/test/runner/runner-included.spec.ts b/test/runner/runner-included.spec.ts index 2be359a4f..cf344b276 100644 --- a/test/runner/runner-included.spec.ts +++ b/test/runner/runner-included.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; describe('betterer.runner', () => { diff --git a/test/same-move-file.spec.ts b/test/same-move-file.spec.ts index 9b0988315..37000c79d 100644 --- a/test/same-move-file.spec.ts +++ b/test/same-move-file.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/same-move-issue.spec.ts b/test/same-move-issue.spec.ts index a589a656c..357b07e60 100644 --- a/test/same-move-issue.spec.ts +++ b/test/same-move-issue.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/same-move-issues.spec.ts b/test/same-move-issues.spec.ts index da7adbb70..a874567a0 100644 --- a/test/same-move-issues.spec.ts +++ b/test/same-move-issues.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/same-result.spec.ts b/test/same-result.spec.ts index 37a41bca8..578201671 100644 --- a/test/same-result.spec.ts +++ b/test/same-result.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/setup-testdouble.ts b/test/setup-testdouble.ts index b3464e56f..5584fcea5 100644 --- a/test/setup-testdouble.ts +++ b/test/setup-testdouble.ts @@ -1,5 +1,6 @@ -/* eslint-disable */ +/* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-var-requires -- this file is a temporary mess*/ export function setupTestdouble() { const td = require('testdouble'); require('testdouble-jest')(td, jest); } +/* eslint-enable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-var-requires */ diff --git a/test/setup.ts b/test/setup.ts index 47316b78f..e121a0ee8 100644 --- a/test/setup.ts +++ b/test/setup.ts @@ -2,15 +2,17 @@ import '@betterer/fixture'; import { jest } from '@jest/globals'; import { replace } from 'testdouble'; +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { setupTestdouble } from './setup-testdouble'; jest.setTimeout(300000); setupTestdouble(); -import * as bettererUtils from '../packages/betterer/dist/utils.js'; +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet +import * as bettererUtils from '../packages/betterer/dist/utils'; -replace('../packages/betterer/dist/utils.js', { +replace('../packages/betterer/dist/utils', { ...bettererUtils, getTime: () => 0 }); diff --git a/test/silent-mute.spec.ts b/test/silent-mute.spec.ts index bc11d42e8..183c96a21 100644 --- a/test/silent-mute.spec.ts +++ b/test/silent-mute.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer --silent', () => { diff --git a/test/silent-unmute.spec.ts b/test/silent-unmute.spec.ts index e1389cc27..2380d85ee 100644 --- a/test/silent-unmute.spec.ts +++ b/test/silent-unmute.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer --silent', () => { diff --git a/test/styelint.spec.ts b/test/styelint.spec.ts index f8d908128..d6c246c15 100644 --- a/test/styelint.spec.ts +++ b/test/styelint.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; const STYLES_SOURCE = ` diff --git a/test/stylelint-no-config.spec.ts b/test/stylelint-no-config.spec.ts index ad7f87bf5..f587d28a0 100644 --- a/test/stylelint-no-config.spec.ts +++ b/test/stylelint-no-config.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/test-no-constraint.spec.ts b/test/test-no-constraint.spec.ts index 377d0b46a..07524f520 100644 --- a/test/test-no-constraint.spec.ts +++ b/test/test-no-constraint.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/test-no-test.spec.ts b/test/test-no-test.spec.ts index f0e18d468..e6181846e 100644 --- a/test/test-no-test.spec.ts +++ b/test/test-no-test.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/test-not-a-betterer-test.spec.ts b/test/test-not-a-betterer-test.spec.ts index c9a79a234..a8bd804dd 100644 --- a/test/test-not-a-betterer-test.spec.ts +++ b/test/test-not-a-betterer-test.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/test-not-a-function.spec.ts b/test/test-not-a-function.spec.ts index 41d217bf9..a0b412d57 100644 --- a/test/test-not-a-function.spec.ts +++ b/test/test-not-a-function.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/tsquery-message.spec.ts b/test/tsquery-message.spec.ts index a8952971a..05312de13 100644 --- a/test/tsquery-message.spec.ts +++ b/test/tsquery-message.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/tsquery-no-query.spec.ts b/test/tsquery-no-query.spec.ts index 0d14af96f..4074f6928 100644 --- a/test/tsquery-no-query.spec.ts +++ b/test/tsquery-no-query.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/tsquery.spec.ts b/test/tsquery.spec.ts index 52b642271..af9d4ab9f 100644 --- a/test/tsquery.spec.ts +++ b/test/tsquery.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/typescript-dependency.spec.ts b/test/typescript-dependency.spec.ts index 354ada7df..c69028c9f 100644 --- a/test/typescript-dependency.spec.ts +++ b/test/typescript-dependency.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/typescript-incremental.spec.ts b/test/typescript-incremental.spec.ts index 3f0c4d2e3..ef2a7e801 100644 --- a/test/typescript-incremental.spec.ts +++ b/test/typescript-incremental.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/typescript-no-config-file.spec.ts b/test/typescript-no-config-file.spec.ts index e95f03789..21674069b 100644 --- a/test/typescript-no-config-file.spec.ts +++ b/test/typescript-no-config-file.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/typescript-strict.spec.ts b/test/typescript-strict.spec.ts index c20d41735..4c4599813 100644 --- a/test/typescript-strict.spec.ts +++ b/test/typescript-strict.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; const INDEX_SOURCE = `export function extractIds(list) { diff --git a/test/typescript.spec.ts b/test/typescript.spec.ts index 16dc608c1..85320e286 100644 --- a/test/typescript.spec.ts +++ b/test/typescript.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/watch/watch-debounced.spec.ts b/test/watch/watch-debounced.spec.ts index 319cd27f2..7d83a125a 100644 --- a/test/watch/watch-debounced.spec.ts +++ b/test/watch/watch-debounced.spec.ts @@ -1,6 +1,7 @@ import type { BettererSuiteSummary } from '@betterer/betterer'; -import assert from 'assert'; +import assert from 'node:assert'; +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; describe('betterer.watch', () => { diff --git a/test/watch/watch-force-stop.spec.ts b/test/watch/watch-force-stop.spec.ts index ac157c78d..69f6496fd 100644 --- a/test/watch/watch-force-stop.spec.ts +++ b/test/watch/watch-force-stop.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; describe('betterer.watch', () => { diff --git a/test/watch/watch-ignored.spec.ts b/test/watch/watch-ignored.spec.ts index 960dbf00d..6c372ea13 100644 --- a/test/watch/watch-ignored.spec.ts +++ b/test/watch/watch-ignored.spec.ts @@ -1,7 +1,8 @@ import type { BettererSuiteSummary } from '@betterer/betterer'; -import assert from 'assert'; +import assert from 'node:assert'; +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; describe('betterer.watch', () => { diff --git a/test/watch/watch-quit.e2e.spec.ts b/test/watch/watch-quit.e2e.spec.ts index 120e21d32..c7fc62776 100644 --- a/test/watch/watch-quit.e2e.spec.ts +++ b/test/watch/watch-quit.e2e.spec.ts @@ -1,5 +1,6 @@ -import assert from 'assert'; +import assert from 'node:assert'; +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; describe('betterer.watch', () => { diff --git a/test/watch/watch.spec.ts b/test/watch/watch.spec.ts index cfd9c6977..b5bf33aa7 100644 --- a/test/watch/watch.spec.ts +++ b/test/watch/watch.spec.ts @@ -1,7 +1,8 @@ import type { BettererSuiteSummary } from '@betterer/betterer'; -import assert from 'assert'; +import assert from 'node:assert'; +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from '../fixture'; describe('betterer.watch', () => { diff --git a/test/workers.spec.ts b/test/workers.spec.ts index ae048d460..8caa6efd9 100644 --- a/test/workers.spec.ts +++ b/test/workers.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/worse-result.spec.ts b/test/worse-result.spec.ts index 06dac6553..194b1d480 100644 --- a/test/worse-result.spec.ts +++ b/test/worse-result.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/worse-strict.spec.ts b/test/worse-strict.spec.ts index 76d0096a9..491f82692 100644 --- a/test/worse-strict.spec.ts +++ b/test/worse-strict.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/test/worse-update.spec.ts b/test/worse-update.spec.ts index c937fa4f7..28dc7f283 100644 --- a/test/worse-update.spec.ts +++ b/test/worse-update.spec.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line require-extensions/require-extensions -- tests not ESM ready yet import { createFixture } from './fixture'; describe('betterer', () => { diff --git a/tools/docs-filter.ts b/tools/docs-filter.ts index 80cb751ca..cf8d14d53 100644 --- a/tools/docs-filter.ts +++ b/tools/docs-filter.ts @@ -1,5 +1,5 @@ -import { promises as fs } from 'fs'; -import path from 'path'; +import { promises as fs } from 'node:fs'; +import path from 'node:path'; interface ApiItem { canonicalReference: string; diff --git a/website/blog/2021-03-01-betterer-and-stylelint.md b/website/blog/2021-03-01-betterer-and-stylelint.md index 53134f5ca..5720a0cb4 100644 --- a/website/blog/2021-03-01-betterer-and-stylelint.md +++ b/website/blog/2021-03-01-betterer-and-stylelint.md @@ -14,7 +14,7 @@ Here's the full test: ```typescript // stylelint.ts import { BettererFileTest } from '@betterer/betterer'; -import { promises as fs } from 'fs'; +import { promises as fs } from 'node:fs'; import { Configuration, lint } from 'stylelint'; export function stylelint(configOverrides: Partial = {}) { @@ -181,7 +181,7 @@ new BettererFileTest(resolver, async (filePaths, fileTestResult) => { The `result` object from **Stylelint** contains a list of `results`. For each item in that list, we need to read the file with [Node's `fs` module](https://nodejs.org/api/fs.html), and then call [`addFile()`](https://phenomnomnominal.github.io/betterer/docs/betterer-file-test#addfile) with the file path (`result.source`), and the contents of the file. That returns a [`BettererFile`](https://phenomnomnominal.github.io/betterer/docs/betterer-file-test#bettererfile) object: ```typescript -import { promises as fs } from 'fs'; +import { promises as fs } from 'node:fs'; await Promise.all( result.results.map(async (result) => { @@ -215,7 +215,7 @@ Putting that all together and you get this: ```typescript // stylelint.ts import { BettererFileTest } from '@betterer/betterer'; -import { promises as fs } from 'fs'; +import { promises as fs } from 'node:fs'; import { Configuration, lint } from 'stylelint'; export function stylelint(configOverrides: Partial = {}) { diff --git a/website/docs/reporters.md b/website/docs/reporters.md index b15892601..b6f15e87a 100644 --- a/website/docs/reporters.md +++ b/website/docs/reporters.md @@ -24,7 +24,7 @@ If you want to write your own reporter, you need to implement the [`BettererRepo // src/html-reporter.ts import { BettererContext, BettererContextSummary, BettererReporter } from '@betterer/betterer'; import { BettererError } from '@betterer/errors'; -import { promises as fs } from 'fs'; +import { promises as fs } from 'node:fs'; export const reporter: BettererReporter = createHTMLReporter(); diff --git a/yarn.lock b/yarn.lock index 2ff7d6cdf..374c8f8ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2145,6 +2145,18 @@ resolved "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== +"@pkgr/utils@^2.3.1": + version "2.4.2" + resolved "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz#9e638bbe9a6a6f165580dc943f138fd3309a2cbc" + integrity sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw== + dependencies: + cross-spawn "^7.0.3" + fast-glob "^3.3.0" + is-glob "^4.0.3" + open "^9.1.0" + picocolors "^1.0.0" + tslib "^2.6.0" + "@rollup/plugin-commonjs@^22.0.0": version "22.0.0" resolved "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-22.0.0.tgz#f4d87016e2fbf187a593ab9f46626fe05b59e8bd" @@ -2525,6 +2537,11 @@ resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.10.tgz#9b05b7896166cd00e9cbd59864853abf65d9ac23" integrity sha512-BLO9bBq59vW3fxCpD4o0N4U+DXsvwvIcl+jofw0frQo/GrBFC+/jRZj1E7kgp6dvTyNmA4y6JCV5Id/r3mNP5A== +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== + "@types/lodash.debounce@^4.0.6": version "4.0.6" resolved "https://registry.npmjs.org/@types/lodash.debounce/-/lodash.debounce-4.0.6.tgz#c5a2326cd3efc46566c47e4c0aa248dc0ee57d60" @@ -3223,6 +3240,14 @@ arr-union@^3.1.0: resolved "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= +array-buffer-byte-length@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" + integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== + dependencies: + call-bind "^1.0.2" + is-array-buffer "^3.0.1" + array-differ@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b" @@ -3233,6 +3258,17 @@ array-ify@^1.0.0: resolved "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" integrity sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4= +array-includes@^3.1.6: + version "3.1.6" + resolved "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz#9e9e720e194f198266ba9e18c29e6a9b0e4b225f" + integrity sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + get-intrinsic "^1.1.3" + is-string "^1.0.7" + array-union@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" @@ -3243,6 +3279,38 @@ array-unique@^0.3.2: resolved "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= +array.prototype.flat@^1.3.1: + version "1.3.1" + resolved "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz#ffc6576a7ca3efc2f46a143b9d1dda9b4b3cf5e2" + integrity sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + es-shim-unscopables "^1.0.0" + +array.prototype.flatmap@^1.3.1: + version "1.3.1" + resolved "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz#1aae7903c2100433cb8261cd4ed310aab5c4a183" + integrity sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + es-shim-unscopables "^1.0.0" + +arraybuffer.prototype.slice@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.1.tgz#9b5ea3868a6eebc30273da577eb888381c0044bb" + integrity sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw== + dependencies: + array-buffer-byte-length "^1.0.0" + call-bind "^1.0.2" + define-properties "^1.2.0" + get-intrinsic "^1.2.1" + is-array-buffer "^3.0.2" + is-shared-array-buffer "^1.0.2" + arrify@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -3301,6 +3369,11 @@ autoprefixer@^9.8.6: postcss "^7.0.32" postcss-value-parser "^4.1.0" +available-typed-arrays@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" + integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== + axios@^1.0.0: version "1.4.0" resolved "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz#38a7bf1224cd308de271146038b551d725f0be1f" @@ -3414,6 +3487,11 @@ big-integer@^1.6.17: resolved "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz#8fd88bd1632cba4a1c8c3e3d7159f08bb95b4b9e" integrity sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w== +big-integer@^1.6.44: + version "1.6.51" + resolved "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686" + integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg== + bin-links@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/bin-links/-/bin-links-4.0.1.tgz#afeb0549e642f61ff889b58ea2f8dca78fb9d8d3" @@ -3451,6 +3529,13 @@ bluebird@~3.4.1: resolved "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz#f72d760be09b7f76d08ed8fae98b289a8d05fab3" integrity sha1-9y12C+Cbf3bQjtj66Ysomo0F+rM= +bplist-parser@^0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz#43a9d183e5bf9d545200ceac3e712f79ebbe8d0e" + integrity sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw== + dependencies: + big-integer "^1.6.44" + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -3578,6 +3663,13 @@ builtins@^5.0.0: dependencies: semver "^7.0.0" +bundle-name@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz#ba59bcc9ac785fb67ccdbf104a2bf60c099f0e1a" + integrity sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw== + dependencies: + run-applescript "^5.0.0" + byte-size@7.0.0: version "7.0.0" resolved "https://registry.npmjs.org/byte-size/-/byte-size-7.0.0.tgz#36528cd1ca87d39bd9abd51f5715dc93b6ceb032" @@ -3645,6 +3737,14 @@ cachedir@2.2.0: resolved "https://registry.npmjs.org/cachedir/-/cachedir-2.2.0.tgz#19afa4305e05d79e417566882e0c8f960f62ff0e" integrity sha512-VvxA0xhNqIIfg0V9AmJkDg91DaJwryutH5rVEZAhcNi4iJFj9f+QxmAjgK1LT9I8OgToX27fypX6/MeCXVbBjQ== +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + callsite@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20" @@ -4369,6 +4469,13 @@ debug@^2.2.0, debug@^2.3.3: dependencies: ms "2.0.0" +debug@^3.2.7: + version "3.2.7" + resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + decamelize-keys@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" @@ -4407,6 +4514,24 @@ deepmerge@^4.2.2: resolved "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== +default-browser-id@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz#bee7bbbef1f4e75d31f98f4d3f1556a14cea790c" + integrity sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA== + dependencies: + bplist-parser "^0.2.0" + untildify "^4.0.0" + +default-browser@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz#53c9894f8810bf86696de117a6ce9085a3cbc7da" + integrity sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA== + dependencies: + bundle-name "^3.0.0" + default-browser-id "^3.0.0" + execa "^7.1.1" + titleize "^3.0.0" + defaults@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" @@ -4419,6 +4544,19 @@ define-lazy-prop@^2.0.0: resolved "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== +define-lazy-prop@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz#dbb19adfb746d7fc6d734a06b72f4a00d021255f" + integrity sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg== + +define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" + integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA== + dependencies: + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + define-property@^0.2.5: version "0.2.5" resolved "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" @@ -4551,6 +4689,13 @@ djb2a@^1.2.0: resolved "https://registry.npmjs.org/djb2a/-/djb2a-1.2.0.tgz#a441d5f49b90b78aac52d2c44f5a6c49b3d1724b" integrity sha512-rXrJYOPCGvHPYw8R2u/zczFTG3xXNqklrtT17vTPm8n/4a16PKEhrfgMwJ9Zyuz96PJwZzHuK2ChQO/SSChuKA== +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + doctrine@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" @@ -4688,6 +4833,14 @@ enhanced-resolve@^5.0.0: graceful-fs "^4.2.4" tapable "^2.2.0" +enhanced-resolve@^5.12.0: + version "5.15.0" + resolved "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz#1af946c7d93603eb88e9896cee4904dc012e9c35" + integrity sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + enhanced-resolve@^5.14.0: version "5.14.0" resolved "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.14.0.tgz#0b6c676c8a3266c99fa281e4433a706f5c0c61c4" @@ -4740,11 +4893,81 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" +es-abstract@^1.19.0, es-abstract@^1.20.4: + version "1.22.1" + resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.1.tgz#8b4e5fc5cefd7f1660f0f8e1a52900dfbc9d9ccc" + integrity sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw== + dependencies: + array-buffer-byte-length "^1.0.0" + arraybuffer.prototype.slice "^1.0.1" + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + es-set-tostringtag "^2.0.1" + es-to-primitive "^1.2.1" + function.prototype.name "^1.1.5" + get-intrinsic "^1.2.1" + get-symbol-description "^1.0.0" + globalthis "^1.0.3" + gopd "^1.0.1" + has "^1.0.3" + has-property-descriptors "^1.0.0" + has-proto "^1.0.1" + has-symbols "^1.0.3" + internal-slot "^1.0.5" + is-array-buffer "^3.0.2" + is-callable "^1.2.7" + is-negative-zero "^2.0.2" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + is-string "^1.0.7" + is-typed-array "^1.1.10" + is-weakref "^1.0.2" + object-inspect "^1.12.3" + object-keys "^1.1.1" + object.assign "^4.1.4" + regexp.prototype.flags "^1.5.0" + safe-array-concat "^1.0.0" + safe-regex-test "^1.0.0" + string.prototype.trim "^1.2.7" + string.prototype.trimend "^1.0.6" + string.prototype.trimstart "^1.0.6" + typed-array-buffer "^1.0.0" + typed-array-byte-length "^1.0.0" + typed-array-byte-offset "^1.0.0" + typed-array-length "^1.0.4" + unbox-primitive "^1.0.2" + which-typed-array "^1.1.10" + es-module-lexer@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.2.1.tgz#ba303831f63e6a394983fde2f97ad77b22324527" integrity sha512-9978wrXM50Y4rTMmW5kXIC09ZdXQZqkE4mxhwkd8VbzsGkXGPgV4zWuqQJgCEzYngdo2dYDa0l8xhX4fkSwJSg== +es-set-tostringtag@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" + integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== + dependencies: + get-intrinsic "^1.1.3" + has "^1.0.3" + has-tostringtag "^1.0.0" + +es-shim-unscopables@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" + integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== + dependencies: + has "^1.0.3" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -4782,6 +5005,65 @@ eslint-config-prettier@^8.1.0: resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1" integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q== +eslint-import-resolver-node@^0.3.7: + version "0.3.7" + resolved "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz#83b375187d412324a1963d84fa664377a23eb4d7" + integrity sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA== + dependencies: + debug "^3.2.7" + is-core-module "^2.11.0" + resolve "^1.22.1" + +eslint-import-resolver-typescript@^3.5.5: + version "3.5.5" + resolved "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.5.5.tgz#0a9034ae7ed94b254a360fbea89187b60ea7456d" + integrity sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw== + dependencies: + debug "^4.3.4" + enhanced-resolve "^5.12.0" + eslint-module-utils "^2.7.4" + get-tsconfig "^4.5.0" + globby "^13.1.3" + is-core-module "^2.11.0" + is-glob "^4.0.3" + synckit "^0.8.5" + +eslint-module-utils@^2.7.4: + version "2.8.0" + resolved "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz#e439fee65fc33f6bba630ff621efc38ec0375c49" + integrity sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw== + dependencies: + debug "^3.2.7" + +eslint-plugin-eslint-comments@^3.2.0: + version "3.2.0" + resolved "https://registry.npmjs.org/eslint-plugin-eslint-comments/-/eslint-plugin-eslint-comments-3.2.0.tgz#9e1cd7b4413526abb313933071d7aba05ca12ffa" + integrity sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ== + dependencies: + escape-string-regexp "^1.0.5" + ignore "^5.0.5" + +eslint-plugin-import@^2.27.5: + version "2.27.5" + resolved "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz#876a6d03f52608a3e5bb439c2550588e51dd6c65" + integrity sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow== + dependencies: + array-includes "^3.1.6" + array.prototype.flat "^1.3.1" + array.prototype.flatmap "^1.3.1" + debug "^3.2.7" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.7" + eslint-module-utils "^2.7.4" + has "^1.0.3" + is-core-module "^2.11.0" + is-glob "^4.0.3" + minimatch "^3.1.2" + object.values "^1.1.6" + resolve "^1.22.1" + semver "^6.3.0" + tsconfig-paths "^3.14.1" + eslint-plugin-jest@^24.4.0: version "24.4.0" resolved "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-24.4.0.tgz#fa4b614dbd46a98b652d830377971f097bda9262" @@ -4796,6 +5078,11 @@ eslint-plugin-prettier@^4.0.0: dependencies: prettier-linter-helpers "^1.0.0" +eslint-plugin-require-extensions@^0.1.3: + version "0.1.3" + resolved "https://registry.npmjs.org/eslint-plugin-require-extensions/-/eslint-plugin-require-extensions-0.1.3.tgz#394aeab433f996797a6ceba0a3f75640d4846bc8" + integrity sha512-T3c1PZ9PIdI3hjV8LdunfYI8gj017UQjzAnCrxuo3wAjneDbTPHdE3oNWInOjMA+z/aBkUtlW5vC0YepYMZIug== + eslint-scope@5.1.1, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -4987,6 +5274,21 @@ execa@^5.0.0, execa@^5.1.1: signal-exit "^3.0.3" strip-final-newline "^2.0.0" +execa@^7.1.1: + version "7.1.1" + resolved "https://registry.npmjs.org/execa/-/execa-7.1.1.tgz#3eb3c83d239488e7b409d48e8813b76bb55c9c43" + integrity sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.1" + human-signals "^4.3.0" + is-stream "^3.0.0" + merge-stream "^2.0.0" + npm-run-path "^5.1.0" + onetime "^6.0.0" + signal-exit "^3.0.7" + strip-final-newline "^3.0.0" + execall@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/execall/-/execall-2.0.0.tgz#16a06b5fe5099df7d00be5d9c06eecded1663b45" @@ -5116,6 +5418,17 @@ fast-glob@^3.2.9: merge2 "^1.3.0" micromatch "^4.0.4" +fast-glob@^3.3.0: + version "3.3.0" + resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.0.tgz#7c40cb491e1e2ed5664749e87bfb516dbe8727c0" + integrity sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -5276,6 +5589,13 @@ follow-redirects@^1.15.0: resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== +for-each@^0.3.3: + version "0.3.3" + resolved "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" + integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== + dependencies: + is-callable "^1.1.3" + for-in@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -5404,11 +5724,26 @@ function-bind@^1.1.1: resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function.prototype.name@^1.1.5: + version "1.1.5" + resolved "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" + integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.0" + functions-have-names "^1.2.2" + functional-red-black-tree@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= +functions-have-names@^1.2.2, functions-have-names@^1.2.3: + version "1.2.3" + resolved "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== + gauge@^4.0.3: version "4.0.4" resolved "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz#52ff0652f2bbf607a989793d53b751bef2328dce" @@ -5452,6 +5787,16 @@ get-caller-file@^2.0.5: resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0, get-intrinsic@^1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82" + integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-proto "^1.0.1" + has-symbols "^1.0.3" + get-pkg-repo@^4.0.0: version "4.2.1" resolved "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-4.2.1.tgz#75973e1c8050c73f48190c52047c4cee3acbf385" @@ -5477,6 +5822,26 @@ get-stream@6.0.0, get-stream@^6.0.0: resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.0.tgz#3e0012cb6827319da2706e601a1583e8629a6718" integrity sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg== +get-stream@^6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + +get-tsconfig@^4.5.0: + version "4.6.2" + resolved "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.6.2.tgz#831879a5e6c2aa24fe79b60340e2233a1e0f472e" + integrity sha512-E5XrT4CbbXcXWy+1jChlZmrmCwd5KGx502kDCXJJ7y898TtWW9FwoG5HfOLVRKmlmDGkWN2HM9Ho+/Y8F0sJDg== + dependencies: + resolve-pkg-maps "^1.0.0" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -5672,6 +6037,13 @@ globals@^13.9.0: dependencies: type-fest "^0.20.2" +globalthis@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" + integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== + dependencies: + define-properties "^1.1.3" + globby@11.1.0, globby@^11.0.1, globby@^11.0.4: version "11.1.0" resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" @@ -5710,6 +6082,17 @@ globby@^10.0.1: merge2 "^1.2.3" slash "^3.0.0" +globby@^13.1.3: + version "13.2.2" + resolved "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz#63b90b1bf68619c2135475cbd4e71e66aa090592" + integrity sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w== + dependencies: + dir-glob "^3.0.1" + fast-glob "^3.3.0" + ignore "^5.2.4" + merge2 "^1.4.1" + slash "^4.0.0" + globjoin@^0.1.4: version "0.1.4" resolved "https://registry.npmjs.org/globjoin/-/globjoin-0.1.4.tgz#2f4494ac8919e3767c5cbb691e9f463324285d43" @@ -5722,6 +6105,13 @@ gonzales-pe@^4.3.0: dependencies: minimist "^1.2.5" +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + graceful-fs@4.2.10: version "4.2.10" resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" @@ -5754,6 +6144,11 @@ hard-rejection@^2.1.0: resolved "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== +has-bigints@^1.0.1, has-bigints@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" + integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -5764,6 +6159,30 @@ has-flag@^4.0.0: resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +has-property-descriptors@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" + integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== + dependencies: + get-intrinsic "^1.1.1" + +has-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" + integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== + +has-symbols@^1.0.2, has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + has-unicode@2.0.1, has-unicode@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -5917,6 +6336,11 @@ human-signals@^2.1.0: resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== +human-signals@^4.3.0: + version "4.3.1" + resolved "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz#ab7f811e851fca97ffbd2c1fe9a958964de321b2" + integrity sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ== + humanize-ms@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" @@ -5967,7 +6391,7 @@ ignore@^4.0.6: resolved "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.0.4: +ignore@^5.0.4, ignore@^5.0.5, ignore@^5.2.4: version "5.2.4" resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== @@ -6152,6 +6576,15 @@ inquirer@^8.2.4: through "^2.3.6" wrap-ansi "^7.0.0" +internal-slot@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" + integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== + dependencies: + get-intrinsic "^1.2.0" + has "^1.0.3" + side-channel "^1.0.4" + interpret@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz#5be0ceed67ca79c6c4bc5cf0d7ee843dcea110c4" @@ -6189,11 +6622,27 @@ is-alphanumerical@^1.0.0: is-alphabetical "^1.0.0" is-decimal "^1.0.0" +is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: + version "3.0.2" + resolved "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" + integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.0" + is-typed-array "^1.1.10" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= +is-bigint@^1.0.1: + version "1.0.4" + resolved "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== + dependencies: + has-bigints "^1.0.1" + is-binary-path@~2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" @@ -6201,6 +6650,14 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" +is-boolean-object@^1.1.0: + version "1.1.2" + resolved "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" @@ -6218,6 +6675,11 @@ is-builtin-module@^3.1.0: dependencies: builtin-modules "^3.0.0" +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: + version "1.2.7" + resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" + integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== + is-ci@2.0.0, is-ci@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" @@ -6232,6 +6694,13 @@ is-core-module@^2.1.0: dependencies: has "^1.0.3" +is-core-module@^2.11.0: + version "2.12.1" + resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz#0c0b6885b6f80011c71541ce15c8d66cf5a4f9fd" + integrity sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg== + dependencies: + has "^1.0.3" + is-core-module@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" @@ -6260,6 +6729,13 @@ is-data-descriptor@^1.0.0: dependencies: kind-of "^6.0.0" +is-date-object@^1.0.1: + version "1.0.5" + resolved "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" + is-decimal@^1.0.0: version "1.0.4" resolved "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz#65a3a5958a1c5b63a706e1b333d7cd9f630d3fa5" @@ -6288,6 +6764,11 @@ is-docker@^2.0.0, is-docker@^2.1.1: resolved "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== +is-docker@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz#90093aa3106277d8a77a5910dbae71747e15a200" + integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ== + is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" @@ -6344,6 +6825,13 @@ is-hexadecimal@^1.0.0: resolved "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz#cc35c97588da4bd49a8eedd6bc4082d44dcb23a7" integrity sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw== +is-inside-container@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz#e81fba699662eb31dbdaf26766a61d4814717ea4" + integrity sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA== + dependencies: + is-docker "^3.0.0" + is-interactive@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" @@ -6359,6 +6847,18 @@ is-module@^1.0.0: resolved "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" integrity sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE= +is-negative-zero@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" + integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== + +is-number-object@^1.0.4: + version "1.0.7" + resolved "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" + integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== + dependencies: + has-tostringtag "^1.0.0" + is-number@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" @@ -6420,6 +6920,14 @@ is-reference@^1.2.1: dependencies: "@types/estree" "*" +is-regex@^1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + is-regexp@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" @@ -6437,6 +6945,13 @@ is-relative@^1.0.0: dependencies: is-unc-path "^1.0.0" +is-shared-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" + integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== + dependencies: + call-bind "^1.0.2" + is-ssh@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/is-ssh/-/is-ssh-1.4.0.tgz#4f8220601d2839d8fa624b3106f8e8884f01b8b2" @@ -6449,6 +6964,25 @@ is-stream@2.0.0, is-stream@^2.0.0: resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== +is-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" + integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== + +is-string@^1.0.5, is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" + +is-symbol@^1.0.2, is-symbol@^1.0.3: + version "1.0.4" + resolved "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== + dependencies: + has-symbols "^1.0.2" + is-text-path@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e" @@ -6456,6 +6990,17 @@ is-text-path@^1.0.1: dependencies: text-extensions "^1.0.0" +is-typed-array@^1.1.10, is-typed-array@^1.1.9: + version "1.1.10" + resolved "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" + integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.0" + is-typedarray@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -6478,6 +7023,13 @@ is-utf8@^0.2.1: resolved "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= +is-weakref@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== + dependencies: + call-bind "^1.0.2" + is-windows@^1.0.1, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" @@ -6495,6 +7047,11 @@ isarray@1.0.0, isarray@~1.0.0: resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -7099,6 +7656,13 @@ json5@2.x, json5@^2.1.2, json5@^2.2.2: resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== +json5@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" + integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== + dependencies: + minimist "^1.2.0" + jsonc-parser@3.2.0: version "3.2.0" resolved "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" @@ -7797,6 +8361,11 @@ mimic-fn@^2.1.0: resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== +mimic-fn@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" + integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== + min-indent@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/min-indent/-/min-indent-1.0.0.tgz#cfc45c37e9ec0d8f0a0ec3dd4ef7f7c3abe39256" @@ -7816,6 +8385,13 @@ minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" +minimatch@^3.1.2: + version "3.1.2" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + minimatch@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" @@ -8005,6 +8581,11 @@ ms@2.1.2, ms@^2.0.0: resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +ms@^2.1.1: + version "2.1.3" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + multimatch@5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/multimatch/-/multimatch-5.0.0.tgz#932b800963cea7a31a033328fa1e0c3a1874dbe6" @@ -8320,6 +8901,13 @@ npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" +npm-run-path@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz#bc62f7f3f6952d9894bd08944ba011a6ee7b7e00" + integrity sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q== + dependencies: + path-key "^4.0.0" + npmlog@6.0.2, npmlog@^6.0.0, npmlog@^6.0.2: version "6.0.2" resolved "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz#c8166017a42f2dea92d6453168dd865186a70830" @@ -8420,6 +9008,16 @@ object-inspect@^1.12.0: resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz#6e2c120e868fd1fd18cb4f18c31741d0d6e776f0" integrity sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g== +object-inspect@^1.12.3, object-inspect@^1.9.0: + version "1.12.3" + resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" + integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== + +object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + object-visit@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" @@ -8427,6 +9025,16 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" +object.assign@^4.1.4: + version "4.1.4" + resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" + integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + has-symbols "^1.0.3" + object-keys "^1.1.1" + object.pick@^1.3.0: version "1.3.0" resolved "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" @@ -8434,6 +9042,15 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" +object.values@^1.1.6: + version "1.1.6" + resolved "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d" + integrity sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + once@^1.3.0, once@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -8462,6 +9079,13 @@ onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" +onetime@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz#7c24c18ed1fd2e9bca4bd26806a33613c77d34b4" + integrity sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ== + dependencies: + mimic-fn "^4.0.0" + open@^8.4.0: version "8.4.2" resolved "https://registry.npmjs.org/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" @@ -8471,6 +9095,16 @@ open@^8.4.0: is-docker "^2.1.1" is-wsl "^2.2.0" +open@^9.1.0: + version "9.1.0" + resolved "https://registry.npmjs.org/open/-/open-9.1.0.tgz#684934359c90ad25742f5a26151970ff8c6c80b6" + integrity sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg== + dependencies: + default-browser "^4.0.0" + define-lazy-prop "^3.0.0" + is-inside-container "^1.0.0" + is-wsl "^2.2.0" + optionator@^0.8.1: version "0.8.3" resolved "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -8781,6 +9415,11 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== +path-key@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" + integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== + path-parse@^1.0.6, path-parse@^1.0.7: version "1.0.7" resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" @@ -9352,6 +9991,15 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" +regexp.prototype.flags@^1.5.0: + version "1.5.0" + resolved "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz#fe7ce25e7e4cca8db37b6634c8a2c7009199b9cb" + integrity sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + functions-have-names "^1.2.3" + regexpp@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" @@ -9437,6 +10085,11 @@ resolve-global@1.0.0, resolve-global@^1.0.0: dependencies: global-dirs "^0.1.1" +resolve-pkg-maps@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" + integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== + resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" @@ -9464,6 +10117,15 @@ resolve@^1.19.0: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +resolve@^1.22.1: + version "1.22.2" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" + integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== + dependencies: + is-core-module "^2.11.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + resolve@~1.17.0: version "1.17.0" resolved "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" @@ -9543,6 +10205,13 @@ rollup@^2.72.1: optionalDependencies: fsevents "~2.3.2" +run-applescript@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz#e11e1c932e055d5c6b40d98374e0268d9b11899c" + integrity sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg== + dependencies: + execa "^5.0.0" + run-async@^2.2.0, run-async@^2.4.0: version "2.4.1" resolved "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" @@ -9574,6 +10243,16 @@ rxjs@^7.5.5: dependencies: tslib "^2.1.0" +safe-array-concat@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz#2064223cba3c08d2ee05148eedbc563cd6d84060" + integrity sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.0" + has-symbols "^1.0.3" + isarray "^2.0.5" + safe-buffer@^5.1.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -9584,6 +10263,15 @@ safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== +safe-regex-test@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" + integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.3" + is-regex "^1.1.4" + safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" @@ -9709,6 +10397,15 @@ shell-quote@^1.6.1: resolved "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz#aa40edac170445b9a431e17bb62c0b881b9c4123" integrity sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw== +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + signal-exit@3.0.7, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" @@ -9752,6 +10449,11 @@ slash@3.0.0, slash@^3.0.0: resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== +slash@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7" + integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== + slice-ansi@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787" @@ -10022,6 +10724,33 @@ string-width@^5.0.0, string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" +string.prototype.trim@^1.2.7: + version "1.2.7" + resolved "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz#a68352740859f6893f14ce3ef1bb3037f7a90533" + integrity sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + +string.prototype.trimend@^1.0.6: + version "1.0.6" + resolved "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" + integrity sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + +string.prototype.trimstart@^1.0.6: + version "1.0.6" + resolved "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz#e90ab66aa8e4007d92ef591bbf3cd422c56bdcf4" + integrity sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.20.4" + string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -10094,6 +10823,11 @@ strip-final-newline@^2.0.0: resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== +strip-final-newline@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" + integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== + strip-indent@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001" @@ -10251,6 +10985,14 @@ symbol-tree@^3.2.4: resolved "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== +synckit@^0.8.5: + version "0.8.5" + resolved "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz#b7f4358f9bb559437f9f167eb6bc46b3c9818fa3" + integrity sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q== + dependencies: + "@pkgr/utils" "^2.3.1" + tslib "^2.5.0" + table@^6.0.9, table@^6.6.0: version "6.7.1" resolved "https://registry.npmjs.org/table/-/table-6.7.1.tgz#ee05592b7143831a8c94f3cee6aae4c1ccef33e2" @@ -10429,6 +11171,11 @@ timsort@~0.3.0: resolved "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= +titleize@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz#71c12eb7fdd2558aa8a44b0be83b8a76694acd53" + integrity sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ== + tmp@^0.0.33: version "0.0.33" resolved "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -10592,6 +11339,16 @@ ts-node@^10.7.0: v8-compile-cache-lib "^3.0.0" yn "3.1.1" +tsconfig-paths@^3.14.1: + version "3.14.2" + resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088" + integrity sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.2" + minimist "^1.2.6" + strip-bom "^3.0.0" + tsconfig-paths@^4.1.2: version "4.2.0" resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz#ef78e19039133446d244beac0fd6a1632e2d107c" @@ -10616,6 +11373,11 @@ tslib@^2.4.0: resolved "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== +tslib@^2.5.0, tslib@^2.6.0: + version "2.6.0" + resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz#b295854684dbda164e181d259a22cd779dcd7bc3" + integrity sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA== + tslib@~2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a" @@ -10706,6 +11468,45 @@ type-fest@^0.8.1: resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== +typed-array-buffer@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz#18de3e7ed7974b0a729d3feecb94338d1472cd60" + integrity sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.1" + is-typed-array "^1.1.10" + +typed-array-byte-length@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz#d787a24a995711611fb2b87a4052799517b230d0" + integrity sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA== + dependencies: + call-bind "^1.0.2" + for-each "^0.3.3" + has-proto "^1.0.1" + is-typed-array "^1.1.10" + +typed-array-byte-offset@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz#cbbe89b51fdef9cd6aaf07ad4707340abbc4ea0b" + integrity sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + has-proto "^1.0.1" + is-typed-array "^1.1.10" + +typed-array-length@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" + integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== + dependencies: + call-bind "^1.0.2" + for-each "^0.3.3" + is-typed-array "^1.1.9" + typedarray-to-buffer@^3.1.5: version "3.1.5" resolved "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" @@ -10738,6 +11539,16 @@ uglify-js@^3.1.4: resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.13.5.tgz#5d71d6dbba64cf441f32929b1efce7365bb4f113" integrity sha512-xtB8yEqIkn7zmOyS2zUNBsYCBRhDkvlNxMMY2smuJ/qA8NCHeQvKCF3i9Z4k8FJH4+PJvZRtMrPynfZ75+CSZw== +unbox-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" + integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== + dependencies: + call-bind "^1.0.2" + has-bigints "^1.0.2" + has-symbols "^1.0.3" + which-boxed-primitive "^1.0.2" + unc-path-regex@^0.1.2: version "0.1.2" resolved "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" @@ -10847,6 +11658,11 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" +untildify@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" + integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== + unzipper@^0.10.11: version "0.10.11" resolved "https://registry.npmjs.org/unzipper/-/unzipper-0.10.11.tgz#0b4991446472cbdb92ee7403909f26c2419c782e" @@ -11172,6 +11988,29 @@ whatwg-url@^8.0.0, whatwg-url@^8.5.0: tr46 "^2.1.0" webidl-conversions "^6.1.0" +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + +which-typed-array@^1.1.10: + version "1.1.10" + resolved "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.10.tgz#74baa2789991905c2076abb317103b866c64e69e" + integrity sha512-uxoA5vLUfRPdjCuJ1h5LlYdmTLbYfums398v3WLkM+i/Wltl2/XyZpQWKbN++ck5L64SR/grOHqtXCUKmlZPNA== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.0" + is-typed-array "^1.1.10" + which@^1.2.14, which@^1.3.1: version "1.3.1" resolved "https://registry.npmjs.org/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" From fbd6e2e907d8e93e7fcdfcf4f163f71576889315 Mon Sep 17 00:00:00 2001 From: Craig Spence Date: Mon, 17 Jul 2023 22:57:51 +1200 Subject: [PATCH 2/2] =?UTF-8?q?refactor(betterer=20=F0=9F=94=A7):=20add=20?= =?UTF-8?q?.js=20extensions=20to=20imports?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yaml | 2 +- test/cli/precommit-add.spec.ts | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 270713463..70cba75a8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - node-version: [16.x, 18.x, 20.x] + node-version: [16.x, 18.x] operating-system: [windows-latest, macOS-latest, ubuntu-latest] steps: diff --git a/test/cli/precommit-add.spec.ts b/test/cli/precommit-add.spec.ts index a472bcbb1..2808bcd40 100644 --- a/test/cli/precommit-add.spec.ts +++ b/test/cli/precommit-add.spec.ts @@ -47,8 +47,6 @@ export default { await cli__(fixturePath, [...ARGV, 'start'], false); - expect(process.exitCode).toBeUndefined(); - await writeFile(indexPath, `const a = 'a';\nconst one = 1;\nconsole.log(one + one);`); await cli__(fixturePath, [...ARGV, 'precommit']);