From 9258aabc22cae7d1d9f84f559934c38e2d25059c Mon Sep 17 00:00:00 2001 From: Harry Chen Date: Sun, 14 Jan 2024 22:17:57 +0800 Subject: [PATCH 1/3] chore: use mwtsc build --- v3/midway-component/boilerplate/_package.json | 8 ++++---- v3/midway-framework-express/boilerplate/_package.json | 10 +++++----- v3/midway-framework-koa-esm/boilerplate/_package.json | 2 +- v3/midway-framework-koa/boilerplate/_package.json | 10 +++++----- v3/midway-quick-start/boilerplate/_package.json | 9 +++++---- .../boilerplate/_package.json | 4 ++-- 6 files changed, 22 insertions(+), 21 deletions(-) diff --git a/v3/midway-component/boilerplate/_package.json b/v3/midway-component/boilerplate/_package.json index 3a3aa8a..be233a2 100644 --- a/v3/midway-component/boilerplate/_package.json +++ b/v3/midway-component/boilerplate/_package.json @@ -5,9 +5,9 @@ "main": "dist/index.js", "typings": "index.d.ts", "scripts": { - "build": "cross-env midway-bin build -c", - "test": "cross-env midway-bin test --ts", - "cov": "cross-env midway-bin cov --ts", + "build": "mwtsc --clean-build", + "test": "cross-env NODE_ENV=unittest jest", + "cov": "jest --coverage", "lint": "mwts check", "lint:fix": "mwts fix" }, @@ -20,7 +20,6 @@ ], "license": "MIT", "devDependencies": { - "@midwayjs/cli": "^2.0.0", "@midwayjs/core": "^3.12.0", "@midwayjs/logger": "^3.1.0", "@midwayjs/mock": "^3.12.0", @@ -29,6 +28,7 @@ "cross-env": "^6.0.0", "jest": "^29.2.2", "mwts": "^1.3.0", + "mwtsc": "^1.4.0", "ts-jest": "^29.0.3", "typescript": "~4.8.0" } diff --git a/v3/midway-framework-express/boilerplate/_package.json b/v3/midway-framework-express/boilerplate/_package.json index 9636133..455fcdd 100644 --- a/v3/midway-framework-express/boilerplate/_package.json +++ b/v3/midway-framework-express/boilerplate/_package.json @@ -11,7 +11,6 @@ "@midwayjs/logger": "^3.1.0" }, "devDependencies": { - "@midwayjs/cli": "^2.0.0", "@midwayjs/mock": "^3.12.0", "@types/body-parser": "^1.19.2", "@types/express": "^4.17.13", @@ -21,6 +20,7 @@ "cross-env": "^6.0.0", "jest": "^29.2.2", "mwts": "^1.3.0", + "mwtsc": "^1.4.0", "ts-jest": "^29.0.3", "typescript": "~4.8.0" }, @@ -29,13 +29,13 @@ }, "scripts": { "start": "NODE_ENV=production node ./bootstrap.js", - "dev": "cross-env NODE_ENV=local midway-bin dev --ts", - "test": "midway-bin test --ts", - "cov": "midway-bin cov --ts", + "dev": "cross-env NODE_ENV=local mwtsc --watch --run @midwayjs/mock/app.js", + "test": "cross-env NODE_ENV=unittest jest", + "cov": "jest --coverage", "lint": "mwts check", "lint:fix": "mwts fix", "ci": "npm run cov", - "build": "midway-bin build -c" + "build": "mwtsc --clean-build" }, "midway-bin-clean": [ ".vscode/.tsbuildinfo", diff --git a/v3/midway-framework-koa-esm/boilerplate/_package.json b/v3/midway-framework-koa-esm/boilerplate/_package.json index d97c175..16e596d 100644 --- a/v3/midway-framework-koa-esm/boilerplate/_package.json +++ b/v3/midway-framework-koa-esm/boilerplate/_package.json @@ -37,7 +37,7 @@ "lint": "mwts check", "lint:fix": "mwts fix", "ci": "npm run cov", - "build": "cross-env rm -rf dist && tsc" + "build": "mwtsc --clean-build" }, "repository": { "type": "git", diff --git a/v3/midway-framework-koa/boilerplate/_package.json b/v3/midway-framework-koa/boilerplate/_package.json index 6a67405..33926d9 100644 --- a/v3/midway-framework-koa/boilerplate/_package.json +++ b/v3/midway-framework-koa/boilerplate/_package.json @@ -13,7 +13,6 @@ "@midwayjs/validate": "^3.12.0" }, "devDependencies": { - "@midwayjs/cli": "^2.0.0", "@midwayjs/mock": "^3.12.0", "@types/jest": "^29.2.0", "@types/koa": "^2.13.4", @@ -21,6 +20,7 @@ "cross-env": "^6.0.0", "jest": "^29.2.2", "mwts": "^1.3.0", + "mwtsc": "^1.4.0", "ts-jest": "^29.0.3", "typescript": "~4.8.0" }, @@ -29,13 +29,13 @@ }, "scripts": { "start": "NODE_ENV=production node ./bootstrap.js", - "dev": "cross-env NODE_ENV=local midway-bin dev --ts", - "test": "midway-bin test --ts", - "cov": "midway-bin cov --ts", + "dev": "cross-env NODE_ENV=local mwtsc --watch --run @midwayjs/mock/app.js", + "test": "cross-env NODE_ENV=unittest jest", + "cov": "jest --coverage", "lint": "mwts check", "lint:fix": "mwts fix", "ci": "npm run cov", - "build": "midway-bin build -c" + "build": "mwtsc --clean-build" }, "midway-bin-clean": [ ".vscode/.tsbuildinfo", diff --git a/v3/midway-quick-start/boilerplate/_package.json b/v3/midway-quick-start/boilerplate/_package.json index 1009fa6..b1d679b 100644 --- a/v3/midway-quick-start/boilerplate/_package.json +++ b/v3/midway-quick-start/boilerplate/_package.json @@ -23,6 +23,7 @@ "cross-env": "^6.0.0", "jest": "^29.2.2", "mwts": "^1.3.0", + "mwtsc": "^1.4.0", "ts-jest": "^29.0.3", "typescript": "~4.8.0" }, @@ -31,13 +32,13 @@ }, "scripts": { "start": "NODE_ENV=production node ./bootstrap.js", - "dev": "cross-env NODE_ENV=local midway-bin dev --ts", - "test": "midway-bin test --ts", - "cov": "midway-bin cov --ts", + "dev": "cross-env NODE_ENV=local mwtsc --watch --run @midwayjs/mock/app.js", + "test": "cross-env NODE_ENV=unittest jest", + "cov": "jest --coverage", "lint": "mwts check", "lint:fix": "mwts fix", "ci": "npm run cov", - "build": "midway-bin build -c" + "build": "mwtsc --clean-build" }, "midway-bin-clean": [ ".vscode/.tsbuildinfo", diff --git a/v3/midway-serverless-http-new/boilerplate/_package.json b/v3/midway-serverless-http-new/boilerplate/_package.json index fa890e1..768aa3f 100644 --- a/v3/midway-serverless-http-new/boilerplate/_package.json +++ b/v3/midway-serverless-http-new/boilerplate/_package.json @@ -18,7 +18,7 @@ "lint": "mwts check", "lint:fix": "mwts fix", "ci": "npm run cov", - "build": "cross-env rm -rf dist && tsc" + "build": "mwtsc --clean-build" }, "dependencies": { "@midwayjs/core": "^3.12.0", @@ -34,7 +34,7 @@ "cross-env": "^7.0.3", "mocha": "^10.2.0", "mwts": "^1.3.0", - "mwtsc": "^1.0.0", + "mwtsc": "^1.4.0", "ts-node": "^10.9.1", "typescript": "~5.1.0" } From f51e80bfce14c35188388e9292da8b819a5c2c1e Mon Sep 17 00:00:00 2001 From: Harry Chen Date: Sun, 14 Jan 2024 22:19:33 +0800 Subject: [PATCH 2/3] chore: remove cli --- v3/midway-quick-start/boilerplate/_package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/v3/midway-quick-start/boilerplate/_package.json b/v3/midway-quick-start/boilerplate/_package.json index b1d679b..d4e68a2 100644 --- a/v3/midway-quick-start/boilerplate/_package.json +++ b/v3/midway-quick-start/boilerplate/_package.json @@ -15,7 +15,6 @@ "@midwayjs/view-nunjucks": "^3.4.12" }, "devDependencies": { - "@midwayjs/cli": "^2.0.0", "@midwayjs/mock": "^3.12.0", "@types/jest": "^29.2.0", "@types/koa": "^2.13.4", From f0590092b1d7498bdd0567d2212f41536de539a7 Mon Sep 17 00:00:00 2001 From: Harry Chen Date: Sun, 14 Jan 2024 22:20:36 +0800 Subject: [PATCH 3/3] chore: update mwtsc version --- v3/midway-framework-koa-esm/boilerplate/_package.json | 2 +- v3/midway-serverless-http-new-esm/boilerplate/_package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/v3/midway-framework-koa-esm/boilerplate/_package.json b/v3/midway-framework-koa-esm/boilerplate/_package.json index 16e596d..9a9516e 100644 --- a/v3/midway-framework-koa-esm/boilerplate/_package.json +++ b/v3/midway-framework-koa-esm/boilerplate/_package.json @@ -22,7 +22,7 @@ "cross-env": "^7.0.3", "mocha": "^10.2.0", "mwts": "^1.3.0", - "mwtsc": "^1.0.0", + "mwtsc": "^1.4.0", "ts-node": "^10.9.1", "typescript": "~5.1.0" }, diff --git a/v3/midway-serverless-http-new-esm/boilerplate/_package.json b/v3/midway-serverless-http-new-esm/boilerplate/_package.json index 31dbaa4..c4aa3ae 100644 --- a/v3/midway-serverless-http-new-esm/boilerplate/_package.json +++ b/v3/midway-serverless-http-new-esm/boilerplate/_package.json @@ -33,7 +33,7 @@ "cross-env": "^7.0.3", "mocha": "^10.2.0", "mwts": "^1.3.0", - "mwtsc": "^1.0.0", + "mwtsc": "^1.4.0", "ts-node": "^10.9.1", "typescript": "~5.1.0" },