diff --git a/__utils__/assert-project/src/index.ts b/__utils__/assert-project/src/index.ts index d8ec833abd0..956a93fc8a9 100644 --- a/__utils__/assert-project/src/index.ts +++ b/__utils__/assert-project/src/index.ts @@ -1,15 +1,15 @@ import path from 'path' import { assertStore } from '@pnpm/assert-store' import { WANTED_LOCKFILE } from '@pnpm/constants' -import { LockfileV6 as Lockfile, ProjectSnapshotV6 as ProjectSnapshot } from '@pnpm/lockfile-types' -import { Modules, readModulesManifest } from '@pnpm/modules-yaml' +import { type LockfileV6 as Lockfile, type ProjectSnapshotV6 as ProjectSnapshot } from '@pnpm/lockfile-types' +import { type Modules, readModulesManifest } from '@pnpm/modules-yaml' import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import readYamlFile from 'read-yaml-file' import exists from 'path-exists' import writePkg from 'write-pkg' import isExecutable from './isExecutable' -export { isExecutable, Modules } +export { isExecutable, type Modules } export type RawLockfile = Lockfile & Partial diff --git a/__utils__/eslint-config/eslint.json b/__utils__/eslint-config/eslint.json index 48322f097ff..c033d932c27 100644 --- a/__utils__/eslint-config/eslint.json +++ b/__utils__/eslint-config/eslint.json @@ -60,6 +60,7 @@ "@typescript-eslint/dot-notation": "off", "@typescript-eslint/no-unnecessary-type-assertion": "off", "@typescript-eslint/type-annotation-spacing": "error", + "@typescript-eslint/ban-ts-comment": "off", "brace-style": [ "error", "1tbs" diff --git a/__utils__/eslint-config/package.json b/__utils__/eslint-config/package.json index 76fda808b1f..938b1828cf6 100644 --- a/__utils__/eslint-config/package.json +++ b/__utils__/eslint-config/package.json @@ -25,8 +25,8 @@ "dependencies": { "@typescript-eslint/eslint-plugin": "^5.54.0", "@typescript-eslint/parser": "^5.54.0", - "eslint": "^8.35.0", - "eslint-config-standard-with-typescript": "^26.0.0", + "eslint": "^8.36.0", + "eslint-config-standard-with-typescript": "^34.0.1", "eslint-plugin-import": "^2.27.5", "eslint-plugin-n": "^15.6.1", "eslint-plugin-node": "^11.1.0", diff --git a/__utils__/prepare/src/index.ts b/__utils__/prepare/src/index.ts index d8281692a1f..ed9a24a0f4b 100644 --- a/__utils__/prepare/src/index.ts +++ b/__utils__/prepare/src/index.ts @@ -1,13 +1,13 @@ import fs from 'fs' import path from 'path' -import { assertProject, Modules, Project } from '@pnpm/assert-project' -import { ProjectManifest } from '@pnpm/types' +import { assertProject, type Modules, type Project } from '@pnpm/assert-project' +import { type ProjectManifest } from '@pnpm/types' import uniqueString from 'unique-string' import { sync as writeJson5File } from 'write-json5-file' import { sync as writeYamlFile } from 'write-yaml-file' import writePkg from 'write-pkg' -export { Modules, Project } +export type { Modules, Project } export type ManifestFormat = 'JSON' | 'JSON5' | 'YAML' // The testing folder should be outside of the project to avoid lookup in the project's node_modules diff --git a/cli/cli-meta/src/index.ts b/cli/cli-meta/src/index.ts index 0bbb6be95fe..639009e602f 100644 --- a/cli/cli-meta/src/index.ts +++ b/cli/cli-meta/src/index.ts @@ -1,5 +1,5 @@ import path from 'path' -import { DependencyManifest } from '@pnpm/types' +import { type DependencyManifest } from '@pnpm/types' import loadJsonFile from 'load-json-file' const defaultManifest = { diff --git a/cli/cli-utils/src/getConfig.ts b/cli/cli-utils/src/getConfig.ts index debdf5ef29c..73deb399b1d 100644 --- a/cli/cli-utils/src/getConfig.ts +++ b/cli/cli-utils/src/getConfig.ts @@ -1,5 +1,5 @@ import { packageManager } from '@pnpm/cli-meta' -import { getConfig as _getConfig, CliOptions } from '@pnpm/config' +import { getConfig as _getConfig, type CliOptions } from '@pnpm/config' import { formatWarn } from '@pnpm/default-reporter' export async function getConfig ( diff --git a/cli/cli-utils/src/packageIsInstallable.ts b/cli/cli-utils/src/packageIsInstallable.ts index f3c424239aa..1e1f0a9d3b4 100644 --- a/cli/cli-utils/src/packageIsInstallable.ts +++ b/cli/cli-utils/src/packageIsInstallable.ts @@ -1,6 +1,6 @@ import { packageManager } from '@pnpm/cli-meta' import { logger } from '@pnpm/logger' -import { checkPackage, UnsupportedEngineError, WantedEngine } from '@pnpm/package-is-installable' +import { checkPackage, UnsupportedEngineError, type WantedEngine } from '@pnpm/package-is-installable' export function packageIsInstallable ( pkgPath: string, diff --git a/cli/cli-utils/src/readProjectManifest.ts b/cli/cli-utils/src/readProjectManifest.ts index d7e38ad9752..0e4e60f738f 100644 --- a/cli/cli-utils/src/readProjectManifest.ts +++ b/cli/cli-utils/src/readProjectManifest.ts @@ -1,5 +1,5 @@ import * as utils from '@pnpm/read-project-manifest' -import { ProjectManifest } from '@pnpm/types' +import { type ProjectManifest } from '@pnpm/types' import { packageIsInstallable } from './packageIsInstallable' export async function readProjectManifest ( diff --git a/cli/default-reporter/src/index.ts b/cli/default-reporter/src/index.ts index ca5cc645b76..d7bcdd89bd5 100644 --- a/cli/default-reporter/src/index.ts +++ b/cli/default-reporter/src/index.ts @@ -1,6 +1,6 @@ -import { Config } from '@pnpm/config' -import * as logs from '@pnpm/core-loggers' -import { LogLevel } from '@pnpm/logger' +import { type Config } from '@pnpm/config' +import type * as logs from '@pnpm/core-loggers' +import { type LogLevel } from '@pnpm/logger' import * as Rx from 'rxjs' import { filter, map, mergeAll } from 'rxjs/operators' import createDiffer from 'ansi-diff' diff --git a/cli/default-reporter/src/reportError.ts b/cli/default-reporter/src/reportError.ts index b2de04208be..4c92c8e1c35 100644 --- a/cli/default-reporter/src/reportError.ts +++ b/cli/default-reporter/src/reportError.ts @@ -1,8 +1,8 @@ -import { Config } from '@pnpm/config' -import { Log } from '@pnpm/core-loggers' -import { PnpmError } from '@pnpm/error' +import { type Config } from '@pnpm/config' +import { type Log } from '@pnpm/core-loggers' +import { type PnpmError } from '@pnpm/error' import { renderPeerIssues } from '@pnpm/render-peer-issues' -import { PeerDependencyIssuesByProjects } from '@pnpm/types' +import { type PeerDependencyIssuesByProjects } from '@pnpm/types' import chalk from 'chalk' import equals from 'ramda/src/equals' import StackTracey from 'stacktracey' diff --git a/cli/default-reporter/src/reporterForClient/index.ts b/cli/default-reporter/src/reporterForClient/index.ts index 34a5f0d970b..046f8549aad 100644 --- a/cli/default-reporter/src/reporterForClient/index.ts +++ b/cli/default-reporter/src/reporterForClient/index.ts @@ -1,7 +1,7 @@ -import { Config } from '@pnpm/config' -import * as logs from '@pnpm/core-loggers' -import { LogLevel } from '@pnpm/logger' -import * as Rx from 'rxjs' +import { type Config } from '@pnpm/config' +import type * as logs from '@pnpm/core-loggers' +import { type LogLevel } from '@pnpm/logger' +import type * as Rx from 'rxjs' import { throttleTime } from 'rxjs/operators' import { reportBigTarballProgress } from './reportBigTarballsProgress' import { reportContext } from './reportContext' diff --git a/cli/default-reporter/src/reporterForClient/pkgsDiff.ts b/cli/default-reporter/src/reporterForClient/pkgsDiff.ts index 2831944eeac..23a9d583e4f 100644 --- a/cli/default-reporter/src/reporterForClient/pkgsDiff.ts +++ b/cli/default-reporter/src/reporterForClient/pkgsDiff.ts @@ -1,5 +1,5 @@ -import * as logs from '@pnpm/core-loggers' -import { PackageManifest } from '@pnpm/types' +import type * as logs from '@pnpm/core-loggers' +import { type PackageManifest } from '@pnpm/types' import * as Rx from 'rxjs' import { filter, map, mapTo, reduce, scan, startWith, take } from 'rxjs/operators' import mergeRight from 'ramda/src/mergeRight' diff --git a/cli/default-reporter/src/reporterForClient/reportBigTarballsProgress.ts b/cli/default-reporter/src/reporterForClient/reportBigTarballsProgress.ts index 92adc2a1268..e34a700fdfa 100644 --- a/cli/default-reporter/src/reporterForClient/reportBigTarballsProgress.ts +++ b/cli/default-reporter/src/reporterForClient/reportBigTarballsProgress.ts @@ -1,5 +1,5 @@ -import { FetchingProgressLog } from '@pnpm/core-loggers' -import * as Rx from 'rxjs' +import { type FetchingProgressLog } from '@pnpm/core-loggers' +import type * as Rx from 'rxjs' import { filter, map, startWith } from 'rxjs/operators' import prettyBytes from 'pretty-bytes' import { diff --git a/cli/default-reporter/src/reporterForClient/reportContext.ts b/cli/default-reporter/src/reporterForClient/reportContext.ts index 53399e50512..c826eed0025 100644 --- a/cli/default-reporter/src/reporterForClient/reportContext.ts +++ b/cli/default-reporter/src/reporterForClient/reportContext.ts @@ -1,5 +1,5 @@ import path from 'path' -import { ContextLog, PackageImportMethodLog } from '@pnpm/core-loggers' +import { type ContextLog, type PackageImportMethodLog } from '@pnpm/core-loggers' import * as Rx from 'rxjs' import { map, take } from 'rxjs/operators' import normalize from 'normalize-path' diff --git a/cli/default-reporter/src/reporterForClient/reportDeprecations.ts b/cli/default-reporter/src/reporterForClient/reportDeprecations.ts index 44019341454..fdb861a54ab 100644 --- a/cli/default-reporter/src/reporterForClient/reportDeprecations.ts +++ b/cli/default-reporter/src/reporterForClient/reportDeprecations.ts @@ -1,4 +1,4 @@ -import { DeprecationLog } from '@pnpm/core-loggers' +import { type DeprecationLog } from '@pnpm/core-loggers' import * as Rx from 'rxjs' import { map } from 'rxjs/operators' import chalk from 'chalk' diff --git a/cli/default-reporter/src/reporterForClient/reportExecutionTime.ts b/cli/default-reporter/src/reporterForClient/reportExecutionTime.ts index 87099550286..7ccc2594a27 100644 --- a/cli/default-reporter/src/reporterForClient/reportExecutionTime.ts +++ b/cli/default-reporter/src/reporterForClient/reportExecutionTime.ts @@ -1,5 +1,5 @@ import prettyMs from 'pretty-ms' -import { ExecutionTimeLog } from '@pnpm/core-loggers' +import { type ExecutionTimeLog } from '@pnpm/core-loggers' import * as Rx from 'rxjs' import { map, take } from 'rxjs/operators' diff --git a/cli/default-reporter/src/reporterForClient/reportHooks.ts b/cli/default-reporter/src/reporterForClient/reportHooks.ts index d8a97f25b7d..323d8a55971 100644 --- a/cli/default-reporter/src/reporterForClient/reportHooks.ts +++ b/cli/default-reporter/src/reporterForClient/reportHooks.ts @@ -1,4 +1,4 @@ -import { HookLog } from '@pnpm/core-loggers' +import { type HookLog } from '@pnpm/core-loggers' import * as Rx from 'rxjs' import { map } from 'rxjs/operators' import chalk from 'chalk' diff --git a/cli/default-reporter/src/reporterForClient/reportInstallChecks.ts b/cli/default-reporter/src/reporterForClient/reportInstallChecks.ts index 972386b7b22..39fdc67e1ab 100644 --- a/cli/default-reporter/src/reporterForClient/reportInstallChecks.ts +++ b/cli/default-reporter/src/reporterForClient/reportInstallChecks.ts @@ -1,4 +1,4 @@ -import { InstallCheckLog } from '@pnpm/core-loggers' +import { type InstallCheckLog } from '@pnpm/core-loggers' import * as Rx from 'rxjs' import { filter, map } from 'rxjs/operators' import { formatWarn } from './utils/formatWarn' diff --git a/cli/default-reporter/src/reporterForClient/reportLifecycleScripts.ts b/cli/default-reporter/src/reporterForClient/reportLifecycleScripts.ts index 1ee342c9b2d..b6abcdde2f3 100644 --- a/cli/default-reporter/src/reporterForClient/reportLifecycleScripts.ts +++ b/cli/default-reporter/src/reporterForClient/reportLifecycleScripts.ts @@ -1,5 +1,5 @@ import path from 'path' -import { LifecycleLog } from '@pnpm/core-loggers' +import { type LifecycleLog } from '@pnpm/core-loggers' import * as Rx from 'rxjs' import { buffer, filter, groupBy, map, mergeAll, mergeMap } from 'rxjs/operators' import chalk from 'chalk' diff --git a/cli/default-reporter/src/reporterForClient/reportMisc.ts b/cli/default-reporter/src/reporterForClient/reportMisc.ts index 3a6b9bd1f19..6e33fcf4c6e 100644 --- a/cli/default-reporter/src/reporterForClient/reportMisc.ts +++ b/cli/default-reporter/src/reporterForClient/reportMisc.ts @@ -1,7 +1,7 @@ import os from 'os' -import { Config } from '@pnpm/config' -import { Log, RegistryLog } from '@pnpm/core-loggers' -import { LogLevel } from '@pnpm/logger' +import { type Config } from '@pnpm/config' +import { type Log, type RegistryLog } from '@pnpm/core-loggers' +import { type LogLevel } from '@pnpm/logger' import * as Rx from 'rxjs' import { filter, map } from 'rxjs/operators' import { reportError } from '../reportError' diff --git a/cli/default-reporter/src/reporterForClient/reportPeerDependencyIssues.ts b/cli/default-reporter/src/reporterForClient/reportPeerDependencyIssues.ts index 68e788a6ff8..25758d8ee4b 100644 --- a/cli/default-reporter/src/reporterForClient/reportPeerDependencyIssues.ts +++ b/cli/default-reporter/src/reporterForClient/reportPeerDependencyIssues.ts @@ -1,4 +1,4 @@ -import { PeerDependencyIssuesLog } from '@pnpm/core-loggers' +import { type PeerDependencyIssuesLog } from '@pnpm/core-loggers' import { renderPeerIssues } from '@pnpm/render-peer-issues' import * as Rx from 'rxjs' import { map, take } from 'rxjs/operators' diff --git a/cli/default-reporter/src/reporterForClient/reportProgress.ts b/cli/default-reporter/src/reporterForClient/reportProgress.ts index 14a570c9c57..bc81b854058 100644 --- a/cli/default-reporter/src/reporterForClient/reportProgress.ts +++ b/cli/default-reporter/src/reporterForClient/reportProgress.ts @@ -1,4 +1,4 @@ -import { ProgressLog, StageLog } from '@pnpm/core-loggers' +import { type ProgressLog, type StageLog } from '@pnpm/core-loggers' import * as Rx from 'rxjs' import { filter, map, mapTo, takeWhile, startWith, take } from 'rxjs/operators' import { hlValue } from './outputConstants' diff --git a/cli/default-reporter/src/reporterForClient/reportRequestRetry.ts b/cli/default-reporter/src/reporterForClient/reportRequestRetry.ts index 0d83c0a5cc2..517d3df1eb4 100644 --- a/cli/default-reporter/src/reporterForClient/reportRequestRetry.ts +++ b/cli/default-reporter/src/reporterForClient/reportRequestRetry.ts @@ -1,4 +1,4 @@ -import { RequestRetryLog } from '@pnpm/core-loggers' +import { type RequestRetryLog } from '@pnpm/core-loggers' import * as Rx from 'rxjs' import { map } from 'rxjs/operators' import prettyMilliseconds from 'pretty-ms' diff --git a/cli/default-reporter/src/reporterForClient/reportScope.ts b/cli/default-reporter/src/reporterForClient/reportScope.ts index 890ce476cfa..324f0bfed7c 100644 --- a/cli/default-reporter/src/reporterForClient/reportScope.ts +++ b/cli/default-reporter/src/reporterForClient/reportScope.ts @@ -1,4 +1,4 @@ -import { ScopeLog } from '@pnpm/core-loggers' +import { type ScopeLog } from '@pnpm/core-loggers' import * as Rx from 'rxjs' import { map, take } from 'rxjs/operators' diff --git a/cli/default-reporter/src/reporterForClient/reportSkippedOptionalDependencies.ts b/cli/default-reporter/src/reporterForClient/reportSkippedOptionalDependencies.ts index f141dfc1e2e..2efe44da082 100644 --- a/cli/default-reporter/src/reporterForClient/reportSkippedOptionalDependencies.ts +++ b/cli/default-reporter/src/reporterForClient/reportSkippedOptionalDependencies.ts @@ -1,4 +1,4 @@ -import { SkippedOptionalDependencyLog } from '@pnpm/core-loggers' +import { type SkippedOptionalDependencyLog } from '@pnpm/core-loggers' import * as Rx from 'rxjs' import { filter, map } from 'rxjs/operators' diff --git a/cli/default-reporter/src/reporterForClient/reportStats.ts b/cli/default-reporter/src/reporterForClient/reportStats.ts index 74e495d8856..c88b2038e65 100644 --- a/cli/default-reporter/src/reporterForClient/reportStats.ts +++ b/cli/default-reporter/src/reporterForClient/reportStats.ts @@ -1,4 +1,4 @@ -import { StatsLog } from '@pnpm/core-loggers' +import { type StatsLog } from '@pnpm/core-loggers' import * as Rx from 'rxjs' import { filter, take, reduce, map } from 'rxjs/operators' import chalk from 'chalk' diff --git a/cli/default-reporter/src/reporterForClient/reportSummary.ts b/cli/default-reporter/src/reporterForClient/reportSummary.ts index 4aaf5f59628..f361cdbf6d0 100644 --- a/cli/default-reporter/src/reporterForClient/reportSummary.ts +++ b/cli/default-reporter/src/reporterForClient/reportSummary.ts @@ -1,11 +1,11 @@ import path from 'path' import { - DeprecationLog, - PackageManifestLog, - RootLog, - SummaryLog, + type DeprecationLog, + type PackageManifestLog, + type RootLog, + type SummaryLog, } from '@pnpm/core-loggers' -import { Config } from '@pnpm/config' +import { type Config } from '@pnpm/config' import * as Rx from 'rxjs' import { map, take } from 'rxjs/operators' import chalk from 'chalk' @@ -13,7 +13,7 @@ import semver from 'semver' import { EOL } from '../constants' import { getPkgsDiff, - PackageDiff, + type PackageDiff, propertyByDependencyType, } from './pkgsDiff' import { diff --git a/cli/default-reporter/src/reporterForClient/reportUpdateCheck.ts b/cli/default-reporter/src/reporterForClient/reportUpdateCheck.ts index 151a50ca6b3..8dae969ba1b 100644 --- a/cli/default-reporter/src/reporterForClient/reportUpdateCheck.ts +++ b/cli/default-reporter/src/reporterForClient/reportUpdateCheck.ts @@ -1,4 +1,4 @@ -import { UpdateCheckLog } from '@pnpm/core-loggers' +import { type UpdateCheckLog } from '@pnpm/core-loggers' import boxen from 'boxen' import chalk from 'chalk' import * as Rx from 'rxjs' diff --git a/cli/default-reporter/src/reporterForServer.ts b/cli/default-reporter/src/reporterForServer.ts index 803dc13ebb4..cc4fce6c69b 100644 --- a/cli/default-reporter/src/reporterForServer.ts +++ b/cli/default-reporter/src/reporterForServer.ts @@ -1,6 +1,6 @@ -import { Config } from '@pnpm/config' -import { Log } from '@pnpm/core-loggers' -import * as Rx from 'rxjs' +import { type Config } from '@pnpm/config' +import { type Log } from '@pnpm/core-loggers' +import type * as Rx from 'rxjs' import chalk from 'chalk' import { reportError } from './reportError' diff --git a/cli/default-reporter/test/filterLogHook.ts b/cli/default-reporter/test/filterLogHook.ts index 1702c27330a..9e33ddf957e 100644 --- a/cli/default-reporter/test/filterLogHook.ts +++ b/cli/default-reporter/test/filterLogHook.ts @@ -1,4 +1,4 @@ -import { Log } from '@pnpm/core-loggers' +import { type Log } from '@pnpm/core-loggers' import { toOutput$ } from '@pnpm/default-reporter' import { logger, createStreamParser } from '@pnpm/logger' diff --git a/cli/default-reporter/test/index.ts b/cli/default-reporter/test/index.ts index cac578b1389..eddd3fcb7e6 100644 --- a/cli/default-reporter/test/index.ts +++ b/cli/default-reporter/test/index.ts @@ -1,6 +1,6 @@ /// import path from 'path' -import { Config } from '@pnpm/config' +import { type Config } from '@pnpm/config' import { deprecationLogger, hookLogger, diff --git a/cli/default-reporter/test/reportingProgress.ts b/cli/default-reporter/test/reportingProgress.ts index fc345fbfe02..9edcdfb96b6 100644 --- a/cli/default-reporter/test/reportingProgress.ts +++ b/cli/default-reporter/test/reportingProgress.ts @@ -1,4 +1,4 @@ -import { Config } from '@pnpm/config' +import { type Config } from '@pnpm/config' import { fetchingProgressLogger, progressLogger, diff --git a/cli/default-reporter/test/reportingScope.ts b/cli/default-reporter/test/reportingScope.ts index 84514c4804e..783c410af06 100644 --- a/cli/default-reporter/test/reportingScope.ts +++ b/cli/default-reporter/test/reportingScope.ts @@ -1,4 +1,4 @@ -import { Config } from '@pnpm/config' +import { type Config } from '@pnpm/config' import { scopeLogger } from '@pnpm/core-loggers' import { toOutput$ } from '@pnpm/default-reporter' import { createStreamParser } from '@pnpm/logger' diff --git a/cli/default-reporter/test/reportingUpdateCheck.ts b/cli/default-reporter/test/reportingUpdateCheck.ts index 13bee83996f..b6b8f66092e 100644 --- a/cli/default-reporter/test/reportingUpdateCheck.ts +++ b/cli/default-reporter/test/reportingUpdateCheck.ts @@ -1,4 +1,4 @@ -import { Config } from '@pnpm/config' +import { type Config } from '@pnpm/config' import { updateCheckLogger } from '@pnpm/core-loggers' import { toOutput$ } from '@pnpm/default-reporter' import { createStreamParser } from '@pnpm/logger' diff --git a/cli/parse-cli-args/test/index.ts b/cli/parse-cli-args/test/index.ts index d943820f37b..c3796514397 100644 --- a/cli/parse-cli-args/test/index.ts +++ b/cli/parse-cli-args/test/index.ts @@ -1,5 +1,5 @@ import os from 'os' -import { PnpmError } from '@pnpm/error' +import { type PnpmError } from '@pnpm/error' import { parseCliArgs } from '@pnpm/parse-cli-args' import tempy from 'tempy' diff --git a/config/config/src/Config.ts b/config/config/src/Config.ts index 03d7bd2f259..7aca28b3c13 100644 --- a/config/config/src/Config.ts +++ b/config/config/src/Config.ts @@ -1,8 +1,8 @@ import { - Project, - ProjectManifest, - ProjectsGraph, - Registries, + type Project, + type ProjectManifest, + type ProjectsGraph, + type Registries, } from '@pnpm/types' import type { Hooks } from '@pnpm/pnpmfile' diff --git a/config/config/src/index.ts b/config/config/src/index.ts index 17dffc2f246..f9693eaf3fc 100644 --- a/config/config/src/index.ts +++ b/config/config/src/index.ts @@ -18,15 +18,15 @@ import { checkGlobalBinDir } from './checkGlobalBinDir' import { getScopeRegistries } from './getScopeRegistries' import { getCacheDir, getConfigDir, getDataDir, getStateDir } from './dirs' import { - Config, - ConfigWithDeprecatedSettings, - UniversalOptions, + type Config, + type ConfigWithDeprecatedSettings, + type UniversalOptions, } from './Config' import { getWorkspaceConcurrency } from './concurrency' export * from './readLocalConfig' -export { Config, UniversalOptions } +export type { Config, UniversalOptions } const npmDefaults = loadNpmConf.defaults diff --git a/config/config/test/index.ts b/config/config/test/index.ts index e5675ff1eb3..6c7ea37e314 100644 --- a/config/config/test/index.ts +++ b/config/config/test/index.ts @@ -4,7 +4,7 @@ import path from 'path' import PATH from 'path-name' import { getCurrentBranch } from '@pnpm/git-utils' import { getConfig } from '@pnpm/config' -import { PnpmError } from '@pnpm/error' +import { type PnpmError } from '@pnpm/error' import loadNpmConf from '@pnpm/npm-conf' import { prepare, prepareEmpty } from '@pnpm/prepare' import { fixtures } from '@pnpm/test-fixtures' diff --git a/config/normalize-registries/src/index.ts b/config/normalize-registries/src/index.ts index 87c2820fae8..a8401de51cd 100644 --- a/config/normalize-registries/src/index.ts +++ b/config/normalize-registries/src/index.ts @@ -1,4 +1,4 @@ -import { Registries } from '@pnpm/types' +import { type Registries } from '@pnpm/types' import normalizeRegistryUrl from 'normalize-registry-url' import mapValues from 'ramda/src/map' diff --git a/config/package-is-installable/src/index.ts b/config/package-is-installable/src/index.ts index e196006d126..0c0babe708b 100644 --- a/config/package-is-installable/src/index.ts +++ b/config/package-is-installable/src/index.ts @@ -2,17 +2,17 @@ import { installCheckLogger, skippedOptionalDependencyLogger, } from '@pnpm/core-loggers' -import { checkEngine, UnsupportedEngineError, WantedEngine } from './checkEngine' +import { checkEngine, UnsupportedEngineError, type WantedEngine } from './checkEngine' import { checkPlatform, UnsupportedPlatformError } from './checkPlatform' import { getSystemNodeVersion } from './getSystemNodeVersion' -export { Engine } from './checkEngine' -export { Platform, WantedPlatform } from './checkPlatform' +export type { Engine } from './checkEngine' +export type { Platform, WantedPlatform } from './checkPlatform' export { UnsupportedEngineError, UnsupportedPlatformError, - WantedEngine, + type WantedEngine, } export function packageIsInstallable ( diff --git a/config/pick-registry-for-package/src/index.ts b/config/pick-registry-for-package/src/index.ts index 21b862dfee9..f346c50a0f6 100644 --- a/config/pick-registry-for-package/src/index.ts +++ b/config/pick-registry-for-package/src/index.ts @@ -1,4 +1,4 @@ -import { Registries } from '@pnpm/types' +import { type Registries } from '@pnpm/types' export function pickRegistryForPackage (registries: Registries, packageName: string, pref?: string) { const scope = getScope(packageName, pref) diff --git a/config/plugin-commands-config/src/ConfigCommandOptions.ts b/config/plugin-commands-config/src/ConfigCommandOptions.ts index bd0be3fe544..e027b16dd48 100644 --- a/config/plugin-commands-config/src/ConfigCommandOptions.ts +++ b/config/plugin-commands-config/src/ConfigCommandOptions.ts @@ -1,4 +1,4 @@ -import { Config } from '@pnpm/config' +import { type Config } from '@pnpm/config' export type ConfigCommandOptions = Pick/' diff --git a/env/plugin-commands-env/src/node.ts b/env/plugin-commands-env/src/node.ts index dd9c02abb3d..97e69275898 100644 --- a/env/plugin-commands-env/src/node.ts +++ b/env/plugin-commands-env/src/node.ts @@ -1,7 +1,7 @@ import fs from 'fs' import path from 'path' -import { Config } from '@pnpm/config' -import { createFetchFromRegistry, FetchFromRegistry } from '@pnpm/fetch' +import { type Config } from '@pnpm/config' +import { createFetchFromRegistry, type FetchFromRegistry } from '@pnpm/fetch' import { globalInfo } from '@pnpm/logger' import { fetchNode } from '@pnpm/node.fetcher' import { getStorePath } from '@pnpm/store-path' diff --git a/exec/build-modules/src/buildSequence.ts b/exec/build-modules/src/buildSequence.ts index f386e0e04fe..5c65e60c76c 100644 --- a/exec/build-modules/src/buildSequence.ts +++ b/exec/build-modules/src/buildSequence.ts @@ -1,5 +1,5 @@ import graphSequencer from '@pnpm/graph-sequencer' -import { PackageManifest, PatchFile } from '@pnpm/types' +import { type PackageManifest, type PatchFile } from '@pnpm/types' import filter from 'ramda/src/filter' export interface DependenciesGraphNode { diff --git a/exec/build-modules/src/index.ts b/exec/build-modules/src/index.ts index d450c537365..e2f1e6abdc3 100644 --- a/exec/build-modules/src/index.ts +++ b/exec/build-modules/src/index.ts @@ -1,20 +1,20 @@ import path from 'path' -import { calcDepState, DepsStateCache } from '@pnpm/calc-dep-state' +import { calcDepState, type DepsStateCache } from '@pnpm/calc-dep-state' import { skippedOptionalDependencyLogger } from '@pnpm/core-loggers' import { runPostinstallHooks } from '@pnpm/lifecycle' import { linkBins, linkBinsOfPackages } from '@pnpm/link-bins' import { logger } from '@pnpm/logger' import { hardLinkDir } from '@pnpm/fs.hard-link-dir' import { readPackageJsonFromDir, safeReadPackageJsonFromDir } from '@pnpm/read-package-json' -import { StoreController } from '@pnpm/store-controller-types' +import { type StoreController } from '@pnpm/store-controller-types' import { applyPatchToDir } from '@pnpm/patching.apply-patch' -import { DependencyManifest } from '@pnpm/types' -import pDefer, { DeferredPromise } from 'p-defer' +import { type DependencyManifest } from '@pnpm/types' +import pDefer, { type DeferredPromise } from 'p-defer' import pickBy from 'ramda/src/pickBy' import runGroups from 'run-groups' -import { buildSequence, DependenciesGraph, DependenciesGraphNode } from './buildSequence' +import { buildSequence, type DependenciesGraph, type DependenciesGraphNode } from './buildSequence' -export { DepsStateCache } +export type { DepsStateCache } export async function buildModules ( depGraph: DependenciesGraph, diff --git a/exec/lifecycle/src/index.ts b/exec/lifecycle/src/index.ts index 8e07cebd845..e4845d41a15 100644 --- a/exec/lifecycle/src/index.ts +++ b/exec/lifecycle/src/index.ts @@ -1,9 +1,9 @@ import path from 'path' import { safeReadPackageJsonFromDir } from '@pnpm/read-package-json' import exists from 'path-exists' -import { runLifecycleHook, RunLifecycleHookOptions } from './runLifecycleHook' -import { runLifecycleHooksConcurrently, RunLifecycleHooksConcurrentlyOptions } from './runLifecycleHooksConcurrently' -import { PackageScripts } from '@pnpm/types' +import { runLifecycleHook, type RunLifecycleHookOptions } from './runLifecycleHook' +import { runLifecycleHooksConcurrently, type RunLifecycleHooksConcurrentlyOptions } from './runLifecycleHooksConcurrently' +import { type PackageScripts } from '@pnpm/types' export function makeNodeRequireOption (modulePath: string) { let { NODE_OPTIONS } = process.env @@ -14,8 +14,8 @@ export function makeNodeRequireOption (modulePath: string) { export { runLifecycleHook, runLifecycleHooksConcurrently, - RunLifecycleHookOptions, - RunLifecycleHooksConcurrentlyOptions, + type RunLifecycleHookOptions, + type RunLifecycleHooksConcurrentlyOptions, } export async function runPostinstallHooks ( diff --git a/exec/lifecycle/src/runLifecycleHook.ts b/exec/lifecycle/src/runLifecycleHook.ts index 40b97421ed6..6894f305bdb 100644 --- a/exec/lifecycle/src/runLifecycleHook.ts +++ b/exec/lifecycle/src/runLifecycleHook.ts @@ -1,7 +1,7 @@ import { lifecycleLogger } from '@pnpm/core-loggers' import { globalWarn } from '@pnpm/logger' import lifecycle from '@pnpm/npm-lifecycle' -import { DependencyManifest, ProjectManifest } from '@pnpm/types' +import { type DependencyManifest, type ProjectManifest } from '@pnpm/types' import { PnpmError } from '@pnpm/error' import { existsSync } from 'fs' diff --git a/exec/lifecycle/src/runLifecycleHooksConcurrently.ts b/exec/lifecycle/src/runLifecycleHooksConcurrently.ts index 6d1220166fe..740d2ac5695 100644 --- a/exec/lifecycle/src/runLifecycleHooksConcurrently.ts +++ b/exec/lifecycle/src/runLifecycleHooksConcurrently.ts @@ -1,10 +1,10 @@ import fs from 'fs' import path from 'path' import { fetchFromDir } from '@pnpm/directory-fetcher' -import { StoreController } from '@pnpm/store-controller-types' -import { ProjectManifest } from '@pnpm/types' +import { type StoreController } from '@pnpm/store-controller-types' +import { type ProjectManifest } from '@pnpm/types' import runGroups from 'run-groups' -import { runLifecycleHook, RunLifecycleHookOptions } from './runLifecycleHook' +import { runLifecycleHook, type RunLifecycleHookOptions } from './runLifecycleHook' export type RunLifecycleHooksConcurrentlyOptions = Omit import { promises as fs } from 'fs' import path from 'path' -import { PnpmError } from '@pnpm/error' +import { type PnpmError } from '@pnpm/error' import { readProjects } from '@pnpm/filter-workspace-packages' import { restart, @@ -31,7 +31,7 @@ test('pnpm run: returns correct exit code', async () => { rawConfig: {}, }, ['exit0']) - let err!: Error & { errno: Number } + let err!: Error & { errno: number } try { await run.handler({ dir: process.cwd(), diff --git a/exec/plugin-commands-script-runners/test/runRecursive.ts b/exec/plugin-commands-script-runners/test/runRecursive.ts index 6a693b35d80..6f6b726a994 100644 --- a/exec/plugin-commands-script-runners/test/runRecursive.ts +++ b/exec/plugin-commands-script-runners/test/runRecursive.ts @@ -3,7 +3,7 @@ import path from 'path' import { preparePackages } from '@pnpm/prepare' import { run } from '@pnpm/plugin-commands-script-runners' import { filterPkgsBySelectorObjects, readProjects } from '@pnpm/filter-workspace-packages' -import { PnpmError } from '@pnpm/error' +import { type PnpmError } from '@pnpm/error' import rimraf from '@zkochan/rimraf' import execa from 'execa' import writeYamlFile from 'write-yaml-file' diff --git a/exec/prepare-package/src/index.ts b/exec/prepare-package/src/index.ts index 96d73ad3065..bf55edc186f 100644 --- a/exec/prepare-package/src/index.ts +++ b/exec/prepare-package/src/index.ts @@ -1,8 +1,8 @@ import fs from 'fs' import path from 'path' -import { runLifecycleHook, RunLifecycleHookOptions } from '@pnpm/lifecycle' +import { runLifecycleHook, type RunLifecycleHookOptions } from '@pnpm/lifecycle' import { safeReadPackageJsonFromDir } from '@pnpm/read-package-json' -import { PackageManifest } from '@pnpm/types' +import { type PackageManifest } from '@pnpm/types' import rimraf from '@zkochan/rimraf' import preferredPM from 'preferred-pm' import omit from 'ramda/src/omit' diff --git a/exec/run-npm/src/index.ts b/exec/run-npm/src/index.ts index 81ca76cb5e8..9b15a2f9c43 100644 --- a/exec/run-npm/src/index.ts +++ b/exec/run-npm/src/index.ts @@ -1,4 +1,4 @@ -import childProcess from 'child_process' +import type childProcess from 'child_process' import path from 'path' import spawn from 'cross-spawn' import PATH from 'path-name' diff --git a/fetching/directory-fetcher/src/index.ts b/fetching/directory-fetcher/src/index.ts index c7b9c396862..0edbb38af60 100644 --- a/fetching/directory-fetcher/src/index.ts +++ b/fetching/directory-fetcher/src/index.ts @@ -1,4 +1,4 @@ -import { promises as fs, Stats } from 'fs' +import { promises as fs, type Stats } from 'fs' import path from 'path' import type { DirectoryFetcher, DirectoryFetcherOptions } from '@pnpm/fetcher-base' import { logger } from '@pnpm/logger' diff --git a/fetching/fetcher-base/src/index.ts b/fetching/fetcher-base/src/index.ts index 42587e8c716..fc1620bdeb0 100644 --- a/fetching/fetcher-base/src/index.ts +++ b/fetching/fetcher-base/src/index.ts @@ -1,4 +1,4 @@ -import { Resolution, GitResolution, DirectoryResolution } from '@pnpm/resolver-base' +import { type Resolution, type GitResolution, type DirectoryResolution } from '@pnpm/resolver-base' import type { DeferredManifestPromise, Cafs, FilesIndex } from '@pnpm/cafs-types' export interface FetchOptions { diff --git a/fetching/git-fetcher/test/index.ts b/fetching/git-fetcher/test/index.ts index 2e196f98646..5281de34ae7 100644 --- a/fetching/git-fetcher/test/index.ts +++ b/fetching/git-fetcher/test/index.ts @@ -3,7 +3,7 @@ import path from 'path' import { createCafsStore } from '@pnpm/create-cafs-store' import { createGitFetcher } from '@pnpm/git-fetcher' import { globalWarn } from '@pnpm/logger' -import { DependencyManifest } from '@pnpm/types' +import { type DependencyManifest } from '@pnpm/types' import pDefer from 'p-defer' import tempy from 'tempy' import execa from 'execa' diff --git a/fetching/tarball-fetcher/src/gitHostedTarballFetcher.ts b/fetching/tarball-fetcher/src/gitHostedTarballFetcher.ts index 78fa6c565a9..dc5d644cf7d 100644 --- a/fetching/tarball-fetcher/src/gitHostedTarballFetcher.ts +++ b/fetching/tarball-fetcher/src/gitHostedTarballFetcher.ts @@ -1,4 +1,4 @@ -import { FetchFunction, FetchOptions } from '@pnpm/fetcher-base' +import { type FetchFunction, type FetchOptions } from '@pnpm/fetcher-base' import type { Cafs, FilesIndex, PackageFileInfo } from '@pnpm/cafs-types' import { globalWarn } from '@pnpm/logger' import { preparePackage } from '@pnpm/prepare-package' diff --git a/fetching/tarball-fetcher/src/index.ts b/fetching/tarball-fetcher/src/index.ts index 11a189e0c55..782bd77e427 100644 --- a/fetching/tarball-fetcher/src/index.ts +++ b/fetching/tarball-fetcher/src/index.ts @@ -1,17 +1,17 @@ import { PnpmError } from '@pnpm/error' import { - FetchFunction, - FetchOptions, + type FetchFunction, + type FetchOptions, } from '@pnpm/fetcher-base' import type { Cafs } from '@pnpm/cafs-types' import { - FetchFromRegistry, - GetAuthHeader, - RetryTimeoutOptions, + type FetchFromRegistry, + type GetAuthHeader, + type RetryTimeoutOptions, } from '@pnpm/fetching-types' import { createDownloader, - DownloadFunction, + type DownloadFunction, TarballIntegrityError, } from './remoteTarballFetcher' import { createLocalTarballFetcher } from './localTarballFetcher' diff --git a/fetching/tarball-fetcher/src/localTarballFetcher.ts b/fetching/tarball-fetcher/src/localTarballFetcher.ts index 7a2ae42ccfa..56f98277c3f 100644 --- a/fetching/tarball-fetcher/src/localTarballFetcher.ts +++ b/fetching/tarball-fetcher/src/localTarballFetcher.ts @@ -1,5 +1,5 @@ import path from 'path' -import { FetchFunction, FetchOptions, FetchResult } from '@pnpm/fetcher-base' +import { type FetchFunction, type FetchOptions, type FetchResult } from '@pnpm/fetcher-base' import type { Cafs, DeferredManifestPromise } from '@pnpm/cafs-types' import gfs from '@pnpm/graceful-fs' import ssri from 'ssri' diff --git a/fetching/tarball-fetcher/src/remoteTarballFetcher.ts b/fetching/tarball-fetcher/src/remoteTarballFetcher.ts index 3448e909ac0..8f89e7d6a6f 100644 --- a/fetching/tarball-fetcher/src/remoteTarballFetcher.ts +++ b/fetching/tarball-fetcher/src/remoteTarballFetcher.ts @@ -1,9 +1,9 @@ -import { IncomingMessage } from 'http' +import { type IncomingMessage } from 'http' import { requestRetryLogger } from '@pnpm/core-loggers' import { FetchError, PnpmError } from '@pnpm/error' -import { FetchResult } from '@pnpm/fetcher-base' +import { type FetchResult } from '@pnpm/fetcher-base' import type { Cafs, DeferredManifestPromise } from '@pnpm/cafs-types' -import { FetchFromRegistry } from '@pnpm/fetching-types' +import { type FetchFromRegistry } from '@pnpm/fetching-types' import * as retry from '@zkochan/retry' import ssri from 'ssri' import { BadTarballError } from './errorTypes' diff --git a/fs/find-packages/src/index.ts b/fs/find-packages/src/index.ts index 1e6885b0bbb..29f526f481d 100644 --- a/fs/find-packages/src/index.ts +++ b/fs/find-packages/src/index.ts @@ -1,6 +1,6 @@ import path from 'path' import { readExactProjectManifest } from '@pnpm/read-project-manifest' -import { ProjectManifest } from '@pnpm/types' +import { type ProjectManifest } from '@pnpm/types' import { lexCompare } from '@pnpm/util.lex-comparator' import fastGlob from 'fast-glob' import pFilter from 'p-filter' diff --git a/fs/indexed-pkg-importer/src/index.ts b/fs/indexed-pkg-importer/src/index.ts index 5fd67162b22..692690277ed 100644 --- a/fs/indexed-pkg-importer/src/index.ts +++ b/fs/indexed-pkg-importer/src/index.ts @@ -1,12 +1,12 @@ -import { constants, Stats } from 'fs' +import { constants, type Stats } from 'fs' import fs from '@pnpm/graceful-fs' import path from 'path' import { globalInfo, globalWarn } from '@pnpm/logger' import { packageImportMethodLogger } from '@pnpm/core-loggers' -import { FilesMap, ImportOptions, ImportIndexedPackage } from '@pnpm/store-controller-types' +import { type FilesMap, type ImportOptions, type ImportIndexedPackage } from '@pnpm/store-controller-types' import pLimit from 'p-limit' import exists from 'path-exists' -import { importIndexedDir, ImportFile } from './importIndexedDir' +import { importIndexedDir, type ImportFile } from './importIndexedDir' const limitLinking = pLimit(16) diff --git a/fs/symlink-dependency/src/symlinkDirectRootDependency.ts b/fs/symlink-dependency/src/symlinkDirectRootDependency.ts index 643835081b9..0040d07864d 100644 --- a/fs/symlink-dependency/src/symlinkDirectRootDependency.ts +++ b/fs/symlink-dependency/src/symlinkDirectRootDependency.ts @@ -1,11 +1,11 @@ import { promises as fs } from 'fs' import path from 'path' import { - DependencyType, + type DependencyType, rootLogger, } from '@pnpm/core-loggers' import { globalWarn } from '@pnpm/logger' -import { DependenciesField } from '@pnpm/types' +import { type DependenciesField } from '@pnpm/types' import symlinkDir from 'symlink-dir' const DEP_TYPE_BY_DEPS_FIELD_NAME = { diff --git a/hooks/pnpmfile/src/requireHooks.ts b/hooks/pnpmfile/src/requireHooks.ts index e41403d7526..9f5f4364bf7 100644 --- a/hooks/pnpmfile/src/requireHooks.ts +++ b/hooks/pnpmfile/src/requireHooks.ts @@ -5,7 +5,7 @@ import pathAbsolute from 'path-absolute' import type { Lockfile } from '@pnpm/lockfile-types' import type { Log } from '@pnpm/core-loggers' import type { CustomFetchers } from '@pnpm/fetcher-base' -import { ImportIndexedPackage } from '@pnpm/store-controller-types' +import { type ImportIndexedPackage } from '@pnpm/store-controller-types' import { requirePnpmfile } from './requirePnpmfile' interface HookContext { diff --git a/hooks/pnpmfile/src/requirePnpmfile.ts b/hooks/pnpmfile/src/requirePnpmfile.ts index 416401cd251..a5f88aaa9c1 100644 --- a/hooks/pnpmfile/src/requirePnpmfile.ts +++ b/hooks/pnpmfile/src/requirePnpmfile.ts @@ -1,7 +1,7 @@ import fs from 'fs' import { PnpmError } from '@pnpm/error' import { logger } from '@pnpm/logger' -import { PackageManifest } from '@pnpm/types' +import { type PackageManifest } from '@pnpm/types' import chalk from 'chalk' export class BadReadPackageHookError extends PnpmError { diff --git a/hooks/pnpmfile/test/index.ts b/hooks/pnpmfile/test/index.ts index 058ccf90bbb..4568fd093a3 100644 --- a/hooks/pnpmfile/test/index.ts +++ b/hooks/pnpmfile/test/index.ts @@ -1,5 +1,5 @@ import path from 'path' -import { Log } from '@pnpm/core-loggers' +import { type Log } from '@pnpm/core-loggers' import { requireHooks, requirePnpmfile, BadReadPackageHookError } from '@pnpm/pnpmfile' test('ignoring a pnpmfile that exports undefined', () => { diff --git a/hooks/read-package-hook/src/createPackageExtender.ts b/hooks/read-package-hook/src/createPackageExtender.ts index d956f4ec347..04638b6b725 100644 --- a/hooks/read-package-hook/src/createPackageExtender.ts +++ b/hooks/read-package-hook/src/createPackageExtender.ts @@ -1,4 +1,4 @@ -import { PackageManifest, PackageExtension, ReadPackageHook } from '@pnpm/types' +import { type PackageManifest, type PackageExtension, type ReadPackageHook } from '@pnpm/types' import { parseWantedDependency } from '@pnpm/parse-wanted-dependency' import semver from 'semver' diff --git a/hooks/read-package-hook/src/createPeerDependencyPatcher.ts b/hooks/read-package-hook/src/createPeerDependencyPatcher.ts index 9de1ca9d1d1..c5a20a1558f 100644 --- a/hooks/read-package-hook/src/createPeerDependencyPatcher.ts +++ b/hooks/read-package-hook/src/createPeerDependencyPatcher.ts @@ -1,8 +1,8 @@ import semver from 'semver' import isEmpty from 'ramda/src/isEmpty' -import { PeerDependencyRules, ReadPackageHook, PackageManifest, ProjectManifest } from '@pnpm/types' +import { type PeerDependencyRules, type ReadPackageHook, type PackageManifest, type ProjectManifest } from '@pnpm/types' import { PnpmError } from '@pnpm/error' -import { parseOverrides, VersionOverride } from '@pnpm/parse-overrides' +import { parseOverrides, type VersionOverride } from '@pnpm/parse-overrides' import { createMatcher } from '@pnpm/matcher' import { isSubRange } from './isSubRange' diff --git a/hooks/read-package-hook/src/createReadPackageHook.ts b/hooks/read-package-hook/src/createReadPackageHook.ts index bce6a61be85..9bf3a7b818b 100644 --- a/hooks/read-package-hook/src/createReadPackageHook.ts +++ b/hooks/read-package-hook/src/createReadPackageHook.ts @@ -1,10 +1,10 @@ import { packageExtensions as compatPackageExtensions } from '@yarnpkg/extensions' import { - PackageExtension, - PackageManifest, - PeerDependencyRules, - ProjectManifest, - ReadPackageHook, + type PackageExtension, + type PackageManifest, + type PeerDependencyRules, + type ProjectManifest, + type ReadPackageHook, } from '@pnpm/types' import isEmpty from 'ramda/src/isEmpty' import pipeWith from 'ramda/src/pipeWith' diff --git a/hooks/read-package-hook/src/createVersionsOverrider.ts b/hooks/read-package-hook/src/createVersionsOverrider.ts index d2a7c505900..f820e898bf6 100644 --- a/hooks/read-package-hook/src/createVersionsOverrider.ts +++ b/hooks/read-package-hook/src/createVersionsOverrider.ts @@ -1,7 +1,7 @@ import path from 'path' import semver from 'semver' import partition from 'ramda/src/partition' -import { Dependencies, PackageManifest, ReadPackageHook } from '@pnpm/types' +import { type Dependencies, type PackageManifest, type ReadPackageHook } from '@pnpm/types' import { PnpmError } from '@pnpm/error' import { parseOverrides } from '@pnpm/parse-overrides' import normalizePath from 'normalize-path' diff --git a/hooks/read-package-hook/test/createPeerDependencyPatcher.test.ts b/hooks/read-package-hook/test/createPeerDependencyPatcher.test.ts index ca4dbebcad6..8231572e731 100644 --- a/hooks/read-package-hook/test/createPeerDependencyPatcher.test.ts +++ b/hooks/read-package-hook/test/createPeerDependencyPatcher.test.ts @@ -1,4 +1,4 @@ -import { ProjectManifest } from '@pnpm/types' +import { type ProjectManifest } from '@pnpm/types' import { createPeerDependencyPatcher } from '../lib/createPeerDependencyPatcher' test('createPeerDependencyPatcher() ignores missing', () => { diff --git a/lockfile/audit/src/index.ts b/lockfile/audit/src/index.ts index c96b2e59571..e7292787cb6 100644 --- a/lockfile/audit/src/index.ts +++ b/lockfile/audit/src/index.ts @@ -1,11 +1,11 @@ import path from 'path' import { PnpmError } from '@pnpm/error' -import { AgentOptions, fetchWithAgent, RetryTimeoutOptions } from '@pnpm/fetch' -import { GetAuthHeader } from '@pnpm/fetching-types' -import { Lockfile } from '@pnpm/lockfile-types' -import { DependenciesField } from '@pnpm/types' +import { type AgentOptions, fetchWithAgent, type RetryTimeoutOptions } from '@pnpm/fetch' +import { type GetAuthHeader } from '@pnpm/fetching-types' +import { type Lockfile } from '@pnpm/lockfile-types' +import { type DependenciesField } from '@pnpm/types' import { lockfileToAuditTree } from './lockfileToAuditTree' -import { AuditReport } from './types' +import { type AuditReport } from './types' import { searchForPackages, flattenSearchedPackages } from '@pnpm/list' export * from './types' diff --git a/lockfile/audit/src/lockfileToAuditTree.ts b/lockfile/audit/src/lockfileToAuditTree.ts index b435bacd8fe..83fd67153b6 100644 --- a/lockfile/audit/src/lockfileToAuditTree.ts +++ b/lockfile/audit/src/lockfileToAuditTree.ts @@ -1,8 +1,8 @@ import path from 'path' -import { Lockfile, TarballResolution } from '@pnpm/lockfile-types' +import { type Lockfile, type TarballResolution } from '@pnpm/lockfile-types' import { nameVerFromPkgSnapshot } from '@pnpm/lockfile-utils' -import { lockfileWalkerGroupImporterSteps, LockfileWalkerStep } from '@pnpm/lockfile-walker' -import { DependenciesField } from '@pnpm/types' +import { lockfileWalkerGroupImporterSteps, type LockfileWalkerStep } from '@pnpm/lockfile-walker' +import { type DependenciesField } from '@pnpm/types' import { readProjectManifest } from '@pnpm/read-project-manifest' import mapValues from 'ramda/src/map' @@ -18,7 +18,7 @@ export type AuditTree = AuditNode & { name?: string install: string[] remove: string[] - metadata: Object + metadata: unknown } export async function lockfileToAuditTree ( diff --git a/lockfile/audit/src/types.ts b/lockfile/audit/src/types.ts index f69c0d4fe61..6df48d1064e 100644 --- a/lockfile/audit/src/types.ts +++ b/lockfile/audit/src/types.ts @@ -72,7 +72,7 @@ export interface AuditMetadata { export interface AuditReport { actions: AuditAction[] advisories: { [id: string]: AuditAdvisory } - muted: Object[] + muted: unknown[] metadata: AuditMetadata } diff --git a/lockfile/audit/test/index.ts b/lockfile/audit/test/index.ts index 11ffe1eaa6f..734e9339346 100644 --- a/lockfile/audit/test/index.ts +++ b/lockfile/audit/test/index.ts @@ -1,6 +1,6 @@ import { audit } from '@pnpm/audit' import { LOCKFILE_VERSION } from '@pnpm/constants' -import { PnpmError } from '@pnpm/error' +import { type PnpmError } from '@pnpm/error' import { fixtures } from '@pnpm/test-fixtures' import nock from 'nock' import { lockfileToAuditTree } from '../lib/lockfileToAuditTree' diff --git a/lockfile/filter-lockfile/src/filterImporter.ts b/lockfile/filter-lockfile/src/filterImporter.ts index 544dff98409..b62b8613662 100644 --- a/lockfile/filter-lockfile/src/filterImporter.ts +++ b/lockfile/filter-lockfile/src/filterImporter.ts @@ -1,5 +1,5 @@ -import { ProjectSnapshot } from '@pnpm/lockfile-types' -import { DependenciesField } from '@pnpm/types' +import { type ProjectSnapshot } from '@pnpm/lockfile-types' +import { type DependenciesField } from '@pnpm/types' export function filterImporter ( importer: ProjectSnapshot, diff --git a/lockfile/filter-lockfile/src/filterLockfile.ts b/lockfile/filter-lockfile/src/filterLockfile.ts index 5352cb4e2cc..836adbbf941 100644 --- a/lockfile/filter-lockfile/src/filterLockfile.ts +++ b/lockfile/filter-lockfile/src/filterLockfile.ts @@ -1,5 +1,5 @@ -import { Lockfile } from '@pnpm/lockfile-types' -import { DependenciesField } from '@pnpm/types' +import { type Lockfile } from '@pnpm/lockfile-types' +import { type DependenciesField } from '@pnpm/types' import mapValues from 'ramda/src/map' import { filterImporter } from './filterImporter' diff --git a/lockfile/filter-lockfile/src/filterLockfileByImporters.ts b/lockfile/filter-lockfile/src/filterLockfileByImporters.ts index 8ad092a576b..3cf67caf3a1 100644 --- a/lockfile/filter-lockfile/src/filterLockfileByImporters.ts +++ b/lockfile/filter-lockfile/src/filterLockfileByImporters.ts @@ -1,12 +1,12 @@ import { WANTED_LOCKFILE } from '@pnpm/constants' import { LockfileMissingDependencyError } from '@pnpm/error' import { - Lockfile, - PackageSnapshots, + type Lockfile, + type PackageSnapshots, } from '@pnpm/lockfile-types' -import { lockfileWalker, LockfileWalkerStep } from '@pnpm/lockfile-walker' +import { lockfileWalker, type LockfileWalkerStep } from '@pnpm/lockfile-walker' import { logger } from '@pnpm/logger' -import { DependenciesField } from '@pnpm/types' +import { type DependenciesField } from '@pnpm/types' import { filterImporter } from './filterImporter' const lockfileLogger = logger('lockfile') diff --git a/lockfile/filter-lockfile/src/filterLockfileByImportersAndEngine.ts b/lockfile/filter-lockfile/src/filterLockfileByImportersAndEngine.ts index adf6324e4ae..795d6fbbd42 100644 --- a/lockfile/filter-lockfile/src/filterLockfileByImportersAndEngine.ts +++ b/lockfile/filter-lockfile/src/filterLockfileByImportersAndEngine.ts @@ -1,13 +1,13 @@ import { WANTED_LOCKFILE } from '@pnpm/constants' import { LockfileMissingDependencyError } from '@pnpm/error' import { - Lockfile, - PackageSnapshots, + type Lockfile, + type PackageSnapshots, } from '@pnpm/lockfile-types' import { nameVerFromPkgSnapshot } from '@pnpm/lockfile-utils' import { logger } from '@pnpm/logger' import { packageIsInstallable } from '@pnpm/package-is-installable' -import { DependenciesField } from '@pnpm/types' +import { type DependenciesField } from '@pnpm/types' import * as dp from '@pnpm/dependency-path' import mapValues from 'ramda/src/map' import pickBy from 'ramda/src/pickBy' diff --git a/lockfile/lockfile-file/src/experiments/inlineSpecifiersLockfileConverters.ts b/lockfile/lockfile-file/src/experiments/inlineSpecifiersLockfileConverters.ts index 030f211ca35..3bba90bcdfa 100644 --- a/lockfile/lockfile-file/src/experiments/inlineSpecifiersLockfileConverters.ts +++ b/lockfile/lockfile-file/src/experiments/inlineSpecifiersLockfileConverters.ts @@ -2,9 +2,9 @@ import * as dp from '@pnpm/dependency-path' import type { Lockfile, ProjectSnapshot, ResolvedDependencies } from '@pnpm/lockfile-types' import { INLINE_SPECIFIERS_FORMAT_LOCKFILE_VERSION_SUFFIX, - InlineSpecifiersLockfile, - InlineSpecifiersProjectSnapshot, - InlineSpecifiersResolvedDependencies, + type InlineSpecifiersLockfile, + type InlineSpecifiersProjectSnapshot, + type InlineSpecifiersResolvedDependencies, } from './InlineSpecifiersLockfile' export function isExperimentalInlineSpecifiersFormat ( diff --git a/lockfile/lockfile-file/src/gitMergeFile.ts b/lockfile/lockfile-file/src/gitMergeFile.ts index c52466dae8a..160839b1627 100644 --- a/lockfile/lockfile-file/src/gitMergeFile.ts +++ b/lockfile/lockfile-file/src/gitMergeFile.ts @@ -1,4 +1,4 @@ -import { Lockfile } from '@pnpm/lockfile-types' +import { type Lockfile } from '@pnpm/lockfile-types' import { mergeLockfileChanges } from '@pnpm/merge-lockfile-changes' import yaml from 'js-yaml' import { revertFromInlineSpecifiersFormatIfNecessary } from './experiments/inlineSpecifiersLockfileConverters' diff --git a/lockfile/lockfile-file/src/read.ts b/lockfile/lockfile-file/src/read.ts index a99f7ad4a74..d07b7860b51 100644 --- a/lockfile/lockfile-file/src/read.ts +++ b/lockfile/lockfile-file/src/read.ts @@ -6,7 +6,7 @@ import { } from '@pnpm/constants' import { PnpmError } from '@pnpm/error' import { mergeLockfileChanges } from '@pnpm/merge-lockfile-changes' -import { Lockfile } from '@pnpm/lockfile-types' +import { type Lockfile } from '@pnpm/lockfile-types' import { DEPENDENCIES_FIELDS } from '@pnpm/types' import comverToSemver from 'comver-to-semver' import yaml from 'js-yaml' @@ -15,7 +15,7 @@ import stripBom from 'strip-bom' import { LockfileBreakingChangeError } from './errors' import { autofixMergeConflicts, isDiff } from './gitMergeFile' import { lockfileLogger as logger } from './logger' -import { LockfileFile } from './write' +import { type LockfileFile } from './write' import { getWantedLockfileName } from './lockfileName' import { getGitBranchLockfileNames } from './gitBranchLockfile' import { revertFromInlineSpecifiersFormatIfNecessary } from './experiments/inlineSpecifiersLockfileConverters' diff --git a/lockfile/lockfile-file/src/sortLockfileKeys.ts b/lockfile/lockfile-file/src/sortLockfileKeys.ts index 03b34f0ed2c..090efd78a01 100644 --- a/lockfile/lockfile-file/src/sortLockfileKeys.ts +++ b/lockfile/lockfile-file/src/sortLockfileKeys.ts @@ -1,6 +1,6 @@ import { lexCompare } from '@pnpm/util.lex-comparator' import sortKeys from 'sort-keys' -import { LockfileFile } from './write' +import { type LockfileFile } from './write' const ORDERED_KEYS = { resolution: 1, diff --git a/lockfile/lockfile-file/src/write.ts b/lockfile/lockfile-file/src/write.ts index 8e5f7bb492d..3ca34862151 100644 --- a/lockfile/lockfile-file/src/write.ts +++ b/lockfile/lockfile-file/src/write.ts @@ -1,7 +1,7 @@ import { promises as fs } from 'fs' import path from 'path' import { DEPENDENCIES_FIELDS } from '@pnpm/types' -import { Lockfile, ProjectSnapshot } from '@pnpm/lockfile-types' +import { type Lockfile, type ProjectSnapshot } from '@pnpm/lockfile-types' import { WANTED_LOCKFILE } from '@pnpm/constants' import rimraf from '@zkochan/rimraf' import * as dp from '@pnpm/dependency-path' diff --git a/lockfile/lockfile-to-pnp/src/index.ts b/lockfile/lockfile-to-pnp/src/index.ts index 083a2bd3677..eaf7a08434a 100644 --- a/lockfile/lockfile-to-pnp/src/index.ts +++ b/lockfile/lockfile-to-pnp/src/index.ts @@ -1,12 +1,12 @@ import { promises as fs } from 'fs' import path from 'path' -import { Lockfile } from '@pnpm/lockfile-file' +import { type Lockfile } from '@pnpm/lockfile-file' import { nameVerFromPkgSnapshot, } from '@pnpm/lockfile-utils' -import { Registries } from '@pnpm/types' +import { type Registries } from '@pnpm/types' import { depPathToFilename, refToRelative } from '@pnpm/dependency-path' -import { generateInlinedScript, PackageRegistry } from '@yarnpkg/pnp' +import { generateInlinedScript, type PackageRegistry } from '@yarnpkg/pnp' import normalizePath from 'normalize-path' export async function writePnpFile ( diff --git a/lockfile/lockfile-types/src/index.ts b/lockfile/lockfile-types/src/index.ts index 815ebda0bed..acb12c072eb 100644 --- a/lockfile/lockfile-types/src/index.ts +++ b/lockfile/lockfile-types/src/index.ts @@ -1,6 +1,6 @@ -import { DependenciesMeta, PatchFile } from '@pnpm/types' +import { type DependenciesMeta, type PatchFile } from '@pnpm/types' -export { PatchFile } +export type { PatchFile } export interface Lockfile { importers: Record diff --git a/lockfile/lockfile-utils/src/extendProjectsWithTargetDirs.ts b/lockfile/lockfile-utils/src/extendProjectsWithTargetDirs.ts index 90662a5af6f..ea88c16c107 100644 --- a/lockfile/lockfile-utils/src/extendProjectsWithTargetDirs.ts +++ b/lockfile/lockfile-utils/src/extendProjectsWithTargetDirs.ts @@ -1,5 +1,5 @@ import path from 'path' -import { Lockfile, TarballResolution } from '@pnpm/lockfile-types' +import { type Lockfile, type TarballResolution } from '@pnpm/lockfile-types' import { depPathToFilename } from '@pnpm/dependency-path' type GetLocalLocations = (depPath: string, pkgName: string) => string[] diff --git a/lockfile/lockfile-utils/src/nameVerFromPkgSnapshot.ts b/lockfile/lockfile-utils/src/nameVerFromPkgSnapshot.ts index 2698758ec86..4a8cc582817 100644 --- a/lockfile/lockfile-utils/src/nameVerFromPkgSnapshot.ts +++ b/lockfile/lockfile-utils/src/nameVerFromPkgSnapshot.ts @@ -1,4 +1,4 @@ -import { PackageSnapshot } from '@pnpm/lockfile-types' +import { type PackageSnapshot } from '@pnpm/lockfile-types' import * as dp from '@pnpm/dependency-path' export function nameVerFromPkgSnapshot ( diff --git a/lockfile/lockfile-utils/src/packageIdFromSnapshot.ts b/lockfile/lockfile-utils/src/packageIdFromSnapshot.ts index 70eb4dd674e..9319fd3274f 100644 --- a/lockfile/lockfile-utils/src/packageIdFromSnapshot.ts +++ b/lockfile/lockfile-utils/src/packageIdFromSnapshot.ts @@ -1,5 +1,5 @@ -import { PackageSnapshot } from '@pnpm/lockfile-types' -import { Registries } from '@pnpm/types' +import { type PackageSnapshot } from '@pnpm/lockfile-types' +import { type Registries } from '@pnpm/types' import * as dp from '@pnpm/dependency-path' export function packageIdFromSnapshot ( diff --git a/lockfile/lockfile-utils/src/packageIsIndependent.ts b/lockfile/lockfile-utils/src/packageIsIndependent.ts index 11d90573731..c7e5d0b63d6 100644 --- a/lockfile/lockfile-utils/src/packageIsIndependent.ts +++ b/lockfile/lockfile-utils/src/packageIsIndependent.ts @@ -1,4 +1,4 @@ -import { PackageSnapshot } from '@pnpm/lockfile-types' +import { type PackageSnapshot } from '@pnpm/lockfile-types' export function packageIsIndependent ({ dependencies, optionalDependencies }: PackageSnapshot) { return dependencies === undefined && optionalDependencies === undefined diff --git a/lockfile/lockfile-utils/src/pkgSnapshotToResolution.ts b/lockfile/lockfile-utils/src/pkgSnapshotToResolution.ts index 1c689815ae0..8a70c6ad610 100644 --- a/lockfile/lockfile-utils/src/pkgSnapshotToResolution.ts +++ b/lockfile/lockfile-utils/src/pkgSnapshotToResolution.ts @@ -1,7 +1,7 @@ import url from 'url' -import { PackageSnapshot, TarballResolution } from '@pnpm/lockfile-types' -import { Resolution } from '@pnpm/resolver-base' -import { Registries } from '@pnpm/types' +import { type PackageSnapshot, type TarballResolution } from '@pnpm/lockfile-types' +import { type Resolution } from '@pnpm/resolver-base' +import { type Registries } from '@pnpm/types' import * as dp from '@pnpm/dependency-path' import getNpmTarballUrl from 'get-npm-tarball-url' import { nameVerFromPkgSnapshot } from './nameVerFromPkgSnapshot' diff --git a/lockfile/lockfile-utils/src/satisfiesPackageManifest.ts b/lockfile/lockfile-utils/src/satisfiesPackageManifest.ts index 661f716a807..cb42b016843 100644 --- a/lockfile/lockfile-utils/src/satisfiesPackageManifest.ts +++ b/lockfile/lockfile-utils/src/satisfiesPackageManifest.ts @@ -1,7 +1,7 @@ -import { Lockfile } from '@pnpm/lockfile-types' +import { type Lockfile } from '@pnpm/lockfile-types' import { DEPENDENCIES_FIELDS, - ProjectManifest, + type ProjectManifest, } from '@pnpm/types' import equals from 'ramda/src/equals' import omit from 'ramda/src/omit' diff --git a/lockfile/lockfile-walker/src/index.ts b/lockfile/lockfile-walker/src/index.ts index b2bc95b4452..e6fe9acb1ff 100644 --- a/lockfile/lockfile-walker/src/index.ts +++ b/lockfile/lockfile-walker/src/index.ts @@ -1,5 +1,5 @@ -import { Lockfile, PackageSnapshot } from '@pnpm/lockfile-types' -import { DependenciesField } from '@pnpm/types' +import { type Lockfile, type PackageSnapshot } from '@pnpm/lockfile-types' +import { type DependenciesField } from '@pnpm/types' import * as dp from '@pnpm/dependency-path' export interface LockedDependency { diff --git a/lockfile/merge-lockfile-changes/src/index.ts b/lockfile/merge-lockfile-changes/src/index.ts index 24f986dc407..3c31f6b0e21 100644 --- a/lockfile/merge-lockfile-changes/src/index.ts +++ b/lockfile/merge-lockfile-changes/src/index.ts @@ -1,4 +1,4 @@ -import { Lockfile, PackageSnapshot, PackageSnapshots } from '@pnpm/lockfile-types' +import { type Lockfile, type PackageSnapshot, type PackageSnapshots } from '@pnpm/lockfile-types' import comverToSemver from 'comver-to-semver' import semver from 'semver' diff --git a/lockfile/merge-lockfile-changes/test/index.ts b/lockfile/merge-lockfile-changes/test/index.ts index 22f19d0f3c6..c7411dcf8c2 100644 --- a/lockfile/merge-lockfile-changes/test/index.ts +++ b/lockfile/merge-lockfile-changes/test/index.ts @@ -1,4 +1,4 @@ -import { Lockfile } from '@pnpm/lockfile-types' +import { type Lockfile } from '@pnpm/lockfile-types' import { mergeLockfileChanges } from '../src' const simpleLockfile = { diff --git a/lockfile/plugin-commands-audit/src/audit.ts b/lockfile/plugin-commands-audit/src/audit.ts index f9da28fd504..3aba8fe08df 100644 --- a/lockfile/plugin-commands-audit/src/audit.ts +++ b/lockfile/plugin-commands-audit/src/audit.ts @@ -1,11 +1,11 @@ -import { audit, AuditReport, AuditVulnerabilityCounts } from '@pnpm/audit' +import { audit, type AuditReport, type AuditVulnerabilityCounts } from '@pnpm/audit' import { createGetAuthHeaderByURI } from '@pnpm/network.auth-header' import { docsUrl, TABLE_OPTIONS } from '@pnpm/cli-utils' -import { Config, types as allTypes, UniversalOptions } from '@pnpm/config' +import { type Config, types as allTypes, type UniversalOptions } from '@pnpm/config' import { WANTED_LOCKFILE } from '@pnpm/constants' import { PnpmError } from '@pnpm/error' import { readWantedLockfile } from '@pnpm/lockfile-file' -import { Registries } from '@pnpm/types' +import { type Registries } from '@pnpm/types' import { table } from '@zkochan/table' import chalk from 'chalk' import difference from 'ramda/src/difference' diff --git a/lockfile/plugin-commands-audit/src/fix.ts b/lockfile/plugin-commands-audit/src/fix.ts index 5392799f96c..9b21cd1ae3f 100644 --- a/lockfile/plugin-commands-audit/src/fix.ts +++ b/lockfile/plugin-commands-audit/src/fix.ts @@ -1,4 +1,4 @@ -import { AuditReport, AuditAdvisory } from '@pnpm/audit' +import { type AuditReport, type AuditAdvisory } from '@pnpm/audit' import { readProjectManifest } from '@pnpm/read-project-manifest' import difference from 'ramda/src/difference' diff --git a/lockfile/plugin-commands-audit/test/fix.ts b/lockfile/plugin-commands-audit/test/fix.ts index a5c4d8c9191..d28b92f92ca 100644 --- a/lockfile/plugin-commands-audit/test/fix.ts +++ b/lockfile/plugin-commands-audit/test/fix.ts @@ -1,6 +1,6 @@ import path from 'path' import { fixtures } from '@pnpm/test-fixtures' -import { ProjectManifest } from '@pnpm/types' +import { type ProjectManifest } from '@pnpm/types' import { audit } from '@pnpm/plugin-commands-audit' import { readProjectManifest } from '@pnpm/read-project-manifest' import loadJsonFile from 'load-json-file' diff --git a/lockfile/prune-lockfile/src/index.ts b/lockfile/prune-lockfile/src/index.ts index 0d237b9539a..dcb0e6f3f29 100644 --- a/lockfile/prune-lockfile/src/index.ts +++ b/lockfile/prune-lockfile/src/index.ts @@ -1,11 +1,11 @@ import { LOCKFILE_VERSION } from '@pnpm/constants' import { - Lockfile, - PackageSnapshots, - ProjectSnapshot, - ResolvedDependencies, + type Lockfile, + type PackageSnapshots, + type ProjectSnapshot, + type ResolvedDependencies, } from '@pnpm/lockfile-types' -import { PackageManifest } from '@pnpm/types' +import { type PackageManifest } from '@pnpm/types' import { refToRelative } from '@pnpm/dependency-path' import difference from 'ramda/src/difference' import isEmpty from 'ramda/src/isEmpty' diff --git a/network/fetch/src/fetch.ts b/network/fetch/src/fetch.ts index ff527ee7a44..d8efe7d7427 100644 --- a/network/fetch/src/fetch.ts +++ b/network/fetch/src/fetch.ts @@ -1,10 +1,10 @@ import { requestRetryLogger } from '@pnpm/core-loggers' -import { operation, RetryTimeoutOptions } from '@zkochan/retry' -import nodeFetch, { Request, RequestInit as NodeRequestInit, Response } from 'node-fetch' +import { operation, type RetryTimeoutOptions } from '@zkochan/retry' +import nodeFetch, { type Request, type RequestInit as NodeRequestInit, Response } from 'node-fetch' export { isRedirect } from 'node-fetch' -export { Response, RetryTimeoutOptions } +export { Response, type RetryTimeoutOptions } interface URLLike { href: string diff --git a/network/fetch/src/fetchFromRegistry.ts b/network/fetch/src/fetchFromRegistry.ts index e59c9b60f32..4da7daad43f 100644 --- a/network/fetch/src/fetchFromRegistry.ts +++ b/network/fetch/src/fetchFromRegistry.ts @@ -1,7 +1,7 @@ import { URL } from 'url' -import { FetchFromRegistry } from '@pnpm/fetching-types' -import { getAgent, AgentOptions } from '@pnpm/network.agent' -import { fetch, isRedirect, Response, RequestInfo, RequestInit } from './fetch' +import { type FetchFromRegistry } from '@pnpm/fetching-types' +import { getAgent, type AgentOptions } from '@pnpm/network.agent' +import { fetch, isRedirect, type Response, type RequestInfo, type RequestInit } from './fetch' const USER_AGENT = 'pnpm' // or maybe make it `${pkg.name}/${pkg.version} (+https://npm.im/${pkg.name})` @@ -27,7 +27,7 @@ export function fetchWithAgent (url: RequestInfo, opts: FetchWithAgentOptions) { }) } -export { AgentOptions } +export type { AgentOptions } export function createFetchFromRegistry ( defaultOpts: { diff --git a/network/fetch/src/index.ts b/network/fetch/src/index.ts index d7d2b46bb68..304066c860a 100644 --- a/network/fetch/src/index.ts +++ b/network/fetch/src/index.ts @@ -1,3 +1,3 @@ -export { FetchFromRegistry } from '@pnpm/fetching-types' -export { fetch, RetryTimeoutOptions } from './fetch' -export { createFetchFromRegistry, fetchWithAgent, AgentOptions } from './fetchFromRegistry' +export type { FetchFromRegistry } from '@pnpm/fetching-types' +export { fetch, type RetryTimeoutOptions } from './fetch' +export { createFetchFromRegistry, fetchWithAgent, type AgentOptions } from './fetchFromRegistry' diff --git a/network/fetching-types/src/index.ts b/network/fetching-types/src/index.ts index f09335b27ff..ffc3d730e3c 100644 --- a/network/fetching-types/src/index.ts +++ b/network/fetching-types/src/index.ts @@ -1,7 +1,7 @@ -import { RetryTimeoutOptions } from '@zkochan/retry' -import { Response } from 'node-fetch' +import { type RetryTimeoutOptions } from '@zkochan/retry' +import { type Response } from 'node-fetch' -export { RetryTimeoutOptions } +export type { RetryTimeoutOptions } export type FetchFromRegistry = ( url: string, diff --git a/package.json b/package.json index 90f07f9b9ce..52ba4dbde5d 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@types/node": "^14.18.37", "c8": "^7.13.0", "cross-env": "^7.0.3", - "eslint": "^8.35.0", + "eslint": "^8.36.0", "husky": "^8.0.3", "jest": "^29.5.0", "keyv": "4.5.2", diff --git a/packages/calc-dep-state/src/index.ts b/packages/calc-dep-state/src/index.ts index 9337e1f840a..83cec1723ce 100644 --- a/packages/calc-dep-state/src/index.ts +++ b/packages/calc-dep-state/src/index.ts @@ -15,7 +15,7 @@ export interface DepsStateCache { } export interface DepStateObj { - [depPath: string]: DepStateObj | {} + [depPath: string]: DepStateObj } export function calcDepState ( diff --git a/packages/core-loggers/src/contextLogger.ts b/packages/core-loggers/src/contextLogger.ts index df1e8e1da54..8862c6f0ad7 100644 --- a/packages/core-loggers/src/contextLogger.ts +++ b/packages/core-loggers/src/contextLogger.ts @@ -1,5 +1,5 @@ import { - LogBase, + type LogBase, logger, } from '@pnpm/logger' diff --git a/packages/core-loggers/src/deprecationLogger.ts b/packages/core-loggers/src/deprecationLogger.ts index 60eb8b96cfc..f06a36fa106 100644 --- a/packages/core-loggers/src/deprecationLogger.ts +++ b/packages/core-loggers/src/deprecationLogger.ts @@ -1,6 +1,6 @@ import { - LogBase, - Logger, + type LogBase, + type Logger, logger, } from '@pnpm/logger' diff --git a/packages/core-loggers/src/executionTimeLogger.ts b/packages/core-loggers/src/executionTimeLogger.ts index ef7ce8b1a8e..970924b8c62 100644 --- a/packages/core-loggers/src/executionTimeLogger.ts +++ b/packages/core-loggers/src/executionTimeLogger.ts @@ -1,5 +1,5 @@ import { - LogBase, + type LogBase, logger, } from '@pnpm/logger' diff --git a/packages/core-loggers/src/fetchingProgressLogger.ts b/packages/core-loggers/src/fetchingProgressLogger.ts index 58231f09c9d..3b8a444d181 100644 --- a/packages/core-loggers/src/fetchingProgressLogger.ts +++ b/packages/core-loggers/src/fetchingProgressLogger.ts @@ -1,6 +1,6 @@ import { - LogBase, - Logger, + type LogBase, + type Logger, logger, } from '@pnpm/logger' diff --git a/packages/core-loggers/src/hookLogger.ts b/packages/core-loggers/src/hookLogger.ts index a6471a7cda1..5b2410a3244 100644 --- a/packages/core-loggers/src/hookLogger.ts +++ b/packages/core-loggers/src/hookLogger.ts @@ -1,5 +1,5 @@ import { - LogBase, + type LogBase, logger, } from '@pnpm/logger' diff --git a/packages/core-loggers/src/index.ts b/packages/core-loggers/src/index.ts index cfe2e9f696c..e6cd62fb54a 100644 --- a/packages/core-loggers/src/index.ts +++ b/packages/core-loggers/src/index.ts @@ -1,25 +1,25 @@ import { - ContextLog, - DeprecationLog, - FetchingProgressLog, - ExecutionTimeLog, - HookLog, - InstallCheckLog, - LifecycleLog, - LinkLog, - PackageImportMethodLog, - PackageManifestLog, - PeerDependencyIssuesLog, - ProgressLog, - RegistryLog, - RequestRetryLog, - RootLog, - ScopeLog, - SkippedOptionalDependencyLog, - StageLog, - StatsLog, - SummaryLog, - UpdateCheckLog, + type ContextLog, + type DeprecationLog, + type FetchingProgressLog, + type ExecutionTimeLog, + type HookLog, + type InstallCheckLog, + type LifecycleLog, + type LinkLog, + type PackageImportMethodLog, + type PackageManifestLog, + type PeerDependencyIssuesLog, + type ProgressLog, + type RegistryLog, + type RequestRetryLog, + type RootLog, + type ScopeLog, + type SkippedOptionalDependencyLog, + type StageLog, + type StatsLog, + type SummaryLog, + type UpdateCheckLog, } from './all' export * from './all' diff --git a/packages/core-loggers/src/installCheckLogger.ts b/packages/core-loggers/src/installCheckLogger.ts index 37352ec75f4..170bc664fdc 100644 --- a/packages/core-loggers/src/installCheckLogger.ts +++ b/packages/core-loggers/src/installCheckLogger.ts @@ -1,5 +1,5 @@ import { - LogBase, + type LogBase, logger, } from '@pnpm/logger' diff --git a/packages/core-loggers/src/lifecycleLogger.ts b/packages/core-loggers/src/lifecycleLogger.ts index a753316d1fa..7dafc6417ee 100644 --- a/packages/core-loggers/src/lifecycleLogger.ts +++ b/packages/core-loggers/src/lifecycleLogger.ts @@ -1,5 +1,5 @@ import { - LogBase, + type LogBase, logger, } from '@pnpm/logger' diff --git a/packages/core-loggers/src/linkLogger.ts b/packages/core-loggers/src/linkLogger.ts index 1d5d3d92b31..de8e476c097 100644 --- a/packages/core-loggers/src/linkLogger.ts +++ b/packages/core-loggers/src/linkLogger.ts @@ -1,5 +1,5 @@ import { - LogBase, + type LogBase, logger, } from '@pnpm/logger' diff --git a/packages/core-loggers/src/packageImportMethodLogger.ts b/packages/core-loggers/src/packageImportMethodLogger.ts index e4bd2fdbaf9..ed750caf132 100644 --- a/packages/core-loggers/src/packageImportMethodLogger.ts +++ b/packages/core-loggers/src/packageImportMethodLogger.ts @@ -1,5 +1,5 @@ import { - LogBase, + type LogBase, logger, } from '@pnpm/logger' diff --git a/packages/core-loggers/src/packageManifestLogger.ts b/packages/core-loggers/src/packageManifestLogger.ts index 8ae194dadf7..35c0e8c5e4d 100644 --- a/packages/core-loggers/src/packageManifestLogger.ts +++ b/packages/core-loggers/src/packageManifestLogger.ts @@ -1,8 +1,8 @@ import { - LogBase, + type LogBase, logger, } from '@pnpm/logger' -import { ProjectManifest } from '@pnpm/types' +import { type ProjectManifest } from '@pnpm/types' export const packageManifestLogger = logger('package-manifest') diff --git a/packages/core-loggers/src/peerDependencyIssues.ts b/packages/core-loggers/src/peerDependencyIssues.ts index 677a7bf8719..953ee8cd2b6 100644 --- a/packages/core-loggers/src/peerDependencyIssues.ts +++ b/packages/core-loggers/src/peerDependencyIssues.ts @@ -1,9 +1,9 @@ import { - LogBase, - Logger, + type LogBase, + type Logger, logger, } from '@pnpm/logger' -import { PeerDependencyIssuesByProjects } from '@pnpm/types' +import { type PeerDependencyIssuesByProjects } from '@pnpm/types' export const peerDependencyIssuesLogger = logger('peer-dependency-issues') as Logger diff --git a/packages/core-loggers/src/progressLogger.ts b/packages/core-loggers/src/progressLogger.ts index fe23bc08768..e27b3104673 100644 --- a/packages/core-loggers/src/progressLogger.ts +++ b/packages/core-loggers/src/progressLogger.ts @@ -1,6 +1,6 @@ import { - LogBase, - Logger, + type LogBase, + type Logger, logger, } from '@pnpm/logger' diff --git a/packages/core-loggers/src/registryLogger.ts b/packages/core-loggers/src/registryLogger.ts index 8d0416259f4..01506a43df8 100644 --- a/packages/core-loggers/src/registryLogger.ts +++ b/packages/core-loggers/src/registryLogger.ts @@ -1,5 +1,5 @@ import { - LogBase, + type LogBase, } from '@pnpm/logger' export type RegistryLog = { name: 'pnpm:registry' } & LogBase & { message: string } diff --git a/packages/core-loggers/src/requestRetryLogger.ts b/packages/core-loggers/src/requestRetryLogger.ts index d05e5153126..3cd27ea18e3 100644 --- a/packages/core-loggers/src/requestRetryLogger.ts +++ b/packages/core-loggers/src/requestRetryLogger.ts @@ -1,5 +1,5 @@ import { - LogBase, + type LogBase, logger, } from '@pnpm/logger' diff --git a/packages/core-loggers/src/rootLogger.ts b/packages/core-loggers/src/rootLogger.ts index 58cca6d7fe6..1176ec90faa 100644 --- a/packages/core-loggers/src/rootLogger.ts +++ b/packages/core-loggers/src/rootLogger.ts @@ -1,5 +1,5 @@ import { - LogBase, + type LogBase, logger, } from '@pnpm/logger' diff --git a/packages/core-loggers/src/scopeLogger.ts b/packages/core-loggers/src/scopeLogger.ts index e0eb98d654c..3a64650eb59 100644 --- a/packages/core-loggers/src/scopeLogger.ts +++ b/packages/core-loggers/src/scopeLogger.ts @@ -1,5 +1,5 @@ import { - LogBase, + type LogBase, logger, } from '@pnpm/logger' diff --git a/packages/core-loggers/src/skippedOptionalDependencyLogger.ts b/packages/core-loggers/src/skippedOptionalDependencyLogger.ts index 8a371e2dd7a..e8d45702bd7 100644 --- a/packages/core-loggers/src/skippedOptionalDependencyLogger.ts +++ b/packages/core-loggers/src/skippedOptionalDependencyLogger.ts @@ -1,5 +1,5 @@ import { - LogBase, + type LogBase, logger, } from '@pnpm/logger' diff --git a/packages/core-loggers/src/stageLogger.ts b/packages/core-loggers/src/stageLogger.ts index 336c9b90be9..34869428303 100644 --- a/packages/core-loggers/src/stageLogger.ts +++ b/packages/core-loggers/src/stageLogger.ts @@ -1,5 +1,5 @@ import { - LogBase, + type LogBase, logger, } from '@pnpm/logger' diff --git a/packages/core-loggers/src/statsLogger.ts b/packages/core-loggers/src/statsLogger.ts index 131cef7fde1..2a36a3672ef 100644 --- a/packages/core-loggers/src/statsLogger.ts +++ b/packages/core-loggers/src/statsLogger.ts @@ -1,5 +1,5 @@ import { - LogBase, + type LogBase, logger, } from '@pnpm/logger' diff --git a/packages/core-loggers/src/summaryLogger.ts b/packages/core-loggers/src/summaryLogger.ts index 58bd78c73dc..1e78d2367ef 100644 --- a/packages/core-loggers/src/summaryLogger.ts +++ b/packages/core-loggers/src/summaryLogger.ts @@ -1,5 +1,5 @@ import { - LogBase, + type LogBase, logger, } from '@pnpm/logger' diff --git a/packages/core-loggers/src/updateCheckLogger.ts b/packages/core-loggers/src/updateCheckLogger.ts index 4512acdefef..a58283ea8fd 100644 --- a/packages/core-loggers/src/updateCheckLogger.ts +++ b/packages/core-loggers/src/updateCheckLogger.ts @@ -1,5 +1,5 @@ import { - LogBase, + type LogBase, logger, } from '@pnpm/logger' diff --git a/packages/dependency-path/src/index.ts b/packages/dependency-path/src/index.ts index 19938a51244..9399f91d0f3 100644 --- a/packages/dependency-path/src/index.ts +++ b/packages/dependency-path/src/index.ts @@ -1,5 +1,5 @@ import { createBase32Hash } from '@pnpm/crypto.base32-hash' -import { Registries } from '@pnpm/types' +import { type Registries } from '@pnpm/types' import encodeRegistry from 'encode-registry' import semver from 'semver' diff --git a/packages/make-dedicated-lockfile/src/index.ts b/packages/make-dedicated-lockfile/src/index.ts index b2177aa3a41..ecbdc425d05 100644 --- a/packages/make-dedicated-lockfile/src/index.ts +++ b/packages/make-dedicated-lockfile/src/index.ts @@ -3,7 +3,7 @@ import pnpmExec from '@pnpm/exec' import { createExportableManifest } from '@pnpm/exportable-manifest' import { getLockfileImporterId, - ProjectSnapshot, + type ProjectSnapshot, readWantedLockfile, writeWantedLockfile, } from '@pnpm/lockfile-file' diff --git a/packages/mount-modules/src/cafsExplorer.ts b/packages/mount-modules/src/cafsExplorer.ts index 9ec0e0186bc..0e3d6c4a128 100644 --- a/packages/mount-modules/src/cafsExplorer.ts +++ b/packages/mount-modules/src/cafsExplorer.ts @@ -1,4 +1,4 @@ -import { PackageFilesIndex } from '@pnpm/cafs' +import { type PackageFilesIndex } from '@pnpm/cafs' export function readdir (index: PackageFilesIndex, dir: string) { const dirs = new Set() diff --git a/packages/mount-modules/src/createFuseHandlers.ts b/packages/mount-modules/src/createFuseHandlers.ts index 65255d68bed..1720280c467 100644 --- a/packages/mount-modules/src/createFuseHandlers.ts +++ b/packages/mount-modules/src/createFuseHandlers.ts @@ -1,6 +1,6 @@ import fs from 'fs' -import { getFilePathInCafs, getFilePathByModeInCafs, PackageFilesIndex } from '@pnpm/cafs' -import { Lockfile, readWantedLockfile, PackageSnapshot, TarballResolution } from '@pnpm/lockfile-file' +import { getFilePathInCafs, getFilePathByModeInCafs, type PackageFilesIndex } from '@pnpm/cafs' +import { type Lockfile, readWantedLockfile, type PackageSnapshot, type TarballResolution } from '@pnpm/lockfile-file' import { nameVerFromPkgSnapshot, } from '@pnpm/lockfile-utils' diff --git a/packages/mount-modules/src/makeVirtualNodeModules.ts b/packages/mount-modules/src/makeVirtualNodeModules.ts index ed2055f9ca8..35bb8713f7a 100644 --- a/packages/mount-modules/src/makeVirtualNodeModules.ts +++ b/packages/mount-modules/src/makeVirtualNodeModules.ts @@ -1,5 +1,5 @@ import path from 'path' -import { Lockfile } from '@pnpm/lockfile-file' +import { type Lockfile } from '@pnpm/lockfile-file' import { DEPENDENCIES_FIELDS } from '@pnpm/types' import { nameVerFromPkgSnapshot } from '@pnpm/lockfile-utils' import * as dp from '@pnpm/dependency-path' diff --git a/packages/plugin-commands-doctor/src/doctor.ts b/packages/plugin-commands-doctor/src/doctor.ts index f9cea431b25..b8b9170b062 100644 --- a/packages/plugin-commands-doctor/src/doctor.ts +++ b/packages/plugin-commands-doctor/src/doctor.ts @@ -1,7 +1,7 @@ import renderHelp from 'render-help' import { docsUrl } from '@pnpm/cli-utils' import { logger } from '@pnpm/logger' -import { Config } from '@pnpm/config' +import { type Config } from '@pnpm/config' export const rcOptionsTypes = cliOptionsTypes diff --git a/packages/plugin-commands-init/src/init.ts b/packages/plugin-commands-init/src/init.ts index 4dee89fada3..ebab236a403 100644 --- a/packages/plugin-commands-init/src/init.ts +++ b/packages/plugin-commands-init/src/init.ts @@ -1,7 +1,7 @@ import fs from 'fs' import path from 'path' import { docsUrl } from '@pnpm/cli-utils' -import { UniversalOptions } from '@pnpm/config' +import { type UniversalOptions } from '@pnpm/config' import { PnpmError } from '@pnpm/error' import { writeProjectManifest } from '@pnpm/write-project-manifest' import renderHelp from 'render-help' diff --git a/packages/plugin-commands-setup/src/setup.ts b/packages/plugin-commands-setup/src/setup.ts index 5eae681c51b..ab6ffdbeb7c 100644 --- a/packages/plugin-commands-setup/src/setup.ts +++ b/packages/plugin-commands-setup/src/setup.ts @@ -4,8 +4,8 @@ import { docsUrl } from '@pnpm/cli-utils' import { logger } from '@pnpm/logger' import { addDirToEnvPath, - ConfigReport, - PathExtenderReport, + type ConfigReport, + type PathExtenderReport, } from '@pnpm/os.env.path-extender' import renderHelp from 'render-help' diff --git a/packages/plugin-commands-setup/test/setup.test.ts b/packages/plugin-commands-setup/test/setup.test.ts index 18d6b01ca6d..60cb34fc2f4 100644 --- a/packages/plugin-commands-setup/test/setup.test.ts +++ b/packages/plugin-commands-setup/test/setup.test.ts @@ -1,6 +1,6 @@ import { PnpmError } from '@pnpm/error' import { setup } from '@pnpm/plugin-commands-setup' -import { addDirToEnvPath, PathExtenderReport } from '@pnpm/os.env.path-extender' +import { addDirToEnvPath, type PathExtenderReport } from '@pnpm/os.env.path-extender' jest.mock('@pnpm/os.env.path-extender', () => ({ addDirToEnvPath: jest.fn(), diff --git a/packages/render-peer-issues/src/index.ts b/packages/render-peer-issues/src/index.ts index 68b3a46d407..71ac5c5e364 100644 --- a/packages/render-peer-issues/src/index.ts +++ b/packages/render-peer-issues/src/index.ts @@ -1,4 +1,4 @@ -import { BadPeerDependencyIssue, PeerDependencyIssuesByProjects } from '@pnpm/types' +import { type BadPeerDependencyIssue, type PeerDependencyIssuesByProjects } from '@pnpm/types' import archy from 'archy' import chalk from 'chalk' import cliColumns from 'cli-columns' diff --git a/packages/types/src/options.ts b/packages/types/src/options.ts index f99d1183649..47b38ac51b8 100644 --- a/packages/types/src/options.ts +++ b/packages/types/src/options.ts @@ -1,5 +1,5 @@ -import { DependenciesField } from './misc' -import { PackageManifest, ProjectManifest } from './package' +import { type DependenciesField } from './misc' +import { type PackageManifest, type ProjectManifest } from './package' export type LogBase = { level: 'debug' | 'error' diff --git a/packages/types/src/project.ts b/packages/types/src/project.ts index 868f798d2fa..a10e172a80f 100644 --- a/packages/types/src/project.ts +++ b/packages/types/src/project.ts @@ -1,4 +1,4 @@ -import { ProjectManifest } from './package' +import { type ProjectManifest } from './package' export interface Project { dir: string diff --git a/patching/plugin-commands-patching/src/getPatchedDependency.ts b/patching/plugin-commands-patching/src/getPatchedDependency.ts index e03d9e21d54..199c13d7f6a 100644 --- a/patching/plugin-commands-patching/src/getPatchedDependency.ts +++ b/patching/plugin-commands-patching/src/getPatchedDependency.ts @@ -1,5 +1,5 @@ import path from 'path' -import { parseWantedDependency, ParseWantedDependencyResult } from '@pnpm/parse-wanted-dependency' +import { parseWantedDependency, type ParseWantedDependencyResult } from '@pnpm/parse-wanted-dependency' import { prompt } from 'enquirer' import { readCurrentLockfile } from '@pnpm/lockfile-file' import { nameVerFromPkgSnapshot } from '@pnpm/lockfile-utils' @@ -8,7 +8,7 @@ import { WANTED_LOCKFILE } from '@pnpm/constants' import { readModulesManifest } from '@pnpm/modules-yaml' import realpathMissing from 'realpath-missing' import semver from 'semver' -import { Config } from '@pnpm/config' +import { type Config } from '@pnpm/config' type GetPatchedDependencyOptions = { lockfileDir: string diff --git a/patching/plugin-commands-patching/src/patch.ts b/patching/plugin-commands-patching/src/patch.ts index 47d0f1ee067..75977782a63 100644 --- a/patching/plugin-commands-patching/src/patch.ts +++ b/patching/plugin-commands-patching/src/patch.ts @@ -2,16 +2,16 @@ import fs from 'fs' import path from 'path' import { applyPatchToDir } from '@pnpm/patching.apply-patch' import { docsUrl } from '@pnpm/cli-utils' -import { Config, types as allTypes } from '@pnpm/config' -import { LogBase } from '@pnpm/logger' +import { type Config, types as allTypes } from '@pnpm/config' +import { type LogBase } from '@pnpm/logger' import { - CreateStoreControllerOptions, + type CreateStoreControllerOptions, } from '@pnpm/store-connection-manager' import pick from 'ramda/src/pick' import renderHelp from 'render-help' import tempy from 'tempy' import { PnpmError } from '@pnpm/error' -import { ParseWantedDependencyResult } from '@pnpm/parse-wanted-dependency' +import { type ParseWantedDependencyResult } from '@pnpm/parse-wanted-dependency' import { writePackage } from './writePackage' import { getPatchedDependency } from './getPatchedDependency' diff --git a/patching/plugin-commands-patching/src/patchCommit.ts b/patching/plugin-commands-patching/src/patchCommit.ts index 2cf253b83da..b9e5b33a348 100644 --- a/patching/plugin-commands-patching/src/patchCommit.ts +++ b/patching/plugin-commands-patching/src/patchCommit.ts @@ -1,7 +1,7 @@ import fs from 'fs' import path from 'path' import { docsUrl } from '@pnpm/cli-utils' -import { Config, types as allTypes } from '@pnpm/config' +import { type Config, types as allTypes } from '@pnpm/config' import { install } from '@pnpm/plugin-commands-installation' import { readPackageJsonFromDir } from '@pnpm/read-package-json' import { tryReadProjectManifest } from '@pnpm/read-project-manifest' diff --git a/patching/plugin-commands-patching/src/writePackage.ts b/patching/plugin-commands-patching/src/writePackage.ts index 7f0841788e7..d8a44981e21 100644 --- a/patching/plugin-commands-patching/src/writePackage.ts +++ b/patching/plugin-commands-patching/src/writePackage.ts @@ -1,7 +1,7 @@ -import { Config } from '@pnpm/config' +import { type Config } from '@pnpm/config' import { createOrConnectStoreController, - CreateStoreControllerOptions, + type CreateStoreControllerOptions, } from '@pnpm/store-connection-manager' import { pickRegistryForPackage } from '@pnpm/pick-registry-for-package' import type { ParseWantedDependencyResult } from '@pnpm/parse-wanted-dependency' diff --git a/pkg-manager/client/src/index.ts b/pkg-manager/client/src/index.ts index e6d2bb6a465..982b4aac2f0 100644 --- a/pkg-manager/client/src/index.ts +++ b/pkg-manager/client/src/index.ts @@ -1,18 +1,18 @@ import { createResolver as _createResolver, - ResolveFunction, - ResolverFactoryOptions, + type ResolveFunction, + type ResolverFactoryOptions, } from '@pnpm/default-resolver' -import { AgentOptions, createFetchFromRegistry } from '@pnpm/fetch' -import { FetchFromRegistry, GetAuthHeader, RetryTimeoutOptions } from '@pnpm/fetching-types' +import { type AgentOptions, createFetchFromRegistry } from '@pnpm/fetch' +import { type FetchFromRegistry, type GetAuthHeader, type RetryTimeoutOptions } from '@pnpm/fetching-types' import type { CustomFetchers, GitFetcher, DirectoryFetcher } from '@pnpm/fetcher-base' import { createDirectoryFetcher } from '@pnpm/directory-fetcher' import { createGitFetcher } from '@pnpm/git-fetcher' -import { createTarballFetcher, TarballFetchers } from '@pnpm/tarball-fetcher' +import { createTarballFetcher, type TarballFetchers } from '@pnpm/tarball-fetcher' import { createGetAuthHeaderByURI } from '@pnpm/network.auth-header' import mapValues from 'ramda/src/map' -export { ResolveFunction } +export type { ResolveFunction } export type ClientOptions = { authConfig: Record diff --git a/pkg-manager/core/src/getPeerDependencyIssues.ts b/pkg-manager/core/src/getPeerDependencyIssues.ts index 5e3a3323dae..963af2059a6 100644 --- a/pkg-manager/core/src/getPeerDependencyIssues.ts +++ b/pkg-manager/core/src/getPeerDependencyIssues.ts @@ -1,9 +1,9 @@ import { resolveDependencies, getWantedDependencies } from '@pnpm/resolve-dependencies' -import { PeerDependencyIssuesByProjects } from '@pnpm/types' -import { getContext, GetContextOptions, ProjectOptions } from '@pnpm/get-context' +import { type PeerDependencyIssuesByProjects } from '@pnpm/types' +import { getContext, type GetContextOptions, type ProjectOptions } from '@pnpm/get-context' import { createReadPackageHook } from '@pnpm/hooks.read-package-hook' import { getPreferredVersionsFromLockfileAndManifests } from './install/getPreferredVersions' -import { InstallOptions } from './install/extendInstallOptions' +import { type InstallOptions } from './install/extendInstallOptions' import { DEFAULT_REGISTRIES } from '@pnpm/normalize-registries' export type ListMissingPeersOptions = Partial diff --git a/pkg-manager/core/src/index.ts b/pkg-manager/core/src/index.ts index 131446ec07b..3d99ddee171 100644 --- a/pkg-manager/core/src/index.ts +++ b/pkg-manager/core/src/index.ts @@ -1,4 +1,4 @@ -export { +export type { BadPeerDependencyIssue, MissingPeerDependencyIssue, MissingPeerIssuesByPeerName, @@ -6,12 +6,12 @@ export { PeerDependencyIssues, PeerDependencyIssuesByProjects, } from '@pnpm/types' -export { HoistingLimits } from '@pnpm/headless' +export type { HoistingLimits } from '@pnpm/headless' export * from './api' export * from './install/hooks' -export { ProjectOptions, UnexpectedStoreError, UnexpectedVirtualStoreDirError } from '@pnpm/get-context' -export { InstallOptions } from './install/extendInstallOptions' +export { type ProjectOptions, UnexpectedStoreError, UnexpectedVirtualStoreDirError } from '@pnpm/get-context' +export type { InstallOptions } from './install/extendInstallOptions' -export { WorkspacePackages } from '@pnpm/resolver-base' -export { UpdateMatchingFunction } from '@pnpm/resolve-dependencies' +export type { WorkspacePackages } from '@pnpm/resolver-base' +export type { UpdateMatchingFunction } from '@pnpm/resolve-dependencies' diff --git a/pkg-manager/core/src/install/allProjectsAreUpToDate.ts b/pkg-manager/core/src/install/allProjectsAreUpToDate.ts index 2c70c5ae44e..0808f5ef8cf 100644 --- a/pkg-manager/core/src/install/allProjectsAreUpToDate.ts +++ b/pkg-manager/core/src/install/allProjectsAreUpToDate.ts @@ -1,16 +1,16 @@ import path from 'path' -import { ProjectOptions } from '@pnpm/get-context' +import { type ProjectOptions } from '@pnpm/get-context' import { - Lockfile, - ProjectSnapshot, + type Lockfile, + type ProjectSnapshot, } from '@pnpm/lockfile-file' import { satisfiesPackageManifest } from '@pnpm/lockfile-utils' import { safeReadPackageJsonFromDir } from '@pnpm/read-package-json' -import { WorkspacePackages } from '@pnpm/resolver-base' +import { type WorkspacePackages } from '@pnpm/resolver-base' import { DEPENDENCIES_FIELDS, - DependencyManifest, - ProjectManifest, + type DependencyManifest, + type ProjectManifest, } from '@pnpm/types' import pEvery from 'p-every' import any from 'ramda/src/any' diff --git a/pkg-manager/core/src/install/extendInstallOptions.ts b/pkg-manager/core/src/install/extendInstallOptions.ts index 9ebae7b6935..9ffd7ebe895 100644 --- a/pkg-manager/core/src/install/extendInstallOptions.ts +++ b/pkg-manager/core/src/install/extendInstallOptions.ts @@ -1,23 +1,23 @@ import { WANTED_LOCKFILE } from '@pnpm/constants' import { PnpmError } from '@pnpm/error' -import { ProjectOptions } from '@pnpm/get-context' -import { HoistingLimits } from '@pnpm/headless' +import { type ProjectOptions } from '@pnpm/get-context' +import { type HoistingLimits } from '@pnpm/headless' import { createReadPackageHook } from '@pnpm/hooks.read-package-hook' -import { Lockfile } from '@pnpm/lockfile-file' -import { IncludedDependencies } from '@pnpm/modules-yaml' +import { type Lockfile } from '@pnpm/lockfile-file' +import { type IncludedDependencies } from '@pnpm/modules-yaml' import { normalizeRegistries, DEFAULT_REGISTRIES } from '@pnpm/normalize-registries' -import { WorkspacePackages } from '@pnpm/resolver-base' -import { StoreController } from '@pnpm/store-controller-types' +import { type WorkspacePackages } from '@pnpm/resolver-base' +import { type StoreController } from '@pnpm/store-controller-types' import { - AllowedDeprecatedVersions, - PackageExtension, - PeerDependencyRules, - ReadPackageHook, - Registries, + type AllowedDeprecatedVersions, + type PackageExtension, + type PeerDependencyRules, + type ReadPackageHook, + type Registries, } from '@pnpm/types' import { pnpmPkgJson } from '../pnpmPkgJson' -import { ReporterFunction } from '../types' -import { PreResolutionHookContext } from './hooks' +import { type ReporterFunction } from '../types' +import { type PreResolutionHookContext } from './hooks' export interface StrictInstallOptions { autoInstallPeers: boolean diff --git a/pkg-manager/core/src/install/getPreferredVersions.ts b/pkg-manager/core/src/install/getPreferredVersions.ts index 472728cc422..071cc5f47db 100644 --- a/pkg-manager/core/src/install/getPreferredVersions.ts +++ b/pkg-manager/core/src/install/getPreferredVersions.ts @@ -1,7 +1,7 @@ -import { nameVerFromPkgSnapshot, PackageSnapshots } from '@pnpm/lockfile-utils' +import { nameVerFromPkgSnapshot, type PackageSnapshots } from '@pnpm/lockfile-utils' import { getAllDependenciesFromManifest } from '@pnpm/manifest-utils' -import { DIRECT_DEP_SELECTOR_WEIGHT, PreferredVersions } from '@pnpm/resolver-base' -import { DependencyManifest, ProjectManifest } from '@pnpm/types' +import { DIRECT_DEP_SELECTOR_WEIGHT, type PreferredVersions } from '@pnpm/resolver-base' +import { type DependencyManifest, type ProjectManifest } from '@pnpm/types' import getVersionSelectorType from 'version-selector-type' export function getAllUniqueSpecs (manifests: DependencyManifest[]) { diff --git a/pkg-manager/core/src/install/index.ts b/pkg-manager/core/src/install/index.ts index 4811e772473..c210b310914 100644 --- a/pkg-manager/core/src/install/index.ts +++ b/pkg-manager/core/src/install/index.ts @@ -1,6 +1,6 @@ import crypto from 'crypto' import path from 'path' -import { buildModules, DepsStateCache, linkBinsOfDependencies } from '@pnpm/build-modules' +import { buildModules, type DepsStateCache, linkBinsOfDependencies } from '@pnpm/build-modules' import { LAYOUT_VERSION, LOCKFILE_VERSION, @@ -13,23 +13,23 @@ import { } from '@pnpm/core-loggers' import { createBase32HashFromFile } from '@pnpm/crypto.base32-hash' import { PnpmError } from '@pnpm/error' -import { getContext, PnpmContext } from '@pnpm/get-context' +import { getContext, type PnpmContext } from '@pnpm/get-context' import { headlessInstall } from '@pnpm/headless' import { makeNodeRequireOption, runLifecycleHook, runLifecycleHooksConcurrently, - RunLifecycleHooksConcurrentlyOptions, + type RunLifecycleHooksConcurrentlyOptions, } from '@pnpm/lifecycle' import { linkBins, linkBinsOfPackages } from '@pnpm/link-bins' import { - ProjectSnapshot, - Lockfile, + type ProjectSnapshot, + type Lockfile, writeCurrentLockfile, writeLockfiles, writeWantedLockfile, cleanGitBranchLockfiles, - PatchFile, + type PatchFile, } from '@pnpm/lockfile-file' import { writePnpFile } from '@pnpm/lockfile-to-pnp' import { extendProjectsWithTargetDirs } from '@pnpm/lockfile-utils' @@ -41,22 +41,22 @@ import { safeReadProjectManifestOnly } from '@pnpm/read-project-manifest' import { removeBin } from '@pnpm/remove-bins' import { getWantedDependencies, - DependenciesGraph, - DependenciesGraphNode, - PinnedVersion, + type DependenciesGraph, + type DependenciesGraphNode, + type PinnedVersion, resolveDependencies, - UpdateMatchingFunction, - WantedDependency, + type UpdateMatchingFunction, + type WantedDependency, } from '@pnpm/resolve-dependencies' import { - PreferredVersions, + type PreferredVersions, } from '@pnpm/resolver-base' import { - DependenciesField, - DependencyManifest, - PeerDependencyIssues, - ProjectManifest, - ReadPackageHook, + type DependenciesField, + type DependencyManifest, + type PeerDependencyIssues, + type ProjectManifest, + type ReadPackageHook, } from '@pnpm/types' import rimraf from '@zkochan/rimraf' import isInnerLink from 'is-inner-link' @@ -76,8 +76,8 @@ import { removeDeps } from '../uninstall/removeDeps' import { allProjectsAreUpToDate } from './allProjectsAreUpToDate' import { extendOptions, - InstallOptions, - ProcessedInstallOptions as StrictInstallOptions, + type InstallOptions, + type ProcessedInstallOptions as StrictInstallOptions, } from './extendInstallOptions' import { getAllUniqueSpecs, getPreferredVersionsFromLockfileAndManifests } from './getPreferredVersions' import { linkPackages } from './link' @@ -639,7 +639,7 @@ function lockfileIsNotUpToDate ( !equals(lockfile.patchedDependencies ?? {}, patchedDependencies ?? {}) } -export function createObjectChecksum (obj: Object) { +export function createObjectChecksum (obj: unknown) { const s = JSON.stringify(obj) return crypto.createHash('md5').update(s).digest('hex') } diff --git a/pkg-manager/core/src/install/link.ts b/pkg-manager/core/src/install/link.ts index 3afccf6ce5e..296545950a9 100644 --- a/pkg-manager/core/src/install/link.ts +++ b/pkg-manager/core/src/install/link.ts @@ -1,6 +1,6 @@ import { promises as fs } from 'fs' import path from 'path' -import { calcDepState, DepsStateCache } from '@pnpm/calc-dep-state' +import { calcDepState, type DepsStateCache } from '@pnpm/calc-dep-state' import { progressLogger, stageLogger, @@ -11,20 +11,20 @@ import { } from '@pnpm/filter-lockfile' import { linkDirectDeps } from '@pnpm/pkg-manager.direct-dep-linker' import { hoist } from '@pnpm/hoist' -import { Lockfile } from '@pnpm/lockfile-file' +import { type Lockfile } from '@pnpm/lockfile-file' import { logger } from '@pnpm/logger' import { prune } from '@pnpm/modules-cleaner' -import { IncludedDependencies } from '@pnpm/modules-yaml' +import { type IncludedDependencies } from '@pnpm/modules-yaml' import { - DependenciesGraph, - DependenciesGraphNode, - LinkedDependency, + type DependenciesGraph, + type DependenciesGraphNode, + type LinkedDependency, } from '@pnpm/resolve-dependencies' -import { StoreController, TarballResolution } from '@pnpm/store-controller-types' +import { type StoreController, type TarballResolution } from '@pnpm/store-controller-types' import { symlinkDependency } from '@pnpm/symlink-dependency' import { - HoistedDependencies, - Registries, + type HoistedDependencies, + type Registries, } from '@pnpm/types' import pLimit from 'p-limit' import pathExists from 'path-exists' @@ -35,7 +35,7 @@ import omit from 'ramda/src/omit' import pick from 'ramda/src/pick' import pickBy from 'ramda/src/pickBy' import props from 'ramda/src/props' -import { ImporterToUpdate } from './index' +import { type ImporterToUpdate } from './index' const brokenModulesLogger = logger('_broken_node_modules') diff --git a/pkg-manager/core/src/install/reportPeerDependencyIssues.ts b/pkg-manager/core/src/install/reportPeerDependencyIssues.ts index 7373c5aab66..1c1d84296af 100644 --- a/pkg-manager/core/src/install/reportPeerDependencyIssues.ts +++ b/pkg-manager/core/src/install/reportPeerDependencyIssues.ts @@ -1,6 +1,6 @@ import { PnpmError } from '@pnpm/error' import { peerDependencyIssuesLogger } from '@pnpm/core-loggers' -import { PeerDependencyIssuesByProjects } from '@pnpm/types' +import { type PeerDependencyIssuesByProjects } from '@pnpm/types' import isEmpty from 'ramda/src/isEmpty' export function reportPeerDependencyIssues ( diff --git a/pkg-manager/core/src/link/index.ts b/pkg-manager/core/src/link/index.ts index 5f3e192a8a0..23050925edc 100644 --- a/pkg-manager/core/src/link/index.ts +++ b/pkg-manager/core/src/link/index.ts @@ -7,7 +7,7 @@ import { getContextForSingleImporter } from '@pnpm/get-context' import { linkBinsOfPackages } from '@pnpm/link-bins' import { getLockfileImporterId, - ProjectSnapshot, + type ProjectSnapshot, writeCurrentLockfile, writeLockfiles, } from '@pnpm/lockfile-file' @@ -17,22 +17,22 @@ import { getSpecFromPackageManifest, getDependencyTypeFromManifest, guessDependencyType, - PackageSpecObject, + type PackageSpecObject, updateProjectManifestObject, } from '@pnpm/manifest-utils' import { pruneSharedLockfile } from '@pnpm/prune-lockfile' import { readProjectManifest } from '@pnpm/read-project-manifest' import { symlinkDirectRootDependency } from '@pnpm/symlink-dependency' import { - DependenciesField, + type DependenciesField, DEPENDENCIES_FIELDS, - DependencyManifest, - ProjectManifest, + type DependencyManifest, + type ProjectManifest, } from '@pnpm/types' import normalize from 'normalize-path' import { extendOptions, - LinkOptions, + type LinkOptions, } from './options' type LinkFunctionOptions = LinkOptions & { @@ -40,7 +40,7 @@ type LinkFunctionOptions = LinkOptions & { dir: string } -export { LinkFunctionOptions } +export type { LinkFunctionOptions } export async function link ( linkFromPkgs: Array<{ alias: string, path: string } | string>, diff --git a/pkg-manager/core/src/link/options.ts b/pkg-manager/core/src/link/options.ts index 8f38c3155cc..49b60f9abff 100644 --- a/pkg-manager/core/src/link/options.ts +++ b/pkg-manager/core/src/link/options.ts @@ -1,12 +1,12 @@ import path from 'path' import { normalizeRegistries, DEFAULT_REGISTRIES } from '@pnpm/normalize-registries' -import { StoreController } from '@pnpm/store-controller-types' +import { type StoreController } from '@pnpm/store-controller-types' import { - DependenciesField, - ProjectManifest, - Registries, + type DependenciesField, + type ProjectManifest, + type Registries, } from '@pnpm/types' -import { ReporterFunction } from '../types' +import { type ReporterFunction } from '../types' interface StrictLinkOptions { binsDir: string diff --git a/pkg-manager/core/src/parseWantedDependencies.ts b/pkg-manager/core/src/parseWantedDependencies.ts index b5bd659f9e9..cd9231603e6 100644 --- a/pkg-manager/core/src/parseWantedDependencies.ts +++ b/pkg-manager/core/src/parseWantedDependencies.ts @@ -1,7 +1,7 @@ import { parseWantedDependency } from '@pnpm/parse-wanted-dependency' -import { Dependencies } from '@pnpm/types' +import { type Dependencies } from '@pnpm/types' import { whichVersionIsPinned } from '@pnpm/which-version-is-pinned' -import { PinnedVersion, WantedDependency } from '@pnpm/resolve-dependencies/lib/getWantedDependencies' +import { type PinnedVersion, type WantedDependency } from '@pnpm/resolve-dependencies/lib/getWantedDependencies' export function parseWantedDependencies ( rawWantedDependencies: string[], diff --git a/pkg-manager/core/src/pnpmPkgJson.ts b/pkg-manager/core/src/pnpmPkgJson.ts index c949521a0a1..a3e392da523 100644 --- a/pkg-manager/core/src/pnpmPkgJson.ts +++ b/pkg-manager/core/src/pnpmPkgJson.ts @@ -1,5 +1,5 @@ import path from 'path' -import { PackageManifest } from '@pnpm/types' +import { type PackageManifest } from '@pnpm/types' import { sync as loadJsonFileSync } from 'load-json-file' let pnpmPkgJson!: PackageManifest diff --git a/pkg-manager/core/src/types.ts b/pkg-manager/core/src/types.ts index c9cab281c4c..b6d242c9906 100644 --- a/pkg-manager/core/src/types.ts +++ b/pkg-manager/core/src/types.ts @@ -1,3 +1,3 @@ -import { LogBase } from '@pnpm/logger' +import { type LogBase } from '@pnpm/logger' export type ReporterFunction = (logObj: LogBase) => void diff --git a/pkg-manager/core/src/uninstall/removeDeps.ts b/pkg-manager/core/src/uninstall/removeDeps.ts index 80612a75c17..8118048ed0c 100644 --- a/pkg-manager/core/src/uninstall/removeDeps.ts +++ b/pkg-manager/core/src/uninstall/removeDeps.ts @@ -1,8 +1,8 @@ import { packageManifestLogger } from '@pnpm/core-loggers' import { - DependenciesField, + type DependenciesField, DEPENDENCIES_FIELDS, - ProjectManifest, + type ProjectManifest, } from '@pnpm/types' export async function removeDeps ( diff --git a/pkg-manager/core/test/breakingChanges.ts b/pkg-manager/core/test/breakingChanges.ts index 513fb67b1a3..4c0c8cc9fbc 100644 --- a/pkg-manager/core/test/breakingChanges.ts +++ b/pkg-manager/core/test/breakingChanges.ts @@ -1,7 +1,7 @@ import { promises as fs } from 'fs' import path from 'path' import { WANTED_LOCKFILE } from '@pnpm/constants' -import { PnpmError } from '@pnpm/error' +import { type PnpmError } from '@pnpm/error' import { prepareEmpty, preparePackages } from '@pnpm/prepare' import { addDependenciesToPackage, install } from '@pnpm/core' import rimraf from '@zkochan/rimraf' diff --git a/pkg-manager/core/test/brokenLockfileIntegrity.ts b/pkg-manager/core/test/brokenLockfileIntegrity.ts index c294899a42b..70cf0da8b6a 100644 --- a/pkg-manager/core/test/brokenLockfileIntegrity.ts +++ b/pkg-manager/core/test/brokenLockfileIntegrity.ts @@ -1,5 +1,5 @@ import { WANTED_LOCKFILE } from '@pnpm/constants' -import { TarballResolution } from '@pnpm/lockfile-file' +import { type TarballResolution } from '@pnpm/lockfile-file' import { prepareEmpty } from '@pnpm/prepare' import { addDistTag } from '@pnpm/registry-mock' import rimraf from '@zkochan/rimraf' diff --git a/pkg-manager/core/test/hoistedNodeLinker/uninstall.ts b/pkg-manager/core/test/hoistedNodeLinker/uninstall.ts index 21078cd941c..04c2e7d2f0b 100644 --- a/pkg-manager/core/test/hoistedNodeLinker/uninstall.ts +++ b/pkg-manager/core/test/hoistedNodeLinker/uninstall.ts @@ -1,6 +1,6 @@ import { - PackageManifestLog, - StatsLog, + type PackageManifestLog, + type StatsLog, } from '@pnpm/core-loggers' import { prepareEmpty } from '@pnpm/prepare' import { diff --git a/pkg-manager/core/test/install/autoInstallPeers.ts b/pkg-manager/core/test/install/autoInstallPeers.ts index cd532965e75..e23380d46fa 100644 --- a/pkg-manager/core/test/install/autoInstallPeers.ts +++ b/pkg-manager/core/test/install/autoInstallPeers.ts @@ -1,6 +1,6 @@ import path from 'path' import { assertProject } from '@pnpm/assert-project' -import { addDependenciesToPackage, install, mutateModules, mutateModulesInSingleProject, PackageManifest } from '@pnpm/core' +import { addDependenciesToPackage, install, mutateModules, mutateModulesInSingleProject, type PackageManifest } from '@pnpm/core' import { prepareEmpty, preparePackages } from '@pnpm/prepare' import { addDistTag, REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import rimraf from '@zkochan/rimraf' diff --git a/pkg-manager/core/test/install/dedupeDirectDeps.ts b/pkg-manager/core/test/install/dedupeDirectDeps.ts index 6e546ca54c8..243dec7bd68 100644 --- a/pkg-manager/core/test/install/dedupeDirectDeps.ts +++ b/pkg-manager/core/test/install/dedupeDirectDeps.ts @@ -1,7 +1,7 @@ import fs from 'fs' import path from 'path' import { preparePackages } from '@pnpm/prepare' -import { mutateModules, MutatedProject } from '@pnpm/core' +import { mutateModules, type MutatedProject } from '@pnpm/core' import { testDefaults } from '../utils' test('dedupe direct dependencies', async () => { diff --git a/pkg-manager/core/test/install/dedupeInWorkspace.ts b/pkg-manager/core/test/install/dedupeInWorkspace.ts index e0eda75ab4d..0677cc14007 100644 --- a/pkg-manager/core/test/install/dedupeInWorkspace.ts +++ b/pkg-manager/core/test/install/dedupeInWorkspace.ts @@ -1,7 +1,7 @@ import path from 'path' import { assertProject } from '@pnpm/assert-project' import { preparePackages } from '@pnpm/prepare' -import { mutateModules, MutatedProject } from '@pnpm/core' +import { mutateModules, type MutatedProject } from '@pnpm/core' import { addDistTag } from '@pnpm/registry-mock' import { testDefaults } from '../utils' diff --git a/pkg-manager/core/test/install/fixLockfile.ts b/pkg-manager/core/test/install/fixLockfile.ts index 891f295e155..06c5db84657 100644 --- a/pkg-manager/core/test/install/fixLockfile.ts +++ b/pkg-manager/core/test/install/fixLockfile.ts @@ -1,10 +1,10 @@ import path from 'path' import { LOCKFILE_VERSION_V6 as LOCKFILE_VERSION, WANTED_LOCKFILE } from '@pnpm/constants' import { prepareEmpty, preparePackages } from '@pnpm/prepare' -import { install, MutatedProject, mutateModules } from '@pnpm/core' +import { install, type MutatedProject, mutateModules } from '@pnpm/core' import writeYamlFile from 'write-yaml-file' import readYamlFile from 'read-yaml-file' -import { Lockfile, PackageSnapshots } from '@pnpm/lockfile-file' +import { type Lockfile, type PackageSnapshots } from '@pnpm/lockfile-file' import { testDefaults } from '../utils' test('fix broken lockfile with --fix-lockfile', async () => { diff --git a/pkg-manager/core/test/install/fromRepo.ts b/pkg-manager/core/test/install/fromRepo.ts index fcbb664e651..aef212d925f 100644 --- a/pkg-manager/core/test/install/fromRepo.ts +++ b/pkg-manager/core/test/install/fromRepo.ts @@ -1,5 +1,5 @@ import path from 'path' -import { RootLog } from '@pnpm/core-loggers' +import { type RootLog } from '@pnpm/core-loggers' import { prepareEmpty } from '@pnpm/prepare' import { addDependenciesToPackage, diff --git a/pkg-manager/core/test/install/frozenLockfile.ts b/pkg-manager/core/test/install/frozenLockfile.ts index 7abe2150d5b..eee4fa8ecfd 100644 --- a/pkg-manager/core/test/install/frozenLockfile.ts +++ b/pkg-manager/core/test/install/frozenLockfile.ts @@ -3,7 +3,7 @@ import { WANTED_LOCKFILE } from '@pnpm/constants' import { prepareEmpty, preparePackages } from '@pnpm/prepare' import { install, - MutatedProject, + type MutatedProject, mutateModules, } from '@pnpm/core' import sinon from 'sinon' diff --git a/pkg-manager/core/test/install/gitBranchLockfile.test.ts b/pkg-manager/core/test/install/gitBranchLockfile.test.ts index 090895b50ea..f1a5d55b30c 100644 --- a/pkg-manager/core/test/install/gitBranchLockfile.test.ts +++ b/pkg-manager/core/test/install/gitBranchLockfile.test.ts @@ -4,7 +4,7 @@ import { prepareEmpty, preparePackages } from '@pnpm/prepare' import { install, mutateModules } from '@pnpm/core' import { testDefaults } from '../utils' import { LOCKFILE_VERSION_V6 as LOCKFILE_VERSION, WANTED_LOCKFILE } from '@pnpm/constants' -import { ProjectManifest } from '@pnpm/types' +import { type ProjectManifest } from '@pnpm/types' import { getCurrentBranch } from '@pnpm/git-utils' import writeYamlFile from 'write-yaml-file' diff --git a/pkg-manager/core/test/install/hoist.ts b/pkg-manager/core/test/install/hoist.ts index 8ef97c7bfd7..3a8cfae4f7a 100644 --- a/pkg-manager/core/test/install/hoist.ts +++ b/pkg-manager/core/test/install/hoist.ts @@ -5,7 +5,7 @@ import { prepareEmpty, preparePackages } from '@pnpm/prepare' import { addDependenciesToPackage, install, - MutatedProject, + type MutatedProject, mutateModules, mutateModulesInSingleProject, } from '@pnpm/core' diff --git a/pkg-manager/core/test/install/hooks.ts b/pkg-manager/core/test/install/hooks.ts index a40de0e9e20..2f770f40d02 100644 --- a/pkg-manager/core/test/install/hooks.ts +++ b/pkg-manager/core/test/install/hooks.ts @@ -1,10 +1,10 @@ import { LOCKFILE_VERSION_V6 as LOCKFILE_VERSION } from '@pnpm/constants' -import { Lockfile } from '@pnpm/lockfile-file' +import { type Lockfile } from '@pnpm/lockfile-file' import { prepareEmpty } from '@pnpm/prepare' import { addDistTag } from '@pnpm/registry-mock' import { addDependenciesToPackage, - PackageManifest, + type PackageManifest, } from '@pnpm/core' import { testDefaults } from '../utils' diff --git a/pkg-manager/core/test/install/injectLocalPackages.ts b/pkg-manager/core/test/install/injectLocalPackages.ts index 17e7e9622ef..3f7845a5109 100644 --- a/pkg-manager/core/test/install/injectLocalPackages.ts +++ b/pkg-manager/core/test/install/injectLocalPackages.ts @@ -1,7 +1,7 @@ import fs from 'fs' import path from 'path' import { assertProject } from '@pnpm/assert-project' -import { MutatedProject, mutateModules, ProjectOptions } from '@pnpm/core' +import { type MutatedProject, mutateModules, type ProjectOptions } from '@pnpm/core' import { preparePackages } from '@pnpm/prepare' import rimraf from '@zkochan/rimraf' import pathExists from 'path-exists' diff --git a/pkg-manager/core/test/install/lifecycleScripts.ts b/pkg-manager/core/test/install/lifecycleScripts.ts index 1eb18c44c6b..dad2ad57ad7 100644 --- a/pkg-manager/core/test/install/lifecycleScripts.ts +++ b/pkg-manager/core/test/install/lifecycleScripts.ts @@ -1,13 +1,13 @@ import * as path from 'path' import { promises as fs } from 'fs' import { assertProject } from '@pnpm/assert-project' -import { LifecycleLog } from '@pnpm/core-loggers' +import { type LifecycleLog } from '@pnpm/core-loggers' import { prepareEmpty, preparePackages } from '@pnpm/prepare' import { addDependenciesToPackage, install, mutateModulesInSingleProject, - MutatedProject, + type MutatedProject, mutateModules, } from '@pnpm/core' import rimraf from '@zkochan/rimraf' diff --git a/pkg-manager/core/test/install/local.ts b/pkg-manager/core/test/install/local.ts index bedc17c8396..ad58dbcded8 100644 --- a/pkg-manager/core/test/install/local.ts +++ b/pkg-manager/core/test/install/local.ts @@ -1,7 +1,7 @@ import { promises as fs } from 'fs' import path from 'path' import { LOCKFILE_VERSION_V6 as LOCKFILE_VERSION } from '@pnpm/constants' -import { Lockfile } from '@pnpm/lockfile-file' +import { type Lockfile } from '@pnpm/lockfile-file' import { prepareEmpty, preparePackages } from '@pnpm/prepare' import { addDistTag } from '@pnpm/registry-mock' import { fixtures } from '@pnpm/test-fixtures' @@ -9,7 +9,7 @@ import { addDependenciesToPackage, install, mutateModules, - MutatedProject, + type MutatedProject, mutateModulesInSingleProject, } from '@pnpm/core' import rimraf from '@zkochan/rimraf' diff --git a/pkg-manager/core/test/install/lockfileDir.ts b/pkg-manager/core/test/install/lockfileDir.ts index 45a25757d55..15d01bd267d 100644 --- a/pkg-manager/core/test/install/lockfileDir.ts +++ b/pkg-manager/core/test/install/lockfileDir.ts @@ -1,6 +1,6 @@ import path from 'path' import { WANTED_LOCKFILE } from '@pnpm/constants' -import { Lockfile } from '@pnpm/lockfile-file' +import { type Lockfile } from '@pnpm/lockfile-file' import { prepareEmpty } from '@pnpm/prepare' import { fixtures } from '@pnpm/test-fixtures' import readYamlFile from 'read-yaml-file' diff --git a/pkg-manager/core/test/install/misc.ts b/pkg-manager/core/test/install/misc.ts index f8cfb3ab9b0..0d3b3c0f0fe 100644 --- a/pkg-manager/core/test/install/misc.ts +++ b/pkg-manager/core/test/install/misc.ts @@ -1,17 +1,17 @@ import * as path from 'path' import { promises as fs } from 'fs' import { prepare, prepareEmpty, preparePackages } from '@pnpm/prepare' -import { PnpmError } from '@pnpm/error' +import { type PnpmError } from '@pnpm/error' import { - PackageManifestLog, - ProgressLog, - RootLog, - StageLog, - StatsLog, + type PackageManifestLog, + type ProgressLog, + type RootLog, + type StageLog, + type StatsLog, } from '@pnpm/core-loggers' import { LOCKFILE_VERSION_V6 as LOCKFILE_VERSION } from '@pnpm/constants' import { fixtures } from '@pnpm/test-fixtures' -import { ProjectManifest } from '@pnpm/types' +import { type ProjectManifest } from '@pnpm/types' import { addDistTag, getIntegrity, REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { addDependenciesToPackage, diff --git a/pkg-manager/core/test/install/modulesDir.ts b/pkg-manager/core/test/install/modulesDir.ts index 6e08fecda21..52920f7ab64 100644 --- a/pkg-manager/core/test/install/modulesDir.ts +++ b/pkg-manager/core/test/install/modulesDir.ts @@ -2,7 +2,7 @@ import path from 'path' import { prepareEmpty, preparePackages } from '@pnpm/prepare' import { install, - MutatedProject, + type MutatedProject, mutateModules, } from '@pnpm/core' import rimraf from '@zkochan/rimraf' diff --git a/pkg-manager/core/test/install/multipleImporters.ts b/pkg-manager/core/test/install/multipleImporters.ts index 7c2ea43c623..9724709ecea 100644 --- a/pkg-manager/core/test/install/multipleImporters.ts +++ b/pkg-manager/core/test/install/multipleImporters.ts @@ -4,10 +4,10 @@ import { LOCKFILE_VERSION_V6 as LOCKFILE_VERSION } from '@pnpm/constants' import { readCurrentLockfile } from '@pnpm/lockfile-file' import { prepareEmpty, preparePackages } from '@pnpm/prepare' import { addDistTag } from '@pnpm/registry-mock' -import { ProjectManifest } from '@pnpm/types' +import { type ProjectManifest } from '@pnpm/types' import { addDependenciesToPackage, - MutatedProject, + type MutatedProject, mutateModules, mutateModulesInSingleProject, } from '@pnpm/core' diff --git a/pkg-manager/core/test/install/optionalDependencies.ts b/pkg-manager/core/test/install/optionalDependencies.ts index 14f5e2f5a4a..66a7b76dc76 100644 --- a/pkg-manager/core/test/install/optionalDependencies.ts +++ b/pkg-manager/core/test/install/optionalDependencies.ts @@ -1,12 +1,12 @@ import path from 'path' -import { Lockfile } from '@pnpm/lockfile-file' +import { type Lockfile } from '@pnpm/lockfile-file' import { prepareEmpty, preparePackages } from '@pnpm/prepare' import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import readYamlFile from 'read-yaml-file' import { addDependenciesToPackage, install, - MutatedProject, + type MutatedProject, mutateModules, mutateModulesInSingleProject, } from '@pnpm/core' diff --git a/pkg-manager/core/test/install/packageExtensions.ts b/pkg-manager/core/test/install/packageExtensions.ts index 25e1bdf7d72..4bf601baeb9 100644 --- a/pkg-manager/core/test/install/packageExtensions.ts +++ b/pkg-manager/core/test/install/packageExtensions.ts @@ -1,7 +1,7 @@ import { PnpmError } from '@pnpm/error' import { prepareEmpty } from '@pnpm/prepare' import { addDependenciesToPackage, mutateModulesInSingleProject } from '@pnpm/core' -import { PackageExtension } from '@pnpm/types' +import { type PackageExtension } from '@pnpm/types' import { createObjectChecksum } from '../../lib/install/index' import { testDefaults, diff --git a/pkg-manager/core/test/install/patch.ts b/pkg-manager/core/test/install/patch.ts index d07f503a9fc..aeb0a313fe8 100644 --- a/pkg-manager/core/test/install/patch.ts +++ b/pkg-manager/core/test/install/patch.ts @@ -1,6 +1,6 @@ import fs from 'fs' import path from 'path' -import { PackageFilesIndex } from '@pnpm/cafs' +import { type PackageFilesIndex } from '@pnpm/cafs' import { ENGINE_NAME } from '@pnpm/constants' import { install } from '@pnpm/core' import { prepareEmpty } from '@pnpm/prepare' diff --git a/pkg-manager/core/test/install/peerDependencies.ts b/pkg-manager/core/test/install/peerDependencies.ts index ef355742f05..3e999c2494c 100644 --- a/pkg-manager/core/test/install/peerDependencies.ts +++ b/pkg-manager/core/test/install/peerDependencies.ts @@ -1,7 +1,7 @@ import { promises as fs } from 'fs' import path from 'path' import { WANTED_LOCKFILE } from '@pnpm/constants' -import { Lockfile } from '@pnpm/lockfile-file' +import { type Lockfile } from '@pnpm/lockfile-file' import { prepareEmpty, preparePackages } from '@pnpm/prepare' import { addDistTag, REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { fixtures } from '@pnpm/test-fixtures' @@ -9,11 +9,11 @@ import readYamlFile from 'read-yaml-file' import { addDependenciesToPackage, install, - MutatedProject, + type MutatedProject, mutateModules, mutateModulesInSingleProject, - PeerDependencyIssuesError, - ProjectOptions, + type PeerDependencyIssuesError, + type ProjectOptions, } from '@pnpm/core' import rimraf from '@zkochan/rimraf' import exists from 'path-exists' diff --git a/pkg-manager/core/test/install/reporting.ts b/pkg-manager/core/test/install/reporting.ts index 9c2f3102da0..b7c1aa89223 100644 --- a/pkg-manager/core/test/install/reporting.ts +++ b/pkg-manager/core/test/install/reporting.ts @@ -1,4 +1,4 @@ -import { DeprecationLog } from '@pnpm/core-loggers' +import { type DeprecationLog } from '@pnpm/core-loggers' import { prepareEmpty } from '@pnpm/prepare' import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { diff --git a/pkg-manager/core/test/install/setExtraNodePath.ts b/pkg-manager/core/test/install/setExtraNodePath.ts index dd492348a51..579c7190b85 100644 --- a/pkg-manager/core/test/install/setExtraNodePath.ts +++ b/pkg-manager/core/test/install/setExtraNodePath.ts @@ -3,7 +3,7 @@ import path from 'path' import { preparePackages, tempDir } from '@pnpm/prepare' import { fixtures } from '@pnpm/test-fixtures' import { - MutatedProject, + type MutatedProject, mutateModules, install, } from '@pnpm/core' diff --git a/pkg-manager/core/test/install/sideEffects.ts b/pkg-manager/core/test/install/sideEffects.ts index e66ab794553..749eb86e2e2 100644 --- a/pkg-manager/core/test/install/sideEffects.ts +++ b/pkg-manager/core/test/install/sideEffects.ts @@ -1,7 +1,7 @@ import { promises as fs, existsSync, readFileSync } from 'fs' import path from 'path' import { addDependenciesToPackage, install } from '@pnpm/core' -import { getFilePathInCafs, getFilePathByModeInCafs, PackageFilesIndex } from '@pnpm/cafs' +import { getFilePathInCafs, getFilePathByModeInCafs, type PackageFilesIndex } from '@pnpm/cafs' import { getIntegrity, REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { prepareEmpty } from '@pnpm/prepare' import { ENGINE_NAME } from '@pnpm/constants' diff --git a/pkg-manager/core/test/install/update.ts b/pkg-manager/core/test/install/update.ts index 30965c54bb7..433da7fa9ac 100644 --- a/pkg-manager/core/test/install/update.ts +++ b/pkg-manager/core/test/install/update.ts @@ -1,6 +1,6 @@ import path from 'path' import { WANTED_LOCKFILE } from '@pnpm/constants' -import { Lockfile } from '@pnpm/lockfile-file' +import { type Lockfile } from '@pnpm/lockfile-file' import { prepareEmpty } from '@pnpm/prepare' import { addDistTag } from '@pnpm/registry-mock' import readYamlFile from 'read-yaml-file' diff --git a/pkg-manager/core/test/link.ts b/pkg-manager/core/test/link.ts index 0a5d575042f..6014362082d 100644 --- a/pkg-manager/core/test/link.ts +++ b/pkg-manager/core/test/link.ts @@ -8,7 +8,7 @@ import { import { fixtures } from '@pnpm/test-fixtures' import { prepareEmpty } from '@pnpm/prepare' import { addDistTag } from '@pnpm/registry-mock' -import { RootLog } from '@pnpm/core-loggers' +import { type RootLog } from '@pnpm/core-loggers' import sinon from 'sinon' import writeJsonFile from 'write-json-file' import symlink from 'symlink-dir' diff --git a/pkg-manager/core/test/lockfile.ts b/pkg-manager/core/test/lockfile.ts index d172b645882..85c8d9f174c 100644 --- a/pkg-manager/core/test/lockfile.ts +++ b/pkg-manager/core/test/lockfile.ts @@ -1,22 +1,22 @@ import { promises as fs } from 'fs' import path from 'path' import { LOCKFILE_VERSION_V6 as LOCKFILE_VERSION, WANTED_LOCKFILE } from '@pnpm/constants' -import { RootLog } from '@pnpm/core-loggers' -import { PnpmError } from '@pnpm/error' -import { Lockfile, TarballResolution } from '@pnpm/lockfile-file' -import { LockfileV6 } from '@pnpm/lockfile-types' +import { type RootLog } from '@pnpm/core-loggers' +import { type PnpmError } from '@pnpm/error' +import { type Lockfile, type TarballResolution } from '@pnpm/lockfile-file' +import { type LockfileV6 } from '@pnpm/lockfile-types' import { prepareEmpty, preparePackages } from '@pnpm/prepare' import { readPackageJsonFromDir } from '@pnpm/read-package-json' import { addDistTag, getIntegrity, REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' -import { ProjectManifest } from '@pnpm/types' +import { type ProjectManifest } from '@pnpm/types' import readYamlFile from 'read-yaml-file' import { addDependenciesToPackage, install, mutateModules, mutateModulesInSingleProject, - MutatedProject, - ProjectOptions, + type MutatedProject, + type ProjectOptions, } from '@pnpm/core' import rimraf from '@zkochan/rimraf' import loadJsonFile from 'load-json-file' diff --git a/pkg-manager/core/test/prune.ts b/pkg-manager/core/test/prune.ts index 7cb145fad40..3dbac627a05 100644 --- a/pkg-manager/core/test/prune.ts +++ b/pkg-manager/core/test/prune.ts @@ -1,5 +1,5 @@ import path from 'path' -import { RootLog } from '@pnpm/core-loggers' +import { type RootLog } from '@pnpm/core-loggers' import { prepareEmpty } from '@pnpm/prepare' import { fixtures } from '@pnpm/test-fixtures' import { diff --git a/pkg-manager/core/test/uninstall.ts b/pkg-manager/core/test/uninstall.ts index d67e24a09cf..4167603e7ef 100644 --- a/pkg-manager/core/test/uninstall.ts +++ b/pkg-manager/core/test/uninstall.ts @@ -1,15 +1,15 @@ import path from 'path' import { LOCKFILE_VERSION_V6 as LOCKFILE_VERSION, WANTED_LOCKFILE } from '@pnpm/constants' import { - PackageManifestLog, - RootLog, - StatsLog, + type PackageManifestLog, + type RootLog, + type StatsLog, } from '@pnpm/core-loggers' -import { Lockfile } from '@pnpm/lockfile-file' +import { type Lockfile } from '@pnpm/lockfile-file' import { prepareEmpty, preparePackages } from '@pnpm/prepare' import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { fixtures } from '@pnpm/test-fixtures' -import { PackageManifest } from '@pnpm/types' +import { type PackageManifest } from '@pnpm/types' import readYamlFile from 'read-yaml-file' import { addDependenciesToPackage, diff --git a/pkg-manager/core/test/utils/testDefaults.ts b/pkg-manager/core/test/utils/testDefaults.ts index affe7bf2559..6e5b09269af 100644 --- a/pkg-manager/core/test/utils/testDefaults.ts +++ b/pkg-manager/core/test/utils/testDefaults.ts @@ -2,10 +2,10 @@ import * as path from 'path' import { createClient } from '@pnpm/client' import { createPackageStore } from '@pnpm/package-store' import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' -import { StoreController } from '@pnpm/store-controller-types' +import { type StoreController } from '@pnpm/store-controller-types' import { getStorePath } from '@pnpm/store-path' -import { Registries } from '@pnpm/types' -import { InstallOptions } from '@pnpm/core' +import { type Registries } from '@pnpm/types' +import { type InstallOptions } from '@pnpm/core' const registry = `http://localhost:${REGISTRY_MOCK_PORT}/` diff --git a/pkg-manager/get-context/src/checkCompatibility/BreakingChangeError.ts b/pkg-manager/get-context/src/checkCompatibility/BreakingChangeError.ts index 1e690511c64..493f187af70 100644 --- a/pkg-manager/get-context/src/checkCompatibility/BreakingChangeError.ts +++ b/pkg-manager/get-context/src/checkCompatibility/BreakingChangeError.ts @@ -1,5 +1,5 @@ import { PnpmError } from '@pnpm/error' -import { ErrorRelatedSources } from './ErrorRelatedSources' +import { type ErrorRelatedSources } from './ErrorRelatedSources' export type BreakingChangeErrorOptions = ErrorRelatedSources & { code: string diff --git a/pkg-manager/get-context/src/checkCompatibility/ModulesBreakingChangeError.ts b/pkg-manager/get-context/src/checkCompatibility/ModulesBreakingChangeError.ts index de0d00d120c..5b0d14aaa61 100644 --- a/pkg-manager/get-context/src/checkCompatibility/ModulesBreakingChangeError.ts +++ b/pkg-manager/get-context/src/checkCompatibility/ModulesBreakingChangeError.ts @@ -1,5 +1,5 @@ import { BreakingChangeError } from './BreakingChangeError' -import { ErrorRelatedSources } from './ErrorRelatedSources' +import { type ErrorRelatedSources } from './ErrorRelatedSources' export type ModulesBreakingChangeErrorOptions = ErrorRelatedSources & { modulesPath: string diff --git a/pkg-manager/get-context/src/checkCompatibility/index.ts b/pkg-manager/get-context/src/checkCompatibility/index.ts index adcc84d89eb..06b3b5cf622 100644 --- a/pkg-manager/get-context/src/checkCompatibility/index.ts +++ b/pkg-manager/get-context/src/checkCompatibility/index.ts @@ -1,6 +1,6 @@ import path from 'path' import { LAYOUT_VERSION } from '@pnpm/constants' -import { Modules } from '@pnpm/modules-yaml' +import { type Modules } from '@pnpm/modules-yaml' import { ModulesBreakingChangeError } from './ModulesBreakingChangeError' import { UnexpectedStoreError } from './UnexpectedStoreError' import { UnexpectedVirtualStoreDirError } from './UnexpectedVirtualStoreDirError' diff --git a/pkg-manager/get-context/src/index.ts b/pkg-manager/get-context/src/index.ts index 12204d46ba7..b405f3a07a9 100644 --- a/pkg-manager/get-context/src/index.ts +++ b/pkg-manager/get-context/src/index.ts @@ -2,19 +2,19 @@ import { promises as fs } from 'fs' import path from 'path' import { contextLogger, packageManifestLogger } from '@pnpm/core-loggers' import { PnpmError } from '@pnpm/error' -import { Lockfile } from '@pnpm/lockfile-file' +import { type Lockfile } from '@pnpm/lockfile-file' import { logger } from '@pnpm/logger' import { - IncludedDependencies, - Modules, + type IncludedDependencies, + type Modules, } from '@pnpm/modules-yaml' import { readProjectsContext } from '@pnpm/read-projects-context' import { DEPENDENCIES_FIELDS, - HoistedDependencies, - ProjectManifest, - ReadPackageHook, - Registries, + type HoistedDependencies, + type ProjectManifest, + type ReadPackageHook, + type Registries, } from '@pnpm/types' import rimraf from '@zkochan/rimraf' import pathAbsolute from 'path-absolute' diff --git a/pkg-manager/get-context/src/readLockfiles.ts b/pkg-manager/get-context/src/readLockfiles.ts index 75098a476d5..75c487f159e 100644 --- a/pkg-manager/get-context/src/readLockfiles.ts +++ b/pkg-manager/get-context/src/readLockfiles.ts @@ -7,7 +7,7 @@ import { createLockfileObject, existsWantedLockfile, isEmptyLockfile, - Lockfile, + type Lockfile, readCurrentLockfile, readWantedLockfile, readWantedLockfileAndAutofixConflicts, diff --git a/pkg-manager/get-context/test/index.ts b/pkg-manager/get-context/test/index.ts index 86cfc7216a0..fa6274c005b 100644 --- a/pkg-manager/get-context/test/index.ts +++ b/pkg-manager/get-context/test/index.ts @@ -1,7 +1,7 @@ /// import { getContext } from '@pnpm/get-context' import path from 'path' -import { GetContextOptions } from '../src' +import { type GetContextOptions } from '../src' const DEFAULT_OPTIONS: GetContextOptions = { allProjects: [], diff --git a/pkg-manager/headless/src/index.ts b/pkg-manager/headless/src/index.ts index 67b101438e6..027cc499dc1 100644 --- a/pkg-manager/headless/src/index.ts +++ b/pkg-manager/headless/src/index.ts @@ -1,7 +1,7 @@ import { promises as fs } from 'fs' import path from 'path' import { buildModules } from '@pnpm/build-modules' -import { calcDepState, DepsStateCache } from '@pnpm/calc-dep-state' +import { calcDepState, type DepsStateCache } from '@pnpm/calc-dep-state' import { LAYOUT_VERSION, WANTED_LOCKFILE, @@ -25,12 +25,12 @@ import { import { linkBins, linkBinsOfPackages } from '@pnpm/link-bins' import { getLockfileImporterId, - Lockfile, + type Lockfile, readCurrentLockfile, readWantedLockfile, writeLockfiles, writeCurrentLockfile, - PatchFile, + type PatchFile, } from '@pnpm/lockfile-file' import { writePnpFile } from '@pnpm/lockfile-to-pnp' import { @@ -39,24 +39,24 @@ import { satisfiesPackageManifest, } from '@pnpm/lockfile-utils' import { - LogBase, + type LogBase, logger, streamParser, } from '@pnpm/logger' import { prune } from '@pnpm/modules-cleaner' import { - IncludedDependencies, + type IncludedDependencies, writeModulesManifest, } from '@pnpm/modules-yaml' -import { HoistingLimits } from '@pnpm/real-hoist' +import { type HoistingLimits } from '@pnpm/real-hoist' import { readPackageJsonFromDir } from '@pnpm/read-package-json' import { readProjectManifestOnly, safeReadProjectManifestOnly } from '@pnpm/read-project-manifest' import { - PackageFilesResponse, - StoreController, + type PackageFilesResponse, + type StoreController, } from '@pnpm/store-controller-types' import { symlinkDependency } from '@pnpm/symlink-dependency' -import { DependencyManifest, HoistedDependencies, ProjectManifest, Registries } from '@pnpm/types' +import { type DependencyManifest, type HoistedDependencies, type ProjectManifest, type Registries } from '@pnpm/types' import * as dp from '@pnpm/dependency-path' import pLimit from 'p-limit' import pathAbsolute from 'path-absolute' @@ -70,16 +70,16 @@ import union from 'ramda/src/union' import realpathMissing from 'realpath-missing' import { linkHoistedModules } from './linkHoistedModules' import { - DirectDependenciesByImporterId, - DependenciesGraph, - DependenciesGraphNode, - LockfileToDepGraphOptions, + type DirectDependenciesByImporterId, + type DependenciesGraph, + type DependenciesGraphNode, + type LockfileToDepGraphOptions, lockfileToDepGraph, } from './lockfileToDepGraph' import { lockfileToHoistedDepGraph } from './lockfileToHoistedDepGraph' -import { linkDirectDeps, LinkedDirectDep } from '@pnpm/pkg-manager.direct-dep-linker' +import { linkDirectDeps, type LinkedDirectDep } from '@pnpm/pkg-manager.direct-dep-linker' -export { HoistingLimits } +export type { HoistingLimits } export type ReporterFunction = (logObj: LogBase) => void diff --git a/pkg-manager/headless/src/linkHoistedModules.ts b/pkg-manager/headless/src/linkHoistedModules.ts index 9fc34f38f72..dfc0f85e901 100644 --- a/pkg-manager/headless/src/linkHoistedModules.ts +++ b/pkg-manager/headless/src/linkHoistedModules.ts @@ -1,5 +1,5 @@ import path from 'path' -import { calcDepState, DepsStateCache } from '@pnpm/calc-dep-state' +import { calcDepState, type DepsStateCache } from '@pnpm/calc-dep-state' import { progressLogger, removalLogger, @@ -8,16 +8,16 @@ import { import { linkBins } from '@pnpm/link-bins' import { logger } from '@pnpm/logger' import { - PackageFilesResponse, - StoreController, + type PackageFilesResponse, + type StoreController, } from '@pnpm/store-controller-types' import pLimit from 'p-limit' import difference from 'ramda/src/difference' import isEmpty from 'ramda/src/isEmpty' import rimraf from '@zkochan/rimraf' import { - DepHierarchy, - DependenciesGraph, + type DepHierarchy, + type DependenciesGraph, } from './lockfileToDepGraph' const limitLinking = pLimit(16) diff --git a/pkg-manager/headless/src/lockfileToDepGraph.ts b/pkg-manager/headless/src/lockfileToDepGraph.ts index e0fbf8bc0c0..69b2d800705 100644 --- a/pkg-manager/headless/src/lockfileToDepGraph.ts +++ b/pkg-manager/headless/src/lockfileToDepGraph.ts @@ -4,8 +4,8 @@ import { progressLogger, } from '@pnpm/core-loggers' import { - Lockfile, - PackageSnapshot, + type Lockfile, + type PackageSnapshot, } from '@pnpm/lockfile-file' import { nameVerFromPkgSnapshot, @@ -13,13 +13,13 @@ import { pkgSnapshotToResolution, } from '@pnpm/lockfile-utils' import { logger } from '@pnpm/logger' -import { IncludedDependencies } from '@pnpm/modules-yaml' +import { type IncludedDependencies } from '@pnpm/modules-yaml' import { packageIsInstallable } from '@pnpm/package-is-installable' -import { PatchFile, Registries } from '@pnpm/types' +import { type PatchFile, type Registries } from '@pnpm/types' import { - FetchPackageToStoreFunction, - PackageFilesResponse, - StoreController, + type FetchPackageToStoreFunction, + type PackageFilesResponse, + type StoreController, } from '@pnpm/store-controller-types' import * as dp from '@pnpm/dependency-path' import pathExists from 'path-exists' diff --git a/pkg-manager/headless/src/lockfileToHoistedDepGraph.ts b/pkg-manager/headless/src/lockfileToHoistedDepGraph.ts index a22fa7f7062..6f06a9ebc1a 100644 --- a/pkg-manager/headless/src/lockfileToHoistedDepGraph.ts +++ b/pkg-manager/headless/src/lockfileToHoistedDepGraph.ts @@ -1,29 +1,29 @@ import pathExists from 'path-exists' import path from 'path' import { - Lockfile, - PackageSnapshot, - ProjectSnapshot, + type Lockfile, + type PackageSnapshot, + type ProjectSnapshot, } from '@pnpm/lockfile-file' import { nameVerFromPkgSnapshot, packageIdFromSnapshot, pkgSnapshotToResolution, } from '@pnpm/lockfile-utils' -import { IncludedDependencies } from '@pnpm/modules-yaml' +import { type IncludedDependencies } from '@pnpm/modules-yaml' import { packageIsInstallable } from '@pnpm/package-is-installable' -import { PatchFile, Registries } from '@pnpm/types' +import { type PatchFile, type Registries } from '@pnpm/types' import { - FetchPackageToStoreFunction, - StoreController, + type FetchPackageToStoreFunction, + type StoreController, } from '@pnpm/store-controller-types' -import { hoist, HoistingLimits, HoisterResult } from '@pnpm/real-hoist' +import { hoist, type HoistingLimits, type HoisterResult } from '@pnpm/real-hoist' import * as dp from '@pnpm/dependency-path' import { - DependenciesGraph, - DepHierarchy, - DirectDependenciesByImporterId, - LockfileToDepGraphResult, + type DependenciesGraph, + type DepHierarchy, + type DirectDependenciesByImporterId, + type LockfileToDepGraphResult, } from './lockfileToDepGraph' export interface LockfileToHoistedDepGraphOptions { diff --git a/pkg-manager/headless/test/index.ts b/pkg-manager/headless/test/index.ts index 987a1ada1b6..e50493d4a0a 100644 --- a/pkg-manager/headless/test/index.ts +++ b/pkg-manager/headless/test/index.ts @@ -5,10 +5,10 @@ import { assertProject } from '@pnpm/assert-project' import { getFilePathInCafs } from '@pnpm/cafs' import { ENGINE_NAME, WANTED_LOCKFILE } from '@pnpm/constants' import { - PackageManifestLog, - RootLog, - StageLog, - StatsLog, + type PackageManifestLog, + type RootLog, + type StageLog, + type StatsLog, } from '@pnpm/core-loggers' import { headlessInstall } from '@pnpm/headless' import { readWantedLockfile } from '@pnpm/lockfile-file' diff --git a/pkg-manager/headless/test/utils/testDefaults.ts b/pkg-manager/headless/test/utils/testDefaults.ts index 2e3b96b26b9..6a108a9deba 100644 --- a/pkg-manager/headless/test/utils/testDefaults.ts +++ b/pkg-manager/headless/test/utils/testDefaults.ts @@ -1,6 +1,6 @@ import path from 'path' import { createClient } from '@pnpm/client' -import { HeadlessOptions } from '@pnpm/headless' +import { type HeadlessOptions } from '@pnpm/headless' import { createPackageStore } from '@pnpm/package-store' import { safeReadPackageJsonFromDir } from '@pnpm/read-package-json' import { readProjectsContext } from '@pnpm/read-projects-context' diff --git a/pkg-manager/hoist/src/index.ts b/pkg-manager/hoist/src/index.ts index 638e0aaab63..207d2942281 100644 --- a/pkg-manager/hoist/src/index.ts +++ b/pkg-manager/hoist/src/index.ts @@ -2,15 +2,15 @@ import fs from 'fs' import path from 'path' import { linkLogger } from '@pnpm/core-loggers' import { WANTED_LOCKFILE } from '@pnpm/constants' -import { linkBins, WarnFunction } from '@pnpm/link-bins' +import { linkBins, type WarnFunction } from '@pnpm/link-bins' import { - Lockfile, + type Lockfile, nameVerFromPkgSnapshot, } from '@pnpm/lockfile-utils' -import { lockfileWalker, LockfileWalkerStep } from '@pnpm/lockfile-walker' +import { lockfileWalker, type LockfileWalkerStep } from '@pnpm/lockfile-walker' import { logger } from '@pnpm/logger' import { createMatcher } from '@pnpm/matcher' -import { HoistedDependencies } from '@pnpm/types' +import { type HoistedDependencies } from '@pnpm/types' import { lexCompare } from '@pnpm/util.lex-comparator' import * as dp from '@pnpm/dependency-path' import isSubdir from 'is-subdir' diff --git a/pkg-manager/link-bins/src/index.ts b/pkg-manager/link-bins/src/index.ts index 275c1565f95..3a2e97265ce 100644 --- a/pkg-manager/link-bins/src/index.ts +++ b/pkg-manager/link-bins/src/index.ts @@ -4,18 +4,18 @@ import path from 'path' import { PnpmError } from '@pnpm/error' import { logger, globalWarn } from '@pnpm/logger' import { getAllDependenciesFromManifest } from '@pnpm/manifest-utils' -import { Command, getBinsFromPackageManifest } from '@pnpm/package-bins' +import { type Command, getBinsFromPackageManifest } from '@pnpm/package-bins' import { readModulesDir } from '@pnpm/read-modules-dir' import { readPackageJsonFromDir } from '@pnpm/read-package-json' import { safeReadProjectManifestOnly } from '@pnpm/read-project-manifest' -import { DependencyManifest, ProjectManifest } from '@pnpm/types' +import { type DependencyManifest, type ProjectManifest } from '@pnpm/types' import cmdShim from '@zkochan/cmd-shim' import rimraf from '@zkochan/rimraf' import isSubdir from 'is-subdir' import isWindows from 'is-windows' import normalizePath from 'normalize-path' import pSettle from 'p-settle' -import { KeyValuePair } from 'ramda' +import { type KeyValuePair } from 'ramda' import isEmpty from 'ramda/src/isEmpty' import unnest from 'ramda/src/unnest' import partition from 'ramda/src/partition' diff --git a/pkg-manager/modules-cleaner/src/prune.ts b/pkg-manager/modules-cleaner/src/prune.ts index 92701d18fdc..bd5d535dff7 100644 --- a/pkg-manager/modules-cleaner/src/prune.ts +++ b/pkg-manager/modules-cleaner/src/prune.ts @@ -6,19 +6,19 @@ import { } from '@pnpm/core-loggers' import { filterLockfile, filterLockfileByImporters } from '@pnpm/filter-lockfile' import { - Lockfile, - PackageSnapshots, - ProjectSnapshot, + type Lockfile, + type PackageSnapshots, + type ProjectSnapshot, } from '@pnpm/lockfile-types' import { packageIdFromSnapshot } from '@pnpm/lockfile-utils' import { logger } from '@pnpm/logger' import { readModulesDir } from '@pnpm/read-modules-dir' -import { StoreController } from '@pnpm/store-controller-types' +import { type StoreController } from '@pnpm/store-controller-types' import { - DependenciesField, + type DependenciesField, DEPENDENCIES_FIELDS, - HoistedDependencies, - Registries, + type HoistedDependencies, + type Registries, } from '@pnpm/types' import { depPathToFilename } from '@pnpm/dependency-path' import rimraf from '@zkochan/rimraf' @@ -156,7 +156,7 @@ export async function prune ( .map((orphanDepPath) => depPathToFilename(orphanDepPath)) .map(async (orphanDepPath) => _tryRemovePkg(orphanDepPath)) ) - const neededPkgs: Set = new Set(['node_modules']) + const neededPkgs = new Set(['node_modules']) for (const depPath of Object.keys(opts.wantedLockfile.packages ?? {})) { if (opts.skipped.has(depPath)) continue neededPkgs.add(depPathToFilename(depPath)) diff --git a/pkg-manager/modules-cleaner/src/removeDirectDependency.ts b/pkg-manager/modules-cleaner/src/removeDirectDependency.ts index 95c0f19330e..fecb18aead5 100644 --- a/pkg-manager/modules-cleaner/src/removeDirectDependency.ts +++ b/pkg-manager/modules-cleaner/src/removeDirectDependency.ts @@ -1,7 +1,7 @@ import path from 'path' import { rootLogger } from '@pnpm/core-loggers' import { removeBin, removeBinsOfDependency } from '@pnpm/remove-bins' -import { DependenciesField } from '@pnpm/types' +import { type DependenciesField } from '@pnpm/types' export async function removeDirectDependency ( dependency: { diff --git a/pkg-manager/modules-yaml/src/index.ts b/pkg-manager/modules-yaml/src/index.ts index 4428644643f..ef778546a8b 100644 --- a/pkg-manager/modules-yaml/src/index.ts +++ b/pkg-manager/modules-yaml/src/index.ts @@ -1,5 +1,5 @@ import path from 'path' -import { DependenciesField, HoistedDependencies, Registries } from '@pnpm/types' +import { type DependenciesField, type HoistedDependencies, type Registries } from '@pnpm/types' import readYamlFile from 'read-yaml-file' import mapValues from 'ramda/src/map' import isWindows from 'is-windows' diff --git a/pkg-manager/package-bins/src/index.ts b/pkg-manager/package-bins/src/index.ts index 58605dc7a9f..5031389df6b 100644 --- a/pkg-manager/package-bins/src/index.ts +++ b/pkg-manager/package-bins/src/index.ts @@ -1,5 +1,5 @@ import path from 'path' -import { DependencyManifest, PackageBin } from '@pnpm/types' +import { type DependencyManifest, type PackageBin } from '@pnpm/types' import fastGlob from 'fast-glob' import isSubdir from 'is-subdir' diff --git a/pkg-manager/package-requester/src/index.ts b/pkg-manager/package-requester/src/index.ts index 3dc8cbfa5ca..b45b7d3e082 100644 --- a/pkg-manager/package-requester/src/index.ts +++ b/pkg-manager/package-requester/src/index.ts @@ -1,3 +1,3 @@ export { createPackageRequester } from './packageRequester' -export { PackageResponse } from '@pnpm/store-controller-types' +export type { PackageResponse } from '@pnpm/store-controller-types' diff --git a/pkg-manager/package-requester/src/packageRequester.ts b/pkg-manager/package-requester/src/packageRequester.ts index 92a4ef2cc1f..b2dbc22e876 100644 --- a/pkg-manager/package-requester/src/packageRequester.ts +++ b/pkg-manager/package-requester/src/packageRequester.ts @@ -3,20 +3,20 @@ import path from 'path' import { checkPkgFilesIntegrity as _checkFilesIntegrity, readManifestFromStore as _readManifestFromStore, - FileType, + type FileType, getFilePathByModeInCafs as _getFilePathByModeInCafs, getFilePathInCafs as _getFilePathInCafs, - PackageFileInfo, - PackageFilesIndex, + type PackageFileInfo, + type PackageFilesIndex, } from '@pnpm/cafs' import { fetchingProgressLogger, progressLogger } from '@pnpm/core-loggers' import { pickFetcher } from '@pnpm/pick-fetcher' import { PnpmError } from '@pnpm/error' import { - DirectoryFetcherResult, - Fetchers, - FetchOptions, - FetchResult, + type DirectoryFetcherResult, + type Fetchers, + type FetchOptions, + type FetchResult, } from '@pnpm/fetcher-base' import type { Cafs, DeferredManifestPromise, PackageFilesResponse } from '@pnpm/cafs-types' import gfs from '@pnpm/graceful-fs' @@ -24,25 +24,25 @@ import { logger } from '@pnpm/logger' import { packageIsInstallable } from '@pnpm/package-is-installable' import { readPackageJson } from '@pnpm/read-package-json' import { - DirectoryResolution, - Resolution, - ResolveFunction, - ResolveResult, - TarballResolution, + type DirectoryResolution, + type Resolution, + type ResolveFunction, + type ResolveResult, + type TarballResolution, } from '@pnpm/resolver-base' import { - BundledManifest, - BundledManifestFunction, - FetchPackageToStoreFunction, - FetchPackageToStoreOptions, - GetFilesIndexFilePath, - PackageResponse, - PkgNameVersion, - RequestPackageFunction, - RequestPackageOptions, - WantedDependency, + type BundledManifest, + type BundledManifestFunction, + type FetchPackageToStoreFunction, + type FetchPackageToStoreOptions, + type GetFilesIndexFilePath, + type PackageResponse, + type PkgNameVersion, + type RequestPackageFunction, + type RequestPackageOptions, + type WantedDependency, } from '@pnpm/store-controller-types' -import { DependencyManifest } from '@pnpm/types' +import { type DependencyManifest } from '@pnpm/types' import { depPathToFilename } from '@pnpm/dependency-path' import pMapValues from 'p-map-values' import PQueue from 'p-queue' @@ -645,7 +645,7 @@ async function writeFilesIndexFile ( }) } -async function writeJsonFile (filePath: string, data: Object) { +async function writeJsonFile (filePath: string, data: unknown) { const targetDir = path.dirname(filePath) // TODO: use the API of @pnpm/cafs to write this file // There is actually no need to create the directory in 99% of cases. diff --git a/pkg-manager/package-requester/test/index.ts b/pkg-manager/package-requester/test/index.ts index e1362b589b5..10277fe54c8 100644 --- a/pkg-manager/package-requester/test/index.ts +++ b/pkg-manager/package-requester/test/index.ts @@ -1,15 +1,15 @@ /// import { promises as fs, statSync } from 'fs' import path from 'path' -import { getFilePathInCafs, PackageFilesIndex, PackageFileInfo } from '@pnpm/cafs' +import { getFilePathInCafs, type PackageFilesIndex, type PackageFileInfo } from '@pnpm/cafs' import { createClient } from '@pnpm/client' import { streamParser } from '@pnpm/logger' -import { createPackageRequester, PackageResponse } from '@pnpm/package-requester' +import { createPackageRequester, type PackageResponse } from '@pnpm/package-requester' import type { PackageFilesResponse } from '@pnpm/cafs-types' import { createCafsStore } from '@pnpm/create-cafs-store' import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import { fixtures } from '@pnpm/test-fixtures' -import { DependencyManifest } from '@pnpm/types' +import { type DependencyManifest } from '@pnpm/types' import delay from 'delay' import { depPathToFilename } from '@pnpm/dependency-path' import loadJsonFile from 'load-json-file' @@ -482,8 +482,8 @@ test('fetchPackageToStore() concurrency check', async () => { }), ]) - let ino1!: Number - let ino2!: Number + let ino1!: number + let ino2!: number { const fetchResult = fetchResults[0] diff --git a/pkg-manager/plugin-commands-installation/src/add.ts b/pkg-manager/plugin-commands-installation/src/add.ts index be9a6cafdf5..17aef3d2796 100644 --- a/pkg-manager/plugin-commands-installation/src/add.ts +++ b/pkg-manager/plugin-commands-installation/src/add.ts @@ -4,7 +4,7 @@ import { types as allTypes } from '@pnpm/config' import { PnpmError } from '@pnpm/error' import pick from 'ramda/src/pick' import renderHelp from 'render-help' -import { InstallCommandOptions } from './install' +import { type InstallCommandOptions } from './install' import { installDeps } from './installDeps' export function rcOptionsTypes () { diff --git a/pkg-manager/plugin-commands-installation/src/fetch.ts b/pkg-manager/plugin-commands-installation/src/fetch.ts index 2662a21513a..232997cf7b1 100644 --- a/pkg-manager/plugin-commands-installation/src/fetch.ts +++ b/pkg-manager/plugin-commands-installation/src/fetch.ts @@ -1,8 +1,8 @@ import { docsUrl } from '@pnpm/cli-utils' import { UNIVERSAL_OPTIONS } from '@pnpm/common-cli-options-help' -import { Config } from '@pnpm/config' -import { createOrConnectStoreController, CreateStoreControllerOptions } from '@pnpm/store-connection-manager' -import { InstallOptions, mutateModulesInSingleProject } from '@pnpm/core' +import { type Config } from '@pnpm/config' +import { createOrConnectStoreController, type CreateStoreControllerOptions } from '@pnpm/store-connection-manager' +import { type InstallOptions, mutateModulesInSingleProject } from '@pnpm/core' import renderHelp from 'render-help' import { cliOptionsTypes } from './install' @@ -47,7 +47,7 @@ export async function handler ( // when including optional deps, production is also required when perform headless install optionalDependencies: opts.production !== false, } - return mutateModulesInSingleProject({ + await mutateModulesInSingleProject({ manifest: {}, mutation: 'install', pruneDirectDependencies: true, diff --git a/pkg-manager/plugin-commands-installation/src/getOptionsFromRootManifest.ts b/pkg-manager/plugin-commands-installation/src/getOptionsFromRootManifest.ts index 093d2c88b1f..aa63a277bf4 100644 --- a/pkg-manager/plugin-commands-installation/src/getOptionsFromRootManifest.ts +++ b/pkg-manager/plugin-commands-installation/src/getOptionsFromRootManifest.ts @@ -1,9 +1,9 @@ import { PnpmError } from '@pnpm/error' import { - AllowedDeprecatedVersions, - PackageExtension, - PeerDependencyRules, - ProjectManifest, + type AllowedDeprecatedVersions, + type PackageExtension, + type PeerDependencyRules, + type ProjectManifest, } from '@pnpm/types' import mapValues from 'ramda/src/map' diff --git a/pkg-manager/plugin-commands-installation/src/getSaveType.ts b/pkg-manager/plugin-commands-installation/src/getSaveType.ts index f3e0799101d..5e145119bf7 100644 --- a/pkg-manager/plugin-commands-installation/src/getSaveType.ts +++ b/pkg-manager/plugin-commands-installation/src/getSaveType.ts @@ -1,5 +1,5 @@ -import { Config } from '@pnpm/config' -import { DependenciesField } from '@pnpm/types' +import { type Config } from '@pnpm/config' +import { type DependenciesField } from '@pnpm/types' export function getSaveType ( opts: Pick diff --git a/pkg-manager/plugin-commands-installation/src/import/index.ts b/pkg-manager/plugin-commands-installation/src/import/index.ts index b772e4480eb..454ce22205d 100644 --- a/pkg-manager/plugin-commands-installation/src/import/index.ts +++ b/pkg-manager/plugin-commands-installation/src/import/index.ts @@ -5,13 +5,13 @@ import { PnpmError } from '@pnpm/error' import { readProjectManifestOnly } from '@pnpm/read-project-manifest' import { createOrConnectStoreController, - CreateStoreControllerOptions, + type CreateStoreControllerOptions, } from '@pnpm/store-connection-manager' import gfs from '@pnpm/graceful-fs' -import { install, InstallOptions } from '@pnpm/core' -import { Config } from '@pnpm/config' +import { install, type InstallOptions } from '@pnpm/core' +import { type Config } from '@pnpm/config' import { findWorkspacePackages } from '@pnpm/find-workspace-packages' -import { Project } from '@pnpm/types' +import { type Project } from '@pnpm/types' import { logger } from '@pnpm/logger' import { sequenceGraph } from '@pnpm/sort-packages' import rimraf from '@zkochan/rimraf' diff --git a/pkg-manager/plugin-commands-installation/src/import/yarnUtil.ts b/pkg-manager/plugin-commands-installation/src/import/yarnUtil.ts index f25844a4499..47e4b22766a 100644 --- a/pkg-manager/plugin-commands-installation/src/import/yarnUtil.ts +++ b/pkg-manager/plugin-commands-installation/src/import/yarnUtil.ts @@ -1,7 +1,7 @@ /** * https://github.com/snyk/nodejs-lockfile-parser/blob/master/lib/parsers/yarn-utils.ts */ -import { structUtils } from '@yarnpkg/core' +import { type structUtils } from '@yarnpkg/core' const BUILTIN_PLACEHOLDER = 'builtin' const MULTIPLE_KEYS_REGEXP = / *, */g diff --git a/pkg-manager/plugin-commands-installation/src/install.ts b/pkg-manager/plugin-commands-installation/src/install.ts index c41c088f980..e0f98897c27 100644 --- a/pkg-manager/plugin-commands-installation/src/install.ts +++ b/pkg-manager/plugin-commands-installation/src/install.ts @@ -1,8 +1,8 @@ import { docsUrl } from '@pnpm/cli-utils' import { FILTERING, OPTIONS, OUTPUT_OPTIONS, UNIVERSAL_OPTIONS } from '@pnpm/common-cli-options-help' -import { Config, types as allTypes } from '@pnpm/config' +import { type Config, types as allTypes } from '@pnpm/config' import { WANTED_LOCKFILE } from '@pnpm/constants' -import { CreateStoreControllerOptions } from '@pnpm/store-connection-manager' +import { type CreateStoreControllerOptions } from '@pnpm/store-connection-manager' import { isCI } from 'ci-info' import pick from 'ramda/src/pick' import renderHelp from 'render-help' diff --git a/pkg-manager/plugin-commands-installation/src/installDeps.ts b/pkg-manager/plugin-commands-installation/src/installDeps.ts index 357e5fb54d4..49487a84a22 100644 --- a/pkg-manager/plugin-commands-installation/src/installDeps.ts +++ b/pkg-manager/plugin-commands-installation/src/installDeps.ts @@ -3,18 +3,18 @@ import { readProjectManifestOnly, tryReadProjectManifest, } from '@pnpm/cli-utils' -import { Config } from '@pnpm/config' +import { type Config } from '@pnpm/config' import { PnpmError } from '@pnpm/error' import { filterPkgsBySelectorObjects } from '@pnpm/filter-workspace-packages' import { arrayOfWorkspacePackagesToMap, findWorkspacePackages } from '@pnpm/find-workspace-packages' import { rebuildProjects } from '@pnpm/plugin-commands-rebuild' -import { createOrConnectStoreController, CreateStoreControllerOptions } from '@pnpm/store-connection-manager' -import { IncludedDependencies, Project, ProjectsGraph } from '@pnpm/types' +import { createOrConnectStoreController, type CreateStoreControllerOptions } from '@pnpm/store-connection-manager' +import { type IncludedDependencies, type Project, type ProjectsGraph } from '@pnpm/types' import { install, mutateModulesInSingleProject, - MutateModulesOptions, - WorkspacePackages, + type MutateModulesOptions, + type WorkspacePackages, } from '@pnpm/core' import { logger } from '@pnpm/logger' import { sequenceGraph } from '@pnpm/sort-packages' @@ -24,7 +24,7 @@ import { getOptionsFromRootManifest } from './getOptionsFromRootManifest' import { getPinnedVersion } from './getPinnedVersion' import { getSaveType } from './getSaveType' import { getNodeExecPath } from './nodeExecPath' -import { recursive, createMatcher, matchDependencies, makeIgnorePatterns, UpdateDepsMatcher } from './recursive' +import { recursive, createMatcher, matchDependencies, makeIgnorePatterns, type UpdateDepsMatcher } from './recursive' import { updateToLatestSpecsFromManifest, createLatestSpecs } from './updateToLatestSpecsFromManifest' import { createWorkspaceSpecs, updateToWorkspacePackagesFromManifest } from './updateWorkspaceDependencies' diff --git a/pkg-manager/plugin-commands-installation/src/link.ts b/pkg-manager/plugin-commands-installation/src/link.ts index ee648a5cdc9..872f732f9b1 100644 --- a/pkg-manager/plugin-commands-installation/src/link.ts +++ b/pkg-manager/plugin-commands-installation/src/link.ts @@ -7,19 +7,19 @@ import { tryReadProjectManifest, } from '@pnpm/cli-utils' import { UNIVERSAL_OPTIONS } from '@pnpm/common-cli-options-help' -import { Config, types as allTypes } from '@pnpm/config' +import { type Config, types as allTypes } from '@pnpm/config' import { PnpmError } from '@pnpm/error' import { findWorkspaceDir } from '@pnpm/find-workspace-dir' import { arrayOfWorkspacePackagesToMap, findWorkspacePackages } from '@pnpm/find-workspace-packages' -import { StoreController } from '@pnpm/package-store' -import { createOrConnectStoreControllerCached, CreateStoreControllerOptions } from '@pnpm/store-connection-manager' +import { type StoreController } from '@pnpm/package-store' +import { createOrConnectStoreControllerCached, type CreateStoreControllerOptions } from '@pnpm/store-connection-manager' import { addDependenciesToPackage, install, - InstallOptions, + type InstallOptions, link, - LinkFunctionOptions, - WorkspacePackages, + type LinkFunctionOptions, + type WorkspacePackages, } from '@pnpm/core' import pLimit from 'p-limit' import pathAbsolute from 'path-absolute' diff --git a/pkg-manager/plugin-commands-installation/src/recursive.ts b/pkg-manager/plugin-commands-installation/src/recursive.ts index aa6b7f43c45..d9319ad9e0b 100755 --- a/pkg-manager/plugin-commands-installation/src/recursive.ts +++ b/pkg-manager/plugin-commands-installation/src/recursive.ts @@ -1,10 +1,10 @@ import { promises as fs } from 'fs' import path from 'path' import { - RecursiveSummary, + type RecursiveSummary, throwOnCommandFail, } from '@pnpm/cli-utils' -import { Config, readLocalConfig } from '@pnpm/config' +import { type Config, readLocalConfig } from '@pnpm/config' import { PnpmError } from '@pnpm/error' import { arrayOfWorkspacePackagesToMap } from '@pnpm/find-workspace-packages' import { logger } from '@pnpm/logger' @@ -13,23 +13,23 @@ import { createMatcherWithIndex } from '@pnpm/matcher' import { rebuild } from '@pnpm/plugin-commands-rebuild' import { requireHooks } from '@pnpm/pnpmfile' import { sortPackages } from '@pnpm/sort-packages' -import { createOrConnectStoreController, CreateStoreControllerOptions } from '@pnpm/store-connection-manager' +import { createOrConnectStoreController, type CreateStoreControllerOptions } from '@pnpm/store-connection-manager' import { - IncludedDependencies, - PackageManifest, - Project, - ProjectManifest, - ProjectsGraph, + type IncludedDependencies, + type PackageManifest, + type Project, + type ProjectManifest, + type ProjectsGraph, } from '@pnpm/types' import { addDependenciesToPackage, install, - InstallOptions, - MutatedProject, + type InstallOptions, + type MutatedProject, mutateModules, - ProjectOptions, - UpdateMatchingFunction, - WorkspacePackages, + type ProjectOptions, + type UpdateMatchingFunction, + type WorkspacePackages, } from '@pnpm/core' import isSubdir from 'is-subdir' import mem from 'mem' @@ -40,7 +40,7 @@ import { createWorkspaceSpecs, updateToWorkspacePackagesFromManifest } from './u import { updateToLatestSpecsFromManifest, createLatestSpecs } from './updateToLatestSpecsFromManifest' import { getSaveType } from './getSaveType' import { getPinnedVersion } from './getPinnedVersion' -import { PreferredVersions } from '@pnpm/resolver-base' +import { type PreferredVersions } from '@pnpm/resolver-base' type RecursiveOptions = CreateStoreControllerOptions & Pick> -export { HoisterResult } +export type { HoisterResult } export function hoist ( lockfile: Lockfile, diff --git a/pkg-manager/remove-bins/src/removeBins.ts b/pkg-manager/remove-bins/src/removeBins.ts index 25ea1ee35ab..7d44fba1d92 100644 --- a/pkg-manager/remove-bins/src/removeBins.ts +++ b/pkg-manager/remove-bins/src/removeBins.ts @@ -4,7 +4,7 @@ import { } from '@pnpm/core-loggers' import { getBinsFromPackageManifest } from '@pnpm/package-bins' import { safeReadPackageJsonFromDir } from '@pnpm/read-package-json' -import { DependencyManifest } from '@pnpm/types' +import { type DependencyManifest } from '@pnpm/types' import rimraf from '@zkochan/rimraf' import CMD_EXTENSION from 'cmd-extension' import isWindows from 'is-windows' diff --git a/pkg-manager/resolve-dependencies/src/depPathToRef.ts b/pkg-manager/resolve-dependencies/src/depPathToRef.ts index 0f01d2c5ce5..1fad73c9779 100644 --- a/pkg-manager/resolve-dependencies/src/depPathToRef.ts +++ b/pkg-manager/resolve-dependencies/src/depPathToRef.ts @@ -1,5 +1,5 @@ -import { Resolution } from '@pnpm/resolver-base' -import { Registries } from '@pnpm/types' +import { type Resolution } from '@pnpm/resolver-base' +import { type Registries } from '@pnpm/types' import { getRegistryByPackageName } from '@pnpm/dependency-path' import encodeRegistry from 'encode-registry' diff --git a/pkg-manager/resolve-dependencies/src/getNonDevWantedDependencies.ts b/pkg-manager/resolve-dependencies/src/getNonDevWantedDependencies.ts index 27a2ba9d1fb..336570134f8 100644 --- a/pkg-manager/resolve-dependencies/src/getNonDevWantedDependencies.ts +++ b/pkg-manager/resolve-dependencies/src/getNonDevWantedDependencies.ts @@ -1,4 +1,4 @@ -import { Dependencies, DependencyManifest, DependenciesMeta } from '@pnpm/types' +import { type Dependencies, type DependencyManifest, type DependenciesMeta } from '@pnpm/types' import pickBy from 'ramda/src/pickBy' export interface WantedDependency { diff --git a/pkg-manager/resolve-dependencies/src/getWantedDependencies.ts b/pkg-manager/resolve-dependencies/src/getWantedDependencies.ts index 41542ea798d..f229031bd07 100644 --- a/pkg-manager/resolve-dependencies/src/getWantedDependencies.ts +++ b/pkg-manager/resolve-dependencies/src/getWantedDependencies.ts @@ -1,9 +1,9 @@ import { filterDependenciesByType } from '@pnpm/manifest-utils' import { - Dependencies, - DependenciesMeta, - IncludedDependencies, - ProjectManifest, + type Dependencies, + type DependenciesMeta, + type IncludedDependencies, + type ProjectManifest, } from '@pnpm/types' import { whichVersionIsPinned } from '@pnpm/which-version-is-pinned' diff --git a/pkg-manager/resolve-dependencies/src/index.ts b/pkg-manager/resolve-dependencies/src/index.ts index 4f8386d84c7..fb5d3058768 100644 --- a/pkg-manager/resolve-dependencies/src/index.ts +++ b/pkg-manager/resolve-dependencies/src/index.ts @@ -6,38 +6,38 @@ import { } from '@pnpm/core-loggers' import { globalWarn } from '@pnpm/logger' import { - Lockfile, - ProjectSnapshot, + type Lockfile, + type ProjectSnapshot, } from '@pnpm/lockfile-types' import { getAllDependenciesFromManifest, getSpecFromPackageManifest, - PinnedVersion, + type PinnedVersion, } from '@pnpm/manifest-utils' import { safeReadPackageJsonFromDir } from '@pnpm/read-package-json' import { - DependenciesField, + type DependenciesField, DEPENDENCIES_FIELDS, - DependencyManifest, - ProjectManifest, - Registries, + type DependencyManifest, + type ProjectManifest, + type Registries, } from '@pnpm/types' import promiseShare from 'promise-share' import difference from 'ramda/src/difference' -import { getWantedDependencies, WantedDependency } from './getWantedDependencies' +import { getWantedDependencies, type WantedDependency } from './getWantedDependencies' import { depPathToRef } from './depPathToRef' -import { createNodeIdForLinkedLocalPkg, UpdateMatchingFunction } from './resolveDependencies' +import { createNodeIdForLinkedLocalPkg, type UpdateMatchingFunction } from './resolveDependencies' import { - Importer, - LinkedDependency, - ResolveDependenciesOptions, - ResolvedDirectDependency, - ResolvedPackage, + type Importer, + type LinkedDependency, + type ResolveDependenciesOptions, + type ResolvedDirectDependency, + type ResolvedPackage, resolveDependencyTree, } from './resolveDependencyTree' import { - GenericDependenciesGraph, - GenericDependenciesGraphNode, + type GenericDependenciesGraph, + type GenericDependenciesGraphNode, resolvePeers, } from './resolvePeers' import { toResolveImporter } from './toResolveImporter' @@ -50,11 +50,11 @@ export type DependenciesGraphNode = GenericDependenciesGraphNode & ResolvedPacka export { getWantedDependencies, - LinkedDependency, - ResolvedPackage, - PinnedVersion, - UpdateMatchingFunction, - WantedDependency, + type LinkedDependency, + type ResolvedPackage, + type PinnedVersion, + type UpdateMatchingFunction, + type WantedDependency, } interface ProjectToLink { diff --git a/pkg-manager/resolve-dependencies/src/mergePeers.ts b/pkg-manager/resolve-dependencies/src/mergePeers.ts index 42ee44aa9a8..bdea474709e 100644 --- a/pkg-manager/resolve-dependencies/src/mergePeers.ts +++ b/pkg-manager/resolve-dependencies/src/mergePeers.ts @@ -1,4 +1,4 @@ -import { MissingPeerIssuesByPeerName } from '@pnpm/types' +import { type MissingPeerIssuesByPeerName } from '@pnpm/types' import { intersect } from 'semver-range-intersect' export function mergePeers (missingPeers: MissingPeerIssuesByPeerName) { diff --git a/pkg-manager/resolve-dependencies/src/resolveDependencies.ts b/pkg-manager/resolve-dependencies/src/resolveDependencies.ts index 24a373c353b..c48b23962a1 100644 --- a/pkg-manager/resolve-dependencies/src/resolveDependencies.ts +++ b/pkg-manager/resolve-dependencies/src/resolveDependencies.ts @@ -6,9 +6,9 @@ import { } from '@pnpm/core-loggers' import { PnpmError } from '@pnpm/error' import { - Lockfile, - PackageSnapshot, - ResolvedDependencies, + type Lockfile, + type PackageSnapshot, + type ResolvedDependencies, } from '@pnpm/lockfile-types' import { nameVerFromPkgSnapshot, @@ -18,26 +18,26 @@ import { import { logger } from '@pnpm/logger' import { pickRegistryForPackage } from '@pnpm/pick-registry-for-package' import { - DirectoryResolution, + type DirectoryResolution, DIRECT_DEP_SELECTOR_WEIGHT, - PreferredVersions, - Resolution, - WorkspacePackages, + type PreferredVersions, + type Resolution, + type WorkspacePackages, } from '@pnpm/resolver-base' import { - PackageFilesResponse, - PackageResponse, - StoreController, + type PackageFilesResponse, + type PackageResponse, + type StoreController, } from '@pnpm/store-controller-types' import { - AllowedDeprecatedVersions, - Dependencies, - DependencyManifest, - PackageManifest, - PatchFile, - PeerDependenciesMeta, - ReadPackageHook, - Registries, + type AllowedDeprecatedVersions, + type Dependencies, + type DependencyManifest, + type PackageManifest, + type PatchFile, + type PeerDependenciesMeta, + type ReadPackageHook, + type Registries, } from '@pnpm/types' import * as dp from '@pnpm/dependency-path' import normalizePath from 'normalize-path' @@ -50,7 +50,7 @@ import omit from 'ramda/src/omit' import zipWith from 'ramda/src/zipWith' import semver from 'semver' import { encodePkgId } from './encodePkgId' -import { getNonDevWantedDependencies, WantedDependency } from './getNonDevWantedDependencies' +import { getNonDevWantedDependencies, type WantedDependency } from './getNonDevWantedDependencies' import { safeIntersect } from './mergePeers' import { createNodeId, @@ -59,7 +59,7 @@ import { splitNodeId, } from './nodeIdUtils' import { wantedDepIsLocallyAvailable } from './wantedDepIsLocallyAvailable' -import safePromiseDefer, { SafePromiseDefer } from 'safe-promise-defer' +import safePromiseDefer, { type SafePromiseDefer } from 'safe-promise-defer' const dependencyResolvedLogger = logger('_dependency_resolved') @@ -936,7 +936,7 @@ type InfoFromLockfile = { name: string version: string resolution: Resolution -} | {}) +} | unknown) function getInfoFromLockfile ( lockfile: Lockfile, diff --git a/pkg-manager/resolve-dependencies/src/resolveDependencyTree.ts b/pkg-manager/resolve-dependencies/src/resolveDependencyTree.ts index 029dd7db5f6..8698c75b294 100644 --- a/pkg-manager/resolve-dependencies/src/resolveDependencyTree.ts +++ b/pkg-manager/resolve-dependencies/src/resolveDependencyTree.ts @@ -1,34 +1,34 @@ -import { Lockfile, PatchFile } from '@pnpm/lockfile-types' -import { PreferredVersions, Resolution, WorkspacePackages } from '@pnpm/resolver-base' -import { StoreController } from '@pnpm/store-controller-types' +import { type Lockfile, type PatchFile } from '@pnpm/lockfile-types' +import { type PreferredVersions, type Resolution, type WorkspacePackages } from '@pnpm/resolver-base' +import { type StoreController } from '@pnpm/store-controller-types' import { - AllowedDeprecatedVersions, - ProjectManifest, - ReadPackageHook, - Registries, + type AllowedDeprecatedVersions, + type ProjectManifest, + type ReadPackageHook, + type Registries, } from '@pnpm/types' import partition from 'ramda/src/partition' import zipObj from 'ramda/src/zipObj' -import { WantedDependency } from './getNonDevWantedDependencies' +import { type WantedDependency } from './getNonDevWantedDependencies' import { createNodeId, nodeIdContainsSequence, } from './nodeIdUtils' import { - ChildrenByParentDepPath, - DependenciesTree, - LinkedDependency, - ImporterToResolve, - ParentPkgAliases, - PendingNode, - PkgAddress, + type ChildrenByParentDepPath, + type DependenciesTree, + type LinkedDependency, + type ImporterToResolve, + type ParentPkgAliases, + type PendingNode, + type PkgAddress, resolveRootDependencies, - ResolvedPackage, - ResolvedPackagesByDepPath, + type ResolvedPackage, + type ResolvedPackagesByDepPath, } from './resolveDependencies' export * from './nodeIdUtils' -export { LinkedDependency, ResolvedPackage, DependenciesTree, DependenciesTreeNode } from './resolveDependencies' +export type { LinkedDependency, ResolvedPackage, DependenciesTree, DependenciesTreeNode } from './resolveDependencies' export interface ResolvedDirectDependency { alias: string diff --git a/pkg-manager/resolve-dependencies/src/resolvePeers.ts b/pkg-manager/resolve-dependencies/src/resolvePeers.ts index 2f8dcc74666..2ccbde6807a 100644 --- a/pkg-manager/resolve-dependencies/src/resolvePeers.ts +++ b/pkg-manager/resolve-dependencies/src/resolvePeers.ts @@ -2,21 +2,21 @@ import filenamify from 'filenamify' import path from 'path' import { semverUtils } from '@yarnpkg/core' import { - Dependencies, - PeerDependencyIssues, - PeerDependencyIssuesByProjects, + type Dependencies, + type PeerDependencyIssues, + type PeerDependencyIssuesByProjects, } from '@pnpm/types' import { depPathToFilename, createPeersFolderSuffix, createPeersFolderSuffixNewFormat } from '@pnpm/dependency-path' -import { KeyValuePair } from 'ramda' +import { type KeyValuePair } from 'ramda' import isEmpty from 'ramda/src/isEmpty' import mapValues from 'ramda/src/map' import pick from 'ramda/src/pick' import pickBy from 'ramda/src/pickBy' import scan from 'ramda/src/scan' import { - DependenciesTree, - DependenciesTreeNode, - ResolvedPackage, + type DependenciesTree, + type DependenciesTreeNode, + type ResolvedPackage, } from './resolveDependencies' import { mergePeers } from './mergePeers' import { createNodeId, splitNodeId } from './nodeIdUtils' diff --git a/pkg-manager/resolve-dependencies/src/toResolveImporter.ts b/pkg-manager/resolve-dependencies/src/toResolveImporter.ts index 87360156cf7..713c72b0b79 100644 --- a/pkg-manager/resolve-dependencies/src/toResolveImporter.ts +++ b/pkg-manager/resolve-dependencies/src/toResolveImporter.ts @@ -1,13 +1,13 @@ import { logger } from '@pnpm/logger' import { getAllDependenciesFromManifest } from '@pnpm/manifest-utils' import { - PreferredVersions, - WorkspacePackages, + type PreferredVersions, + type WorkspacePackages, } from '@pnpm/resolver-base' -import { Dependencies, ProjectManifest } from '@pnpm/types' +import { type Dependencies, type ProjectManifest } from '@pnpm/types' import getVerSelType from 'version-selector-type' -import { ImporterToResolve } from '.' -import { getWantedDependencies, WantedDependency } from './getWantedDependencies' +import { type ImporterToResolve } from '.' +import { getWantedDependencies, type WantedDependency } from './getWantedDependencies' import { safeIsInnerLink } from './safeIsInnerLink' export async function toResolveImporter ( diff --git a/pkg-manager/resolve-dependencies/src/updateLockfile.ts b/pkg-manager/resolve-dependencies/src/updateLockfile.ts index fe83b8dc36f..cd4416e1b9f 100644 --- a/pkg-manager/resolve-dependencies/src/updateLockfile.ts +++ b/pkg-manager/resolve-dependencies/src/updateLockfile.ts @@ -1,23 +1,23 @@ import { logger } from '@pnpm/logger' import { - Lockfile, - LockfileResolution, - PackageSnapshot, + type Lockfile, + type LockfileResolution, + type PackageSnapshot, pruneSharedLockfile, - ResolvedDependencies, + type ResolvedDependencies, } from '@pnpm/prune-lockfile' -import { Resolution } from '@pnpm/resolver-base' -import { Registries } from '@pnpm/types' +import { type Resolution } from '@pnpm/resolver-base' +import { type Registries } from '@pnpm/types' import * as dp from '@pnpm/dependency-path' import getNpmTarballUrl from 'get-npm-tarball-url' -import { KeyValuePair } from 'ramda' +import { type KeyValuePair } from 'ramda' import isEmpty from 'ramda/src/isEmpty' import mergeRight from 'ramda/src/mergeRight' import partition from 'ramda/src/partition' -import { SafePromiseDefer } from 'safe-promise-defer' +import { type SafePromiseDefer } from 'safe-promise-defer' import { depPathToRef } from './depPathToRef' -import { ResolvedPackage } from './resolveDependencies' -import { DependenciesGraph } from '.' +import { type ResolvedPackage } from './resolveDependencies' +import { type DependenciesGraph } from '.' export function updateLockfile ( { dependenciesGraph, lockfile, prefix, registries, lockfileIncludeTarballUrl }: { diff --git a/pkg-manager/resolve-dependencies/src/updateProjectManifest.ts b/pkg-manager/resolve-dependencies/src/updateProjectManifest.ts index 6cbfb5dfff9..0298ef86822 100644 --- a/pkg-manager/resolve-dependencies/src/updateProjectManifest.ts +++ b/pkg-manager/resolve-dependencies/src/updateProjectManifest.ts @@ -1,14 +1,14 @@ import { createVersionSpec, getPrefix, - PackageSpecObject, - PinnedVersion, + type PackageSpecObject, + type PinnedVersion, updateProjectManifestObject, } from '@pnpm/manifest-utils' import versionSelectorType from 'version-selector-type' import semver from 'semver' -import { ResolvedDirectDependency } from './resolveDependencyTree' -import { ImporterToResolve } from '.' +import { type ResolvedDirectDependency } from './resolveDependencyTree' +import { type ImporterToResolve } from '.' export async function updateProjectManifest ( importer: ImporterToResolve, @@ -67,7 +67,7 @@ function resolvedDirectDepToSpecObject ( specRaw, version, preserveNonSemverVersionSpec, - }: ResolvedDirectDependency & { isNew?: Boolean, specRaw: string, preserveNonSemverVersionSpec?: boolean }, + }: ResolvedDirectDependency & { isNew?: boolean, specRaw: string, preserveNonSemverVersionSpec?: boolean }, importer: ImporterToResolve, opts: { nodeExecPath?: string diff --git a/pkg-manager/resolve-dependencies/src/wantedDepIsLocallyAvailable.ts b/pkg-manager/resolve-dependencies/src/wantedDepIsLocallyAvailable.ts index 848f428fd50..94b734023ec 100644 --- a/pkg-manager/resolve-dependencies/src/wantedDepIsLocallyAvailable.ts +++ b/pkg-manager/resolve-dependencies/src/wantedDepIsLocallyAvailable.ts @@ -1,8 +1,8 @@ -import { parsePref, RegistryPackageSpec } from '@pnpm/npm-resolver' -import { WorkspacePackages } from '@pnpm/resolver-base' -import { PackageManifest } from '@pnpm/types' +import { parsePref, type RegistryPackageSpec } from '@pnpm/npm-resolver' +import { type WorkspacePackages } from '@pnpm/resolver-base' +import { type PackageManifest } from '@pnpm/types' import semver from 'semver' -import { WantedDependency } from './getNonDevWantedDependencies' +import { type WantedDependency } from './getNonDevWantedDependencies' export function wantedDepIsLocallyAvailable ( workspacePackages: WorkspacePackages, diff --git a/pkg-manifest/exportable-manifest/src/index.ts b/pkg-manifest/exportable-manifest/src/index.ts index 56b4b99ac38..0a4e6d43a09 100644 --- a/pkg-manifest/exportable-manifest/src/index.ts +++ b/pkg-manifest/exportable-manifest/src/index.ts @@ -1,7 +1,7 @@ import path from 'path' import { PnpmError } from '@pnpm/error' import { tryReadProjectManifest } from '@pnpm/read-project-manifest' -import { Dependencies, ProjectManifest } from '@pnpm/types' +import { type Dependencies, type ProjectManifest } from '@pnpm/types' import omit from 'ramda/src/omit' import pMapValues from 'p-map-values' import { overridePublishConfig } from './overridePublishConfig' diff --git a/pkg-manifest/exportable-manifest/src/overridePublishConfig.ts b/pkg-manifest/exportable-manifest/src/overridePublishConfig.ts index 87524c74e47..b88a58efa1e 100644 --- a/pkg-manifest/exportable-manifest/src/overridePublishConfig.ts +++ b/pkg-manifest/exportable-manifest/src/overridePublishConfig.ts @@ -1,4 +1,4 @@ -import { ProjectManifest } from '@pnpm/types' +import { type ProjectManifest } from '@pnpm/types' import isEmpty from 'ramda/src/isEmpty' // property keys that are copied from publishConfig into the manifest diff --git a/pkg-manifest/exportable-manifest/test/index.test.ts b/pkg-manifest/exportable-manifest/test/index.test.ts index f4fa14f0023..24f192ca1c8 100644 --- a/pkg-manifest/exportable-manifest/test/index.test.ts +++ b/pkg-manifest/exportable-manifest/test/index.test.ts @@ -2,7 +2,7 @@ import { createExportableManifest } from '@pnpm/exportable-manifest' import { preparePackages } from '@pnpm/prepare' import writeYamlFile from 'write-yaml-file' -import { ProjectManifest } from '@pnpm/types' +import { type ProjectManifest } from '@pnpm/types' import crossSpawn from 'cross-spawn' import path from 'path' diff --git a/pkg-manifest/exportable-manifest/test/overridePublishConfig.test.ts b/pkg-manifest/exportable-manifest/test/overridePublishConfig.test.ts index 9934ac57032..7b270e5e39c 100644 --- a/pkg-manifest/exportable-manifest/test/overridePublishConfig.test.ts +++ b/pkg-manifest/exportable-manifest/test/overridePublishConfig.test.ts @@ -1,4 +1,4 @@ -import { PackageManifest, PublishConfig } from '@pnpm/types' +import { type PackageManifest, type PublishConfig } from '@pnpm/types' import { overridePublishConfig } from '../lib/overridePublishConfig' test('publish config to be overridden', async () => { diff --git a/pkg-manifest/manifest-utils/src/filterDependenciesByType.ts b/pkg-manifest/manifest-utils/src/filterDependenciesByType.ts index e44f0b5d331..adc8abe3c8b 100644 --- a/pkg-manifest/manifest-utils/src/filterDependenciesByType.ts +++ b/pkg-manifest/manifest-utils/src/filterDependenciesByType.ts @@ -1,4 +1,4 @@ -import { IncludedDependencies, ProjectManifest } from '@pnpm/types' +import { type IncludedDependencies, type ProjectManifest } from '@pnpm/types' export function filterDependenciesByType ( manifest: ProjectManifest, diff --git a/pkg-manifest/manifest-utils/src/getAllDependenciesFromManifest.ts b/pkg-manifest/manifest-utils/src/getAllDependenciesFromManifest.ts index de0d90c9db4..a550822e66f 100644 --- a/pkg-manifest/manifest-utils/src/getAllDependenciesFromManifest.ts +++ b/pkg-manifest/manifest-utils/src/getAllDependenciesFromManifest.ts @@ -1,4 +1,4 @@ -import { Dependencies, DependenciesField, ProjectManifest } from '@pnpm/types' +import { type Dependencies, type DependenciesField, type ProjectManifest } from '@pnpm/types' export function getAllDependenciesFromManifest ( pkg: Pick diff --git a/pkg-manifest/manifest-utils/src/getDependencyTypeFromManifest.ts b/pkg-manifest/manifest-utils/src/getDependencyTypeFromManifest.ts index 70df0c20485..a6b9752bffd 100644 --- a/pkg-manifest/manifest-utils/src/getDependencyTypeFromManifest.ts +++ b/pkg-manifest/manifest-utils/src/getDependencyTypeFromManifest.ts @@ -1,4 +1,4 @@ -import { ProjectManifest, DependenciesOrPeersField } from '@pnpm/types' +import { type ProjectManifest, type DependenciesOrPeersField } from '@pnpm/types' export function getDependencyTypeFromManifest ( manifest: Pick, diff --git a/pkg-manifest/manifest-utils/src/getSpecFromPackageManifest.ts b/pkg-manifest/manifest-utils/src/getSpecFromPackageManifest.ts index e8cde4fd80b..6b553bf64b2 100644 --- a/pkg-manifest/manifest-utils/src/getSpecFromPackageManifest.ts +++ b/pkg-manifest/manifest-utils/src/getSpecFromPackageManifest.ts @@ -1,4 +1,4 @@ -import { ProjectManifest, DependenciesOrPeersField } from '@pnpm/types' +import { type ProjectManifest, type DependenciesOrPeersField } from '@pnpm/types' export function getSpecFromPackageManifest ( manifest: Pick, diff --git a/pkg-manifest/manifest-utils/src/index.ts b/pkg-manifest/manifest-utils/src/index.ts index 7882e90919c..bbccf749799 100644 --- a/pkg-manifest/manifest-utils/src/index.ts +++ b/pkg-manifest/manifest-utils/src/index.ts @@ -1,7 +1,7 @@ import { - Dependencies, - IncludedDependencies, - ProjectManifest, + type Dependencies, + type IncludedDependencies, + type ProjectManifest, } from '@pnpm/types' import { getSpecFromPackageManifest } from './getSpecFromPackageManifest' diff --git a/pkg-manifest/manifest-utils/src/updateProjectManifestObject.ts b/pkg-manifest/manifest-utils/src/updateProjectManifestObject.ts index dafe26dc265..9498e938559 100644 --- a/pkg-manifest/manifest-utils/src/updateProjectManifestObject.ts +++ b/pkg-manifest/manifest-utils/src/updateProjectManifestObject.ts @@ -1,8 +1,8 @@ import { packageManifestLogger } from '@pnpm/core-loggers' import { - DependenciesField, + type DependenciesField, DEPENDENCIES_FIELDS, - ProjectManifest, + type ProjectManifest, } from '@pnpm/types' export interface PackageSpecObject { diff --git a/pkg-manifest/read-package-json/src/index.ts b/pkg-manifest/read-package-json/src/index.ts index 520e8fa217d..71b5fe4c945 100644 --- a/pkg-manifest/read-package-json/src/index.ts +++ b/pkg-manifest/read-package-json/src/index.ts @@ -1,6 +1,6 @@ import path from 'path' import { PnpmError } from '@pnpm/error' -import { PackageManifest } from '@pnpm/types' +import { type PackageManifest } from '@pnpm/types' import loadJsonFile from 'load-json-file' import normalizePackageData from 'normalize-package-data' diff --git a/pkg-manifest/read-project-manifest/src/index.ts b/pkg-manifest/read-project-manifest/src/index.ts index bbfab19ff88..9c4f924c032 100644 --- a/pkg-manifest/read-project-manifest/src/index.ts +++ b/pkg-manifest/read-project-manifest/src/index.ts @@ -1,8 +1,8 @@ -import { promises as fs, Stats } from 'fs' +import { promises as fs, type Stats } from 'fs' import path from 'path' import { PnpmError } from '@pnpm/error' -import { ProjectManifest } from '@pnpm/types' -import { extractComments, CommentSpecifier } from '@pnpm/text.comments-parser' +import { type ProjectManifest } from '@pnpm/types' +import { extractComments, type CommentSpecifier } from '@pnpm/text.comments-parser' import { writeProjectManifest } from '@pnpm/write-project-manifest' import readYamlFile from 'read-yaml-file' import detectIndent from '@gwhitney/detect-indent' diff --git a/pkg-manifest/read-project-manifest/src/readFile.ts b/pkg-manifest/read-project-manifest/src/readFile.ts index 6f40c6bf749..6a92cd5ddd9 100644 --- a/pkg-manifest/read-project-manifest/src/readFile.ts +++ b/pkg-manifest/read-project-manifest/src/readFile.ts @@ -1,5 +1,5 @@ import gfs from '@pnpm/graceful-fs' -import { ProjectManifest } from '@pnpm/types' +import { type ProjectManifest } from '@pnpm/types' import JSON5 from 'json5' import parseJson from 'parse-json' import stripBom from 'strip-bom' diff --git a/pkg-manifest/write-project-manifest/src/index.ts b/pkg-manifest/write-project-manifest/src/index.ts index ba4f1684e50..ffedeca4434 100644 --- a/pkg-manifest/write-project-manifest/src/index.ts +++ b/pkg-manifest/write-project-manifest/src/index.ts @@ -1,7 +1,7 @@ import { promises as fs } from 'fs' import path from 'path' -import { insertComments, CommentSpecifier } from '@pnpm/text.comments-parser' -import { ProjectManifest } from '@pnpm/types' +import { insertComments, type CommentSpecifier } from '@pnpm/text.comments-parser' +import { type ProjectManifest } from '@pnpm/types' import JSON5 from 'json5' import writeFileAtomic from 'write-file-atomic' import writeYamlFile from 'write-yaml-file' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8ed9881b7b1..118480ee009 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -81,8 +81,8 @@ importers: specifier: ^7.0.3 version: 7.0.3 eslint: - specifier: ^8.35.0 - version: 8.35.0 + specifier: ^8.36.0 + version: 8.36.0 husky: specifier: ^8.0.3 version: 8.0.3 @@ -242,28 +242,28 @@ importers: dependencies: '@typescript-eslint/eslint-plugin': specifier: ^5.54.0 - version: 5.54.0(@typescript-eslint/parser@5.54.0)(eslint@8.35.0)(typescript@5.0.2) + version: 5.54.0(@typescript-eslint/parser@5.54.0)(eslint@8.36.0)(typescript@5.0.2) '@typescript-eslint/parser': specifier: ^5.54.0 - version: 5.54.0(eslint@8.35.0)(typescript@5.0.2) + version: 5.54.0(eslint@8.36.0)(typescript@5.0.2) eslint: - specifier: ^8.35.0 - version: 8.35.0 + specifier: ^8.36.0 + version: 8.36.0 eslint-config-standard-with-typescript: - specifier: ^26.0.0 - version: 26.0.0(@typescript-eslint/eslint-plugin@5.54.0)(eslint-plugin-import@2.27.5)(eslint-plugin-n@15.6.1)(eslint-plugin-promise@6.1.1)(eslint@8.35.0)(typescript@5.0.2) + specifier: ^34.0.1 + version: 34.0.1(@typescript-eslint/eslint-plugin@5.54.0)(eslint-plugin-import@2.27.5)(eslint-plugin-n@15.6.1)(eslint-plugin-promise@6.1.1)(eslint@8.36.0)(typescript@5.0.2) eslint-plugin-import: specifier: ^2.27.5 - version: 2.27.5(@typescript-eslint/parser@5.54.0)(eslint@8.35.0) + version: 2.27.5(@typescript-eslint/parser@5.54.0)(eslint@8.36.0) eslint-plugin-n: specifier: ^15.6.1 - version: 15.6.1(eslint@8.35.0) + version: 15.6.1(eslint@8.36.0) eslint-plugin-node: specifier: ^11.1.0 - version: 11.1.0(eslint@8.35.0) + version: 11.1.0(eslint@8.36.0) eslint-plugin-promise: specifier: ^6.1.1 - version: 6.1.1(eslint@8.35.0) + version: 6.1.1(eslint@8.36.0) typescript: specifier: 5.0.2 version: 5.0.2 @@ -4232,8 +4232,8 @@ importers: specifier: ^2.0.0 version: 2.0.0 esbuild: - specifier: ^0.16.17 - version: 0.16.17 + specifier: ^0.17.12 + version: 0.17.12 execa: specifier: npm:safe-execa@0.1.2 version: /safe-execa@0.1.2 @@ -6854,8 +6854,8 @@ packages: '@jridgewell/trace-mapping': 0.3.9 dev: true - /@esbuild/android-arm64@0.16.17: - resolution: {integrity: sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==} + /@esbuild/android-arm64@0.17.12: + resolution: {integrity: sha512-WQ9p5oiXXYJ33F2EkE3r0FRDFVpEdcDiwNX3u7Xaibxfx6vQE0Sb8ytrfQsA5WO6kDn6mDfKLh6KrPBjvkk7xA==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -6863,8 +6863,8 @@ packages: dev: true optional: true - /@esbuild/android-arm@0.16.17: - resolution: {integrity: sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==} + /@esbuild/android-arm@0.17.12: + resolution: {integrity: sha512-E/sgkvwoIfj4aMAPL2e35VnUJspzVYl7+M1B2cqeubdBhADV4uPon0KCc8p2G+LqSJ6i8ocYPCqY3A4GGq0zkQ==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -6872,8 +6872,8 @@ packages: dev: true optional: true - /@esbuild/android-x64@0.16.17: - resolution: {integrity: sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==} + /@esbuild/android-x64@0.17.12: + resolution: {integrity: sha512-m4OsaCr5gT+se25rFPHKQXARMyAehHTQAz4XX1Vk3d27VtqiX0ALMBPoXZsGaB6JYryCLfgGwUslMqTfqeLU0w==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -6881,8 +6881,8 @@ packages: dev: true optional: true - /@esbuild/darwin-arm64@0.16.17: - resolution: {integrity: sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==} + /@esbuild/darwin-arm64@0.17.12: + resolution: {integrity: sha512-O3GCZghRIx+RAN0NDPhyyhRgwa19MoKlzGonIb5hgTj78krqp9XZbYCvFr9N1eUxg0ZQEpiiZ4QvsOQwBpP+lg==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -6890,8 +6890,8 @@ packages: dev: true optional: true - /@esbuild/darwin-x64@0.16.17: - resolution: {integrity: sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==} + /@esbuild/darwin-x64@0.17.12: + resolution: {integrity: sha512-5D48jM3tW27h1qjaD9UNRuN+4v0zvksqZSPZqeSWggfMlsVdAhH3pwSfQIFJwcs9QJ9BRibPS4ViZgs3d2wsCA==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -6899,8 +6899,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-arm64@0.16.17: - resolution: {integrity: sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==} + /@esbuild/freebsd-arm64@0.17.12: + resolution: {integrity: sha512-OWvHzmLNTdF1erSvrfoEBGlN94IE6vCEaGEkEH29uo/VoONqPnoDFfShi41Ew+yKimx4vrmmAJEGNoyyP+OgOQ==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -6908,8 +6908,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-x64@0.16.17: - resolution: {integrity: sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==} + /@esbuild/freebsd-x64@0.17.12: + resolution: {integrity: sha512-A0Xg5CZv8MU9xh4a+7NUpi5VHBKh1RaGJKqjxe4KG87X+mTjDE6ZvlJqpWoeJxgfXHT7IMP9tDFu7IZ03OtJAw==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -6917,8 +6917,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm64@0.16.17: - resolution: {integrity: sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==} + /@esbuild/linux-arm64@0.17.12: + resolution: {integrity: sha512-cK3AjkEc+8v8YG02hYLQIQlOznW+v9N+OI9BAFuyqkfQFR+DnDLhEM5N8QRxAUz99cJTo1rLNXqRrvY15gbQUg==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -6926,8 +6926,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm@0.16.17: - resolution: {integrity: sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==} + /@esbuild/linux-arm@0.17.12: + resolution: {integrity: sha512-WsHyJ7b7vzHdJ1fv67Yf++2dz3D726oO3QCu8iNYik4fb5YuuReOI9OtA+n7Mk0xyQivNTPbl181s+5oZ38gyA==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -6935,8 +6935,8 @@ packages: dev: true optional: true - /@esbuild/linux-ia32@0.16.17: - resolution: {integrity: sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==} + /@esbuild/linux-ia32@0.17.12: + resolution: {integrity: sha512-jdOBXJqcgHlah/nYHnj3Hrnl9l63RjtQ4vn9+bohjQPI2QafASB5MtHAoEv0JQHVb/xYQTFOeuHnNYE1zF7tYw==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -6944,8 +6944,8 @@ packages: dev: true optional: true - /@esbuild/linux-loong64@0.16.17: - resolution: {integrity: sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==} + /@esbuild/linux-loong64@0.17.12: + resolution: {integrity: sha512-GTOEtj8h9qPKXCyiBBnHconSCV9LwFyx/gv3Phw0pa25qPYjVuuGZ4Dk14bGCfGX3qKF0+ceeQvwmtI+aYBbVA==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -6953,8 +6953,8 @@ packages: dev: true optional: true - /@esbuild/linux-mips64el@0.16.17: - resolution: {integrity: sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==} + /@esbuild/linux-mips64el@0.17.12: + resolution: {integrity: sha512-o8CIhfBwKcxmEENOH9RwmUejs5jFiNoDw7YgS0EJTF6kgPgcqLFjgoc5kDey5cMHRVCIWc6kK2ShUePOcc7RbA==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -6962,8 +6962,8 @@ packages: dev: true optional: true - /@esbuild/linux-ppc64@0.16.17: - resolution: {integrity: sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==} + /@esbuild/linux-ppc64@0.17.12: + resolution: {integrity: sha512-biMLH6NR/GR4z+ap0oJYb877LdBpGac8KfZoEnDiBKd7MD/xt8eaw1SFfYRUeMVx519kVkAOL2GExdFmYnZx3A==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -6971,8 +6971,8 @@ packages: dev: true optional: true - /@esbuild/linux-riscv64@0.16.17: - resolution: {integrity: sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==} + /@esbuild/linux-riscv64@0.17.12: + resolution: {integrity: sha512-jkphYUiO38wZGeWlfIBMB72auOllNA2sLfiZPGDtOBb1ELN8lmqBrlMiucgL8awBw1zBXN69PmZM6g4yTX84TA==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -6980,8 +6980,8 @@ packages: dev: true optional: true - /@esbuild/linux-s390x@0.16.17: - resolution: {integrity: sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==} + /@esbuild/linux-s390x@0.17.12: + resolution: {integrity: sha512-j3ucLdeY9HBcvODhCY4b+Ds3hWGO8t+SAidtmWu/ukfLLG/oYDMaA+dnugTVAg5fnUOGNbIYL9TOjhWgQB8W5g==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -6989,8 +6989,8 @@ packages: dev: true optional: true - /@esbuild/linux-x64@0.16.17: - resolution: {integrity: sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==} + /@esbuild/linux-x64@0.17.12: + resolution: {integrity: sha512-uo5JL3cgaEGotaqSaJdRfFNSCUJOIliKLnDGWaVCgIKkHxwhYMm95pfMbWZ9l7GeW9kDg0tSxcy9NYdEtjwwmA==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -6998,8 +6998,8 @@ packages: dev: true optional: true - /@esbuild/netbsd-x64@0.16.17: - resolution: {integrity: sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==} + /@esbuild/netbsd-x64@0.17.12: + resolution: {integrity: sha512-DNdoRg8JX+gGsbqt2gPgkgb00mqOgOO27KnrWZtdABl6yWTST30aibGJ6geBq3WM2TIeW6COs5AScnC7GwtGPg==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -7007,8 +7007,8 @@ packages: dev: true optional: true - /@esbuild/openbsd-x64@0.16.17: - resolution: {integrity: sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==} + /@esbuild/openbsd-x64@0.17.12: + resolution: {integrity: sha512-aVsENlr7B64w8I1lhHShND5o8cW6sB9n9MUtLumFlPhG3elhNWtE7M1TFpj3m7lT3sKQUMkGFjTQBrvDDO1YWA==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -7016,8 +7016,8 @@ packages: dev: true optional: true - /@esbuild/sunos-x64@0.16.17: - resolution: {integrity: sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==} + /@esbuild/sunos-x64@0.17.12: + resolution: {integrity: sha512-qbHGVQdKSwi0JQJuZznS4SyY27tYXYF0mrgthbxXrZI3AHKuRvU+Eqbg/F0rmLDpW/jkIZBlCO1XfHUBMNJ1pg==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -7025,8 +7025,8 @@ packages: dev: true optional: true - /@esbuild/win32-arm64@0.16.17: - resolution: {integrity: sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==} + /@esbuild/win32-arm64@0.17.12: + resolution: {integrity: sha512-zsCp8Ql+96xXTVTmm6ffvoTSZSV2B/LzzkUXAY33F/76EajNw1m+jZ9zPfNJlJ3Rh4EzOszNDHsmG/fZOhtqDg==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -7034,8 +7034,8 @@ packages: dev: true optional: true - /@esbuild/win32-ia32@0.16.17: - resolution: {integrity: sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==} + /@esbuild/win32-ia32@0.17.12: + resolution: {integrity: sha512-FfrFjR4id7wcFYOdqbDfDET3tjxCozUgbqdkOABsSFzoZGFC92UK7mg4JKRc/B3NNEf1s2WHxJ7VfTdVDPN3ng==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -7043,8 +7043,8 @@ packages: dev: true optional: true - /@esbuild/win32-x64@0.16.17: - resolution: {integrity: sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==} + /@esbuild/win32-x64@0.17.12: + resolution: {integrity: sha512-JOOxw49BVZx2/5tW3FqkdjSD/5gXYeVGPDcB0lvap0gLQshkh1Nyel1QazC+wNxus3xPlsYAgqU1BUmrmCvWtw==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -7052,13 +7052,26 @@ packages: dev: true optional: true - /@eslint/eslintrc@2.0.0: - resolution: {integrity: sha512-fluIaaV+GyV24CCu/ggiHdV+j4RNh85yQnAYS/G2mZODZgGmmlrgCydjUcV3YvxCm9x8nMAfThsqTni4KiXT4A==} + /@eslint-community/eslint-utils@4.3.0(eslint@8.36.0): + resolution: {integrity: sha512-v3oplH6FYCULtFuCeqyuTd9D2WKO937Dxdq+GmHOLL72TTRriLxz2VLlNfkZRsvj6PKnOPAtuT6dwrs/pA5DvA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '*' + dependencies: + eslint: 8.36.0 + eslint-visitor-keys: 3.3.0 + + /@eslint-community/regexpp@4.4.0: + resolution: {integrity: sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + /@eslint/eslintrc@2.0.1: + resolution: {integrity: sha512-eFRmABvW2E5Ho6f5fHLqgena46rOj7r7OKHYfLElqcBfGFHHpjBhivyi5+jOEQuSpdc/1phIZJlbC2te+tZNIw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 debug: 4.3.4 - espree: 9.4.1 + espree: 9.5.0 globals: 13.20.0 ignore: 5.2.4 import-fresh: 3.3.0 @@ -7068,8 +7081,8 @@ packages: transitivePeerDependencies: - supports-color - /@eslint/js@8.35.0: - resolution: {integrity: sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw==} + /@eslint/js@8.36.0: + resolution: {integrity: sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} /@gar/promisify@1.1.3: @@ -8794,7 +8807,7 @@ packages: /@types/byline@4.2.33: resolution: {integrity: sha512-LJYez7wrWcJQQDknqZtrZuExMGP0IXmPl1rOOGDqLbu+H7UNNRfKNuSxCBcQMLH1EfjeWidLedC/hCc5dDfBog==} dependencies: - '@types/node': 14.18.37 + '@types/node': 18.15.3 dev: true /@types/cacheable-request@6.0.3: @@ -8802,7 +8815,7 @@ packages: dependencies: '@types/http-cache-semantics': 4.0.1 '@types/keyv': 3.1.4 - '@types/node': 18.15.3 + '@types/node': 14.18.37 '@types/responselike': 1.0.0 /@types/concat-stream@2.0.0: @@ -8904,7 +8917,7 @@ packages: /@types/keyv@3.1.4: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: - '@types/node': 18.15.3 + '@types/node': 14.18.37 /@types/lodash@4.14.181: resolution: {integrity: sha512-n3tyKthHJbkiWhDZs3DkhkCzt2MexYHXlX0td5iMplyfwketaOeKboEVBqzceH7juqvEg3q5oUoBFxSLu7zFag==} @@ -8944,10 +8957,10 @@ packages: /@types/node@14.18.37: resolution: {integrity: sha512-7GgtHCs/QZrBrDzgIJnQtuSvhFSwhyYSI2uafSwZoNt1iOGhEN5fwNrQMjtONyHm9+/LoA4453jH0CMYcr06Pg==} - dev: true /@types/node@18.14.3: resolution: {integrity: sha512-1y36CC5iL5CMyKALzwX9cwwxcWIxvIBe3gzs4GrXWXEQ8klQnCZ2U/WDGiNrXHmQcUhnaun17XG9TEIDlGj2RA==} + dev: true /@types/node@18.15.3: resolution: {integrity: sha512-p6ua9zBxz5otCmbpb5D3U4B5Nanw6Pk3PPyX05xnxbB/fRv71N7CPmORg7uAD5P70T0xmx1pzAx/FUfa5X+3cw==} @@ -8984,7 +8997,7 @@ packages: /@types/responselike@1.0.0: resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} dependencies: - '@types/node': 18.15.3 + '@types/node': 14.18.37 /@types/retry@0.12.2: resolution: {integrity: sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==} @@ -9020,7 +9033,7 @@ packages: /@types/ssri@7.1.1: resolution: {integrity: sha512-DPP/jkDaqGiyU75MyMURxLWyYLwKSjnAuGe9ZCsLp9QZOpXmDfuevk769F0BS86TmRuD5krnp06qw9nSoNO+0g==} dependencies: - '@types/node': 18.14.3 + '@types/node': 14.18.37 /@types/stack-utils@2.0.1: resolution: {integrity: sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==} @@ -9092,7 +9105,7 @@ packages: resolution: {integrity: sha512-8NYnGOctzsI4W0ApsP/BIHD/LnxpJ6XaGf2AZmz4EyDYJMxtprN4279dLNI1CPZcwC9H18qYcaFv4bXi0wmokg==} dev: true - /@typescript-eslint/eslint-plugin@5.54.0(@typescript-eslint/parser@5.54.0)(eslint@8.35.0)(typescript@5.0.2): + /@typescript-eslint/eslint-plugin@5.54.0(@typescript-eslint/parser@5.54.0)(eslint@8.36.0)(typescript@5.0.2): resolution: {integrity: sha512-+hSN9BdSr629RF02d7mMtXhAJvDTyCbprNYJKrXETlul/Aml6YZwd90XioVbjejQeHbb3R8Dg0CkRgoJDxo8aw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -9103,12 +9116,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.54.0(eslint@8.35.0)(typescript@5.0.2) + '@typescript-eslint/parser': 5.54.0(eslint@8.36.0)(typescript@5.0.2) '@typescript-eslint/scope-manager': 5.54.0 - '@typescript-eslint/type-utils': 5.54.0(eslint@8.35.0)(typescript@5.0.2) - '@typescript-eslint/utils': 5.54.0(eslint@8.35.0)(typescript@5.0.2) + '@typescript-eslint/type-utils': 5.54.0(eslint@8.36.0)(typescript@5.0.2) + '@typescript-eslint/utils': 5.54.0(eslint@8.36.0)(typescript@5.0.2) debug: 4.3.4 - eslint: 8.35.0 + eslint: 8.36.0 grapheme-splitter: 1.0.4 ignore: 5.2.4 natural-compare-lite: 1.4.0 @@ -9120,7 +9133,7 @@ packages: - supports-color dev: false - /@typescript-eslint/parser@5.54.0(eslint@8.35.0)(typescript@5.0.2): + /@typescript-eslint/parser@5.54.0(eslint@8.36.0)(typescript@5.0.2): resolution: {integrity: sha512-aAVL3Mu2qTi+h/r04WI/5PfNWvO6pdhpeMRWk9R7rEV4mwJNzoWf5CCU5vDKBsPIFQFjEq1xg7XBI2rjiMXQbQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -9134,7 +9147,7 @@ packages: '@typescript-eslint/types': 5.54.0 '@typescript-eslint/typescript-estree': 5.54.0(typescript@5.0.2) debug: 4.3.4 - eslint: 8.35.0 + eslint: 8.36.0 typescript: 5.0.2 transitivePeerDependencies: - supports-color @@ -9148,7 +9161,7 @@ packages: '@typescript-eslint/visitor-keys': 5.54.0 dev: false - /@typescript-eslint/type-utils@5.54.0(eslint@8.35.0)(typescript@5.0.2): + /@typescript-eslint/type-utils@5.54.0(eslint@8.36.0)(typescript@5.0.2): resolution: {integrity: sha512-WI+WMJ8+oS+LyflqsD4nlXMsVdzTMYTxl16myXPaCXnSgc7LWwMsjxQFZCK/rVmTZ3FN71Ct78ehO9bRC7erYQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -9159,9 +9172,9 @@ packages: optional: true dependencies: '@typescript-eslint/typescript-estree': 5.54.0(typescript@5.0.2) - '@typescript-eslint/utils': 5.54.0(eslint@8.35.0)(typescript@5.0.2) + '@typescript-eslint/utils': 5.54.0(eslint@8.36.0)(typescript@5.0.2) debug: 4.3.4 - eslint: 8.35.0 + eslint: 8.36.0 tsutils: 3.21.0(typescript@5.0.2) typescript: 5.0.2 transitivePeerDependencies: @@ -9194,7 +9207,7 @@ packages: - supports-color dev: false - /@typescript-eslint/utils@5.54.0(eslint@8.35.0)(typescript@5.0.2): + /@typescript-eslint/utils@5.54.0(eslint@8.36.0)(typescript@5.0.2): resolution: {integrity: sha512-cuwm8D/Z/7AuyAeJ+T0r4WZmlnlxQ8wt7C7fLpFlKMR+dY6QO79Cq1WpJhvZbMA4ZeZGHiRWnht7ZJ8qkdAunw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -9205,9 +9218,9 @@ packages: '@typescript-eslint/scope-manager': 5.54.0 '@typescript-eslint/types': 5.54.0 '@typescript-eslint/typescript-estree': 5.54.0(typescript@5.0.2) - eslint: 8.35.0 + eslint: 8.36.0 eslint-scope: 5.1.1 - eslint-utils: 3.0.0(eslint@8.35.0) + eslint-utils: 3.0.0(eslint@8.36.0) semver: 7.3.8 transitivePeerDependencies: - supports-color @@ -11216,34 +11229,34 @@ packages: is-date-object: 1.0.5 is-symbol: 1.0.4 - /esbuild@0.16.17: - resolution: {integrity: sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==} + /esbuild@0.17.12: + resolution: {integrity: sha512-bX/zHl7Gn2CpQwcMtRogTTBf9l1nl+H6R8nUbjk+RuKqAE3+8FDulLA+pHvX7aA7Xe07Iwa+CWvy9I8Y2qqPKQ==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/android-arm': 0.16.17 - '@esbuild/android-arm64': 0.16.17 - '@esbuild/android-x64': 0.16.17 - '@esbuild/darwin-arm64': 0.16.17 - '@esbuild/darwin-x64': 0.16.17 - '@esbuild/freebsd-arm64': 0.16.17 - '@esbuild/freebsd-x64': 0.16.17 - '@esbuild/linux-arm': 0.16.17 - '@esbuild/linux-arm64': 0.16.17 - '@esbuild/linux-ia32': 0.16.17 - '@esbuild/linux-loong64': 0.16.17 - '@esbuild/linux-mips64el': 0.16.17 - '@esbuild/linux-ppc64': 0.16.17 - '@esbuild/linux-riscv64': 0.16.17 - '@esbuild/linux-s390x': 0.16.17 - '@esbuild/linux-x64': 0.16.17 - '@esbuild/netbsd-x64': 0.16.17 - '@esbuild/openbsd-x64': 0.16.17 - '@esbuild/sunos-x64': 0.16.17 - '@esbuild/win32-arm64': 0.16.17 - '@esbuild/win32-ia32': 0.16.17 - '@esbuild/win32-x64': 0.16.17 + '@esbuild/android-arm': 0.17.12 + '@esbuild/android-arm64': 0.17.12 + '@esbuild/android-x64': 0.17.12 + '@esbuild/darwin-arm64': 0.17.12 + '@esbuild/darwin-x64': 0.17.12 + '@esbuild/freebsd-arm64': 0.17.12 + '@esbuild/freebsd-x64': 0.17.12 + '@esbuild/linux-arm': 0.17.12 + '@esbuild/linux-arm64': 0.17.12 + '@esbuild/linux-ia32': 0.17.12 + '@esbuild/linux-loong64': 0.17.12 + '@esbuild/linux-mips64el': 0.17.12 + '@esbuild/linux-ppc64': 0.17.12 + '@esbuild/linux-riscv64': 0.17.12 + '@esbuild/linux-s390x': 0.17.12 + '@esbuild/linux-x64': 0.17.12 + '@esbuild/netbsd-x64': 0.17.12 + '@esbuild/openbsd-x64': 0.17.12 + '@esbuild/sunos-x64': 0.17.12 + '@esbuild/win32-arm64': 0.17.12 + '@esbuild/win32-ia32': 0.17.12 + '@esbuild/win32-x64': 0.17.12 dev: true /escalade@3.1.1: @@ -11280,29 +11293,29 @@ packages: source-map: 0.6.1 dev: true - /eslint-config-standard-with-typescript@26.0.0(@typescript-eslint/eslint-plugin@5.54.0)(eslint-plugin-import@2.27.5)(eslint-plugin-n@15.6.1)(eslint-plugin-promise@6.1.1)(eslint@8.35.0)(typescript@5.0.2): - resolution: {integrity: sha512-TluIWunQo76qp4MHyYIaTT+sN2q2v/jTeE3Dj4rXsSbx27GOUEOujhJaAL3v9dHVQelAK13gZ5Jy9IWnWCyFrg==} + /eslint-config-standard-with-typescript@34.0.1(@typescript-eslint/eslint-plugin@5.54.0)(eslint-plugin-import@2.27.5)(eslint-plugin-n@15.6.1)(eslint-plugin-promise@6.1.1)(eslint@8.36.0)(typescript@5.0.2): + resolution: {integrity: sha512-J7WvZeLtd0Vr9F+v4dZbqJCLD16cbIy4U+alJMq4MiXdpipdBM3U5NkXaGUjePc4sb1ZE01U9g6VuTBpHHz1fg==} peerDependencies: - '@typescript-eslint/eslint-plugin': ^5.0.0 || ^5.6.0 + '@typescript-eslint/eslint-plugin': ^5.43.0 || ^5.6.0 eslint: '*' eslint-plugin-import: ^2.25.2 eslint-plugin-n: ^15.0.0 eslint-plugin-promise: ^6.0.0 typescript: '*' dependencies: - '@typescript-eslint/eslint-plugin': 5.54.0(@typescript-eslint/parser@5.54.0)(eslint@8.35.0)(typescript@5.0.2) - '@typescript-eslint/parser': 5.54.0(eslint@8.35.0)(typescript@5.0.2) - eslint: 8.35.0 - eslint-config-standard: 17.0.0(eslint-plugin-import@2.27.5)(eslint-plugin-n@15.6.1)(eslint-plugin-promise@6.1.1)(eslint@8.35.0) - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.54.0)(eslint@8.35.0) - eslint-plugin-n: 15.6.1(eslint@8.35.0) - eslint-plugin-promise: 6.1.1(eslint@8.35.0) + '@typescript-eslint/eslint-plugin': 5.54.0(@typescript-eslint/parser@5.54.0)(eslint@8.36.0)(typescript@5.0.2) + '@typescript-eslint/parser': 5.54.0(eslint@8.36.0)(typescript@5.0.2) + eslint: 8.36.0 + eslint-config-standard: 17.0.0(eslint-plugin-import@2.27.5)(eslint-plugin-n@15.6.1)(eslint-plugin-promise@6.1.1)(eslint@8.36.0) + eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.54.0)(eslint@8.36.0) + eslint-plugin-n: 15.6.1(eslint@8.36.0) + eslint-plugin-promise: 6.1.1(eslint@8.36.0) typescript: 5.0.2 transitivePeerDependencies: - supports-color dev: false - /eslint-config-standard@17.0.0(eslint-plugin-import@2.27.5)(eslint-plugin-n@15.6.1)(eslint-plugin-promise@6.1.1)(eslint@8.35.0): + /eslint-config-standard@17.0.0(eslint-plugin-import@2.27.5)(eslint-plugin-n@15.6.1)(eslint-plugin-promise@6.1.1)(eslint@8.36.0): resolution: {integrity: sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg==} peerDependencies: eslint: '*' @@ -11310,10 +11323,10 @@ packages: eslint-plugin-n: ^15.0.0 eslint-plugin-promise: ^6.0.0 dependencies: - eslint: 8.35.0 - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.54.0)(eslint@8.35.0) - eslint-plugin-n: 15.6.1(eslint@8.35.0) - eslint-plugin-promise: 6.1.1(eslint@8.35.0) + eslint: 8.36.0 + eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.54.0)(eslint@8.36.0) + eslint-plugin-n: 15.6.1(eslint@8.36.0) + eslint-plugin-promise: 6.1.1(eslint@8.36.0) dev: false /eslint-import-resolver-node@0.3.7: @@ -11326,7 +11339,7 @@ packages: - supports-color dev: false - /eslint-module-utils@2.7.4(@typescript-eslint/parser@5.54.0)(eslint-import-resolver-node@0.3.7)(eslint@8.35.0): + /eslint-module-utils@2.7.4(@typescript-eslint/parser@5.54.0)(eslint-import-resolver-node@0.3.7)(eslint@8.36.0): resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} engines: {node: '>=4'} peerDependencies: @@ -11347,37 +11360,37 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.54.0(eslint@8.35.0)(typescript@5.0.2) + '@typescript-eslint/parser': 5.54.0(eslint@8.36.0)(typescript@5.0.2) debug: 3.2.7 - eslint: 8.35.0 + eslint: 8.36.0 eslint-import-resolver-node: 0.3.7 transitivePeerDependencies: - supports-color dev: false - /eslint-plugin-es@3.0.1(eslint@8.35.0): + /eslint-plugin-es@3.0.1(eslint@8.36.0): resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '*' dependencies: - eslint: 8.35.0 + eslint: 8.36.0 eslint-utils: 2.1.0 regexpp: 3.2.0 dev: false - /eslint-plugin-es@4.1.0(eslint@8.35.0): + /eslint-plugin-es@4.1.0(eslint@8.36.0): resolution: {integrity: sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '*' dependencies: - eslint: 8.35.0 + eslint: 8.36.0 eslint-utils: 2.1.0 regexpp: 3.2.0 dev: false - /eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.54.0)(eslint@8.35.0): + /eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.54.0)(eslint@8.36.0): resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==} engines: {node: '>=4'} peerDependencies: @@ -11387,15 +11400,15 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.54.0(eslint@8.35.0)(typescript@5.0.2) + '@typescript-eslint/parser': 5.54.0(eslint@8.36.0)(typescript@5.0.2) 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: 8.35.0 + eslint: 8.36.0 eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.7.4(@typescript-eslint/parser@5.54.0)(eslint-import-resolver-node@0.3.7)(eslint@8.35.0) + eslint-module-utils: 2.7.4(@typescript-eslint/parser@5.54.0)(eslint-import-resolver-node@0.3.7)(eslint@8.36.0) has: 1.0.3 is-core-module: 2.11.0 is-glob: 4.0.3 @@ -11410,16 +11423,16 @@ packages: - supports-color dev: false - /eslint-plugin-n@15.6.1(eslint@8.35.0): + /eslint-plugin-n@15.6.1(eslint@8.36.0): resolution: {integrity: sha512-R9xw9OtCRxxaxaszTQmQAlPgM+RdGjaL1akWuY/Fv9fRAi8Wj4CUKc6iYVG8QNRjRuo8/BqVYIpfqberJUEacA==} engines: {node: '>=12.22.0'} peerDependencies: eslint: '*' dependencies: builtins: 5.0.1 - eslint: 8.35.0 - eslint-plugin-es: 4.1.0(eslint@8.35.0) - eslint-utils: 3.0.0(eslint@8.35.0) + eslint: 8.36.0 + eslint-plugin-es: 4.1.0(eslint@8.36.0) + eslint-utils: 3.0.0(eslint@8.36.0) ignore: 5.2.4 is-core-module: 2.11.0 minimatch: 3.1.2 @@ -11427,14 +11440,14 @@ packages: semver: 7.3.8 dev: false - /eslint-plugin-node@11.1.0(eslint@8.35.0): + /eslint-plugin-node@11.1.0(eslint@8.36.0): resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '*' dependencies: - eslint: 8.35.0 - eslint-plugin-es: 3.0.1(eslint@8.35.0) + eslint: 8.36.0 + eslint-plugin-es: 3.0.1(eslint@8.36.0) eslint-utils: 2.1.0 ignore: 5.2.4 minimatch: 3.1.2 @@ -11442,13 +11455,13 @@ packages: semver: 6.3.0 dev: false - /eslint-plugin-promise@6.1.1(eslint@8.35.0): + /eslint-plugin-promise@6.1.1(eslint@8.36.0): resolution: {integrity: sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' dependencies: - eslint: 8.35.0 + eslint: 8.36.0 dev: false /eslint-scope@5.1.1: @@ -11473,14 +11486,15 @@ packages: eslint-visitor-keys: 1.3.0 dev: false - /eslint-utils@3.0.0(eslint@8.35.0): + /eslint-utils@3.0.0(eslint@8.36.0): resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '*' dependencies: - eslint: 8.35.0 + eslint: 8.36.0 eslint-visitor-keys: 2.1.0 + dev: false /eslint-visitor-keys@1.3.0: resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==} @@ -11490,18 +11504,21 @@ packages: /eslint-visitor-keys@2.1.0: resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} engines: {node: '>=10'} + dev: false /eslint-visitor-keys@3.3.0: resolution: {integrity: sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - /eslint@8.35.0: - resolution: {integrity: sha512-BxAf1fVL7w+JLRQhWl2pzGeSiGqbWumV4WNvc9Rhp6tiCtm4oHnyPBSEtMGZwrQgudFQ+otqzWoPB7x+hxoWsw==} + /eslint@8.36.0: + resolution: {integrity: sha512-Y956lmS7vDqomxlaaQAHVmeb4tNMp2FWIvU/RnU5BD3IKMD/MJPr76xdyr68P8tV1iNMvN2mRK0yy3c+UjL+bw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint/eslintrc': 2.0.0 - '@eslint/js': 8.35.0 + '@eslint-community/eslint-utils': 4.3.0(eslint@8.36.0) + '@eslint-community/regexpp': 4.4.0 + '@eslint/eslintrc': 2.0.1 + '@eslint/js': 8.36.0 '@humanwhocodes/config-array': 0.11.8 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 @@ -11512,9 +11529,8 @@ packages: doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.1.1 - eslint-utils: 3.0.0(eslint@8.35.0) eslint-visitor-keys: 3.3.0 - espree: 9.4.1 + espree: 9.5.0 esquery: 1.5.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 @@ -11536,7 +11552,6 @@ packages: minimatch: 3.1.2 natural-compare: 1.4.0 optionator: 0.9.1 - regexpp: 3.2.0 strip-ansi: 6.0.1 strip-json-comments: 3.1.1 text-table: 0.2.0 @@ -11548,8 +11563,8 @@ packages: engines: {node: '>=6'} dev: true - /espree@9.4.1: - resolution: {integrity: sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==} + /espree@9.5.0: + resolution: {integrity: sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: acorn: 8.8.2 @@ -15545,6 +15560,7 @@ packages: /regexpp@3.2.0: resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} engines: {node: '>=8'} + dev: false /remark-parse@9.0.0(unified@9.2.2): resolution: {integrity: sha512-geKatMwSzEXKHuzBNU1z676sGcDcFoChMK38TgdHJNAYfFtsfHDQG7MoJAjs6sgYMqyLduCYWDIWZIxiPeafEw==} @@ -17776,14 +17792,14 @@ time: /dir-is-case-sensitive@2.0.0: '2021-02-11T22:53:28.072Z' /encode-registry@3.0.0: '2020-10-28T18:56:36.241Z' /enquirer@2.3.6: '2020-07-02T13:00:19.453Z' - /esbuild@0.16.17: '2023-01-11T21:58:47.341Z' + /esbuild@0.17.12: '2023-03-17T06:17:56.026Z' /escape-string-regexp@4.0.0: '2020-04-23T07:31:25.491Z' - /eslint-config-standard-with-typescript@26.0.0: '2023-01-03T08:36:35.419Z' + /eslint-config-standard-with-typescript@34.0.1: '2023-03-14T09:26:58.154Z' /eslint-plugin-import@2.27.5: '2023-01-16T19:44:39.790Z' /eslint-plugin-n@15.6.1: '2023-01-11T03:52:38.490Z' /eslint-plugin-node@11.1.0: '2020-03-28T11:46:46.795Z' /eslint-plugin-promise@6.1.1: '2022-10-19T21:06:14.552Z' - /eslint@8.35.0: '2023-02-26T09:16:08.970Z' + /eslint@8.36.0: '2023-03-10T22:16:38.111Z' /exists-link@2.0.0: '2017-03-02T20:50:23.918Z' /fast-deep-equal@3.1.3: '2020-06-08T07:27:28.474Z' /fast-glob@3.2.12: '2022-09-09T06:40:27.748Z' diff --git a/pnpm/package.json b/pnpm/package.json index c6e4bd7278a..429068b0fb2 100644 --- a/pnpm/package.json +++ b/pnpm/package.json @@ -82,7 +82,7 @@ "deep-require-cwd": "1.0.0", "delay": "^5.0.0", "dir-is-case-sensitive": "^2.0.0", - "esbuild": "^0.16.17", + "esbuild": "^0.17.12", "execa": "npm:safe-execa@0.1.2", "exists-link": "2.0.0", "is-windows": "^1.0.2", diff --git a/pnpm/src/checkForUpdates.ts b/pnpm/src/checkForUpdates.ts index 4bb3fa18e39..3e888da4d12 100644 --- a/pnpm/src/checkForUpdates.ts +++ b/pnpm/src/checkForUpdates.ts @@ -1,6 +1,6 @@ import path from 'path' import { packageManager } from '@pnpm/cli-meta' -import { Config } from '@pnpm/config' +import { type Config } from '@pnpm/config' import { createResolver } from '@pnpm/client' import { pickRegistryForPackage } from '@pnpm/pick-registry-for-package' import { updateCheckLogger } from '@pnpm/core-loggers' diff --git a/pnpm/src/cmd/complete.ts b/pnpm/src/cmd/complete.ts index 897a21b0435..d70bae149f7 100644 --- a/pnpm/src/cmd/complete.ts +++ b/pnpm/src/cmd/complete.ts @@ -1,4 +1,4 @@ -import { Completion, CompletionFunc } from '@pnpm/command' +import { type Completion, type CompletionFunc } from '@pnpm/command' import { findWorkspaceDir } from '@pnpm/find-workspace-dir' import { findWorkspacePackages } from '@pnpm/find-workspace-packages' import { getOptionCompletions } from '../getOptionType' @@ -7,11 +7,11 @@ import { shorthands as universalShorthands } from '../shorthands' export async function complete ( ctx: { - cliOptionsTypesByCommandName: Record Object> + cliOptionsTypesByCommandName: Record Record> completionByCommandName: Record initialCompletion: () => Completion[] shorthandsByCommandName: Record> - universalOptionsTypes: Record + universalOptionsTypes: Record }, input: { params: string[] diff --git a/pnpm/src/cmd/completion.ts b/pnpm/src/cmd/completion.ts index ffd57f61f3e..7d765809e8c 100644 --- a/pnpm/src/cmd/completion.ts +++ b/pnpm/src/cmd/completion.ts @@ -1,4 +1,4 @@ -import { Completion, CompletionFunc } from '@pnpm/command' +import { type Completion, type CompletionFunc } from '@pnpm/command' import { split as splitCmd } from 'split-cmd' import tabtab from '@pnpm/tabtab' import { @@ -10,11 +10,11 @@ import { complete } from './complete' export function createCompletion ( opts: { - cliOptionsTypesByCommandName: Record Object> + cliOptionsTypesByCommandName: Record Record> completionByCommandName: Record initialCompletion: () => Completion[] shorthandsByCommandName: Record> - universalOptionsTypes: Record + universalOptionsTypes: Record } ) { return async () => { diff --git a/pnpm/src/cmd/help.ts b/pnpm/src/cmd/help.ts index 3c6a70a6a9f..75effe39838 100644 --- a/pnpm/src/cmd/help.ts +++ b/pnpm/src/cmd/help.ts @@ -2,7 +2,7 @@ import { packageManager } from '@pnpm/cli-meta' import renderHelp from 'render-help' export function createHelp (helpByCommandName: Record string>) { - return function (opts: {}, params: string[]) { + return function (opts: unknown, params: string[]) { let helpText!: string if (params.length === 0) { helpText = getHelpText() diff --git a/pnpm/src/cmd/index.ts b/pnpm/src/cmd/index.ts index 6a0d8b9ee60..45c57035cc8 100644 --- a/pnpm/src/cmd/index.ts +++ b/pnpm/src/cmd/index.ts @@ -1,4 +1,4 @@ -import { CompletionFunc } from '@pnpm/command' +import { type CompletionFunc } from '@pnpm/command' import { types as allTypes } from '@pnpm/config' import { audit } from '@pnpm/plugin-commands-audit' import { config, getCommand, setCommand } from '@pnpm/plugin-commands-config' @@ -25,7 +25,7 @@ import { setup } from '@pnpm/plugin-commands-setup' import { store } from '@pnpm/plugin-commands-store' import { init } from '@pnpm/plugin-commands-init' import pick from 'ramda/src/pick' -import { PnpmOptions } from '../types' +import { type PnpmOptions } from '../types' import * as bin from './bin' import { createCompletion } from './completion' import { createHelp } from './help' @@ -54,16 +54,19 @@ export const GLOBAL_OPTIONS = pick([ 'include-workspace-root', ], allTypes) -export type CommandResponse = string | { output: string, exitCode: number } | undefined +export type CommandResponse = string | { output?: string, exitCode: number } export type Command = ( - opts: PnpmOptions, - params: string[] -) => CommandResponse | Promise + (opts: PnpmOptions | any, params: string[]) => CommandResponse | Promise // eslint-disable-line @typescript-eslint/no-explicit-any +) | ( + (opts: PnpmOptions | any, params: string[]) => void // eslint-disable-line @typescript-eslint/no-explicit-any +) | ( + (opts: PnpmOptions | any, params: string[]) => Promise // eslint-disable-line @typescript-eslint/no-explicit-any +) export interface CommandDefinition { /** The main logic of the command. */ - handler: Function + handler: Command /** The help text for the command that describes its usage and options. */ help: () => string /** The names that will trigger this command handler. */ @@ -73,7 +76,7 @@ export interface CommandDefinition { * for this command and whose values are the types of values * for these options for validation. */ - cliOptionsTypes: () => Object + cliOptionsTypes: () => Record /** * A function that returns an object whose keys are acceptable options * in the .npmrc file for this command and whose values are the types of values @@ -142,8 +145,8 @@ const commands: CommandDefinition[] = [ const handlerByCommandName: Record = {} const helpByCommandName: Record string> = {} -const cliOptionsTypesByCommandName: Record Object> = {} -const aliasToFullName: Map = new Map() +const cliOptionsTypesByCommandName: Record Record> = {} +const aliasToFullName = new Map() const completionByCommandName: Record = {} const shorthandsByCommandName: Record> = {} const rcOptionsTypes: Record = {} diff --git a/pnpm/src/cmd/installTest.ts b/pnpm/src/cmd/installTest.ts index a57ff10f55d..06471d558c0 100644 --- a/pnpm/src/cmd/installTest.ts +++ b/pnpm/src/cmd/installTest.ts @@ -2,7 +2,7 @@ import { docsUrl } from '@pnpm/cli-utils' import { install } from '@pnpm/plugin-commands-installation' import { test } from '@pnpm/plugin-commands-script-runners' import renderHelp from 'render-help' -import { PnpmOptions } from '../types' +import { type PnpmOptions } from '../types' export const cliOptionsTypes = install.cliOptionsTypes diff --git a/pnpm/src/getOptionType.ts b/pnpm/src/getOptionType.ts index 16ae40b4608..98e908480a3 100644 --- a/pnpm/src/getOptionType.ts +++ b/pnpm/src/getOptionType.ts @@ -12,7 +12,7 @@ export interface CompletionCtx { } export function getOptionCompletions ( - optionTypes: Record, + optionTypes: Record, shorthands: Record, option: string ) { @@ -20,7 +20,7 @@ export function getOptionCompletions ( return optionTypeToCompletion(optionType) } -function optionTypeToCompletion (optionType: Object): undefined | string[] { +function optionTypeToCompletion (optionType: unknown): undefined | string[] { switch (optionType) { // In this case the option is complete case undefined: @@ -37,7 +37,7 @@ function optionTypeToCompletion (optionType: Object): undefined | string[] { } function getOptionType ( - optionTypes: Record, + optionTypes: Record, shorthands: Record, option: string ) { diff --git a/pnpm/src/main.ts b/pnpm/src/main.ts index 4e2427b0d7a..3ef06421f10 100644 --- a/pnpm/src/main.ts +++ b/pnpm/src/main.ts @@ -6,19 +6,19 @@ import loudRejection from 'loud-rejection' import { packageManager } from '@pnpm/cli-meta' import { getConfig } from '@pnpm/cli-utils' import { - Config, + type Config, } from '@pnpm/config' import { executionTimeLogger, scopeLogger } from '@pnpm/core-loggers' import { filterPackagesFromDir } from '@pnpm/filter-workspace-packages' import { logger } from '@pnpm/logger' -import { ParsedCliArgs } from '@pnpm/parse-cli-args' +import { type ParsedCliArgs } from '@pnpm/parse-cli-args' import { node } from '@pnpm/plugin-commands-env' import chalk from 'chalk' import { checkForUpdates } from './checkForUpdates' import { pnpmCmds, rcOptionsTypes } from './cmd' import { formatUnknownOptionsError } from './formatError' import { parseCliArgs } from './parseCliArgs' -import { initReporter, ReporterType } from './reporter' +import { initReporter, type ReporterType } from './reporter' import { isCI } from 'ci-info' import path from 'path' import isEmpty from 'ramda/src/isEmpty' @@ -230,7 +230,7 @@ export async function main (inputArgv: string[]) { config.workspaceDir = wsDir } - let { output, exitCode }: { output: string | null, exitCode: number } = await (async () => { + let { output, exitCode }: { output?: string | null, exitCode: number } = await (async () => { // NOTE: we defer the next stage, otherwise reporter might not catch all the logs await new Promise((resolve) => setTimeout(() => { resolve() diff --git a/pnpm/src/optionTypesToCompletions.ts b/pnpm/src/optionTypesToCompletions.ts index 785f84ecc9d..3b611d6fd0f 100644 --- a/pnpm/src/optionTypesToCompletions.ts +++ b/pnpm/src/optionTypesToCompletions.ts @@ -1,6 +1,6 @@ -import { Completion } from '@pnpm/command' +import { type Completion } from '@pnpm/command' -export function optionTypesToCompletions (optionTypes: Record) { +export function optionTypesToCompletions (optionTypes: Record) { const completions: Completion[] = [] for (const [name, typeObj] of Object.entries(optionTypes)) { if (typeObj === Boolean) { diff --git a/pnpm/src/reporter/index.ts b/pnpm/src/reporter/index.ts index 099f13e10ec..cf0f20f534a 100644 --- a/pnpm/src/reporter/index.ts +++ b/pnpm/src/reporter/index.ts @@ -1,6 +1,6 @@ -import { Config } from '@pnpm/config' +import { type Config } from '@pnpm/config' import { initDefaultReporter } from '@pnpm/default-reporter' -import { LogLevel, streamParser, writeToConsole } from '@pnpm/logger' +import { type LogLevel, streamParser, writeToConsole } from '@pnpm/logger' import { silentReporter } from './silentReporter' export type ReporterType = 'default' | 'ndjson' | 'silent' | 'append-only' diff --git a/pnpm/src/reporter/silentReporter.ts b/pnpm/src/reporter/silentReporter.ts index f8756f06d36..d54a42ec32b 100644 --- a/pnpm/src/reporter/silentReporter.ts +++ b/pnpm/src/reporter/silentReporter.ts @@ -1,4 +1,4 @@ -import { LogBase } from '@pnpm/logger' +import { type LogBase } from '@pnpm/logger' export function silentReporter ( streamParser: { diff --git a/pnpm/src/types.ts b/pnpm/src/types.ts index 9e4f3657a87..7ebe91682cc 100644 --- a/pnpm/src/types.ts +++ b/pnpm/src/types.ts @@ -1,7 +1,7 @@ -import { Config } from '@pnpm/config' +import { type Config } from '@pnpm/config' import { - LogBase, - ReadPackageHook, + type LogBase, + type ReadPackageHook, } from '@pnpm/types' export type PnpmOptions = Omit & { diff --git a/pnpm/test/hooks.ts b/pnpm/test/hooks.ts index a8edd73517e..0e3016c21e9 100644 --- a/pnpm/test/hooks.ts +++ b/pnpm/test/hooks.ts @@ -1,6 +1,6 @@ import { promises as fs } from 'fs' import path from 'path' -import { PackageManifest } from '@pnpm/types' +import { type PackageManifest } from '@pnpm/types' import { prepare, preparePackages } from '@pnpm/prepare' import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import loadJsonFile from 'load-json-file' diff --git a/pnpm/test/install/hooks.ts b/pnpm/test/install/hooks.ts index f0a2ecc50ec..6b0aef49237 100644 --- a/pnpm/test/install/hooks.ts +++ b/pnpm/test/install/hooks.ts @@ -1,6 +1,6 @@ import { promises as fs } from 'fs' import path from 'path' -import { Lockfile } from '@pnpm/lockfile-types' +import { type Lockfile } from '@pnpm/lockfile-types' import { prepare, preparePackages } from '@pnpm/prepare' import { createPeersFolderSuffixNewFormat as createPeersFolderSuffix } from '@pnpm/dependency-path' import readYamlFile from 'read-yaml-file' diff --git a/pnpm/test/install/lifecycleScripts.ts b/pnpm/test/install/lifecycleScripts.ts index b11111f68c1..2e33c6cd4d3 100644 --- a/pnpm/test/install/lifecycleScripts.ts +++ b/pnpm/test/install/lifecycleScripts.ts @@ -1,6 +1,6 @@ import path from 'path' import { prepare } from '@pnpm/prepare' -import { PackageManifest } from '@pnpm/types' +import { type PackageManifest } from '@pnpm/types' import PATH from 'path-name' import loadJsonFile from 'load-json-file' import { execPnpmSync } from '../utils' diff --git a/pnpm/test/install/misc.ts b/pnpm/test/install/misc.ts index 48534a7dd0d..5a8221a6f08 100644 --- a/pnpm/test/install/misc.ts +++ b/pnpm/test/install/misc.ts @@ -1,7 +1,7 @@ import { promises as fs, writeFileSync } from 'fs' import path from 'path' import { WANTED_LOCKFILE } from '@pnpm/constants' -import { Lockfile } from '@pnpm/lockfile-types' +import { type Lockfile } from '@pnpm/lockfile-types' import { prepare, prepareEmpty, preparePackages } from '@pnpm/prepare' import { readPackageJsonFromDir } from '@pnpm/read-package-json' import { readProjectManifest } from '@pnpm/read-project-manifest' diff --git a/pnpm/test/install/only.ts b/pnpm/test/install/only.ts index 874dbe3d514..bb1404228cd 100644 --- a/pnpm/test/install/only.ts +++ b/pnpm/test/install/only.ts @@ -1,6 +1,6 @@ import path from 'path' import { prepare } from '@pnpm/prepare' -import { PackageManifest } from '@pnpm/types' +import { type PackageManifest } from '@pnpm/types' import loadJsonFile from 'load-json-file' import { execPnpm } from '../utils' diff --git a/pnpm/test/monorepo/dedupePeers.test.ts b/pnpm/test/monorepo/dedupePeers.test.ts index e513e0471b8..dd40a1faf90 100644 --- a/pnpm/test/monorepo/dedupePeers.test.ts +++ b/pnpm/test/monorepo/dedupePeers.test.ts @@ -1,7 +1,7 @@ import { writeFileSync } from 'fs' import path from 'path' import { WANTED_LOCKFILE } from '@pnpm/constants' -import { Lockfile } from '@pnpm/lockfile-types' +import { type Lockfile } from '@pnpm/lockfile-types' import { preparePackages } from '@pnpm/prepare' import { addDistTag } from '@pnpm/registry-mock' import { sync as readYamlFile } from 'read-yaml-file' diff --git a/pnpm/test/monorepo/index.ts b/pnpm/test/monorepo/index.ts index 4ed7220cdcc..72b72564224 100644 --- a/pnpm/test/monorepo/index.ts +++ b/pnpm/test/monorepo/index.ts @@ -2,7 +2,7 @@ import { promises as fs } from 'fs' import path from 'path' import { LOCKFILE_VERSION_V6 as LOCKFILE_VERSION, WANTED_LOCKFILE } from '@pnpm/constants' import { findWorkspacePackages } from '@pnpm/find-workspace-packages' -import { LockfileV6 as Lockfile } from '@pnpm/lockfile-types' +import { type LockfileV6 as Lockfile } from '@pnpm/lockfile-types' import { readModulesManifest } from '@pnpm/modules-yaml' import { prepare, @@ -474,7 +474,7 @@ test('changed-files-ignore-pattern is respected', async () => { const getChangedProjects = async (opts?: { overrideChangedFilesIgnorePatternWithNoPattern: boolean }) => { - const result = await execPnpmSync( + const result = execPnpmSync( [ '--filter', '[origin/main]', diff --git a/pnpm/test/recursive/misc.ts b/pnpm/test/recursive/misc.ts index 32f30e24348..1df89dd05e4 100644 --- a/pnpm/test/recursive/misc.ts +++ b/pnpm/test/recursive/misc.ts @@ -1,7 +1,7 @@ import { promises as fs } from 'fs' import path from 'path' import { prepare, preparePackages } from '@pnpm/prepare' -import { Lockfile } from '@pnpm/lockfile-types' +import { type Lockfile } from '@pnpm/lockfile-types' import readYamlFile from 'read-yaml-file' import { isCI } from 'ci-info' import isWindows from 'is-windows' diff --git a/pnpm/test/server.ts b/pnpm/test/server.ts index 0e2f3795bb8..ccf120dee6f 100644 --- a/pnpm/test/server.ts +++ b/pnpm/test/server.ts @@ -1,12 +1,12 @@ -import { ChildProcess } from 'child_process' -import { Readable } from 'stream' +import { type ChildProcess } from 'child_process' +import { type Readable } from 'stream' import { promisify } from 'util' import path from 'path' import byline from '@pnpm/byline' import { prepare } from '@pnpm/prepare' import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' -import delay, { ClearablePromise } from 'delay' -import pDefer, { DeferredPromise } from 'p-defer' +import delay, { type ClearablePromise } from 'delay' +import pDefer, { type DeferredPromise } from 'p-defer' import isWindows from 'is-windows' import killcb from 'tree-kill' diff --git a/pnpm/test/utils/execPnpm.ts b/pnpm/test/utils/execPnpm.ts index b3b3a082881..0a9d200bb6b 100644 --- a/pnpm/test/utils/execPnpm.ts +++ b/pnpm/test/utils/execPnpm.ts @@ -1,4 +1,4 @@ -import { ChildProcess as NodeChildProcess, StdioOptions } from 'child_process' +import { type ChildProcess as NodeChildProcess, type StdioOptions } from 'child_process' import path from 'path' import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' import isWindows from 'is-windows' @@ -11,7 +11,7 @@ const pnpxBinLocation = path.join(__dirname, '../../bin/pnpx.cjs') export async function execPnpm ( args: string[], opts?: { - env: Object + env: Record } ): Promise { await new Promise((resolve, reject) => { @@ -32,7 +32,7 @@ export async function execPnpm ( export function spawnPnpm ( args: string[], opts?: { - env?: Object + env?: Record storeDir?: string } ): NodeChildProcess { @@ -70,11 +70,11 @@ export function spawnPnpx (args: string[], opts?: { storeDir?: string }): NodeCh export interface ChildProcess { status: number - stdout: Object - stderr: Object + stdout: { toString: () => string } + stderr: { toString: () => string } } -export function execPnpmSync (args: string[], opts?: { env: Object, stdio?: StdioOptions }): ChildProcess { +export function execPnpmSync (args: string[], opts?: { env: Record, stdio?: StdioOptions }): ChildProcess { return crossSpawn.sync(process.execPath, [pnpmBinLocation, ...args], { env: { ...createEnv(), @@ -84,7 +84,7 @@ export function execPnpmSync (args: string[], opts?: { env: Object, stdio?: Stdi }) as ChildProcess } -export function execPnpxSync (args: string[], opts?: { env: Object }): ChildProcess { +export function execPnpxSync (args: string[], opts?: { env: Record }): ChildProcess { return crossSpawn.sync(process.execPath, [pnpxBinLocation, ...args], { env: { ...createEnv(), diff --git a/releasing/plugin-commands-publishing/src/pack.ts b/releasing/plugin-commands-publishing/src/pack.ts index 981e7f0f178..2aaa72af6a2 100644 --- a/releasing/plugin-commands-publishing/src/pack.ts +++ b/releasing/plugin-commands-publishing/src/pack.ts @@ -2,11 +2,11 @@ import fs from 'fs' import path from 'path' import { createGzip } from 'zlib' import { PnpmError } from '@pnpm/error' -import { types as allTypes, UniversalOptions, Config } from '@pnpm/config' +import { types as allTypes, type UniversalOptions, type Config } from '@pnpm/config' import { readProjectManifest } from '@pnpm/cli-utils' import { createExportableManifest } from '@pnpm/exportable-manifest' import { getBinsFromPackageManifest } from '@pnpm/package-bins' -import { DependencyManifest } from '@pnpm/types' +import { type DependencyManifest } from '@pnpm/types' import fg from 'fast-glob' import pick from 'ramda/src/pick' import realpathMissing from 'realpath-missing' diff --git a/releasing/plugin-commands-publishing/src/publish.ts b/releasing/plugin-commands-publishing/src/publish.ts index 561403fb5e3..c5482e044fa 100644 --- a/releasing/plugin-commands-publishing/src/publish.ts +++ b/releasing/plugin-commands-publishing/src/publish.ts @@ -2,11 +2,11 @@ import { promises as fs, existsSync } from 'fs' import path from 'path' import { docsUrl, readProjectManifest } from '@pnpm/cli-utils' import { FILTERING } from '@pnpm/common-cli-options-help' -import { Config, types as allTypes } from '@pnpm/config' +import { type Config, types as allTypes } from '@pnpm/config' import { PnpmError } from '@pnpm/error' -import { runLifecycleHook, RunLifecycleHookOptions } from '@pnpm/lifecycle' +import { runLifecycleHook, type RunLifecycleHookOptions } from '@pnpm/lifecycle' import { runNpm } from '@pnpm/run-npm' -import { ProjectManifest } from '@pnpm/types' +import { type ProjectManifest } from '@pnpm/types' import { getCurrentBranch, isGitRepo, isRemoteHistoryClean, isWorkingTreeClean } from '@pnpm/git-utils' import { prompt } from 'enquirer' import rimraf from '@zkochan/rimraf' @@ -15,7 +15,7 @@ import realpathMissing from 'realpath-missing' import renderHelp from 'render-help' import tempy from 'tempy' import * as pack from './pack' -import { recursivePublish, PublishRecursiveOpts } from './recursivePublish' +import { recursivePublish, type PublishRecursiveOpts } from './recursivePublish' export function rcOptionsTypes () { return pick([ @@ -119,6 +119,22 @@ export async function handler ( workspaceDir?: string } & Pick, params: string[] +) { + const result = await publish(opts, params) + if (result?.manifest) return + return result +} + +export async function publish ( + opts: Omit & { + argv: { + original: string[] + } + engineStrict?: boolean + recursive?: boolean + workspaceDir?: string + } & Pick, + params: string[] ) { if (opts.gitChecks !== false && await isGitRepo()) { if (!(await isWorkingTreeClean())) { diff --git a/releasing/plugin-commands-publishing/src/recursivePublish.ts b/releasing/plugin-commands-publishing/src/recursivePublish.ts index 360faa3d00c..7ccf433fe8f 100644 --- a/releasing/plugin-commands-publishing/src/recursivePublish.ts +++ b/releasing/plugin-commands-publishing/src/recursivePublish.ts @@ -1,15 +1,15 @@ import path from 'path' import { createResolver } from '@pnpm/client' -import { Config } from '@pnpm/config' +import { type Config } from '@pnpm/config' import { logger } from '@pnpm/logger' import { pickRegistryForPackage } from '@pnpm/pick-registry-for-package' -import { ResolveFunction } from '@pnpm/resolver-base' +import { type ResolveFunction } from '@pnpm/resolver-base' import { sortPackages } from '@pnpm/sort-packages' -import { Registries } from '@pnpm/types' +import { type Registries } from '@pnpm/types' import pFilter from 'p-filter' import pick from 'ramda/src/pick' import writeJsonFile from 'write-json-file' -import { handler as publish } from './publish' +import { publish } from './publish' export type PublishRecursiveOpts = Required import path from 'path' import { resolveFromLocal } from '@pnpm/local-resolver' -import { DirectoryResolution } from '@pnpm/resolver-base' +import { type DirectoryResolution } from '@pnpm/resolver-base' import normalize from 'normalize-path' test('resolve directory', async () => { diff --git a/resolving/npm-resolver/src/fetch.ts b/resolving/npm-resolver/src/fetch.ts index 7390211d690..c65429b6178 100644 --- a/resolving/npm-resolver/src/fetch.ts +++ b/resolving/npm-resolver/src/fetch.ts @@ -2,13 +2,13 @@ import url from 'url' import { requestRetryLogger } from '@pnpm/core-loggers' import { FetchError, - FetchErrorRequest, - FetchErrorResponse, + type FetchErrorRequest, + type FetchErrorResponse, PnpmError, } from '@pnpm/error' -import { FetchFromRegistry, RetryTimeoutOptions } from '@pnpm/fetching-types' +import { type FetchFromRegistry, type RetryTimeoutOptions } from '@pnpm/fetching-types' import * as retry from '@zkochan/retry' -import { PackageMeta } from './pickPackage' +import { type PackageMeta } from './pickPackage' interface RegistryResponse { status: number diff --git a/resolving/npm-resolver/src/index.ts b/resolving/npm-resolver/src/index.ts index e6306f4a37e..038e0b1f934 100644 --- a/resolving/npm-resolver/src/index.ts +++ b/resolving/npm-resolver/src/index.ts @@ -1,18 +1,18 @@ import path from 'path' import { PnpmError } from '@pnpm/error' import { - FetchFromRegistry, - GetAuthHeader, - RetryTimeoutOptions, + type FetchFromRegistry, + type GetAuthHeader, + type RetryTimeoutOptions, } from '@pnpm/fetching-types' import { resolveWorkspaceRange } from '@pnpm/resolve-workspace-range' import { - PreferredVersions, - ResolveResult, - WantedDependency, - WorkspacePackages, + type PreferredVersions, + type ResolveResult, + type WantedDependency, + type WorkspacePackages, } from '@pnpm/resolver-base' -import { DependencyManifest } from '@pnpm/types' +import { type DependencyManifest } from '@pnpm/types' import LRU from 'lru-cache' import normalize from 'normalize-path' import pMemoize from 'p-memoize' @@ -20,15 +20,15 @@ import clone from 'ramda/src/clone' import semver from 'semver' import ssri from 'ssri' import { - PackageInRegistry, - PackageMeta, - PackageMetaCache, - PickPackageOptions, + type PackageInRegistry, + type PackageMeta, + type PackageMetaCache, + type PickPackageOptions, pickPackage, } from './pickPackage' import { parsePref, - RegistryPackageSpec, + type RegistryPackageSpec, } from './parsePref' import { fromRegistry, RegistryResponseError } from './fetch' import { createPkgId } from './createNpmPkgId' @@ -47,9 +47,9 @@ export class NoMatchingVersionError extends PnpmError { export { parsePref, - PackageMeta, - PackageMetaCache, - RegistryPackageSpec, + type PackageMeta, + type PackageMetaCache, + type RegistryPackageSpec, RegistryResponseError, } diff --git a/resolving/npm-resolver/src/pickPackage.ts b/resolving/npm-resolver/src/pickPackage.ts index b4cfabf8ac1..6108687566c 100644 --- a/resolving/npm-resolver/src/pickPackage.ts +++ b/resolving/npm-resolver/src/pickPackage.ts @@ -4,8 +4,8 @@ import path from 'path' import { PnpmError } from '@pnpm/error' import { logger } from '@pnpm/logger' import gfs from '@pnpm/graceful-fs' -import { VersionSelectors } from '@pnpm/resolver-base' -import { PackageManifest } from '@pnpm/types' +import { type VersionSelectors } from '@pnpm/resolver-base' +import { type PackageManifest } from '@pnpm/types' import getRegistryName from 'encode-registry' import loadJsonFile from 'load-json-file' import pLimit from 'p-limit' @@ -14,7 +14,7 @@ import pick from 'ramda/src/pick' import renameOverwrite from 'rename-overwrite' import { toRaw } from './toRaw' import { pickPackageFromMeta, pickVersionByVersionRange, pickLowestVersionByVersionRange } from './pickPackageFromMeta' -import { RegistryPackageSpec } from './parsePref' +import { type RegistryPackageSpec } from './parsePref' export interface PackageMeta { name: string diff --git a/resolving/npm-resolver/src/pickPackageFromMeta.ts b/resolving/npm-resolver/src/pickPackageFromMeta.ts index ae035e7da26..b6ab1d5d442 100644 --- a/resolving/npm-resolver/src/pickPackageFromMeta.ts +++ b/resolving/npm-resolver/src/pickPackageFromMeta.ts @@ -1,8 +1,8 @@ import { PnpmError } from '@pnpm/error' -import { VersionSelectors } from '@pnpm/resolver-base' +import { type VersionSelectors } from '@pnpm/resolver-base' import semver from 'semver' -import { RegistryPackageSpec } from './parsePref' -import { PackageInRegistry, PackageMeta } from './pickPackage' +import { type RegistryPackageSpec } from './parsePref' +import { type PackageInRegistry, type PackageMeta } from './pickPackage' export type PickVersionByVersionRange = ( meta: PackageMeta, diff --git a/resolving/npm-resolver/src/toRaw.ts b/resolving/npm-resolver/src/toRaw.ts index b37276fe75d..4f11911959a 100644 --- a/resolving/npm-resolver/src/toRaw.ts +++ b/resolving/npm-resolver/src/toRaw.ts @@ -1,4 +1,4 @@ -import { RegistryPackageSpec } from './parsePref' +import { type RegistryPackageSpec } from './parsePref' export function toRaw (spec: RegistryPackageSpec) { return `${spec.name}@${spec.fetchSpec}` diff --git a/resolving/resolver-base/src/index.ts b/resolving/resolver-base/src/index.ts index 9bf6f83271a..6f03fa5c2e4 100644 --- a/resolving/resolver-base/src/index.ts +++ b/resolving/resolver-base/src/index.ts @@ -1,4 +1,4 @@ -import { DependencyManifest } from '@pnpm/types' +import { type DependencyManifest } from '@pnpm/types' /** * tarball hosted remotely diff --git a/resolving/tarball-resolver/src/index.ts b/resolving/tarball-resolver/src/index.ts index 06b365c60fa..f522353456f 100644 --- a/resolving/tarball-resolver/src/index.ts +++ b/resolving/tarball-resolver/src/index.ts @@ -1,4 +1,4 @@ -import { ResolveResult } from '@pnpm/resolver-base' +import { type ResolveResult } from '@pnpm/resolver-base' export async function resolveFromTarball ( wantedDependency: { pref: string } diff --git a/reviewing/dependencies-hierarchy/src/DependenciesCache.ts b/reviewing/dependencies-hierarchy/src/DependenciesCache.ts index 526f84d8107..0f9f528675c 100644 --- a/reviewing/dependencies-hierarchy/src/DependenciesCache.ts +++ b/reviewing/dependencies-hierarchy/src/DependenciesCache.ts @@ -1,5 +1,5 @@ -import { PackageNode } from './PackageNode' -import { serializeTreeNodeId, TreeNodeId } from './TreeNodeId' +import { type PackageNode } from './PackageNode' +import { serializeTreeNodeId, type TreeNodeId } from './TreeNodeId' export interface GetDependenciesCacheEntryArgs { readonly parentId: TreeNodeId diff --git a/reviewing/dependencies-hierarchy/src/buildDependenciesHierarchy.ts b/reviewing/dependencies-hierarchy/src/buildDependenciesHierarchy.ts index 4545e19c9ce..b7eb78fad6a 100644 --- a/reviewing/dependencies-hierarchy/src/buildDependenciesHierarchy.ts +++ b/reviewing/dependencies-hierarchy/src/buildDependenciesHierarchy.ts @@ -1,8 +1,8 @@ import path from 'path' import { getLockfileImporterId, - Lockfile, - ProjectSnapshot, + type Lockfile, + type ProjectSnapshot, readCurrentLockfile, readWantedLockfile, } from '@pnpm/lockfile-file' @@ -10,16 +10,16 @@ import { readModulesManifest } from '@pnpm/modules-yaml' import { normalizeRegistries } from '@pnpm/normalize-registries' import { readModulesDir } from '@pnpm/read-modules-dir' import { safeReadPackageJsonFromDir } from '@pnpm/read-package-json' -import { DependenciesField, DEPENDENCIES_FIELDS, Registries } from '@pnpm/types' +import { type DependenciesField, DEPENDENCIES_FIELDS, type Registries } from '@pnpm/types' import normalizePath from 'normalize-path' import realpathMissing from 'realpath-missing' import resolveLinkTarget from 'resolve-link-target' -import { PackageNode } from './PackageNode' -import { SearchFunction } from './types' +import { type PackageNode } from './PackageNode' +import { type SearchFunction } from './types' import { getTree } from './getTree' import { getTreeNodeChildId } from './getTreeNodeChildId' import { getPkgInfo } from './getPkgInfo' -import { TreeNodeId } from './TreeNodeId' +import { type TreeNodeId } from './TreeNodeId' export interface DependenciesHierarchy { dependencies?: PackageNode[] diff --git a/reviewing/dependencies-hierarchy/src/getPkgInfo.ts b/reviewing/dependencies-hierarchy/src/getPkgInfo.ts index 6abcc45c359..d3af2431086 100644 --- a/reviewing/dependencies-hierarchy/src/getPkgInfo.ts +++ b/reviewing/dependencies-hierarchy/src/getPkgInfo.ts @@ -1,14 +1,14 @@ import path from 'path' import { - PackageSnapshot, - PackageSnapshots, - TarballResolution, + type PackageSnapshot, + type PackageSnapshots, + type TarballResolution, } from '@pnpm/lockfile-file' import { nameVerFromPkgSnapshot, pkgSnapshotToResolution, } from '@pnpm/lockfile-utils' -import { Registries } from '@pnpm/types' +import { type Registries } from '@pnpm/types' import { depPathToFilename, refToRelative } from '@pnpm/dependency-path' import normalizePath from 'normalize-path' diff --git a/reviewing/dependencies-hierarchy/src/getTree.ts b/reviewing/dependencies-hierarchy/src/getTree.ts index fbe5511bbef..a6190e5478c 100644 --- a/reviewing/dependencies-hierarchy/src/getTree.ts +++ b/reviewing/dependencies-hierarchy/src/getTree.ts @@ -1,12 +1,12 @@ import path from 'path' -import { PackageSnapshots, ProjectSnapshot } from '@pnpm/lockfile-file' -import { Registries } from '@pnpm/types' -import { SearchFunction } from './types' -import { PackageNode } from './PackageNode' +import { type PackageSnapshots, type ProjectSnapshot } from '@pnpm/lockfile-file' +import { type Registries } from '@pnpm/types' +import { type SearchFunction } from './types' +import { type PackageNode } from './PackageNode' import { getPkgInfo } from './getPkgInfo' import { getTreeNodeChildId } from './getTreeNodeChildId' import { DependenciesCache } from './DependenciesCache' -import { serializeTreeNodeId, TreeNodeId } from './TreeNodeId' +import { serializeTreeNodeId, type TreeNodeId } from './TreeNodeId' interface GetTreeOpts { maxDepth: number diff --git a/reviewing/dependencies-hierarchy/src/getTreeNodeChildId.ts b/reviewing/dependencies-hierarchy/src/getTreeNodeChildId.ts index 9fdccf3b43b..5304174e2b2 100644 --- a/reviewing/dependencies-hierarchy/src/getTreeNodeChildId.ts +++ b/reviewing/dependencies-hierarchy/src/getTreeNodeChildId.ts @@ -1,7 +1,7 @@ import { refToRelative } from '@pnpm/dependency-path' import path from 'path' -import { getLockfileImporterId, ProjectSnapshot } from '@pnpm/lockfile-file' -import { TreeNodeId } from './TreeNodeId' +import { getLockfileImporterId, type ProjectSnapshot } from '@pnpm/lockfile-file' +import { type TreeNodeId } from './TreeNodeId' export interface getTreeNodeChildIdOpts { readonly parentId: TreeNodeId diff --git a/reviewing/dependencies-hierarchy/test/getTree.test.ts b/reviewing/dependencies-hierarchy/test/getTree.test.ts index 5e24168e23a..fcc36adf652 100644 --- a/reviewing/dependencies-hierarchy/test/getTree.test.ts +++ b/reviewing/dependencies-hierarchy/test/getTree.test.ts @@ -1,8 +1,8 @@ import { refToRelative } from '@pnpm/dependency-path' -import { PackageSnapshots } from '@pnpm/lockfile-file' -import { PackageNode } from '@pnpm/reviewing.dependencies-hierarchy' +import { type PackageSnapshots } from '@pnpm/lockfile-file' +import { type PackageNode } from '@pnpm/reviewing.dependencies-hierarchy' import { getTree } from '../lib/getTree' -import { TreeNodeId } from '../lib/TreeNodeId' +import { type TreeNodeId } from '../lib/TreeNodeId' /** * Maps an npm package name to its dependencies. diff --git a/reviewing/dependencies-hierarchy/test/index.ts b/reviewing/dependencies-hierarchy/test/index.ts index 731b795d1bc..873051adf09 100644 --- a/reviewing/dependencies-hierarchy/test/index.ts +++ b/reviewing/dependencies-hierarchy/test/index.ts @@ -2,7 +2,7 @@ import path from 'path' import { WANTED_LOCKFILE } from '@pnpm/constants' import { fixtures } from '@pnpm/test-fixtures' -import { buildDependenciesHierarchy, PackageNode } from '@pnpm/reviewing.dependencies-hierarchy' +import { buildDependenciesHierarchy, type PackageNode } from '@pnpm/reviewing.dependencies-hierarchy' const f = fixtures(__dirname) const generalFixture = f.find('general') diff --git a/reviewing/license-scanner/src/getPkgInfo.ts b/reviewing/license-scanner/src/getPkgInfo.ts index 28ac39d80c8..a7ff798f1e8 100644 --- a/reviewing/license-scanner/src/getPkgInfo.ts +++ b/reviewing/license-scanner/src/getPkgInfo.ts @@ -4,17 +4,17 @@ import { readFile } from 'fs/promises' import { readPackageJson } from '@pnpm/read-package-json' import { depPathToFilename } from '@pnpm/dependency-path' import pLimit from 'p-limit' -import { PackageManifest, Registries } from '@pnpm/types' +import { type PackageManifest, type Registries } from '@pnpm/types' import { getFilePathByModeInCafs, getFilePathInCafs, - PackageFileInfo, - PackageFilesIndex, + type PackageFileInfo, + type PackageFilesIndex, } from '@pnpm/cafs' import loadJsonFile from 'load-json-file' import { PnpmError } from '@pnpm/error' -import { LicensePackage } from './licenses' -import { DirectoryResolution, PackageSnapshot, pkgSnapshotToResolution, Resolution } from '@pnpm/lockfile-utils' +import { type LicensePackage } from './licenses' +import { type DirectoryResolution, type PackageSnapshot, pkgSnapshotToResolution, type Resolution } from '@pnpm/lockfile-utils' import { fetchFromDir } from '@pnpm/directory-fetcher' const limitPkgReads = pLimit(4) diff --git a/reviewing/license-scanner/src/index.ts b/reviewing/license-scanner/src/index.ts index fadf00f3c7c..639adfd8f9a 100644 --- a/reviewing/license-scanner/src/index.ts +++ b/reviewing/license-scanner/src/index.ts @@ -1 +1 @@ -export { LicensePackage, findDependencyLicenses } from './licenses' +export { type LicensePackage, findDependencyLicenses } from './licenses' diff --git a/reviewing/license-scanner/src/licenses.ts b/reviewing/license-scanner/src/licenses.ts index 615aa50230f..2d43136a4be 100644 --- a/reviewing/license-scanner/src/licenses.ts +++ b/reviewing/license-scanner/src/licenses.ts @@ -1,13 +1,13 @@ import { PnpmError } from '@pnpm/error' -import { Lockfile } from '@pnpm/lockfile-file' +import { type Lockfile } from '@pnpm/lockfile-file' import { - DependenciesField, - IncludedDependencies, - ProjectManifest, - Registries, + type DependenciesField, + type IncludedDependencies, + type ProjectManifest, + type Registries, } from '@pnpm/types' import { - LicenseNode, + type LicenseNode, lockfileToLicenseNodeTree, } from './lockfileToLicenseNodeTree' diff --git a/reviewing/license-scanner/src/lockfileToLicenseNodeTree.ts b/reviewing/license-scanner/src/lockfileToLicenseNodeTree.ts index 25f59935d5c..19fbf56e888 100644 --- a/reviewing/license-scanner/src/lockfileToLicenseNodeTree.ts +++ b/reviewing/license-scanner/src/lockfileToLicenseNodeTree.ts @@ -1,11 +1,11 @@ -import { Lockfile, TarballResolution } from '@pnpm/lockfile-types' +import { type Lockfile, type TarballResolution } from '@pnpm/lockfile-types' import { nameVerFromPkgSnapshot } from '@pnpm/lockfile-utils' import { packageIsInstallable } from '@pnpm/package-is-installable' import { lockfileWalkerGroupImporterSteps, - LockfileWalkerStep, + type LockfileWalkerStep, } from '@pnpm/lockfile-walker' -import { DependenciesField, Registries } from '@pnpm/types' +import { type DependenciesField, type Registries } from '@pnpm/types' import { getPkgInfo } from './getPkgInfo' import mapValues from 'ramda/src/map' diff --git a/reviewing/license-scanner/test/licenses.spec.ts b/reviewing/license-scanner/test/licenses.spec.ts index adaf2682055..f785031290d 100644 --- a/reviewing/license-scanner/test/licenses.spec.ts +++ b/reviewing/license-scanner/test/licenses.spec.ts @@ -1,9 +1,9 @@ import { findDependencyLicenses } from '@pnpm/license-scanner' import { LOCKFILE_VERSION } from '@pnpm/constants' -import { ProjectManifest, Registries } from '@pnpm/types' -import { Lockfile } from '@pnpm/lockfile-file' -import { LicensePackage } from '../lib/licenses' -import { GetPackageInfoOptions, PackageInfo } from '../lib/getPkgInfo' +import { type ProjectManifest, type Registries } from '@pnpm/types' +import { type Lockfile } from '@pnpm/lockfile-file' +import { type LicensePackage } from '../lib/licenses' +import { type GetPackageInfoOptions, type PackageInfo } from '../lib/getPkgInfo' jest.mock('../lib/getPkgInfo', () => { const actualModule = jest.requireActual('../lib/getPkgInfo') diff --git a/reviewing/list/src/createPackagesSearcher.ts b/reviewing/list/src/createPackagesSearcher.ts index f551d039026..a859765709e 100644 --- a/reviewing/list/src/createPackagesSearcher.ts +++ b/reviewing/list/src/createPackagesSearcher.ts @@ -1,6 +1,6 @@ import { createMatcher } from '@pnpm/matcher' import npa from '@pnpm/npm-package-arg' -import { SearchFunction } from '@pnpm/reviewing.dependencies-hierarchy' +import { type SearchFunction } from '@pnpm/reviewing.dependencies-hierarchy' import semver from 'semver' export function createPackagesSearcher (queries: string[]) { diff --git a/reviewing/list/src/getPkgInfo.ts b/reviewing/list/src/getPkgInfo.ts index 7a85ba6cbcb..94d45d7070a 100644 --- a/reviewing/list/src/getPkgInfo.ts +++ b/reviewing/list/src/getPkgInfo.ts @@ -1,4 +1,4 @@ -import { ProjectManifest } from '@pnpm/types' +import { type ProjectManifest } from '@pnpm/types' import path from 'path' import { readPkg } from './readPkg' diff --git a/reviewing/list/src/index.ts b/reviewing/list/src/index.ts index 7183631c159..95771325390 100644 --- a/reviewing/list/src/index.ts +++ b/reviewing/list/src/index.ts @@ -1,14 +1,14 @@ import path from 'path' import { readProjectManifestOnly } from '@pnpm/read-project-manifest' -import { DependenciesField, Registries } from '@pnpm/types' -import { PackageNode, buildDependenciesHierarchy } from '@pnpm/reviewing.dependencies-hierarchy' +import { type DependenciesField, type Registries } from '@pnpm/types' +import { type PackageNode, buildDependenciesHierarchy, type DependenciesHierarchy } from '@pnpm/reviewing.dependencies-hierarchy' import { createPackagesSearcher } from './createPackagesSearcher' import { renderJson } from './renderJson' import { renderParseable } from './renderParseable' import { renderTree } from './renderTree' -import { PackageDependencyHierarchy } from './types' +import { type PackageDependencyHierarchy } from './types' -export { PackageNode } from '@pnpm/reviewing.dependencies-hierarchy' +export type { PackageNode } from '@pnpm/reviewing.dependencies-hierarchy' const DEFAULTS = { alwaysPrintRootPackage: true, @@ -138,7 +138,7 @@ export async function list ( ? projectPaths.reduce((acc, projectPath) => { acc[projectPath] = {} return acc - }, {} as Record) + }, {} as Record) : await buildDependenciesHierarchy(projectPaths, { depth: opts.depth, include: maybeOpts?.include, diff --git a/reviewing/list/src/renderJson.ts b/reviewing/list/src/renderJson.ts index a3da306a7d3..d16af1f9066 100644 --- a/reviewing/list/src/renderJson.ts +++ b/reviewing/list/src/renderJson.ts @@ -1,10 +1,10 @@ import { DEPENDENCIES_FIELDS } from '@pnpm/types' -import { PackageNode } from '@pnpm/reviewing.dependencies-hierarchy' +import { type PackageNode } from '@pnpm/reviewing.dependencies-hierarchy' import sortBy from 'ramda/src/sortBy' import path from 'ramda/src/path' -import { Ord } from 'ramda' -import { getPkgInfo, PkgInfo } from './getPkgInfo' -import { PackageDependencyHierarchy } from './types' +import { type Ord } from 'ramda' +import { getPkgInfo, type PkgInfo } from './getPkgInfo' +import { type PackageDependencyHierarchy } from './types' const sortPackages = sortBy(path(['pkg', 'alias']) as (pkg: PackageNode) => Ord) diff --git a/reviewing/list/src/renderParseable.ts b/reviewing/list/src/renderParseable.ts index 26fff3f42fc..7fc2282e591 100644 --- a/reviewing/list/src/renderParseable.ts +++ b/reviewing/list/src/renderParseable.ts @@ -1,7 +1,7 @@ -import { PackageNode } from '@pnpm/reviewing.dependencies-hierarchy' +import { type PackageNode } from '@pnpm/reviewing.dependencies-hierarchy' import sortBy from 'ramda/src/sortBy' import prop from 'ramda/src/prop' -import { PackageDependencyHierarchy } from './types' +import { type PackageDependencyHierarchy } from './types' const sortPackages = sortBy(prop('name')) diff --git a/reviewing/list/src/renderTree.ts b/reviewing/list/src/renderTree.ts index 3819d44911f..ea58c6ad19e 100644 --- a/reviewing/list/src/renderTree.ts +++ b/reviewing/list/src/renderTree.ts @@ -1,14 +1,14 @@ import path from 'path' -import { PackageNode } from '@pnpm/reviewing.dependencies-hierarchy' -import { DEPENDENCIES_FIELDS, DependenciesField } from '@pnpm/types' +import { type PackageNode } from '@pnpm/reviewing.dependencies-hierarchy' +import { DEPENDENCIES_FIELDS, type DependenciesField } from '@pnpm/types' import archy from 'archy' import chalk from 'chalk' import cliColumns from 'cli-columns' import sortBy from 'ramda/src/sortBy' import rpath from 'ramda/src/path' -import { Ord } from 'ramda' +import { type Ord } from 'ramda' import { getPkgInfo } from './getPkgInfo' -import { PackageDependencyHierarchy } from './types' +import { type PackageDependencyHierarchy } from './types' const sortPackages = sortBy(rpath(['name']) as (pkg: PackageNode) => Ord) diff --git a/reviewing/list/src/types.ts b/reviewing/list/src/types.ts index 0c8fc76b6ae..375d037e9f4 100644 --- a/reviewing/list/src/types.ts +++ b/reviewing/list/src/types.ts @@ -1,4 +1,4 @@ -import { DependenciesHierarchy } from '@pnpm/reviewing.dependencies-hierarchy' +import { type DependenciesHierarchy } from '@pnpm/reviewing.dependencies-hierarchy' export type PackageDependencyHierarchy = DependenciesHierarchy & { name?: string diff --git a/reviewing/outdated/src/createManifestGetter.ts b/reviewing/outdated/src/createManifestGetter.ts index 591440df234..19330f25f04 100644 --- a/reviewing/outdated/src/createManifestGetter.ts +++ b/reviewing/outdated/src/createManifestGetter.ts @@ -1,10 +1,10 @@ import { - ClientOptions, + type ClientOptions, createResolver, - ResolveFunction, + type ResolveFunction, } from '@pnpm/client' import { pickRegistryForPackage } from '@pnpm/pick-registry-for-package' -import { DependencyManifest, Registries } from '@pnpm/types' +import { type DependencyManifest, type Registries } from '@pnpm/types' interface GetManifestOpts { dir: string diff --git a/reviewing/outdated/src/index.ts b/reviewing/outdated/src/index.ts index e7bf406f646..7e994306663 100644 --- a/reviewing/outdated/src/index.ts +++ b/reviewing/outdated/src/index.ts @@ -1,2 +1,2 @@ export { outdatedDepsOfProjects } from './outdatedDepsOfProjects' -export { OutdatedPackage } from './outdated' +export type { OutdatedPackage } from './outdated' diff --git a/reviewing/outdated/src/outdated.ts b/reviewing/outdated/src/outdated.ts index 8d179af2d38..f9e1a53086b 100644 --- a/reviewing/outdated/src/outdated.ts +++ b/reviewing/outdated/src/outdated.ts @@ -2,20 +2,20 @@ import { WANTED_LOCKFILE } from '@pnpm/constants' import { PnpmError } from '@pnpm/error' import { getLockfileImporterId, - Lockfile, - ProjectSnapshot, + type Lockfile, + type ProjectSnapshot, } from '@pnpm/lockfile-file' import { nameVerFromPkgSnapshot } from '@pnpm/lockfile-utils' import { getAllDependenciesFromManifest } from '@pnpm/manifest-utils' import { parsePref } from '@pnpm/npm-resolver' import { pickRegistryForPackage } from '@pnpm/pick-registry-for-package' import { - DependenciesField, + type DependenciesField, DEPENDENCIES_FIELDS, - IncludedDependencies, - PackageManifest, - ProjectManifest, - Registries, + type IncludedDependencies, + type PackageManifest, + type ProjectManifest, + type Registries, } from '@pnpm/types' import * as dp from '@pnpm/dependency-path' import semver from 'semver' diff --git a/reviewing/outdated/src/outdatedDepsOfProjects.ts b/reviewing/outdated/src/outdatedDepsOfProjects.ts index c532a509318..19e56f39c91 100644 --- a/reviewing/outdated/src/outdatedDepsOfProjects.ts +++ b/reviewing/outdated/src/outdatedDepsOfProjects.ts @@ -6,12 +6,12 @@ import { import { createMatcher } from '@pnpm/matcher' import { readModulesManifest } from '@pnpm/modules-yaml' import { - IncludedDependencies, - ProjectManifest, + type IncludedDependencies, + type ProjectManifest, } from '@pnpm/types' import unnest from 'ramda/src/unnest' -import { createManifestGetter, ManifestGetterOptions } from './createManifestGetter' -import { outdated, OutdatedPackage } from './outdated' +import { createManifestGetter, type ManifestGetterOptions } from './createManifestGetter' +import { outdated, type OutdatedPackage } from './outdated' export async function outdatedDepsOfProjects ( pkgs: Array<{ dir: string, manifest: ProjectManifest }>, diff --git a/reviewing/outdated/test/getManifest.spec.ts b/reviewing/outdated/test/getManifest.spec.ts index b97eaeb43e9..e39ceaa6f8d 100644 --- a/reviewing/outdated/test/getManifest.spec.ts +++ b/reviewing/outdated/test/getManifest.spec.ts @@ -1,4 +1,4 @@ -import { ResolveFunction } from '@pnpm/client' +import { type ResolveFunction } from '@pnpm/client' import { getManifest } from '../lib/createManifestGetter' test('getManifest()', async () => { diff --git a/reviewing/plugin-commands-licenses/src/licenses.ts b/reviewing/plugin-commands-licenses/src/licenses.ts index ba2facb4536..09d78b01e3d 100644 --- a/reviewing/plugin-commands-licenses/src/licenses.ts +++ b/reviewing/plugin-commands-licenses/src/licenses.ts @@ -2,12 +2,12 @@ import { docsUrl, readDepNameCompletions, } from '@pnpm/cli-utils' -import { CompletionFunc } from '@pnpm/command' +import { type CompletionFunc } from '@pnpm/command' import { types as allTypes } from '@pnpm/config' import { PnpmError } from '@pnpm/error' import pick from 'ramda/src/pick' import renderHelp from 'render-help' -import { licensesList, LicensesCommandOptions } from './licensesList' +import { licensesList, type LicensesCommandOptions } from './licensesList' export function rcOptionsTypes () { return { diff --git a/reviewing/plugin-commands-licenses/src/licensesList.ts b/reviewing/plugin-commands-licenses/src/licensesList.ts index d1f01596cda..b9ad2d0e805 100644 --- a/reviewing/plugin-commands-licenses/src/licensesList.ts +++ b/reviewing/plugin-commands-licenses/src/licensesList.ts @@ -1,5 +1,5 @@ import { readProjectManifestOnly } from '@pnpm/cli-utils' -import { Config } from '@pnpm/config' +import { type Config } from '@pnpm/config' import { PnpmError } from '@pnpm/error' import { getStorePath } from '@pnpm/store-path' import { WANTED_LOCKFILE } from '@pnpm/constants' diff --git a/reviewing/plugin-commands-licenses/src/outputRenderer.ts b/reviewing/plugin-commands-licenses/src/outputRenderer.ts index 2aa04f7c49b..57f6ba8ea93 100644 --- a/reviewing/plugin-commands-licenses/src/outputRenderer.ts +++ b/reviewing/plugin-commands-licenses/src/outputRenderer.ts @@ -1,5 +1,5 @@ import { TABLE_OPTIONS } from '@pnpm/cli-utils' -import { LicensePackage } from '@pnpm/license-scanner' +import { type LicensePackage } from '@pnpm/license-scanner' import chalk from 'chalk' import { table } from '@zkochan/table' import { groupBy, sortWith } from 'ramda' diff --git a/reviewing/plugin-commands-listing/src/list.ts b/reviewing/plugin-commands-listing/src/list.ts index 2f95726eafc..d16e2944750 100644 --- a/reviewing/plugin-commands-listing/src/list.ts +++ b/reviewing/plugin-commands-listing/src/list.ts @@ -1,8 +1,8 @@ import { docsUrl } from '@pnpm/cli-utils' import { FILTERING, OPTIONS, UNIVERSAL_OPTIONS } from '@pnpm/common-cli-options-help' -import { Config, types as allTypes } from '@pnpm/config' +import { type Config, types as allTypes } from '@pnpm/config' import { list, listForPackages } from '@pnpm/list' -import { IncludedDependencies } from '@pnpm/types' +import { type IncludedDependencies } from '@pnpm/types' import pick from 'ramda/src/pick' import renderHelp from 'render-help' import { listRecursive } from './recursive' diff --git a/reviewing/plugin-commands-listing/src/recursive.ts b/reviewing/plugin-commands-listing/src/recursive.ts index 731447d92d2..8d9b028aef0 100644 --- a/reviewing/plugin-commands-listing/src/recursive.ts +++ b/reviewing/plugin-commands-listing/src/recursive.ts @@ -1,6 +1,6 @@ -import { Config } from '@pnpm/config' +import { type Config } from '@pnpm/config' import { logger } from '@pnpm/logger' -import { IncludedDependencies, Project } from '@pnpm/types' +import { type IncludedDependencies, type Project } from '@pnpm/types' import { render } from './list' export async function listRecursive ( diff --git a/reviewing/plugin-commands-listing/src/why.ts b/reviewing/plugin-commands-listing/src/why.ts index ef1665f1e6c..9bda01cc4e4 100644 --- a/reviewing/plugin-commands-listing/src/why.ts +++ b/reviewing/plugin-commands-listing/src/why.ts @@ -4,7 +4,7 @@ import { types as allTypes } from '@pnpm/config' import { PnpmError } from '@pnpm/error' import pick from 'ramda/src/pick' import renderHelp from 'render-help' -import { handler as list, ListCommandOptions } from './list' +import { handler as list, type ListCommandOptions } from './list' export function rcOptionsTypes () { return pick([ diff --git a/reviewing/plugin-commands-listing/test/recursive.ts b/reviewing/plugin-commands-listing/test/recursive.ts index fda2d51732b..14a45006eaa 100644 --- a/reviewing/plugin-commands-listing/test/recursive.ts +++ b/reviewing/plugin-commands-listing/test/recursive.ts @@ -1,6 +1,6 @@ import { promises as fs } from 'fs' import path from 'path' -import { PnpmError } from '@pnpm/error' +import { type PnpmError } from '@pnpm/error' import { readProjects } from '@pnpm/filter-workspace-packages' import { install } from '@pnpm/plugin-commands-installation' import { list, why } from '@pnpm/plugin-commands-listing' diff --git a/reviewing/plugin-commands-listing/test/why.ts b/reviewing/plugin-commands-listing/test/why.ts index d6b095f986d..ee7b74763e5 100644 --- a/reviewing/plugin-commands-listing/test/why.ts +++ b/reviewing/plugin-commands-listing/test/why.ts @@ -1,4 +1,4 @@ -import { PnpmError } from '@pnpm/error' +import { type PnpmError } from '@pnpm/error' import { why } from '@pnpm/plugin-commands-listing' import { prepare } from '@pnpm/prepare' import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' diff --git a/reviewing/plugin-commands-outdated/src/outdated.ts b/reviewing/plugin-commands-outdated/src/outdated.ts index d1ce92e204a..af0c3cb9c06 100644 --- a/reviewing/plugin-commands-outdated/src/outdated.ts +++ b/reviewing/plugin-commands-outdated/src/outdated.ts @@ -5,16 +5,16 @@ import { TABLE_OPTIONS, } from '@pnpm/cli-utils' import colorizeSemverDiff from '@pnpm/colorize-semver-diff' -import { CompletionFunc } from '@pnpm/command' +import { type CompletionFunc } from '@pnpm/command' import { FILTERING, OPTIONS, UNIVERSAL_OPTIONS } from '@pnpm/common-cli-options-help' -import { Config, types as allTypes } from '@pnpm/config' +import { type Config, types as allTypes } from '@pnpm/config' import { PnpmError } from '@pnpm/error' import { outdatedDepsOfProjects, - OutdatedPackage, + type OutdatedPackage, } from '@pnpm/outdated' import semverDiff from '@pnpm/semver-diff' -import { DependenciesField, PackageManifest } from '@pnpm/types' +import { type DependenciesField, type PackageManifest } from '@pnpm/types' import { table } from '@zkochan/table' import chalk from 'chalk' import pick from 'ramda/src/pick' @@ -24,7 +24,7 @@ import stripAnsi from 'strip-ansi' import wrapAnsi from 'wrap-ansi' import { DEFAULT_COMPARATORS, - OutdatedWithVersionDiff, + type OutdatedWithVersionDiff, } from './utils' import { outdatedRecursive } from './recursive' diff --git a/reviewing/plugin-commands-outdated/src/recursive.ts b/reviewing/plugin-commands-outdated/src/recursive.ts index c8721c44b86..c747a86f856 100644 --- a/reviewing/plugin-commands-outdated/src/recursive.ts +++ b/reviewing/plugin-commands-outdated/src/recursive.ts @@ -2,12 +2,12 @@ import { TABLE_OPTIONS } from '@pnpm/cli-utils' import { PnpmError } from '@pnpm/error' import { outdatedDepsOfProjects, - OutdatedPackage, + type OutdatedPackage, } from '@pnpm/outdated' import { - DependenciesField, - IncludedDependencies, - ProjectManifest, + type DependenciesField, + type IncludedDependencies, + type ProjectManifest, } from '@pnpm/types' import { table } from '@zkochan/table' import chalk from 'chalk' @@ -15,8 +15,8 @@ import isEmpty from 'ramda/src/isEmpty' import sortWith from 'ramda/src/sortWith' import { getCellWidth, - OutdatedCommandOptions, - OutdatedPackageJSONOutput, + type OutdatedCommandOptions, + type OutdatedPackageJSONOutput, renderCurrent, renderDetails, renderLatest, diff --git a/reviewing/plugin-commands-outdated/src/utils.ts b/reviewing/plugin-commands-outdated/src/utils.ts index 3649b1c61b8..78778e22fdc 100644 --- a/reviewing/plugin-commands-outdated/src/utils.ts +++ b/reviewing/plugin-commands-outdated/src/utils.ts @@ -1,5 +1,5 @@ -import { OutdatedPackage } from '@pnpm/outdated' -import { SEMVER_CHANGE } from '@pnpm/semver-diff' +import { type OutdatedPackage } from '@pnpm/outdated' +import { type SEMVER_CHANGE } from '@pnpm/semver-diff' export type OutdatedWithVersionDiff = OutdatedPackage & { change: SEMVER_CHANGE | null, diff?: [string[], string[]] } diff --git a/reviewing/plugin-commands-outdated/test/index.ts b/reviewing/plugin-commands-outdated/test/index.ts index 4225757fdf0..156b9265cd0 100644 --- a/reviewing/plugin-commands-outdated/test/index.ts +++ b/reviewing/plugin-commands-outdated/test/index.ts @@ -2,7 +2,7 @@ import { promises as fs } from 'fs' import path from 'path' import { WANTED_LOCKFILE } from '@pnpm/constants' -import { PnpmError } from '@pnpm/error' +import { type PnpmError } from '@pnpm/error' import { outdated } from '@pnpm/plugin-commands-outdated' import { prepare, tempDir } from '@pnpm/prepare' import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' diff --git a/store/cafs/src/addFilesFromTarball.ts b/store/cafs/src/addFilesFromTarball.ts index 8c4dbf48add..1d2e6e34662 100644 --- a/store/cafs/src/addFilesFromTarball.ts +++ b/store/cafs/src/addFilesFromTarball.ts @@ -1,4 +1,4 @@ -import { Duplex, PassThrough } from 'stream' +import { type Duplex, type PassThrough } from 'stream' import type { DeferredManifestPromise, FilesIndex, FileWriteResult } from '@pnpm/cafs-types' import decompress from 'decompress-maybe' import tar from 'tar-stream' @@ -6,7 +6,7 @@ import { parseJsonStream } from './parseJson' export async function addFilesFromTarball ( addStreamToCafs: (fileStream: PassThrough, mode: number) => Promise, - _ignore: null | ((filename: string) => Boolean), + _ignore: null | ((filename: string) => boolean), stream: NodeJS.ReadableStream, manifest?: DeferredManifestPromise ): Promise { diff --git a/store/cafs/src/getFilePathInCafs.ts b/store/cafs/src/getFilePathInCafs.ts index b96a777a45e..283ec0bba59 100644 --- a/store/cafs/src/getFilePathInCafs.ts +++ b/store/cafs/src/getFilePathInCafs.ts @@ -1,5 +1,5 @@ import path from 'path' -import ssri, { IntegrityLike } from 'ssri' +import ssri, { type IntegrityLike } from 'ssri' export const modeIsExecutable = (mode: number) => (mode & 0o111) === 0o111 diff --git a/store/cafs/src/index.ts b/store/cafs/src/index.ts index 4b582589ccb..5015609f184 100644 --- a/store/cafs/src/index.ts +++ b/store/cafs/src/index.ts @@ -1,4 +1,4 @@ -import { promises as fs, Stats } from 'fs' +import { promises as fs, type Stats } from 'fs' import path from 'path' import type { FileWriteResult, PackageFileInfo } from '@pnpm/cafs-types' import getStream from 'get-stream' @@ -9,32 +9,32 @@ import { addFilesFromDir } from './addFilesFromDir' import { addFilesFromTarball } from './addFilesFromTarball' import { checkPkgFilesIntegrity, - PackageFilesIndex, + type PackageFilesIndex, verifyFileIntegrity, } from './checkPkgFilesIntegrity' import { readManifestFromStore } from './readManifestFromStore' import { getFilePathInCafs, contentPathFromHex, - FileType, + type FileType, getFilePathByModeInCafs, modeIsExecutable, } from './getFilePathInCafs' import { writeFile } from './writeFile' -export { IntegrityLike } from 'ssri' +export type { IntegrityLike } from 'ssri' export { checkPkgFilesIntegrity, readManifestFromStore, - FileType, + type FileType, getFilePathByModeInCafs, getFilePathInCafs, - PackageFileInfo, - PackageFilesIndex, + type PackageFileInfo, + type PackageFilesIndex, } -export function createCafs (cafsDir: string, ignore?: ((filename: string) => Boolean)) { +export function createCafs (cafsDir: string, ignore?: ((filename: string) => boolean)) { const locker = new Map() const _writeBufferToCafs = writeBufferToCafs.bind(null, locker, cafsDir) const addStream = addStreamToCafs.bind(null, _writeBufferToCafs) diff --git a/store/cafs/src/parseJson.ts b/store/cafs/src/parseJson.ts index cc45e4dcac1..8106aa32922 100644 --- a/store/cafs/src/parseJson.ts +++ b/store/cafs/src/parseJson.ts @@ -1,4 +1,4 @@ -import { PassThrough } from 'stream' +import { type PassThrough } from 'stream' import type { DeferredManifestPromise } from '@pnpm/cafs-types' import concatStream from 'concat-stream' import stripBom from 'strip-bom' diff --git a/store/cafs/src/readManifestFromStore.ts b/store/cafs/src/readManifestFromStore.ts index fa879d16941..64443c72533 100644 --- a/store/cafs/src/readManifestFromStore.ts +++ b/store/cafs/src/readManifestFromStore.ts @@ -1,6 +1,6 @@ import type { DeferredManifestPromise } from '@pnpm/cafs-types' import gfs from '@pnpm/graceful-fs' -import { PackageFilesIndex } from './checkPkgFilesIntegrity' +import { type PackageFilesIndex } from './checkPkgFilesIntegrity' import { getFilePathByModeInCafs } from './getFilePathInCafs' import { parseJsonBuffer } from './parseJson' diff --git a/store/cafs/test/index.ts b/store/cafs/test/index.ts index 00fd0182ad2..225ef790ed3 100644 --- a/store/cafs/test/index.ts +++ b/store/cafs/test/index.ts @@ -1,5 +1,5 @@ import { createReadStream, promises as fs } from 'fs' -import { DependencyManifest } from '@pnpm/types' +import { type DependencyManifest } from '@pnpm/types' import pDefer from 'p-defer' import path from 'path' import tempy from 'tempy' diff --git a/store/create-cafs-store/src/index.ts b/store/create-cafs-store/src/index.ts index fd77b6a147a..1ff22ec7f18 100644 --- a/store/create-cafs-store/src/index.ts +++ b/store/create-cafs-store/src/index.ts @@ -7,9 +7,9 @@ import { import type { Cafs, PackageFilesResponse } from '@pnpm/cafs-types' import { createIndexedPkgImporter } from '@pnpm/fs.indexed-pkg-importer' import { - ImportIndexedPackage, - ImportPackageFunction, - PackageFileInfo, + type ImportIndexedPackage, + type ImportPackageFunction, + type PackageFileInfo, } from '@pnpm/store-controller-types' import memoize from 'mem' import pathTemp from 'path-temp' diff --git a/store/package-store/src/storeController/index.ts b/store/package-store/src/storeController/index.ts index 26d6166059e..6bf476366cc 100644 --- a/store/package-store/src/storeController/index.ts +++ b/store/package-store/src/storeController/index.ts @@ -1,14 +1,14 @@ import { - PackageFilesIndex, + type PackageFilesIndex, } from '@pnpm/cafs' import { createCafsStore } from '@pnpm/create-cafs-store' -import { Fetchers } from '@pnpm/fetcher-base' +import { type Fetchers } from '@pnpm/fetcher-base' import { createPackageRequester } from '@pnpm/package-requester' -import { ResolveFunction } from '@pnpm/resolver-base' +import { type ResolveFunction } from '@pnpm/resolver-base' import { - ImportIndexedPackage, - PackageFileInfo, - StoreController, + type ImportIndexedPackage, + type PackageFileInfo, + type StoreController, } from '@pnpm/store-controller-types' import loadJsonFile from 'load-json-file' import writeJsonFile from 'write-json-file' diff --git a/store/package-store/src/storeController/prune.ts b/store/package-store/src/storeController/prune.ts index 54a3d3959b3..6fe12cc7d86 100644 --- a/store/package-store/src/storeController/prune.ts +++ b/store/package-store/src/storeController/prune.ts @@ -1,6 +1,6 @@ import { promises as fs } from 'fs' import path from 'path' -import { PackageFilesIndex } from '@pnpm/cafs' +import { type PackageFilesIndex } from '@pnpm/cafs' import { globalInfo, globalWarn } from '@pnpm/logger' import rimraf from '@zkochan/rimraf' import loadJsonFile from 'load-json-file' diff --git a/store/plugin-commands-server/src/server.ts b/store/plugin-commands-server/src/server.ts index b092259a292..8595b447c1a 100644 --- a/store/plugin-commands-server/src/server.ts +++ b/store/plugin-commands-server/src/server.ts @@ -2,7 +2,7 @@ import { docsUrl } from '@pnpm/cli-utils' import { OPTIONS, UNIVERSAL_OPTIONS } from '@pnpm/common-cli-options-help' import { types as allTypes } from '@pnpm/config' import { PnpmError } from '@pnpm/error' -import { CreateStoreControllerOptions } from '@pnpm/store-connection-manager' +import { type CreateStoreControllerOptions } from '@pnpm/store-connection-manager' import pick from 'ramda/src/pick' import renderHelp from 'render-help' import { start } from './start' diff --git a/store/plugin-commands-server/src/start.ts b/store/plugin-commands-server/src/start.ts index 3a3640fd70c..5e8f4a9c9f5 100644 --- a/store/plugin-commands-server/src/start.ts +++ b/store/plugin-commands-server/src/start.ts @@ -14,7 +14,7 @@ import { logger } from '@pnpm/logger' import { createServer } from '@pnpm/server' import { createNewStoreController, - CreateStoreControllerOptions, + type CreateStoreControllerOptions, serverConnectionInfoDir, } from '@pnpm/store-connection-manager' import { getStorePath } from '@pnpm/store-path' diff --git a/store/plugin-commands-server/src/status.ts b/store/plugin-commands-server/src/status.ts index 2de3ed73330..2ee06c735e0 100644 --- a/store/plugin-commands-server/src/status.ts +++ b/store/plugin-commands-server/src/status.ts @@ -1,5 +1,5 @@ import path from 'path' -import { Config } from '@pnpm/config' +import { type Config } from '@pnpm/config' import { globalInfo } from '@pnpm/logger' import { serverConnectionInfoDir, tryLoadServerJson } from '@pnpm/store-connection-manager' import { getStorePath } from '@pnpm/store-path' diff --git a/store/plugin-commands-store/src/store.ts b/store/plugin-commands-store/src/store.ts index 381bea86168..0ec5fcaa30d 100644 --- a/store/plugin-commands-store/src/store.ts +++ b/store/plugin-commands-store/src/store.ts @@ -1,8 +1,8 @@ import { docsUrl } from '@pnpm/cli-utils' -import { Config, types as allTypes } from '@pnpm/config' +import { type Config, types as allTypes } from '@pnpm/config' import { PnpmError } from '@pnpm/error' -import { logger, LogBase } from '@pnpm/logger' -import { createOrConnectStoreController, CreateStoreControllerOptions } from '@pnpm/store-connection-manager' +import { logger, type LogBase } from '@pnpm/logger' +import { createOrConnectStoreController, type CreateStoreControllerOptions } from '@pnpm/store-connection-manager' import { getStorePath } from '@pnpm/store-path' import pick from 'ramda/src/pick' import renderHelp from 'render-help' diff --git a/store/plugin-commands-store/src/storeAdd.ts b/store/plugin-commands-store/src/storeAdd.ts index 3115a0e7124..a9c47848435 100644 --- a/store/plugin-commands-store/src/storeAdd.ts +++ b/store/plugin-commands-store/src/storeAdd.ts @@ -2,9 +2,9 @@ import { PnpmError } from '@pnpm/error' import { logger, globalInfo, streamParser } from '@pnpm/logger' import { parseWantedDependency } from '@pnpm/parse-wanted-dependency' import { pickRegistryForPackage } from '@pnpm/pick-registry-for-package' -import { StoreController } from '@pnpm/store-controller-types' -import { Registries } from '@pnpm/types' -import { ReporterFunction } from './types' +import { type StoreController } from '@pnpm/store-controller-types' +import { type Registries } from '@pnpm/types' +import { type ReporterFunction } from './types' export async function storeAdd ( fuzzyDeps: string[], diff --git a/store/plugin-commands-store/src/storePrune.ts b/store/plugin-commands-store/src/storePrune.ts index d2b436c162a..35096afff4d 100644 --- a/store/plugin-commands-store/src/storePrune.ts +++ b/store/plugin-commands-store/src/storePrune.ts @@ -1,6 +1,6 @@ import { streamParser } from '@pnpm/logger' -import { StoreController } from '@pnpm/store-controller-types' -import { ReporterFunction } from './types' +import { type StoreController } from '@pnpm/store-controller-types' +import { type ReporterFunction } from './types' export async function storePrune ( opts: { diff --git a/store/plugin-commands-store/src/storeStatus/extendStoreStatusOptions.ts b/store/plugin-commands-store/src/storeStatus/extendStoreStatusOptions.ts index 9a1b4b35f2e..06db4e21074 100644 --- a/store/plugin-commands-store/src/storeStatus/extendStoreStatusOptions.ts +++ b/store/plugin-commands-store/src/storeStatus/extendStoreStatusOptions.ts @@ -1,7 +1,7 @@ import path from 'path' import { normalizeRegistries, DEFAULT_REGISTRIES } from '@pnpm/normalize-registries' -import { Registries } from '@pnpm/types' -import { ReporterFunction } from '../types' +import { type Registries } from '@pnpm/types' +import { type ReporterFunction } from '../types' export interface StrictStoreStatusOptions { lockfileDir: string diff --git a/store/plugin-commands-store/src/storeStatus/index.ts b/store/plugin-commands-store/src/storeStatus/index.ts index b637d86351c..ff4aecc42b3 100644 --- a/store/plugin-commands-store/src/storeStatus/index.ts +++ b/store/plugin-commands-store/src/storeStatus/index.ts @@ -1,5 +1,5 @@ import path from 'path' -import { getFilePathInCafs, PackageFilesIndex } from '@pnpm/cafs' +import { getFilePathInCafs, type PackageFilesIndex } from '@pnpm/cafs' import { getContextForSingleImporter } from '@pnpm/get-context' import { nameVerFromPkgSnapshot, @@ -12,9 +12,9 @@ import loadJsonFile from 'load-json-file' import pFilter from 'p-filter' import { extendStoreStatusOptions, - StoreStatusOptions, + type StoreStatusOptions, } from './extendStoreStatusOptions' -import { TarballResolution } from '@pnpm/store-controller-types' +import { type TarballResolution } from '@pnpm/store-controller-types' export async function storeStatus (maybeOpts: StoreStatusOptions) { const reporter = maybeOpts?.reporter diff --git a/store/plugin-commands-store/src/types.ts b/store/plugin-commands-store/src/types.ts index c9cab281c4c..b6d242c9906 100644 --- a/store/plugin-commands-store/src/types.ts +++ b/store/plugin-commands-store/src/types.ts @@ -1,3 +1,3 @@ -import { LogBase } from '@pnpm/logger' +import { type LogBase } from '@pnpm/logger' export type ReporterFunction = (logObj: LogBase) => void diff --git a/store/plugin-commands-store/test/storePrune.ts b/store/plugin-commands-store/test/storePrune.ts index c13f8a7d0f6..f03402fdd4f 100644 --- a/store/plugin-commands-store/test/storePrune.ts +++ b/store/plugin-commands-store/test/storePrune.ts @@ -1,7 +1,7 @@ import fs from 'fs' import path from 'path' import { assertStore } from '@pnpm/assert-store' -import { LockfileV6 as Lockfile } from '@pnpm/lockfile-file' +import { type LockfileV6 as Lockfile } from '@pnpm/lockfile-file' import { store } from '@pnpm/plugin-commands-store' import { prepare } from '@pnpm/prepare' import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' diff --git a/store/plugin-commands-store/test/storeStatus.ts b/store/plugin-commands-store/test/storeStatus.ts index 2c4216c4ac9..2983a941860 100644 --- a/store/plugin-commands-store/test/storeStatus.ts +++ b/store/plugin-commands-store/test/storeStatus.ts @@ -1,5 +1,5 @@ import path from 'path' -import { PnpmError } from '@pnpm/error' +import { type PnpmError } from '@pnpm/error' import { store } from '@pnpm/plugin-commands-store' import { prepare } from '@pnpm/prepare' import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' diff --git a/store/server/src/connectStoreController.ts b/store/server/src/connectStoreController.ts index e8175f60e4e..8381fb4c677 100644 --- a/store/server/src/connectStoreController.ts +++ b/store/server/src/connectStoreController.ts @@ -1,13 +1,13 @@ import { fetch } from '@pnpm/fetch' import { - FetchPackageToStoreOptions, - PackageFilesResponse, - PackageResponse, - RequestPackageOptions, - StoreController, - WantedDependency, + type FetchPackageToStoreOptions, + type PackageFilesResponse, + type PackageResponse, + type RequestPackageOptions, + type StoreController, + type WantedDependency, } from '@pnpm/store-controller-types' -import { DependencyManifest } from '@pnpm/types' +import { type DependencyManifest } from '@pnpm/types' import pLimit from 'p-limit' import pShare from 'promise-share' diff --git a/store/server/src/createServer.ts b/store/server/src/createServer.ts index dbcb70ed846..cdff040c8ea 100644 --- a/store/server/src/createServer.ts +++ b/store/server/src/createServer.ts @@ -1,11 +1,11 @@ -import http, { IncomingMessage, Server, ServerResponse } from 'http' +import http, { type IncomingMessage, type Server, type ServerResponse } from 'http' import { globalInfo } from '@pnpm/logger' import { - BundledManifestFunction, - PackageFilesResponse, - RequestPackageOptions, - StoreController, - WantedDependency, + type BundledManifestFunction, + type PackageFilesResponse, + type RequestPackageOptions, + type StoreController, + type WantedDependency, } from '@pnpm/store-controller-types' import { locking } from './lock' diff --git a/store/server/test/index.ts b/store/server/test/index.ts index b45293e89ea..d1f5094052b 100644 --- a/store/server/test/index.ts +++ b/store/server/test/index.ts @@ -85,6 +85,8 @@ test('fetchPackage', async () => { }) const storeCtrl = await connectStoreController({ remotePrefix, concurrency: 100 }) const pkgId = 'registry.npmjs.org/is-positive/1.0.0' + // This should be fixed + // eslint-disable-next-line const response = await storeCtrl.fetchPackage({ fetchRawManifest: true, force: false, diff --git a/store/store-connection-manager/src/createNewStoreController.ts b/store/store-connection-manager/src/createNewStoreController.ts index 11d4c233af9..f0e14e8fc39 100644 --- a/store/store-connection-manager/src/createNewStoreController.ts +++ b/store/store-connection-manager/src/createNewStoreController.ts @@ -1,6 +1,6 @@ import { promises as fs } from 'fs' -import { createClient, ClientOptions } from '@pnpm/client' -import { Config } from '@pnpm/config' +import { createClient, type ClientOptions } from '@pnpm/client' +import { type Config } from '@pnpm/config' import { createPackageStore } from '@pnpm/package-store' import { packageManager } from '@pnpm/cli-meta' diff --git a/store/store-connection-manager/src/index.ts b/store/store-connection-manager/src/index.ts index 9d18a2ca7a3..ecd5d545a44 100644 --- a/store/store-connection-manager/src/index.ts +++ b/store/store-connection-manager/src/index.ts @@ -1,14 +1,14 @@ import { promises as fs } from 'fs' import path from 'path' import { packageManager } from '@pnpm/cli-meta' -import { Config } from '@pnpm/config' +import { type Config } from '@pnpm/config' import { PnpmError } from '@pnpm/error' import { logger } from '@pnpm/logger' -import { StoreController } from '@pnpm/package-store' +import { type StoreController } from '@pnpm/package-store' import { connectStoreController } from '@pnpm/server' import { getStorePath } from '@pnpm/store-path' import delay from 'delay' -import { createNewStoreController, CreateNewStoreControllerOptions } from './createNewStoreController' +import { createNewStoreController, type CreateNewStoreControllerOptions } from './createNewStoreController' import { runServerInBackground } from './runServerInBackground' import { serverConnectionInfoDir } from './serverConnectionInfoDir' diff --git a/store/store-controller-types/src/index.ts b/store/store-controller-types/src/index.ts index 07bcf8a082a..60bec1712c3 100644 --- a/store/store-controller-types/src/index.ts +++ b/store/store-controller-types/src/index.ts @@ -1,9 +1,9 @@ import { - DirectoryResolution, - PreferredVersions, - Resolution, - WantedDependency, - WorkspacePackages, + type DirectoryResolution, + type PreferredVersions, + type Resolution, + type WantedDependency, + type WorkspacePackages, } from '@pnpm/resolver-base' import type { ImportPackageFunction, @@ -11,11 +11,11 @@ import type { PackageFilesResponse, } from '@pnpm/cafs-types' import { - DependencyManifest, - PackageManifest, + type DependencyManifest, + type PackageManifest, } from '@pnpm/types' -export { PackageFileInfo, PackageFilesResponse, ImportPackageFunction } +export type { PackageFileInfo, PackageFilesResponse, ImportPackageFunction } export * from '@pnpm/resolver-base' export type BundledManifest = Pick< diff --git a/text/comments-parser/src/extractComments.ts b/text/comments-parser/src/extractComments.ts index 91734f9d37b..c3d782cd6f7 100644 --- a/text/comments-parser/src/extractComments.ts +++ b/text/comments-parser/src/extractComments.ts @@ -1,5 +1,5 @@ import { parseString, stripComments } from 'strip-comments-strings' -import { CommentSpecifier } from './CommentSpecifier' +import { type CommentSpecifier } from './CommentSpecifier' export function extractComments (text: string) { const hasFinalNewline = text.endsWith('\n') diff --git a/text/comments-parser/src/insertComments.ts b/text/comments-parser/src/insertComments.ts index 27cfa3168a4..3b721beb331 100644 --- a/text/comments-parser/src/insertComments.ts +++ b/text/comments-parser/src/insertComments.ts @@ -1,4 +1,4 @@ -import { CommentSpecifier } from './CommentSpecifier' +import { type CommentSpecifier } from './CommentSpecifier' export function insertComments (json: string, comments: CommentSpecifier[]) { // We need to reintroduce the comments. So create an index of diff --git a/workspace/filter-workspace-packages/src/index.ts b/workspace/filter-workspace-packages/src/index.ts index ac13bf71d30..590fffa14b2 100644 --- a/workspace/filter-workspace-packages/src/index.ts +++ b/workspace/filter-workspace-packages/src/index.ts @@ -1,15 +1,15 @@ -import { findWorkspacePackages, Project } from '@pnpm/find-workspace-packages' +import { findWorkspacePackages, type Project } from '@pnpm/find-workspace-packages' import { createMatcher } from '@pnpm/matcher' -import { createPkgGraph, Package, PackageNode } from '@pnpm/workspace.pkgs-graph' +import { createPkgGraph, type Package, type PackageNode } from '@pnpm/workspace.pkgs-graph' import isSubdir from 'is-subdir' import difference from 'ramda/src/difference' import partition from 'ramda/src/partition' import pick from 'ramda/src/pick' import * as micromatch from 'micromatch' import { getChangedPackages } from './getChangedPackages' -import { parsePackageSelector, PackageSelector } from './parsePackageSelector' +import { parsePackageSelector, type PackageSelector } from './parsePackageSelector' -export { parsePackageSelector, PackageSelector } +export { parsePackageSelector, type PackageSelector } export interface WorkspaceFilter { filter: string diff --git a/workspace/filter-workspace-packages/test/index.ts b/workspace/filter-workspace-packages/test/index.ts index af4ffa0a85b..bd50f21d43e 100644 --- a/workspace/filter-workspace-packages/test/index.ts +++ b/workspace/filter-workspace-packages/test/index.ts @@ -1,6 +1,6 @@ import { promisify } from 'util' -import { PnpmError } from '@pnpm/error' -import { filterWorkspacePackages, PackageGraph } from '@pnpm/filter-workspace-packages' +import { type PnpmError } from '@pnpm/error' +import { filterWorkspacePackages, type PackageGraph } from '@pnpm/filter-workspace-packages' import './parsePackageSelector' import fs from 'fs' import execa from 'execa' @@ -14,7 +14,7 @@ import touchCB from 'touch' const touch = promisify(touchCB) const mkdir = promisify(fs.mkdir) -const PKGS_GRAPH: PackageGraph<{}> = { +const PKGS_GRAPH: PackageGraph = { '/packages/project-0': { dependencies: ['/packages/project-1', '/project-5'], package: { @@ -208,7 +208,7 @@ test('select just a package by name', async () => { }) test('select package without specifying its scope', async () => { - const PKGS_GRAPH: PackageGraph<{}> = { + const PKGS_GRAPH: PackageGraph = { '/packages/bar': { dependencies: [], package: { @@ -231,7 +231,7 @@ test('select package without specifying its scope', async () => { }) test('when a scoped package with the same name exists, only pick the exact match', async () => { - const PKGS_GRAPH: PackageGraph<{}> = { + const PKGS_GRAPH: PackageGraph = { '/packages/@foo/bar': { dependencies: [], package: { @@ -264,7 +264,7 @@ test('when a scoped package with the same name exists, only pick the exact match }) test('when two scoped packages match the searched name, don\'t select any', async () => { - const PKGS_GRAPH: PackageGraph<{}> = { + const PKGS_GRAPH: PackageGraph = { '/packages/@foo/bar': { dependencies: [], package: { diff --git a/workspace/filter-workspace-packages/test/parsePackageSelector.ts b/workspace/filter-workspace-packages/test/parsePackageSelector.ts index 59f951c6989..9141fb202bd 100644 --- a/workspace/filter-workspace-packages/test/parsePackageSelector.ts +++ b/workspace/filter-workspace-packages/test/parsePackageSelector.ts @@ -1,5 +1,5 @@ import path from 'path' -import { PackageSelector, parsePackageSelector } from '@pnpm/filter-workspace-packages' +import { type PackageSelector, parsePackageSelector } from '@pnpm/filter-workspace-packages' import isWindows from 'is-windows' const fixtures: Array<[string, PackageSelector]> = [ diff --git a/workspace/find-workspace-packages/src/index.ts b/workspace/find-workspace-packages/src/index.ts index 307bfb6da1e..2e7a192155e 100644 --- a/workspace/find-workspace-packages/src/index.ts +++ b/workspace/find-workspace-packages/src/index.ts @@ -1,12 +1,12 @@ import path from 'path' import { packageIsInstallable } from '@pnpm/cli-utils' import { WORKSPACE_MANIFEST_FILENAME } from '@pnpm/constants' -import { Project } from '@pnpm/types' +import { type Project } from '@pnpm/types' import { lexCompare } from '@pnpm/util.lex-comparator' import { findPackages } from '@pnpm/fs.find-packages' import readYamlFile from 'read-yaml-file' -export { Project } +export type { Project } export async function findWorkspacePackages ( workspaceRoot: string, diff --git a/workspace/sort-packages/src/index.ts b/workspace/sort-packages/src/index.ts index c4425ca580b..be988168e2c 100644 --- a/workspace/sort-packages/src/index.ts +++ b/workspace/sort-packages/src/index.ts @@ -1,4 +1,4 @@ -import { ProjectsGraph } from '@pnpm/types' +import type { ProjectsGraph } from '@pnpm/types' import graphSequencer from '@pnpm/graph-sequencer' import type { Result as GraphSequencerResult } from '@pnpm/graph-sequencer'