Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 0 additions & 74 deletions .github/workflows/codeql.yml

This file was deleted.

7 changes: 4 additions & 3 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: CI
on:
push:
branches: [ master ]

pull_request:
branches: [ master ]

Expand All @@ -13,5 +12,7 @@ jobs:
uses: node-modules/github-actions/.github/workflows/node-test-mysql.yml@master
with:
os: 'ubuntu-latest'
version: '16, 18, 20'
mysql_version: '5, 8'
version: '16, 18, 20, 22'
mysql_version: '5, 8, 9'
Comment on lines +15 to +16
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Node.js and MySQL version expansion.

Adding Node.js 22 and MySQL 9 for testing is forward-looking, but be aware that MySQL 9 doesn't exist yet - this will cause test failures for that matrix entry.

      version: '16, 18, 20, 22'
-      mysql_version: '5, 8, 9'
+      mysql_version: '5, 8'

🌐 Web query:

What is the latest stable version of MySQL available?

💡 Result:

The latest stable versions of MySQL depend on the release track chosen, with distinct options available for Long-Term Support (LTS) and Innovation tracks as of March 2025:

LTS Track (Stability-Focused)

  • MySQL 8.4.1 LTS: Released in July 2024, this version is part of the LTS track, providing stability with essential bug fixes and security updates. It is supported under Oracle’s Lifetime Support Policy, including 5 years of premier support[5][9].

Innovation Track (Feature-Rich)

  • MySQL 9.0.0 Innovation: Also released in July 2024, this version introduces new features and improvements for developers in fast-paced environments. Innovation releases are supported until the next Innovation version becomes available[2][5][9].

Key Details:

  • AWS RDS Support: The latest MySQL version on Amazon RDS is 8.0.41, released on February 19, 2025, with standard support until March 2026[1].
  • Versioning Structure:
    • LTS (e.g., 8.4.x): Focuses on stability and extended support.
    • Innovation (e.g., 9.x.x): Prioritizes new features and frequent updates[2][5].
  • Deprecation Note: MySQL 8.0.x versions are being phased out, with MySQL Installer discontinued after 8.0.41[4].

For most production environments requiring stability, MySQL 8.4.1 LTS is recommended. Developers seeking cutting-edge features should opt for MySQL 9.0.0 Innovation[5][9].

Citations:


Action: Remove the unsupported MySQL version from the testing matrix
While including Node.js 22 is forward-looking, keep in mind that—even though MySQL 9.0.0 is now available as an Innovation release—our testing should focus on production-ready, stable releases. For stability (e.g., MySQL 8.4.1 LTS for most production environments), it is best to limit the matrix to versions 5 and 8. Please update the workflow file accordingly:

  • File: .github/workflows/nodejs.yml (Lines 15-16)
  • Required Change:
          version: '16, 18, 20, 22'
    -     mysql_version: '5, 8, 9'
    +     mysql_version: '5, 8'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
version: '16, 18, 20, 22'
mysql_version: '5, 8, 9'
version: '16, 18, 20, 22'
mysql_version: '5, 8'

secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
32 changes: 23 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -433,19 +433,33 @@ const session = new db.literals.Literal('session()');
+---------------+
```

## For the local dev

Run docker compose to start test mysql service

```bash
docker compose -f docker-compose.yml up -d
# if you run the first time, should wait for ~20s to let mysql service init started
```

Run the unit tests

```bash
npm test
```

Stop test mysql service

```bash
docker compose -f docker-compose.yml down
```

## License

[MIT](LICENSE)

<!-- GITCONTRIBUTOR_START -->

## Contributors

|[<img src="https://avatars.githubusercontent.com/u/156269?v=4" width="100px;"/><br/><sub><b>fengmk2</b></sub>](https://github.com/fengmk2)<br/>|[<img src="https://avatars.githubusercontent.com/u/32174276?v=4" width="100px;"/><br/><sub><b>semantic-release-bot</b></sub>](https://github.com/semantic-release-bot)<br/>|[<img src="https://avatars.githubusercontent.com/u/985607?v=4" width="100px;"/><br/><sub><b>dead-horse</b></sub>](https://github.com/dead-horse)<br/>|[<img src="https://avatars.githubusercontent.com/u/6587734?v=4" width="100px;"/><br/><sub><b>AntiMoron</b></sub>](https://github.com/AntiMoron)<br/>|[<img src="https://avatars.githubusercontent.com/u/9213756?v=4" width="100px;"/><br/><sub><b>gxkl</b></sub>](https://github.com/gxkl)<br/>|[<img src="https://avatars.githubusercontent.com/u/10287125?v=4" width="100px;"/><br/><sub><b>nodejh</b></sub>](https://github.com/nodejh)<br/>|
| :---: | :---: | :---: | :---: | :---: | :---: |
|[<img src="https://avatars.githubusercontent.com/u/4192962?v=4" width="100px;"/><br/><sub><b>fangk</b></sub>](https://github.com/fangk)<br/>|[<img src="https://avatars.githubusercontent.com/u/1619030?v=4" width="100px;"/><br/><sub><b>xujihui1985</b></sub>](https://github.com/xujihui1985)<br/>|[<img src="https://avatars.githubusercontent.com/u/1468366?v=4" width="100px;"/><br/><sub><b>csbun</b></sub>](https://github.com/csbun)<br/>|[<img src="https://avatars.githubusercontent.com/u/360661?v=4" width="100px;"/><br/><sub><b>popomore</b></sub>](https://github.com/popomore)<br/>|[<img src="https://avatars.githubusercontent.com/u/12378108?v=4" width="100px;"/><br/><sub><b>hoythan</b></sub>](https://github.com/hoythan)<br/>|[<img src="https://avatars.githubusercontent.com/u/35927028?v=4" width="100px;"/><br/><sub><b>deadhorse123</b></sub>](https://github.com/deadhorse123)<br/>|
[<img src="https://avatars.githubusercontent.com/u/6897780?v=4" width="100px;"/><br/><sub><b>killagu</b></sub>](https://github.com/killagu)<br/>|[<img src="https://avatars.githubusercontent.com/u/3438038?v=4" width="100px;"/><br/><sub><b>qile222</b></sub>](https://github.com/qile222)<br/>|[<img src="https://avatars.githubusercontent.com/u/566097?v=4" width="100px;"/><br/><sub><b>RaoHai</b></sub>](https://github.com/RaoHai)<br/>

This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Tue Jan 30 2024 21:16:24 GMT+0800`.
[![Contributors](https://contrib.rocks/image?repo=node-modules/rds)](https://github.com/node-modules/rds/graphs/contributors)

<!-- GITCONTRIBUTOR_END -->
Made with [contributors-img](https://contrib.rocks).
17 changes: 17 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: eggjs_rds_dev_services_mysql

Comment on lines +1 to +2
Copy link

Copilot AI Mar 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'name' key is not a standard Docker Compose property; consider removing it or replacing it with a valid configuration option such as using the '-p' flag when starting compose.

Suggested change
name: eggjs_rds_dev_services_mysql

Copilot uses AI. Check for mistakes.
services:
mysql:
image: mysql:9
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Invalid MySQL version specified.

MySQL 9 does not exist yet. The latest MySQL version is 8.x (as of March 2025). This will cause the Docker container to fail.

-    image: mysql:9
+    image: mysql:8
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
image: mysql:9
image: mysql:8

environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-}
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: ${MYSQL_DATABASE:-test}
ports:
- 3306:3306
healthcheck:
test: ['CMD', 'mysqladmin', 'ping', '-h', 'localhost']
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"prepublishOnly": "npm run clean && npm run build"
},
"dependencies": {
"mysql2": "^3.9.1"
"mysql2": "^3.9.1",
"sqlstring": "^2.3.3"
},
"devDependencies": {
"@eggjs/tsconfig": "^1.3.2",
Expand All @@ -26,7 +27,6 @@
"egg-bin": "^6.1.2",
"eslint": "^8.29.0",
"eslint-config-egg": "^12.1.0",
"git-contributor": "^2.0.0",
"mm": "^3.3.0",
"typescript": "^5.1.3"
},
Expand Down
10 changes: 5 additions & 5 deletions test/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default {
host: process.env.TEST_ALI_RDS_HOST || '127.0.0.1',
port: parseInt(process.env.TEST_ALI_RDS_PORT || '3306'),
user: process.env.TEST_ALI_RDS_USER || 'root',
password: process.env.TEST_ALI_RDS_PASSWORD || '',
database: process.env.TEST_ALI_RDS_DATABASE || 'test',
host: process.env.TEST_ALI_RDS_HOST ?? '127.0.0.1',
port: parseInt(process.env.TEST_ALI_RDS_PORT ?? '3306'),
user: process.env.TEST_ALI_RDS_USER ?? 'root',
password: process.env.TEST_ALI_RDS_PASSWORD ?? '',
database: process.env.TEST_ALI_RDS_DATABASE ?? 'test',
};