Comments (9)
Feel free to create mongodb-memory-server-offline
package and add it as optionalDependency
. Like it did here https://github.com/graphql-compose/graphql-compose-mongoose/blob/30968a23a40d0bdbf90621984e189439eec13711/src/composeWithMongoose.js#L240-L245 with optional package graphql-compose-pagination
.
from mongodb-memory-server.
Or maybe need to find another solution on your side. Cause mongodb-memory-server-offline
will be very FAT package if you will add all supported mongodb versions.
Try to add some options which will instruct where to take mongodb bineries offline from your repo. It will be more right way.
from mongodb-memory-server.
mongo-memory-server-offline package could fetch server during install phase, which will work for virtually everything, except automatic updates. This way package won't be that fat.
from mongodb-memory-server.
And how it decide which version of mongodb binaries need to install? 3.4, 3.6
from mongodb-memory-server.
There are 2 options:
- provide a release for each mongo build
- provide (cli?) interface to fetch necessary build right from dependent npm script using pre-install hook
from mongodb-memory-server.
Ok, let take 1st case. But rename packages something like:
- mongo-memory-server-download-3.4
- mongo-memory-server-download-3.6
Where this packages at pre-install will download needed mongo binary to path.resolve(os.homedir(), '.mongodb-binaries')
folder.
from mongodb-memory-server.
As long as you won't have 2 different versions for any package given it's OK to use path.resolve(os.homedir(), '.mongodb-binaries',version)
and reference correct one from mongo-memory-server
.
from mongodb-memory-server.
Any update on this issue?
from mongodb-memory-server.
By default mongodb-memory-server
package installs latest
version of mongod
in postscripts.
If you want a specific version, you should provide it in your test files with proper timeout for test-runner.
Or you may add some script to your package.json which will execute after package installation:
{
"scripts": {
"postinstall": "node ./postinstall.js",
}
}
Like it did in this file https://github.com/nodkz/mongodb-memory-server/blob/master/postinstall.js
from mongodb-memory-server.
Related Issues (20)
- Enabling debug mode through package.json does not work HOT 3
- Randomizing db names for each test
- GridFS streams not working correctly HOT 4
- Jest + mongodb-memory-server + mongoose - Calling 'find' hangs indefinitely HOT 2
- Invalid version reported for version strings ending in -latest HOT 2
- Ubuntu >= 22.04 is unsupported when using MongoDB >= 6.0.4 HOT 7
- _startUpInstance threw a Error: TypeError: (intermediate value).finally is not a function HOT 3
- Mongod instance closed with code "127" HOT 7
- Case: InMemory DB refuses to update after Making changes to model HOT 7
- Library is missing or cannot be opened: "libcrypto.so.1.1" HOT 2
- 9.1.8 not working out of the box for node:20 docker (LTS images) HOT 5
- ReplicaSet - emulate replication lag HOT 1
- Issue downloading mongo binaries with Nexus set as MONGOMS_DOWNLOAD_MIRROR HOT 8
- Error when trying to run tests HOT 1
- Instance failed to start because a library is missing or cannot be opened: "libcrypto.so.1.1" HOT 8
- Requested Version "6.0.14" is not available for "Debian 12"! Available Versions: ">=7.0.3" HOT 1
- Mongod sometimes fails to start due to ETXTBSY HOT 10
- The download of the mongodb binary is corrupted when using a hoisted dependency in a monorepo HOT 4
- How to initialize data/collections/indexes on startup? HOT 1
- Fix Documentation path because of repository transfer HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongodb-memory-server.