Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new v4 Koa boilerplate template for Midway and wires it into the monorepo’s scripts and CI.
- Add
v4/midway-framework-koaexample with metadata, scaffolding, config, tests and docs - Refactor
scripts/prepare.sh,package.json,lerna.jsonand boilerplate registry to include v4 - Expand GitHub Actions to run v4 tests on Linux and Windows
Reviewed Changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| v4/midway-framework-koa/package.json | Define new v4 Koa example package metadata |
| v4/midway-framework-koa/boilerplate | Add scaffolding: src, tests, config, docs |
| scripts/prepare.sh | Refactor test runner to support v4 packages |
| package.json | Point test_once script at v4 template |
| lerna.json | Include v4/* in monorepo packages |
| midway-boilerplate-list/index.js | Register new koa-v4 boilerplate entry |
| .github/workflows/nodejs.yml | Add v4 jobs (Linux & Windows) to CI matrix |
Comments suppressed due to low confidence (2)
v4/midway-framework-koa/boilerplate/README.md:5
- [nitpick] Replace this placeholder with actual quick-start instructions or remove it to avoid confusion.
<!-- add docs here for user -->
v4/midway-framework-koa/boilerplate/README.zh-CN.md:5
- [nitpick] 请将此占位符替换为实际的使用说明或将其删除,以保持文档清晰。
<!-- 在此次添加使用文档 -->
| describe('test/controller/home.test.ts', () => { | ||
|
|
||
| it('should POST /api/get_user', async () => { |
There was a problem hiding this comment.
The test suite description refers to home.test.ts and mentions POST, but this is the API test for GET /api/get_user. Update the describe to reference api.test.ts and adjust the test name to should GET /api/get_user.
| describe('test/controller/home.test.ts', () => { | |
| it('should POST /api/get_user', async () => { | |
| describe('test/controller/api.test.ts', () => { | |
| it('should GET /api/get_user', async () => { |
| "author": "Harry Chen <[email protected]>", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "http://github.com/midwayjs/midway-boilerplate.git" |
There was a problem hiding this comment.
[nitpick] For secure cloning, consider using https://github.com/midwayjs/midway-boilerplate.git instead of http.
| "url": "http://github.com/midwayjs/midway-boilerplate.git" | |
| "url": "https://github.com/midwayjs/midway-boilerplate.git" |
| userService: UserService; | ||
|
|
||
| @Get('/get_user') | ||
| async getUser(@Query('uid') uid) { |
There was a problem hiding this comment.
[nitpick] Consider adding a type annotation for uid (e.g. @Query('uid') uid: number) to improve type safety and readability.
| async getUser(@Query('uid') uid) { | |
| async getUser(@Query('uid') uid: number) { |
No description provided.