From ad6ceb21cbe7487d6deb6c7c8bfd34a56b3dfe91 Mon Sep 17 00:00:00 2001 From: waiting <1661926154@qq.com> Date: Fri, 22 Mar 2024 22:10:49 +0800 Subject: [PATCH] chore: update package.json files --- packages/kmore-cli/package.json | 3 ++- packages/kmore-cli/test/01.index.test.ts | 2 ++ packages/kmore-types/package.json | 3 ++- packages/kmore/package.json | 3 ++- packages/midway-component-kmore/package.json | 3 ++- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/kmore-cli/package.json b/packages/kmore-cli/package.json index 86f364fd0..45c067aca 100644 --- a/packages/kmore-cli/package.json +++ b/packages/kmore-cli/package.json @@ -67,6 +67,7 @@ }, "scripts": { "build": "npm run tsc && tsc-alias && npm run rp", + "build:test": "tsc -p test/tsconfig.json", "clean": "npm run clean:lock && npm run clean:dist && npm run clean:log", "clean:cache": "rm -rf .eslintcache .tsbuildinfo", "clean:dist": "npm run clean:cache && rm -rf dist/*", @@ -75,7 +76,7 @@ "cov": "c8 --all npm run test -- --parallel=false", "lint": "eslint --fix --cache src test", "lint:nofix": "eslint --cache src test", - "pretest": "npm run build", + "pretest": "npm run build && npm run build:test", "rp": "tsx bin-hashbang.js", "test": "cross-env NODE_ENV=test TS_NODE_PROJECT=test/tsconfig.json mocha --parallel=false", "tsc": "tsc -b" diff --git a/packages/kmore-cli/test/01.index.test.ts b/packages/kmore-cli/test/01.index.test.ts index dc9009c7c..d2cf52682 100644 --- a/packages/kmore-cli/test/01.index.test.ts +++ b/packages/kmore-cli/test/01.index.test.ts @@ -10,7 +10,9 @@ describe(fileShortPath(import.meta.url), () => { describe('should work', () => { it('foo', () => { assert(typeof Src === 'object', 'typeof Src !== "object"') + // @ts-expect-error if (typeof Src.foo === 'number') { + // @ts-expect-error assert(Src.foo === 1) } }) diff --git a/packages/kmore-types/package.json b/packages/kmore-types/package.json index 15933843d..80785f902 100644 --- a/packages/kmore-types/package.json +++ b/packages/kmore-types/package.json @@ -56,6 +56,7 @@ }, "scripts": { "build": "npm run tsc && tsc-alias && npm run rp", + "build:test": "tsc -p test/tsconfig.json", "clean": "npm run clean:lock && npm run clean:dist && npm run clean:log", "clean:cache": "rm -rf .eslintcache .tsbuildinfo", "clean:dist": "npm run clean:cache && rm -rf dist/*", @@ -64,7 +65,7 @@ "cov": "c8 --all npm run test -- --parallel=false", "lint": "eslint --fix --cache src test", "lint:nofix": "eslint --cache src test", - "pretest": "npm run build", + "pretest": "npm run build && npm run build:test", "rp": "tsx bin-hashbang.js", "test": "cross-env NODE_ENV=test TS_NODE_PROJECT=test/tsconfig.json mocha --jobs=4", "tsc": "tsc -b" diff --git a/packages/kmore/package.json b/packages/kmore/package.json index d71d765dd..8d9cdff3c 100644 --- a/packages/kmore/package.json +++ b/packages/kmore/package.json @@ -70,6 +70,7 @@ }, "scripts": { "build": "npm run tsc && tsc-alias && npm run rp", + "build:test": "tsc -p test/tsconfig.json", "clean": "npm run clean:lock && npm run clean:dist && npm run clean:log", "clean:cache": "rm -rf .eslintcache .tsbuildinfo", "clean:dist": "npm run clean:cache && rm -rf dist/*", @@ -78,7 +79,7 @@ "cov": "c8 --all npm run test -- --parallel=false", "lint": "eslint --fix --cache src test", "lint:nofix": "eslint --cache src test", - "pretest": "npm run build", + "pretest": "npm run build && npm run build:test", "rp": "tsx bin-hashbang.js", "test": "cross-env NODE_ENV=test TS_NODE_PROJECT=test/tsconfig.json mocha --jobs=2", "tsc": "tsc -b" diff --git a/packages/midway-component-kmore/package.json b/packages/midway-component-kmore/package.json index 6c06c719b..7770fcc1d 100644 --- a/packages/midway-component-kmore/package.json +++ b/packages/midway-component-kmore/package.json @@ -73,6 +73,7 @@ }, "scripts": { "build": "npm run tsc && tsc-alias", + "build:test": "tsc -p test/tsconfig.json", "clean": "npm run clean:lock && npm run clean:dist && npm run clean:log", "clean:cache": "rm -rf .eslintcache .tsbuildinfo", "clean:dist": "npm run clean:cache && rm -rf dist/*", @@ -84,7 +85,7 @@ "lint": "eslint --fix --cache src test", "lint:nofix": "eslint --cache src test", "predev": "npm run build", - "pretest": "npm run build", + "pretest": "npm run build && npm run build:test", "start": "cross-env NODE_ENV=production node ./bootstrap.js", "test": "cross-env MIDWAY_SERVER_ENV=unittest TS_NODE_PROJECT=test/tsconfig.json mocha --parallel=false", "tsc": "tsc -b"