Skip to content

Commit d87d44c

Browse files
committed
Merge branch 'beta'
2 parents 70f2afa + 5d86125 commit d87d44c

File tree

10 files changed

+86
-13
lines changed

10 files changed

+86
-13
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## [10.2.1-beta.2](https://github.com/typegoose/mongodb-memory-server/compare/v10.2.1-beta.1...v10.2.1-beta.2) (2025-09-15)
2+
3+
### Fixes
4+
5+
* **MongoBinaryDownloadUrl:** add "cachyos" as arch-like ([b32b3d2](https://github.com/typegoose/mongodb-memory-server/commit/b32b3d28f1ba72a512503b55cff0383ed9b8c186)), closes [#947](https://github.com/typegoose/mongodb-memory-server/issues/947)
6+
7+
## [10.2.1-beta.1](https://github.com/typegoose/mongodb-memory-server/compare/v10.2.0...v10.2.1-beta.1) (2025-09-06)
8+
9+
### Fixes
10+
11+
* **MongoBinaryDownloadUrl:** use "rhel90" before mongodb 8.0.0 ([7cc91e6](https://github.com/typegoose/mongodb-memory-server/commit/7cc91e6475018e528103ad8885618099494fd47c)), closes [#942](https://github.com/typegoose/mongodb-memory-server/issues/942) [#941](https://github.com/typegoose/mongodb-memory-server/issues/941)
12+
113
## [10.2.0](https://github.com/typegoose/mongodb-memory-server/compare/v10.1.4...v10.2.0) (2025-08-02)
214

315
### Features

packages/mongodb-memory-server-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mongodb-memory-server-core",
3-
"version": "10.2.0",
3+
"version": "10.2.1-beta.2",
44
"description": "MongoDB Server for testing (core package, without autodownload). The server will allow you to connect your favourite ODM or client library to the MongoDB Server and run parallel integration tests isolated from each other.",
55
"main": "lib/index",
66
"types": "lib/index.d.ts",

packages/mongodb-memory-server-core/src/util/MongoBinaryDownloadUrl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ export class MongoBinaryDownloadUrl implements MongoBinaryDownloadUrlOpts {
237237
} else if (regexHelper(/alpine/i, os)) {
238238
console.warn('There is no official build of MongoDB for Alpine!');
239239
// Match "arch", "archlinux", "manjaro", "manjarolinux", "arco", "arcolinux"
240-
} else if (regexHelper(/(arch|manjaro|arco)(?:linux)?$/i, os)) {
240+
} else if (regexHelper(/(arch|manjaro|arco|cachyos)(?:linux)?$/i, os)) {
241241
console.warn(
242242
`There is no official build of MongoDB for ArchLinux (${os.dist}). Falling back to Ubuntu 22.04 release.`
243243
);
@@ -425,7 +425,7 @@ export class MongoBinaryDownloadUrl implements MongoBinaryDownloadUrlOpts {
425425

426426
// as of mongodb 8.0.9, there are currently no binaries for rhel 10.0
427427

428-
if (semver.satisfies(releaseAsSemver, '>=9.3.0')) {
428+
if (semver.satisfies(releaseAsSemver, '>=9.3.0') && semver.gte(coercedVersion, '8.0.0')) {
429429
// since mongodb 8.0.0 there are only binaries for `rhel93`, no more `rhel90`
430430
name += '93';
431431
} else if (semver.satisfies(releaseAsSemver, '>=9.0.0')) {

packages/mongodb-memory-server-core/src/util/__tests__/MongoBinaryDownloadUrl.test.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -864,6 +864,26 @@ describe('MongoBinaryDownloadUrl', () => {
864864
);
865865
expect(console.warn).toHaveBeenCalledTimes(1);
866866
});
867+
868+
it('cachyos (x86_64) & 8.0.7 (using ubuntu2404)', async () => {
869+
jest.spyOn(console, 'warn').mockImplementation(() => void 0);
870+
871+
const du = new MongoBinaryDownloadUrl({
872+
platform: 'linux',
873+
arch: 'x64',
874+
version: '8.0.7',
875+
os: {
876+
os: 'linux',
877+
dist: 'cachyos',
878+
release: '',
879+
id_like: [],
880+
},
881+
});
882+
expect(await du.getDownloadUrl()).toBe(
883+
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-8.0.7.tgz'
884+
);
885+
expect(console.warn).toHaveBeenCalledTimes(1);
886+
});
867887
});
868888

869889
describe('for gentoo', () => {
@@ -1564,6 +1584,22 @@ describe('MongoBinaryDownloadUrl', () => {
15641584
);
15651585
});
15661586

1587+
it('rhel 9.3 (x86_64) & 7.0.14', async () => {
1588+
const du = new MongoBinaryDownloadUrl({
1589+
platform: 'linux',
1590+
arch: 'x64',
1591+
version: '7.0.14',
1592+
os: {
1593+
os: 'linux',
1594+
dist: 'rhel',
1595+
release: '9.3',
1596+
},
1597+
});
1598+
expect(await du.getDownloadUrl()).toBe(
1599+
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel90-7.0.14.tgz'
1600+
);
1601+
});
1602+
15671603
it('rhel 9.3 (x86_64) & 8.0.0', async () => {
15681604
const du = new MongoBinaryDownloadUrl({
15691605
platform: 'linux',

packages/mongodb-memory-server-core/src/util/getos/__tests__/getos.test.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,4 +144,29 @@ HOME_URL="https://amazonlinux.com/"`;
144144
);
145145
});
146146
});
147+
148+
describe('extra os tests', () => {
149+
it('should parse cachyos', () => {
150+
// output taken from https://github.com/typegoose/mongodb-memory-server/issues/947
151+
const example = `NAME="CachyOS Linux"
152+
PRETTY_NAME="CachyOS"
153+
ID=cachyos
154+
BUILD_ID=rolling
155+
ANSI_COLOR="38;2;23;147;209"
156+
HOME_URL="https://cachyos.org/"
157+
DOCUMENTATION_URL="https://wiki.cachyos.org/"
158+
SUPPORT_URL="https://discuss.cachyos.org/"
159+
BUG_REPORT_URL="https://github.com/cachyos"
160+
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
161+
LOGO=cachyos`;
162+
163+
expect(getos.parseOS(example)).toEqual<getos.LinuxOS>({
164+
os: 'linux',
165+
dist: 'cachyos',
166+
release: '',
167+
codename: undefined,
168+
id_like: undefined,
169+
});
170+
});
171+
});
147172
});

packages/mongodb-memory-server-global-4.0/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mongodb-memory-server-global-4.0",
3-
"version": "10.2.0",
3+
"version": "10.2.1-beta.2",
44
"mongodb_version": "4.0.28",
55
"description": "MongoDB Server for testing (auto-download 4.0 version to ~/.cache/mongodb-binaries).",
66
"main": "index.js",
@@ -25,7 +25,7 @@
2525
"mongomem"
2626
],
2727
"dependencies": {
28-
"mongodb-memory-server-core": "10.2.0",
28+
"mongodb-memory-server-core": "10.2.1-beta.2",
2929
"tslib": "^2.8.1"
3030
},
3131
"scripts": {

packages/mongodb-memory-server-global-4.2/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mongodb-memory-server-global-4.2",
3-
"version": "10.2.0",
3+
"version": "10.2.1-beta.2",
44
"mongodb_version": "4.2.24",
55
"description": "MongoDB Server for testing (auto-download 4.2 version to ~/.cache/mongodb-binaries).",
66
"main": "index.js",
@@ -25,7 +25,7 @@
2525
"mongomem"
2626
],
2727
"dependencies": {
28-
"mongodb-memory-server-core": "10.2.0",
28+
"mongodb-memory-server-core": "10.2.1-beta.2",
2929
"tslib": "^2.8.1"
3030
},
3131
"scripts": {

packages/mongodb-memory-server-global-4.4/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mongodb-memory-server-global-4.4",
3-
"version": "10.2.0",
3+
"version": "10.2.1-beta.2",
44
"mongodb_version": "4.4.28",
55
"description": "MongoDB Server for testing (auto-download 4.4 version to ~/.cache/mongodb-binaries).",
66
"main": "index.js",
@@ -25,7 +25,7 @@
2525
"mongomem"
2626
],
2727
"dependencies": {
28-
"mongodb-memory-server-core": "10.2.0",
28+
"mongodb-memory-server-core": "10.2.1-beta.2",
2929
"tslib": "^2.8.1"
3030
},
3131
"scripts": {

packages/mongodb-memory-server-global/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mongodb-memory-server-global",
3-
"version": "10.2.0",
3+
"version": "10.2.1-beta.2",
44
"description": "MongoDB Server for testing (auto-download latest version to ~/.cache/mongodb-binaries).",
55
"main": "index.js",
66
"types": "index.d.ts",
@@ -24,7 +24,7 @@
2424
"mongomem"
2525
],
2626
"dependencies": {
27-
"mongodb-memory-server-core": "10.2.0",
27+
"mongodb-memory-server-core": "10.2.1-beta.2",
2828
"tslib": "^2.8.1"
2929
},
3030
"scripts": {

packages/mongodb-memory-server/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mongodb-memory-server",
3-
"version": "10.2.0",
3+
"version": "10.2.1-beta.2",
44
"description": "MongoDB Server for testing (auto-download latest version). The server will allow you to connect your favourite ODM or client library to the MongoDB Server and run parallel integration tests isolated from each other.",
55
"main": "index.js",
66
"types": "index.d.ts",
@@ -24,7 +24,7 @@
2424
"mongomem"
2525
],
2626
"dependencies": {
27-
"mongodb-memory-server-core": "10.2.0",
27+
"mongodb-memory-server-core": "10.2.1-beta.2",
2828
"tslib": "^2.8.1"
2929
},
3030
"scripts": {

0 commit comments

Comments
 (0)