Skip to content

Commit

Permalink
feat: use mysql2 (#671)
Browse files Browse the repository at this point in the history
cyjake/leoric#419

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Updated the database management system to enhance performance and
compatibility.
- **Chores**
	- Upgraded internal libraries to improve stability and security.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
fengmk2 authored Apr 15, 2024
1 parent b94c8ef commit 58d19b1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/config.default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default (appInfo: EggAppConfig) => {
config.dataDir = process.env.CNPMCORE_DATA_DIR || join(appInfo.root, '.cnpmcore');

config.orm = {
client: 'mysql',
client: 'mysql2',
database: process.env.CNPMCORE_MYSQL_DATABASE || process.env.MYSQL_DATABASE || 'cnpmcore',
host: process.env.CNPMCORE_MYSQL_HOST || process.env.MYSQL_HOST || '127.0.0.1',
port: process.env.CNPMCORE_MYSQL_PORT || process.env.MYSQL_PORT || 3306,
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@
"eggjs-elasticsearch": "^0.0.6",
"fs-cnpm": "^2.4.0",
"ioredis": "^5.3.1",
"leoric": "^2.11.5",
"leoric": "^2.12.3",
"lodash": "^4.17.21",
"mime-types": "^2.1.35",
"mysql": "^2.18.1",
"mysql2": "^3.9.4",
"npm-package-arg": "^10.1.0",
"oss-cnpm": "^5.0.1",
"p-map": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion test/TestUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import coffee from 'coffee';
import { tmpdir } from 'os';
import { mkdtempSync } from 'fs';
import { Readable } from 'stream';
import mysql from 'mysql';
import mysql from 'mysql2';
import path from 'path';
import crypto from 'crypto';
import { cleanUserPrefix, getScopeAndName } from '../app/common/PackageUtil';
Expand Down

0 comments on commit 58d19b1

Please sign in to comment.