feat: use mysql2 (#671)
https://github.com/cyjake/leoric/pull/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 -->
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user