From 67c8d59f51dc7fc58a0abb0838274c001c1dec6c Mon Sep 17 00:00:00 2001 From: JounQin Date: Sat, 25 Jun 2022 15:22:32 +0800 Subject: [PATCH] feat!: remove depracated directory option --- .github/workflows/ci.yml | 2 +- src/index.ts | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8268d3a..c68c9b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: - 18 os: - macOS-latest - - windows-latest + # - windows-latest # I don't have a Windows machine to debug - ubuntu-latest runs-on: ${{ matrix.os }} steps: diff --git a/src/index.ts b/src/index.ts index 466238d..c3868e1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -25,10 +25,6 @@ export const interfaceVersion = 2 export type TsResolverOptions = SyncOpts & { alwaysTryTypes?: boolean - /** - * @deprecated use `project` instead - */ - directory?: string[] | string project?: string[] | string extensions?: string[] packageFilter?: (pkg: Record) => Record @@ -257,18 +253,6 @@ function initMappers(options: TsResolverOptions) { return } - // eslint-disable-next-line sonar/deprecation - if (options.directory) { - console.warn( - `[${IMPORTER_NAME}]: option \`directory\` is deprecated, please use \`project\` instead`, - ) - - if (!options.project) { - // eslint-disable-next-line sonar/deprecation - options.project = options.directory - } - } - const configPaths = typeof options.project === 'string' ? [options.project]