mysql-memory-server 1.10.0 → 1.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -15,9 +15,9 @@ Download with your package manager of choice. The package name is `mysql-memory-
|
|
|
15
15
|
#### Currently supported MySQL versions
|
|
16
16
|
|
|
17
17
|
- ```mysql-memory-server``` can run MySQL versions 5.7.19 and newer (if the version is already installed on your system)
|
|
18
|
-
- ```mysql-memory-server``` can download and run MySQL versions 5.7.19 - 9.
|
|
18
|
+
- ```mysql-memory-server``` can download and run MySQL versions 5.7.19 - 9.3.0 (if the version is not already installed on your system)
|
|
19
19
|
|
|
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.
|
|
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.1/docs/SUPPORTED_MYSQL_DOWNLOADS.md)
|
|
21
21
|
|
|
22
22
|
## Example Usage - Application Code
|
|
23
23
|
|
|
@@ -102,11 +102,11 @@ Description: Version of MySQL to use for the database. Uses semver for getting t
|
|
|
102
102
|
|
|
103
103
|
If left undefined:
|
|
104
104
|
- If the system has MySQL installed, the system-installed version will be used. If the installed version is not supported by this package (currently <5.7.19), an error will be thrown unless `ignoreUnsupportedSystemVersion` is set to `true`.
|
|
105
|
-
- If the system does not have MySQL installed, the latest version of MySQL that [this package supports downloading](https://github.com/Sebastian-Webster/mysql-memory-server-nodejs/blob/v1.10.
|
|
105
|
+
- If the system does not have MySQL installed, the latest version of MySQL that [this package supports downloading](https://github.com/Sebastian-Webster/mysql-memory-server-nodejs/blob/v1.10.1/docs/SUPPORTED_MYSQL_DOWNLOADS.md) will be downloaded.
|
|
106
106
|
|
|
107
107
|
If defined:
|
|
108
108
|
- If the version is older than 5.7.19, an error will be thrown as this package does not currently support those versions of MySQL.
|
|
109
|
-
- If the desired version of MySQL is already installed on the system, the installed version will be used. Otherwise the selected version will be downloaded as long as this package [supports downloading it](https://github.com/Sebastian-Webster/mysql-memory-server-nodejs/blob/v1.10.
|
|
109
|
+
- If the desired version of MySQL is already installed on the system, the installed version will be used. Otherwise the selected version will be downloaded as long as this package [supports downloading it](https://github.com/Sebastian-Webster/mysql-memory-server-nodejs/blob/v1.10.1/docs/SUPPORTED_MYSQL_DOWNLOADS.md). If this package does not support downloading the selected version, or your system does not [meet the requirements](https://github.com/Sebastian-Webster/mysql-memory-server-nodejs/blob/v1.10.1/docs/SUPPORTED_MYSQL_DOWNLOADS.md) for that version to be ran, an error will be thrown.
|
|
110
110
|
|
|
111
111
|
- `dbName: string`
|
|
112
112
|
|
|
@@ -148,7 +148,8 @@ function extractBinary(url, archiveLocation, extractedLocation, logger) {
|
|
|
148
148
|
const lastDashIndex = url.lastIndexOf('-');
|
|
149
149
|
const fileExtension = url.slice(lastDashIndex).split('.').splice(1).join('.');
|
|
150
150
|
await fsPromises.mkdir(extractedLocation, { recursive: true });
|
|
151
|
-
const
|
|
151
|
+
const splitURL = url.split('/');
|
|
152
|
+
const mySQLFolderName = splitURL[splitURL.length - 1];
|
|
152
153
|
if (!mySQLFolderName) {
|
|
153
154
|
return reject(`Folder name is undefined for url: ${url}`);
|
|
154
155
|
}
|
|
@@ -44,7 +44,7 @@ const LinuxOSRelease_1 = __importDefault(require("./LinuxOSRelease"));
|
|
|
44
44
|
function getBinaryURL(versionToGet = "x", currentArch) {
|
|
45
45
|
let selectedVersions = constants_1.DOWNLOADABLE_MYSQL_VERSIONS.filter(version => (0, semver_1.satisfies)(version, versionToGet));
|
|
46
46
|
if (selectedVersions.length === 0) {
|
|
47
|
-
throw `mysql-memory-server does not support downloading a version of MySQL that fits the following version requirement: ${versionToGet}. This package only supports downloads of MySQL for MySQL >= ${constants_1.DOWNLOADABLE_MYSQL_VERSIONS[0]} <= ${constants_1.DOWNLOADABLE_MYSQL_VERSIONS.
|
|
47
|
+
throw `mysql-memory-server does not support downloading a version of MySQL that fits the following version requirement: ${versionToGet}. This package only supports downloads of MySQL for MySQL >= ${constants_1.DOWNLOADABLE_MYSQL_VERSIONS[0]} <= ${constants_1.DOWNLOADABLE_MYSQL_VERSIONS[constants_1.DOWNLOADABLE_MYSQL_VERSIONS.length - 1]}. Please check for typos, choose a different version of MySQL to use, or make an issue or pull request on GitHub if you belive this is a bug.`;
|
|
48
48
|
}
|
|
49
49
|
const currentOS = os.platform();
|
|
50
50
|
const OSVersionSupport = constants_1.MYSQL_MIN_OS_SUPPORT[currentOS];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mysql-memory-server",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.1",
|
|
4
4
|
"description": "Spin up an ephemeral MySQL database from your JavaScript code",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -27,20 +27,20 @@
|
|
|
27
27
|
"author": "Sebastian-Webster",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@babel/core": "^7.
|
|
31
|
-
"@babel/preset-env": "^7.
|
|
32
|
-
"@babel/preset-typescript": "^7.27.
|
|
30
|
+
"@babel/core": "^7.27.4",
|
|
31
|
+
"@babel/preset-env": "^7.27.2",
|
|
32
|
+
"@babel/preset-typescript": "^7.27.1",
|
|
33
33
|
"@types/adm-zip": "^0.5.5",
|
|
34
|
-
"@types/node": "^
|
|
34
|
+
"@types/node": "^24.0.1",
|
|
35
35
|
"@types/semver": "^7.7.0",
|
|
36
36
|
"babel-jest": "^29.7.0",
|
|
37
37
|
"jest": "^29.7.0",
|
|
38
|
-
"mysql2": "^3.
|
|
38
|
+
"mysql2": "^3.14.1",
|
|
39
39
|
"typescript": "^5.8.3"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"adm-zip": "^0.5.16",
|
|
43
|
-
"semver": "^7.7.
|
|
43
|
+
"semver": "^7.7.2",
|
|
44
44
|
"signal-exit": "^4.1.0"
|
|
45
45
|
},
|
|
46
46
|
"repository": {
|