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)
- Consider supporting mongod option `--logpath` HOT 1
- Unable to connect to replica set running within Docker container HOT 1
- Can't connect to dockerized mongodb-memory-server replica set running as a service in GitLab HOT 11
- Change `forceSamePort` parameter to also be a config option
- oplogSize for replSet should be removed in README HOT 2
- Use RHEL 9 binaries HOT 2
- Add Support for "Rocky Linux 9" HOT 4
- [SOLUTION] Jest and Fake Timers HOT 1
- Amazon EC2 instance download failed, combination does not exist (403) HOT 4
- "getport" sometimes throwing an error HOT 41
- DownloadError: Download failed for url "https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-5.0.19.tgz" HOT 10
- Weird "db.watch" issue HOT 1
- postinstallHelper always installs to $HOME/.cache instead of node_modules/.cache HOT 6
- 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
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.