Skip to content

Commit 1cf876c

Browse files
build - v1.8.1
1 parent 728e21c commit 1cf876c

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

dist/src/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,6 @@ async function createDB(opts) {
7474
if (throwUnsupportedError) {
7575
throw `A version of MySQL is installed on your system that is not supported by this package. If you want to download a MySQL binary instead of getting this error, please set the option "ignoreUnsupportedSystemVersion" to true.`;
7676
}
77-
if (options.version && (0, semver_1.lt)(options.version, constants_1.MIN_SUPPORTED_MYSQL)) {
78-
//The difference between the throw here and the throw above is this throw is because the selected "version" is not supported.
79-
//The throw above is because the system-installed MySQL is out of date and "ignoreUnsupportedSystemVersion" is not set to true.
80-
throw `The selected version of MySQL (${options.version}) is not currently supported by this package. Please choose a different version to use.`;
81-
}
8277
logger.log('Version currently installed:', version);
8378
if (version === null || (options.version && !(0, semver_1.satisfies)(version.version, options.version)) || unsupportedMySQLIsInstalled) {
8479
let binaryInfo;
@@ -94,6 +89,11 @@ async function createDB(opts) {
9489
}
9590
throw `A MySQL binary could not be found that supports your OS (${os.platform()} | ${os.version()} | ${os.release()}) and CPU architecture (${os.arch()}). Please check you have the latest version of mysql-memory-server. If the latest version still doesn't support your OS and CPU architecture, feel free to make a pull request to add support!`;
9691
}
92+
if ((0, semver_1.lt)(binaryInfo.version, constants_1.MIN_SUPPORTED_MYSQL)) {
93+
//The difference between the throw here and the throw above is this throw is because the selected "version" is not supported.
94+
//The throw above is because the system-installed MySQL is out of date and "ignoreUnsupportedSystemVersion" is not set to true.
95+
throw `The selected version of MySQL (${options.version}) is not currently supported by this package. Please choose a different version to use.`;
96+
}
9797
try {
9898
binaryFilepath = await (0, Downloader_1.downloadBinary)(binaryInfo, options, logger);
9999
}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mysql-memory-server",
3-
"version": "1.8.0",
3+
"version": "1.8.1",
44
"description": "Spin up an ephemeral MySQL database from your JavaScript code",
55
"main": "dist/src/index.js",
66
"types": "dist/src/index.d.ts",

0 commit comments

Comments
 (0)