-
Notifications
You must be signed in to change notification settings - Fork 18
feat: add v4 template #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-koa
example with metadata, scaffolding, config, tests and docs - Refactor
scripts/prepare.sh
,package.json
,lerna.json
and 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 () => { |
Copilot uses AI. Check for mistakes.
"author": "Harry Chen <[email protected]>", | ||
"repository": { | ||
"type": "git", | ||
"url": "http://github.com/midwayjs/midway-boilerplate.git" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[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" |
Copilot uses AI. Check for mistakes.
userService: UserService; | ||
|
||
@Get('/get_user') | ||
async getUser(@Query('uid') uid) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[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) { |
Copilot uses AI. Check for mistakes.
No description provided.