Skip to content

Commit

Permalink
revert all the import type changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cspotcode committed Jun 4, 2021
1 parent f3f8041 commit 508a322
Show file tree
Hide file tree
Showing 141 changed files with 268 additions and 268 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {stringifySyml, parseSyml} from '@yarnpkg/parsers';
import klaw from 'klaw';
import tarFs from 'tar-fs';
import zlib from 'zlib';
import type {Gzip} from 'zlib';
import {Gzip} from 'zlib';

import * as miscUtils from './misc';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {PortablePath, ppath, Filename} from '@yarnpkg/fslib';

import * as fsUtils from './fs';
import type {RunFunction} from './tests';
import {RunFunction} from './tests';

const deepResolve = require(`super-resolve`);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import crypto from 'crypto';
import finalhandler from 'finalhandler';
import https from 'https';
import http from 'http';
import type {IncomingMessage, ServerResponse} from 'http';
import {IncomingMessage, ServerResponse} from 'http';
import invariant from 'invariant';
import type {AddressInfo} from 'net';
import {AddressInfo} from 'net';
import pem from 'pem';
import semver from 'semver';
import serveStatic from 'serve-static';
Expand All @@ -15,9 +15,9 @@ const deepResolve = require(`super-resolve`);

const staticServer = serveStatic(npath.fromPortablePath(require(`pkg-tests-fixtures`)));

import type {Gzip} from 'zlib';
import {Gzip} from 'zlib';

import type {ExecResult} from './exec';
import {ExecResult} from './exec';
import * as fsUtils from './fs';

export type PackageEntry = Map<string, {path: string, packageJson: Object}>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Manifest} from '@yarnpkg/core';
import type {PortablePath} from '@yarnpkg/fslib';
import {PortablePath} from '@yarnpkg/fslib';
import {merge} from 'lodash';
import {fs, yarn} from 'pkg-tests-core';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {PortablePath} from '@yarnpkg/fslib';
import {PortablePath} from '@yarnpkg/fslib';
import {fs} from 'pkg-tests-core';

const {writeJson} = fs;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {PortablePath} from '@yarnpkg/fslib';
import type {exec} from 'pkg-tests-core';
import {PortablePath} from '@yarnpkg/fslib';
import {exec} from 'pkg-tests-core';
import {fs} from 'pkg-tests-core';

const {readFile, writeFile, writeJson} = fs;
Expand Down
2 changes: 1 addition & 1 deletion packages/esbuild-plugin-pnp/sources/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {PnpApi} from '@yarnpkg/pnp';
import type {OnLoadArgs, OnLoadResult, OnResolveArgs, OnResolveResult, Plugin, PluginBuild} from 'esbuild';
import {OnLoadArgs, OnLoadResult, OnResolveArgs, OnResolveResult, Plugin, PluginBuild} from 'esbuild';
import * as fs from 'fs';

const matchAll = /()/;
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-compat/sources/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// the same fields as you add here and prefix your changes with the relevant
// PR url.

import type {PackageExtensionData} from '@yarnpkg/core';
import {PackageExtensionData} from '@yarnpkg/core';

const optionalPeerDep = {
optional: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-compat/sources/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Hooks as CoreHooks, Plugin, structUtils} from '@yarnpkg/core';
import type {Hooks as PatchHooks} from '@yarnpkg/plugin-patch';
import {Hooks as PatchHooks} from '@yarnpkg/plugin-patch';

import {packageExtensions} from './extensions';
import {getPatch as getFseventsPatch} from './patches/fsevents.patch';
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-constraints/sources/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Plugin, SettingsType} from '@yarnpkg/core';
import type {PortablePath} from '@yarnpkg/fslib';
import {PortablePath} from '@yarnpkg/fslib';

import queryConstraints from './commands/constraints/query';
import sourceConstraints from './commands/constraints/source';
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-constraints/sources/tauModule.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference path="./tauProlog.d.ts"/>

import {Project, structUtils} from '@yarnpkg/core';
import type {PortablePath} from '@yarnpkg/fslib';
import {PortablePath} from '@yarnpkg/fslib';
import getPath from 'lodash/get';
import pl from 'tau-prolog';
import vm from 'vm';
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-dlx/sources/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Plugin} from '@yarnpkg/core';
import {Plugin} from '@yarnpkg/core';

import create from './commands/create';
import dlx from './commands/dlx';
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-essentials/sources/commands/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import {BaseCommand, WorkspaceRequiredError} from '@yarnp
import {Cache, Configuration, Descriptor, LightReport, MessageName} from '@yarnpkg/core';
import {Project, StreamReport, Workspace, Ident} from '@yarnpkg/core';
import {structUtils} from '@yarnpkg/core';
import type {PortablePath} from '@yarnpkg/fslib';
import {PortablePath} from '@yarnpkg/fslib';
import {Command, Option, Usage, UsageError} from 'clipanion';
import {prompt} from 'enquirer';

import * as suggestUtils from '../suggestUtils';
import type {Hooks} from '..';
import {Hooks} from '..';

// eslint-disable-next-line arca/no-default-export
export default class AddCommand extends BaseCommand {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {CommandContext} from '@yarnpkg/core';
import {CommandContext} from '@yarnpkg/core';
import {Command} from 'clipanion';

// eslint-disable-next-line arca/no-default-export
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {BaseCommand} from '@yarnpkg/cli';
import {Configuration, MessageName, miscUtils, Project, StreamReport, structUtils, semverUtils, formatUtils, PeerRequirement} from '@yarnpkg/core';
import {Command, Option} from 'clipanion';
import type {Writable} from 'stream';
import {Writable} from 'stream';
import * as t from 'typanion';

// eslint-disable-next-line arca/no-default-export
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-essentials/sources/commands/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {xfs}
import {Command, Option, Usage, UsageError} from 'clipanion';
import mm from 'micromatch';

import type {Hooks} from '..';
import {Hooks} from '..';

// eslint-disable-next-line arca/no-default-export
export default class InfoCommand extends BaseCommand {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-essentials/sources/commands/remove.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {Command, Option, Usage, UsageError} from
import micromatch from 'micromatch';

import * as suggestUtils from '../suggestUtils';
import type {Hooks} from '..';
import {Hooks} from '..';

// eslint-disable-next-line arca/no-default-export
export default class RemoveCommand extends BaseCommand {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-essentials/sources/commands/up.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import micromatch
import * as t from 'typanion';

import * as suggestUtils from '../suggestUtils';
import type {Hooks} from '..';
import {Hooks} from '..';

// eslint-disable-next-line arca/no-default-export
export default class UpCommand extends BaseCommand {
Expand Down
3 changes: 2 additions & 1 deletion packages/plugin-essentials/sources/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//ts-node-dump
import {Descriptor, Plugin, SettingsType, Package, formatUtils} from '@yarnpkg/core';
import type {Workspace} from '@yarnpkg/core';
import {Workspace} from '@yarnpkg/core';
import {isCI} from 'ci-info';

import add from './commands/add';
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-exec/sources/ExecFetcher.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {execUtils, scriptUtils, structUtils, tgzUtils} from '@yarnpkg/core';
import type {Locator} from '@yarnpkg/core';
import type {Fetcher, FetchOptions, MinimalFetchOptions} from '@yarnpkg/core';
import {Locator} from '@yarnpkg/core';
import {Fetcher, FetchOptions, MinimalFetchOptions} from '@yarnpkg/core';
import {Filename, PortablePath, npath, ppath, xfs, NativePath} from '@yarnpkg/fslib';

import {PROTOCOL} from './constants';
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-exec/sources/ExecResolver.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Resolver, ResolveOptions, MinimalResolveOptions} from '@yarnpkg/core';
import {Resolver, ResolveOptions, MinimalResolveOptions} from '@yarnpkg/core';
import {Descriptor, Locator, Manifest, DescriptorHash, Package} from '@yarnpkg/core';
import {LinkType} from '@yarnpkg/core';
import {miscUtils, structUtils, hashUtils} from '@yarnpkg/core';
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-exec/sources/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Plugin} from '@yarnpkg/core';
import {Plugin} from '@yarnpkg/core';

import {ExecFetcher, ExecEnv} from './ExecFetcher';
import {ExecResolver} from './ExecResolver';
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-file/sources/FileFetcher.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {structUtils} from '@yarnpkg/core';
import type {Locator} from '@yarnpkg/core';
import type {Fetcher, FetchOptions, MinimalFetchOptions} from '@yarnpkg/core';
import {Locator} from '@yarnpkg/core';
import {Fetcher, FetchOptions, MinimalFetchOptions} from '@yarnpkg/core';
import {ppath} from '@yarnpkg/fslib';

import {PROTOCOL} from './constants';
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-file/sources/FileResolver.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {miscUtils, structUtils, hashUtils} from '@yarnpkg/core';
import {LinkType} from '@yarnpkg/core';
import {Descriptor, Locator, Manifest} from '@yarnpkg/core';
import type {Resolver, ResolveOptions, MinimalResolveOptions} from '@yarnpkg/core';
import {Resolver, ResolveOptions, MinimalResolveOptions} from '@yarnpkg/core';

import {FILE_REGEXP, PROTOCOL} from './constants';
import * as fileUtils from './fileUtils';
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-file/sources/TarballFileFetcher.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {Fetcher, FetchOptions, FetchResult, MinimalFetchOptions} from '@yarnpkg/core';
import type {Locator} from '@yarnpkg/core';
import {Fetcher, FetchOptions, FetchResult, MinimalFetchOptions} from '@yarnpkg/core';
import {Locator} from '@yarnpkg/core';
import {miscUtils, structUtils, tgzUtils} from '@yarnpkg/core';
import {PortablePath, ppath, CwdFS} from '@yarnpkg/fslib';

Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-file/sources/TarballFileResolver.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Resolver, ResolveOptions, MinimalResolveOptions} from '@yarnpkg/core';
import {Resolver, ResolveOptions, MinimalResolveOptions} from '@yarnpkg/core';
import {Descriptor, Locator, Manifest} from '@yarnpkg/core';
import {LinkType} from '@yarnpkg/core';
import {miscUtils, structUtils} from '@yarnpkg/core';
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-file/sources/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Plugin} from '@yarnpkg/core';
import {Plugin} from '@yarnpkg/core';

import {FileFetcher} from './FileFetcher';
import {FileResolver} from './FileResolver';
Expand Down
6 changes: 3 additions & 3 deletions packages/plugin-git/sources/GitFetcher.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type {Fetcher, FetchOptions, MinimalFetchOptions, FetchResult} from '@yarnpkg/core';
import type {Locator} from '@yarnpkg/core';
import {Fetcher, FetchOptions, MinimalFetchOptions, FetchResult} from '@yarnpkg/core';
import {Locator} from '@yarnpkg/core';
import {miscUtils, scriptUtils, structUtils, tgzUtils} from '@yarnpkg/core';
import {PortablePath, ppath, xfs} from '@yarnpkg/fslib';

import * as gitUtils from './gitUtils';
import type {Hooks} from './index';
import {Hooks} from './index';

export class GitFetcher implements Fetcher {
supports(locator: Locator, opts: MinimalFetchOptions) {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-git/sources/GitResolver.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Resolver, ResolveOptions, MinimalResolveOptions} from '@yarnpkg/core';
import {Resolver, ResolveOptions, MinimalResolveOptions} from '@yarnpkg/core';
import {miscUtils, structUtils} from '@yarnpkg/core';
import {LinkType} from '@yarnpkg/core';
import {Descriptor, Locator, Manifest} from '@yarnpkg/core';
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-github/sources/GithubFetcher.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {Fetcher, FetchOptions, MinimalFetchOptions} from '@yarnpkg/core';
import type {Locator} from '@yarnpkg/core';
import {Fetcher, FetchOptions, MinimalFetchOptions} from '@yarnpkg/core';
import {Locator} from '@yarnpkg/core';
import {httpUtils, scriptUtils, structUtils, tgzUtils} from '@yarnpkg/core';
import {PortablePath, CwdFS, ppath, xfs} from '@yarnpkg/fslib';
import {gitUtils} from '@yarnpkg/plugin-git';
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-github/sources/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {Plugin} from '@yarnpkg/core';
import type {Hooks as GitHooks} from '@yarnpkg/plugin-git';
import {Plugin} from '@yarnpkg/core';
import {Hooks as GitHooks} from '@yarnpkg/plugin-git';

import {GithubFetcher} from './GithubFetcher';

Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-http/sources/TarballHttpFetcher.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {Fetcher, FetchOptions, MinimalFetchOptions} from '@yarnpkg/core';
import type {Locator} from '@yarnpkg/core';
import {Fetcher, FetchOptions, MinimalFetchOptions} from '@yarnpkg/core';
import {Locator} from '@yarnpkg/core';
import {httpUtils, structUtils, tgzUtils} from '@yarnpkg/core';

import {TARBALL_REGEXP, PROTOCOL_REGEXP} from './constants';
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-http/sources/TarballHttpResolver.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Resolver, ResolveOptions, MinimalResolveOptions} from '@yarnpkg/core';
import {Resolver, ResolveOptions, MinimalResolveOptions} from '@yarnpkg/core';
import {Descriptor, Locator, Manifest} from '@yarnpkg/core';
import {LinkType} from '@yarnpkg/core';
import {miscUtils, structUtils} from '@yarnpkg/core';
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-http/sources/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Plugin} from '@yarnpkg/core';
import {Plugin} from '@yarnpkg/core';

import {TarballHttpFetcher} from './TarballHttpFetcher';
import {TarballHttpResolver} from './TarballHttpResolver';
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-interactive-tools/sources/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Plugin} from '@yarnpkg/core';
import {Plugin} from '@yarnpkg/core';

import search from './commands/search';
import upgradeInteractive from './commands/upgrade-interactive';
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-link/sources/LinkFetcher.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {Fetcher, FetchOptions, FetchResult, MinimalFetchOptions} from '@yarnpkg/core';
import type {Locator} from '@yarnpkg/core';
import {Fetcher, FetchOptions, FetchResult, MinimalFetchOptions} from '@yarnpkg/core';
import {Locator} from '@yarnpkg/core';
import {structUtils} from '@yarnpkg/core';
import {CwdFS, JailFS, ppath, PortablePath} from '@yarnpkg/fslib';

Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-link/sources/LinkResolver.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Resolver, ResolveOptions, MinimalResolveOptions} from '@yarnpkg/core';
import {Resolver, ResolveOptions, MinimalResolveOptions} from '@yarnpkg/core';
import {Descriptor, Locator, Manifest, Package} from '@yarnpkg/core';
import {LinkType} from '@yarnpkg/core';
import {miscUtils, structUtils} from '@yarnpkg/core';
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-link/sources/RawLinkFetcher.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {Fetcher, FetchOptions, FetchResult, MinimalFetchOptions} from '@yarnpkg/core';
import type {Locator} from '@yarnpkg/core';
import {Fetcher, FetchOptions, FetchResult, MinimalFetchOptions} from '@yarnpkg/core';
import {Locator} from '@yarnpkg/core';
import {structUtils} from '@yarnpkg/core';
import {CwdFS, JailFS, ppath, PortablePath} from '@yarnpkg/fslib';

Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-link/sources/RawLinkResolver.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {Resolver, ResolveOptions, MinimalResolveOptions} from '@yarnpkg/core';
import type {Descriptor, Locator} from '@yarnpkg/core';
import {Resolver, ResolveOptions, MinimalResolveOptions} from '@yarnpkg/core';
import {Descriptor, Locator} from '@yarnpkg/core';
import {LinkType} from '@yarnpkg/core';
import {structUtils} from '@yarnpkg/core';
import {npath} from '@yarnpkg/fslib';
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-link/sources/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Plugin} from '@yarnpkg/core';
import {Plugin} from '@yarnpkg/core';

import {LinkFetcher} from './LinkFetcher';
import {LinkResolver} from './LinkResolver';
Expand Down
Loading

0 comments on commit 508a322

Please sign in to comment.