diff --git a/lerna.json b/lerna.json index ca5f3573d..efebebf85 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,6 @@ { "npmClient": "yarn", + "useWorkspaces": true, "packages": [ "packages/*" ], diff --git a/packages/cli-core/jest.config.js b/packages/cli-core/jest.config.js index b99936600..fc0542574 100644 --- a/packages/cli-core/jest.config.js +++ b/packages/cli-core/jest.config.js @@ -9,10 +9,10 @@ module.exports = { }, coverageThreshold: { global: { - statements: 73.68, - branches: 70.84, + statements: 73.59, + branches: 70.62, functions: 52.15, - lines: 73.68 + lines: 73.59 } }, }; diff --git a/packages/cli/src/commands/add/AddCmd.ts b/packages/cli/src/commands/add/AddCmd.ts index 3345075d0..1ab3b95ce 100644 --- a/packages/cli/src/commands/add/AddCmd.ts +++ b/packages/cli/src/commands/add/AddCmd.ts @@ -7,7 +7,8 @@ import { createSubTasks, PackageManagersModule, ProjectPackageJson, - QuestionOptions + QuestionOptions, + Task } from "@tsed/cli-core"; export interface AddCmdOptions extends CliDefaultOptions { @@ -49,7 +50,7 @@ export class AddCmd implements CommandProvider { ]; } - $exec(ctx: AddCmdOptions) { + $exec(ctx: AddCmdOptions): Task[] { this.packageJson.addDevDependency(ctx.name, "latest"); return [ diff --git a/packages/cli/src/commands/init/InitCmd.ts b/packages/cli/src/commands/init/InitCmd.ts index cf7c9e5ac..4a604842b 100644 --- a/packages/cli/src/commands/init/InitCmd.ts +++ b/packages/cli/src/commands/init/InitCmd.ts @@ -15,7 +15,8 @@ import { PackageManagersModule, ProjectPackageJson, QuestionOptions, - RootRendererService + RootRendererService, + Task } from "@tsed/cli-core"; import {paramCase, pascalCase} from "change-case"; import {basename, join} from "path"; @@ -289,7 +290,7 @@ export class InitCmd implements CommandProvider { ); } - async $exec(ctx: InitCmdContext) { + async $exec(ctx: InitCmdContext): Promise { this.checkPrecondition(ctx); const subTasks = [ diff --git a/packages/cli/src/commands/update/UpdateCmd.ts b/packages/cli/src/commands/update/UpdateCmd.ts index d06ef62fb..128e9e571 100644 --- a/packages/cli/src/commands/update/UpdateCmd.ts +++ b/packages/cli/src/commands/update/UpdateCmd.ts @@ -8,7 +8,8 @@ import { NpmRegistryClient, PackageManagersModule, ProjectPackageJson, - QuestionOptions + QuestionOptions, + Task } from "@tsed/cli-core"; import {getValue} from "@tsed/core"; import semver from "semver"; @@ -70,7 +71,7 @@ export class UpdateCmd implements CommandProvider { ]; } - async $exec(ctx: UpdateCmdContext) { + async $exec(ctx: UpdateCmdContext): Promise { Object.keys(this.projectPackage.dependencies).forEach((pkg: string) => { if (shouldUpdate(pkg)) { this.projectPackage.addDependency(pkg, ctx.version); diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json index 3fea65865..acaac5714 100644 --- a/packages/cli/tsconfig.json +++ b/packages/cli/tsconfig.json @@ -3,6 +3,7 @@ "compilerOptions": { "baseUrl": ".", "module": "commonjs", + "moduleResolution": "Node16", "rootDir": "src", "outDir": "./lib/cjs", "declaration": true,