From 2ae2cbc39e12c6394de88cb39c17c2374fd54c30 Mon Sep 17 00:00:00 2001 From: York Yao Date: Wed, 17 Feb 2021 17:41:42 +0800 Subject: [PATCH] fix: move getProjectRootNamesAndCompilerOptions to core and fix glob and minimatch usage error #79 --- package.json | 2 +- packages/core/package.json | 2 +- packages/core/src/core.ts | 4 ++-- packages/core/src/tsconfig.json | 1 + packages/{utils => core}/src/tsconfig.ts | 2 +- packages/utils/package.json | 1 - packages/utils/src/index.ts | 1 - 7 files changed, 6 insertions(+), 7 deletions(-) rename packages/{utils => core}/src/tsconfig.ts (99%) diff --git a/package.json b/package.json index 218c15b..a85eee0 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,6 @@ ], "private": true, "typeCoverage": { - "atLeast": 98.91 + "atLeast": 96.92 } } diff --git a/packages/core/package.json b/packages/core/package.json index 27fd3fe..a186d1b 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -8,8 +8,8 @@ "author": "york yao ", "license": "MIT", "dependencies": { + "glob": "7", "minimatch": "3", - "ts-lib-utils": "^2.15.0", "tslib": "1 || 2", "tsutils": "3" }, diff --git a/packages/core/src/core.ts b/packages/core/src/core.ts index 0c972c6..3c6739d 100644 --- a/packages/core/src/core.ts +++ b/packages/core/src/core.ts @@ -1,7 +1,7 @@ import * as ts from 'typescript' import * as path from 'path' -import minimatch from 'minimatch' -import { getProjectRootNamesAndCompilerOptions } from 'ts-lib-utils' +import minimatch = require('minimatch') +import { getProjectRootNamesAndCompilerOptions } from './tsconfig' import { FileContext, diff --git a/packages/core/src/tsconfig.json b/packages/core/src/tsconfig.json index 04deb07..8a96bc0 100644 --- a/packages/core/src/tsconfig.json +++ b/packages/core/src/tsconfig.json @@ -4,6 +4,7 @@ "outDir": "../dist", "module": "commonjs", "esModuleInterop": false, + "target": "ES2018", "declaration": true }, "files": [ diff --git a/packages/utils/src/tsconfig.ts b/packages/core/src/tsconfig.ts similarity index 99% rename from packages/utils/src/tsconfig.ts rename to packages/core/src/tsconfig.ts index 2d969f5..40e4d56 100644 --- a/packages/utils/src/tsconfig.ts +++ b/packages/core/src/tsconfig.ts @@ -1,7 +1,7 @@ import * as ts from 'typescript' import * as fs from 'fs' import * as path from 'path' -import glob from 'glob' +import glob = require('glob') /** * @public diff --git a/packages/utils/package.json b/packages/utils/package.json index 7c9cd9f..41495f4 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -9,7 +9,6 @@ "author": "york yao ", "license": "MIT", "dependencies": { - "glob": "7", "tslib": "1 || 2" }, "publishConfig": { diff --git a/packages/utils/src/index.ts b/packages/utils/src/index.ts index 788ff09..5e2786a 100644 --- a/packages/utils/src/index.ts +++ b/packages/utils/src/index.ts @@ -1,3 +1,2 @@ -export * from './tsconfig' export * from './language-service' export * from './js-doc'