Skip to content

Commit 599ede5

Browse files
build - v1.10.0
1 parent d8c62b6 commit 599ede5

File tree

9 files changed

+69
-356
lines changed

9 files changed

+69
-356
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Download with your package manager of choice. The package name is `mysql-memory-
1717
- ```mysql-memory-server``` can run MySQL versions 5.7.19 and newer (if the version is already installed on your system)
1818
- ```mysql-memory-server``` can download and run MySQL versions 5.7.19 - 9.2.0 (if the version is not already installed on your system)
1919

20-
Extra system requirements apply when ```mysql-memory-server``` is downloading MySQL instead of running a version of MySQL that is already installed on the system. To see the requirements and learn more about the supported versions for download, [read the doc](https://github.com/Sebastian-Webster/mysql-memory-server-nodejs/blob/v1.9.0/docs/SUPPORTED_MYSQL_DOWNLOADS.md)
20+
Extra system requirements apply when ```mysql-memory-server``` is downloading MySQL instead of running a version of MySQL that is already installed on the system. To see the requirements and learn more about the supported versions for download, [read the doc](https://github.com/Sebastian-Webster/mysql-memory-server-nodejs/blob/v1.10.0/docs/SUPPORTED_MYSQL_DOWNLOADS.md)
2121

2222
## Example Usage - Application Code
2323

dist/src/constants.d.ts

+21-14
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ export declare const OPTION_TYPE_CHECKS: OptionTypeChecks;
1717
export declare const MIN_SUPPORTED_MYSQL = "5.7.19";
1818
export declare const downloadsBaseURL = "https://cdn.mysql.com//Downloads/MySQL-";
1919
export declare const archiveBaseURL = "https://cdn.mysql.com/archives/mysql-";
20-
export declare const DOWNLOADABLE_MYSQL_VERSIONS: readonly ["5.7.19", "5.7.20", "5.7.21", "5.7.22", "5.7.23", "5.7.24", "5.7.25", "5.7.26", "5.7.27", "5.7.28", "5.7.29", "5.7.30", "5.7.31", "5.7.32", "5.7.33", "5.7.34", "5.7.35", "5.7.36", "5.7.37", "5.7.38", "5.7.39", "5.7.40", "5.7.41", "5.7.42", "5.7.43", "5.7.44", "8.0.0", "8.0.1", "8.0.2", "8.0.3", "8.0.4", "8.0.11", "8.0.12", "8.0.13", "8.0.14", "8.0.15", "8.0.16", "8.0.17", "8.0.18", "8.0.19", "8.0.20", "8.0.21", "8.0.22", "8.0.23", "8.0.24", "8.0.25", "8.0.26", "8.0.27", "8.0.28", "8.0.30", "8.0.31", "8.0.32", "8.0.33", "8.0.34", "8.0.35", "8.0.36", "8.0.37", "8.0.39", "8.0.40", "8.0.41", "8.1.0", "8.2.0", "8.3.0", "8.4.0", "8.4.2", "8.4.3", "8.4.4", "9.0.1", "9.1.0", "9.2.0"];
20+
export declare const DOWNLOADABLE_MYSQL_VERSIONS: readonly ["5.7.19", "5.7.20", "5.7.21", "5.7.22", "5.7.23", "5.7.24", "5.7.25", "5.7.26", "5.7.27", "5.7.28", "5.7.29", "5.7.30", "5.7.31", "5.7.32", "5.7.33", "5.7.34", "5.7.35", "5.7.36", "5.7.37", "5.7.38", "5.7.39", "5.7.40", "5.7.41", "5.7.42", "5.7.43", "5.7.44", "8.0.0", "8.0.1", "8.0.2", "8.0.3", "8.0.4", "8.0.11", "8.0.12", "8.0.13", "8.0.14", "8.0.15", "8.0.16", "8.0.17", "8.0.18", "8.0.19", "8.0.20", "8.0.21", "8.0.22", "8.0.23", "8.0.24", "8.0.25", "8.0.26", "8.0.27", "8.0.28", "8.0.30", "8.0.31", "8.0.32", "8.0.33", "8.0.34", "8.0.35", "8.0.36", "8.0.37", "8.0.39", "8.0.40", "8.0.41", "8.0.42", "8.1.0", "8.2.0", "8.3.0", "8.4.0", "8.4.2", "8.4.3", "8.4.4", "8.4.5", "9.0.1", "9.1.0", "9.2.0", "9.3.0"];
2121
export declare const MYSQL_ARCH_SUPPORT: {
2222
readonly darwin: {
23-
readonly arm64: "8.0.26 - 9.2.0";
24-
readonly x64: "5.7.19 - 9.2.0";
23+
readonly arm64: "8.0.26 - 9.3.0";
24+
readonly x64: "5.7.19 - 9.3.0";
2525
};
2626
readonly linux: {
27-
readonly arm64: "8.0.31 - 9.2.0";
28-
readonly x64: "5.7.19 - 9.2.0";
27+
readonly arm64: "8.0.31 - 9.3.0";
28+
readonly x64: "5.7.19 - 9.3.0";
2929
};
3030
readonly win32: {
31-
readonly x64: "5.7.19 - 9.2.0";
31+
readonly x64: "5.7.19 - 9.3.0";
3232
};
3333
};
3434
export declare const MYSQL_MIN_OS_SUPPORT: {
@@ -47,7 +47,7 @@ export declare const MYSQL_MIN_OS_SUPPORT: {
4747
readonly '8.0.28 - 8.0.31': "20.0.0";
4848
readonly '8.0.32 - 8.0.34': "21.0.0";
4949
readonly '8.0.35 - 8.0.39 || 8.1.0 - 8.4.2 || 9.0.1': "22.0.0";
50-
readonly '8.0.40 - 8.0.41 || 8.4.3 - 8.4.4 || 9.1.0 - 9.2.0': "23.0.0";
50+
readonly '8.0.40 - 8.0.42 || 8.4.3 - 8.4.5 || 9.1.0 - 9.3.0': "23.0.0";
5151
};
5252
};
5353
export declare const DMR_MYSQL_VERSIONS = "8.0.0 - 8.0.2";
@@ -62,26 +62,33 @@ export declare const MYSQL_MACOS_VERSIONS_IN_FILENAME: {
6262
readonly '8.0.30 - 8.0.31': "macos12";
6363
readonly '8.0.32 - 8.0.35 || 8.1.0 - 8.2.0': "macos13";
6464
readonly '8.0.36 - 8.0.40 || 8.3.0 - 8.4.3 || 9.0.1 - 9.1.0': "macos14";
65-
readonly '8.0.41 || 8.4.4 || 9.2.0': "macos15";
65+
readonly '8.0.41 - 8.0.42 || 8.4.4 - 8.4.5 || 9.2.0 - 9.3.0': "macos15";
6666
};
6767
export declare const MYSQL_LINUX_GLIBC_VERSIONS: {
68-
readonly '5.7.19 - 8.0.20': "2.12";
69-
readonly '8.0.21 - 9.2.0': "2.17";
68+
readonly x64: {
69+
readonly '5.7.19 - 8.0.20': "2.12";
70+
readonly '8.0.21 - 9.3.0': "2.17";
71+
};
72+
readonly arm64: {
73+
readonly '5.7.19 - 8.0.20': "2.12";
74+
readonly '8.0.21 - 8.0.41 || 8.1.0 - 8.4.4 || 9.0.1 - 9.2.0': "2.17";
75+
readonly '8.0.42 || 8.4.5 || 9.3.0': "2.28";
76+
};
7077
};
7178
export declare const MYSQL_LINUX_MINIMAL_INSTALL_AVAILABLE: {
7279
readonly '5.7.19 - 8.0.15': "no";
7380
readonly '8.0.16 - 8.0.20': "no-glibc-tag";
74-
readonly '8.0.21 - 9.2.0': "glibc-tag";
81+
readonly '8.0.21 - 9.3.0': "glibc-tag";
7582
};
76-
export declare const MYSQL_LINUX_MINIMAL_INSTALL_AVAILABLE_ARM64 = ">=8.0.33";
83+
export declare const MYSQL_LINUX_MINIMAL_INSTALL_AVAILABLE_ARM64 = "8.0.33 - 8.0.41 || 8.1.0 - 8.4.4 || 9.0.1 - 9.2.0";
7784
export declare const MYSQL_LINUX_FILE_EXTENSIONS: {
7885
readonly x64: {
7986
readonly '5.7.19 - 8.0.11': "gz";
80-
readonly '8.0.12 - 9.2.0': "xz";
87+
readonly '8.0.12 - 9.3.0': "xz";
8188
};
8289
readonly arm64: {
8390
readonly '8.0.31 - 8.0.32': "gz";
84-
readonly '8.0.33 - 9.2.0': "xz";
91+
readonly '8.0.33 - 9.3.0': "xz";
8592
};
8693
};
8794
export declare const MYSQL_LINUX_MINIMAL_REBUILD_VERSIONS = "8.0.26";

dist/src/constants.js

+27-16
Original file line numberDiff line numberDiff line change
@@ -117,22 +117,22 @@ exports.archiveBaseURL = 'https://cdn.mysql.com/archives/mysql-';
117117
exports.DOWNLOADABLE_MYSQL_VERSIONS = [
118118
'5.7.19', '5.7.20', '5.7.21', '5.7.22', '5.7.23', '5.7.24', '5.7.25', '5.7.26', '5.7.27', '5.7.28', '5.7.29', '5.7.30', '5.7.31', '5.7.32', '5.7.33', '5.7.34', '5.7.35', '5.7.36', '5.7.37', '5.7.38', '5.7.39', '5.7.40', '5.7.41', '5.7.42', '5.7.43', '5.7.44',
119119
'8.0.0', '8.0.1', '8.0.2', '8.0.3', '8.0.4',
120-
'8.0.11', '8.0.12', '8.0.13', '8.0.14', '8.0.15', '8.0.16', '8.0.17', '8.0.18', '8.0.19', '8.0.20', '8.0.21', '8.0.22', '8.0.23', '8.0.24', '8.0.25', '8.0.26', '8.0.27', '8.0.28', '8.0.30', '8.0.31', '8.0.32', '8.0.33', '8.0.34', '8.0.35', '8.0.36', '8.0.37', '8.0.39', '8.0.40', '8.0.41',
120+
'8.0.11', '8.0.12', '8.0.13', '8.0.14', '8.0.15', '8.0.16', '8.0.17', '8.0.18', '8.0.19', '8.0.20', '8.0.21', '8.0.22', '8.0.23', '8.0.24', '8.0.25', '8.0.26', '8.0.27', '8.0.28', '8.0.30', '8.0.31', '8.0.32', '8.0.33', '8.0.34', '8.0.35', '8.0.36', '8.0.37', '8.0.39', '8.0.40', '8.0.41', '8.0.42',
121121
'8.1.0', '8.2.0', '8.3.0',
122-
'8.4.0', '8.4.2', '8.4.3', '8.4.4',
123-
'9.0.1', '9.1.0', '9.2.0'
122+
'8.4.0', '8.4.2', '8.4.3', '8.4.4', '8.4.5',
123+
'9.0.1', '9.1.0', '9.2.0', '9.3.0'
124124
];
125125
exports.MYSQL_ARCH_SUPPORT = {
126126
darwin: {
127-
arm64: '8.0.26 - 9.2.0',
128-
x64: '5.7.19 - 9.2.0'
127+
arm64: '8.0.26 - 9.3.0',
128+
x64: '5.7.19 - 9.3.0'
129129
},
130130
linux: {
131-
arm64: '8.0.31 - 9.2.0',
132-
x64: '5.7.19 - 9.2.0'
131+
arm64: '8.0.31 - 9.3.0',
132+
x64: '5.7.19 - 9.3.0'
133133
},
134134
win32: {
135-
x64: '5.7.19 - 9.2.0'
135+
x64: '5.7.19 - 9.3.0'
136136
}
137137
};
138138
exports.MYSQL_MIN_OS_SUPPORT = {
@@ -152,7 +152,7 @@ exports.MYSQL_MIN_OS_SUPPORT = {
152152
'8.0.28 - 8.0.31': '20.0.0',
153153
'8.0.32 - 8.0.34': '21.0.0',
154154
'8.0.35 - 8.0.39 || 8.1.0 - 8.4.2 || 9.0.1': '22.0.0',
155-
'8.0.40 - 8.0.41 || 8.4.3 - 8.4.4 || 9.1.0 - 9.2.0': '23.0.0'
155+
'8.0.40 - 8.0.42 || 8.4.3 - 8.4.5 || 9.1.0 - 9.3.0': '23.0.0'
156156
}
157157
};
158158
exports.DMR_MYSQL_VERSIONS = '8.0.0 - 8.0.2';
@@ -167,26 +167,37 @@ exports.MYSQL_MACOS_VERSIONS_IN_FILENAME = {
167167
'8.0.30 - 8.0.31': 'macos12',
168168
'8.0.32 - 8.0.35 || 8.1.0 - 8.2.0': 'macos13',
169169
'8.0.36 - 8.0.40 || 8.3.0 - 8.4.3 || 9.0.1 - 9.1.0': 'macos14',
170-
'8.0.41 || 8.4.4 || 9.2.0': 'macos15'
170+
'8.0.41 - 8.0.42 || 8.4.4 - 8.4.5 || 9.2.0 - 9.3.0': 'macos15'
171171
};
172172
exports.MYSQL_LINUX_GLIBC_VERSIONS = {
173-
'5.7.19 - 8.0.20': '2.12',
174-
'8.0.21 - 9.2.0': '2.17'
173+
//8.0.42, 8.4.5, and 9.3.0 with glibc 2.28 does NOT have a minimal install version for x64 but it DOES have arm64 support.
174+
//8.0.42, 8.4.5, and 9.3.0 with glibc 2.17 DOES have a minimal install version for x64 but does NOT have arm64 support.
175+
//The new versions having these differences between the glibc versions has led to the glibc versions being different depending on CPU architecture for this package.
176+
//Neither glibc versions for the above MySQL versions have an arm64 minimal install.
177+
x64: {
178+
'5.7.19 - 8.0.20': '2.12',
179+
'8.0.21 - 9.3.0': '2.17'
180+
},
181+
arm64: {
182+
'5.7.19 - 8.0.20': '2.12',
183+
'8.0.21 - 8.0.41 || 8.1.0 - 8.4.4 || 9.0.1 - 9.2.0': '2.17',
184+
'8.0.42 || 8.4.5 || 9.3.0': '2.28'
185+
}
175186
};
176187
exports.MYSQL_LINUX_MINIMAL_INSTALL_AVAILABLE = {
177188
'5.7.19 - 8.0.15': 'no',
178189
'8.0.16 - 8.0.20': 'no-glibc-tag',
179-
'8.0.21 - 9.2.0': 'glibc-tag'
190+
'8.0.21 - 9.3.0': 'glibc-tag'
180191
};
181-
exports.MYSQL_LINUX_MINIMAL_INSTALL_AVAILABLE_ARM64 = '>=8.0.33';
192+
exports.MYSQL_LINUX_MINIMAL_INSTALL_AVAILABLE_ARM64 = '8.0.33 - 8.0.41 || 8.1.0 - 8.4.4 || 9.0.1 - 9.2.0'; //Not available for < 8.0.33 and 8.0.42, 8.4.5, and 9.3.0
182193
exports.MYSQL_LINUX_FILE_EXTENSIONS = {
183194
x64: {
184195
'5.7.19 - 8.0.11': 'gz',
185-
'8.0.12 - 9.2.0': 'xz'
196+
'8.0.12 - 9.3.0': 'xz'
186197
},
187198
arm64: {
188199
'8.0.31 - 8.0.32': 'gz',
189-
'8.0.33 - 9.2.0': 'xz'
200+
'8.0.33 - 9.3.0': 'xz'
190201
}
191202
};
192203
exports.MYSQL_LINUX_MINIMAL_REBUILD_VERSIONS = '8.0.26';

dist/src/libraries/Downloader.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ function downloadBinary(binaryInfo, options, logger) {
363363
return reject(e);
364364
}
365365
else {
366-
console.warn(`An error was encountered during the binary download process. Retrying for retry ${downloadTries}/${options.downloadRetries}. The error was:`, e);
366+
logger.warn(`An error was encountered during the binary download process. Retrying for retry ${downloadTries}/${options.downloadRetries}. The error was:`, e);
367367
}
368368
}
369369
} while (downloadTries <= options.downloadRetries);

dist/src/libraries/Executor.js

+13-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,18 @@ class Executor {
6464
return new Promise(async (resolve, reject) => {
6565
if (process.platform === 'win32') {
6666
try {
67-
const dirs = await fsPromises.readdir(`${process.env.PROGRAMFILES}\\MySQL`);
67+
let dirs;
68+
try {
69+
dirs = await fsPromises.readdir(`${process.env.PROGRAMFILES}\\MySQL`);
70+
}
71+
catch (e) {
72+
if (e?.code === 'ENOENT') {
73+
return resolve(null);
74+
}
75+
else {
76+
throw e;
77+
}
78+
}
6879
const servers = dirs.filter(dirname => dirname.includes('MySQL Server'));
6980
if (servers.length === 0) {
7081
return resolve(null);
@@ -336,7 +347,7 @@ _Executor_instances = new WeakSet(), _Executor_executeFile = function _Executor_
336347
}
337348
});
338349
fs.watchFile(errorLogFile, async (curr) => {
339-
if (curr.dev !== 0) {
350+
if (curr.isFile()) {
340351
//File exists
341352
const file = await fsPromises.readFile(errorLogFile, { encoding: 'utf8' });
342353
if (file.includes(': ready for connections') || file.includes('Server starts handling incoming connections')) {

dist/src/libraries/Version.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,10 @@ function getBinaryURL(versionToGet = "x", currentArch) {
111111
fileLocation = `${(0, semver_1.major)(selectedVersion)}.${(0, semver_1.minor)(selectedVersion)}/mysql-${selectedVersion}${isRC ? '-rc' : isDMR ? '-dmr' : ''}-${constants_1.MYSQL_MACOS_VERSIONS_IN_FILENAME[macOSVersionNameKey]}-${currentArch === 'x64' ? 'x86_64' : 'arm64'}.tar.gz`;
112112
}
113113
else if (currentOS === 'linux') {
114-
const glibcVersionKeys = Object.keys(constants_1.MYSQL_LINUX_GLIBC_VERSIONS);
114+
const glibcObject = constants_1.MYSQL_LINUX_GLIBC_VERSIONS[currentArch];
115+
const glibcVersionKeys = Object.keys(glibcObject);
115116
const glibcVersionKey = glibcVersionKeys.find(range => (0, semver_1.satisfies)(selectedVersion, range));
116-
const glibcVersion = constants_1.MYSQL_LINUX_GLIBC_VERSIONS[glibcVersionKey];
117+
const glibcVersion = glibcObject[glibcVersionKey];
117118
const minimalInstallAvailableKeys = Object.keys(constants_1.MYSQL_LINUX_MINIMAL_INSTALL_AVAILABLE);
118119
const minimalInstallAvailableKey = minimalInstallAvailableKeys.find(range => (0, semver_1.satisfies)(selectedVersion, range));
119120
const minimalInstallAvailable = constants_1.MYSQL_LINUX_MINIMAL_INSTALL_AVAILABLE[minimalInstallAvailableKey];

0 commit comments

Comments
 (0)