Skip to content

Commit

Permalink
chore: enhance build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Jul 31, 2022
1 parent a0d32ee commit 938413a
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 39 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@ jobs:
with:
path: yarn.lock
key: yarn-lock-${{ github.sha }}
restore-keys: yarn-lock-
- name: Restore Cache
uses: actions/cache@v2
with:
path: ${{ steps.cache.outputs.value }}
key: yarn-cache-${{ github.sha }}-node-16
restore-keys: yarn-cache-
- name: Install
run: yarn

Expand Down Expand Up @@ -131,8 +129,6 @@ jobs:
restore-keys: yarn-cache-${{ github.sha }}-node
- name: Install
run: yarn
- name: Build JS
run: yarn compile
- name: Unit Test
run: yarn test:json
- name: Report Coverage
Expand Down
2 changes: 1 addition & 1 deletion build/template/koishi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins:
sandbox: null
insight: null
dataview: null
manager: null
market: null
status: null
logger: null
chat: null
Expand Down
23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"satori": "yarn workspace @root/satori",
"yakumo": "yarn workspace @root/yakumo",
"clean": "node -r esbuild-register build/clean",
"compile": "yakumo esbuild",
"build": "yakumo esbuild && yakumo tsc",
"bump": "yakumo version",
"dep": "yakumo upgrade",
Expand All @@ -41,7 +42,7 @@
"test:html": "shx rm -rf coverage && c8 -r html yarn test",
"test:text": "shx rm -rf coverage && c8 -r text yarn test",
"scaffold": "shx rm -rf test && shx cp -rf build/template/ test/ && yarn",
"start": "yakumo esbuild && yarn workspace test dev",
"start": "yarn compile cli && yarn workspace test dev",
"shiki": "yarn workspace bot-shiki"
},
"license": "MIT",
Expand All @@ -53,19 +54,19 @@
"@types/cross-spawn": "^6.0.2",
"@types/fs-extra": "^9.0.13",
"@types/mocha": "^9.1.1",
"@types/node": "^17.0.35",
"@types/semver": "^7.3.9",
"@types/node": "^17.0.45",
"@types/semver": "^7.3.10",
"@types/sinonjs__fake-timers": "^6.0.4",
"@types/source-map-support": "^0.5.4",
"@typescript-eslint/eslint-plugin": "^5.26.0",
"@typescript-eslint/parser": "^5.26.0",
"c8": "^7.11.3",
"@typescript-eslint/eslint-plugin": "^5.31.0",
"@typescript-eslint/parser": "^5.31.0",
"c8": "^7.12.0",
"cac": "^6.7.12",
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"cross-env": "^7.0.3",
"cross-spawn": "^7.0.3",
"esbuild": "^0.14.48",
"esbuild": "^0.14.51",
"esbuild-register": "^3.3.3",
"eslint": "^7.32.0",
"eslint-config-standard": "^16.0.3",
Expand All @@ -76,21 +77,21 @@
"eslint-plugin-promise": "^5.2.0",
"fs-extra": "^10.1.0",
"globby": "^11.1.0",
"jest-mock": "^28.1.0",
"kleur": "^4.1.4",
"jest-mock": "^28.1.3",
"kleur": "^4.1.5",
"latest-version": "^5.1.0",
"mocha": "^9.2.2",
"ora": "^5.4.1",
"prompts": "^2.4.2",
"semver": "^7.3.7",
"shx": "^0.3.4",
"source-map-support": "^0.5.21",
"typescript": "^4.7.2",
"typescript": "^4.7.4",
"yakumo": "^0.3.1",
"yakumo-mocha": "^0.3.0",
"yakumo-publish": "^0.3.0",
"yakumo-tsc": "^0.3.0",
"yakumo-upgrade": "^0.3.0",
"yakumo-upgrade": "^0.3.1",
"yakumo-version": "^0.3.0",
"yml-register": "^1.0.0"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/bootstrap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
},
"dependencies": {
"@koishijs/loader": "^1.0.1",
"kleur": "^4.1.4",
"kleur": "^4.1.5",
"which-pm-runs": "^1.1.0",
"yargs-parser": "^21.0.1"
}
}
}
1 change: 0 additions & 1 deletion packages/bootstrap/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"compilerOptions": {
"rootDir": "src",
"outDir": "lib",
"emitDeclarationOnly": false,
},
"include": [
"src",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"chokidar": "^3.5.3",
"dotenv": "^16.0.1",
"ns-require": "^1.1.4",
"kleur": "^4.1.4",
"kleur": "^4.1.5",
"prompts": "^2.4.2",
"throttle-debounce": "^3.0.1"
}
Expand Down
1 change: 0 additions & 1 deletion packages/cli/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"compilerOptions": {
"rootDir": "src",
"outDir": "lib",
"emitDeclarationOnly": false,
},
"include": [
"src",
Expand Down
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@koishijs/core",
"description": "Core Features for Koishi",
"version": "4.8.3",
"main": "lib/node.js",
"module": "lib/browser.js",
"main": "lib/index.cjs",
"module": "lib/index.mjs",
"typings": "lib/index.d.ts",
"files": [
"lib"
Expand Down Expand Up @@ -33,7 +33,7 @@
"@koishijs/utils": "^6.0.0",
"@satorijs/core": "^1.0.6",
"cordis": "^2.0.6",
"fastest-levenshtein": "^1.0.12",
"fastest-levenshtein": "^1.0.14",
"minato": "^1.2.3"
}
}
5 changes: 2 additions & 3 deletions packages/create/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "create-koishi",
"description": "Setup a Koishi application",
"version": "5.1.5",
"main": "lib/index.js",
"engines": {
"node": "^12 || >=14"
},
Expand Down Expand Up @@ -35,10 +34,10 @@
"dependencies": {
"axios": "^0.24.0",
"cross-spawn": "^7.0.3",
"kleur": "^4.1.4",
"kleur": "^4.1.5",
"prompts": "^2.4.2",
"tar": "^6.1.11",
"which-pm-runs": "^1.1.0",
"yargs-parser": "^21.0.1"
}
}
}
2 changes: 1 addition & 1 deletion packages/koishi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@koishijs/core": "^4.8.3",
"@koishijs/utils": "^6.0.0",
"@satorijs/satori": "^1.0.6",
"file-type": "^16.5.3",
"file-type": "^16.5.4",
"ns-require": "^1.1.4"
}
}
2 changes: 1 addition & 1 deletion packages/koishi/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Koishi 是一个现代化跨平台机器人框架,目前可支持 [QQ](https:/
- 支持 QQ,Telegram,Discord 等主流聊天平台,支持多账户和跨平台数据互通
- 随时随地通过控制面板监控运行状态,控制机器人的行为,甚至上号聊天

参见:[模板项目](https://koishi.js.org/manual/starter/installation.html)
参见:[创建模板项目](https://koishi.js.org/manual/starter/boilerplate.html)

### 功能强大的 API

Expand Down
6 changes: 3 additions & 3 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@koishijs/utils",
"description": "Utilities for Koishi",
"version": "6.0.0",
"main": "lib/node.js",
"module": "lib/browser.js",
"main": "lib/index.cjs",
"module": "lib/index.mjs",
"typings": "lib/index.d.ts",
"files": [
"lib"
Expand Down Expand Up @@ -32,6 +32,6 @@
"dependencies": {
"cosmokit": "^1.2.1",
"reggol": "^1.0.3",
"schemastery": "^3.5.0"
"schemastery": "^3.5.1"
}
}
2 changes: 1 addition & 1 deletion plugins/assets/git/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
"koishi": "^4.8.3"
},
"dependencies": {
"simple-git": "^3.7.1"
"simple-git": "^3.11.0"
}
}
2 changes: 1 addition & 1 deletion plugins/assets/local/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
"koishi": "^4.8.3"
},
"dependencies": {
"file-type": "^16.5.3"
"file-type": "^16.5.4"
}
}
2 changes: 1 addition & 1 deletion plugins/assets/s3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@
"koishi": "^4.8.3"
},
"dependencies": {
"@aws-sdk/client-s3": "^3.95.0"
"@aws-sdk/client-s3": "^3.137.0"
}
}
4 changes: 2 additions & 2 deletions plugins/database/level/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@koishijs/plugin-database-level",
"description": "LevelDB implementation for Koishi",
"version": "1.4.1",
"main": "lib/node.js",
"module": "lib/browser.js",
"main": "lib/index.cjs",
"module": "lib/index.mjs",
"typings": "lib/index.d.ts",
"files": [
"lib"
Expand Down
4 changes: 2 additions & 2 deletions plugins/database/memory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@koishijs/plugin-database-memory",
"description": "A in-memory database implementation for Koishi",
"version": "1.4.1",
"main": "lib/node.js",
"module": "lib/browser.js",
"main": "lib/index.cjs",
"module": "lib/index.mjs",
"typings": "lib/index.d.ts",
"files": [
"lib"
Expand Down

0 comments on commit 938413a

Please sign in to comment.