Skip to content
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

feat: use mysql2 #671

Merged
merged 1 commit into from
Apr 15, 2024
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
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",
Copy link
Contributor

Choose a reason for hiding this comment

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

Tip

Codebase Verification

The verification process did not yield relevant information regarding the compatibility of leoric with mysql2. The search results pertained to a different project, indicating that the necessary evidence to confirm compatibility was not found. Further investigation into leoric's official documentation or release notes specifically addressing mysql2 support might be required.

Analysis chain

Updated leoric to ^2.12.3. Ensure compatibility with mysql2 as part of this upgrade.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the new version of leoric supports mysql2
rg --files-with-matches 'mysql2' --glob '*.{js,ts}' | xargs grep 'leoric'

Length of output: 183



Script:

#!/bin/bash
# Search for mentions of mysql2 in the documentation or release notes of leoric
rg --files-with-matches 'mysql2' --glob '*.{md,txt}' | xargs grep -i 'support'

Length of output: 3729

"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
Loading