Skip to content

Conversation

czy88840616
Copy link
Member

No description provided.

@czy88840616 czy88840616 requested a review from Copilot July 6, 2025 15:23
@czy88840616 czy88840616 merged commit 91dd5c5 into master Jul 6, 2025
10 checks passed
@czy88840616 czy88840616 deleted the add_v4_template branch July 6, 2025 15:23
Copy link

@Copilot Copilot AI left a 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] 请将此占位符替换为实际的使用说明或将其删除,以保持文档清晰。
<!-- 在此次添加使用文档 -->

Comment on lines +4 to +6
describe('test/controller/home.test.ts', () => {

it('should POST /api/get_user', async () => {
Copy link
Preview

Copilot AI Jul 6, 2025

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.

Suggested change
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"
Copy link
Preview

Copilot AI Jul 6, 2025

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.

Suggested change
"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) {
Copy link
Preview

Copilot AI Jul 6, 2025

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.

Suggested change
async getUser(@Query('uid') uid) {
async getUser(@Query('uid') uid: number) {

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant