@unchainedshop/mongodb 4.8.4 → 5.0.0-alpha.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.
Files changed (2) hide show
  1. package/lib/initDb.js +2 -2
  2. package/package.json +2 -2
package/lib/initDb.js CHANGED
@@ -26,7 +26,7 @@ export const startDb = async (options) => {
26
26
  try {
27
27
  mongod = MongoMemoryServer.create({
28
28
  instance: useInMemory
29
- ? { dbName: 'test', port: mongoPort, storageEngine: 'ephemeralForTest' }
29
+ ? { dbName: 'test', port: mongoPort, storageEngine: 'wiredTiger' }
30
30
  : {
31
31
  dbPath: `${process.cwd()}/.db`,
32
32
  storageEngine: 'wiredTiger',
@@ -43,7 +43,7 @@ export const startDb = async (options) => {
43
43
  if (error.message?.includes('code "62"')) {
44
44
  throw new Error(`MongoDB database files in .db are incompatible with the current MongoDB version. ` +
45
45
  `This usually happens after a MongoDB upgrade. ` +
46
- `To fix this, remove the .db directory: rm -rf ${process.cwd()}/.db`, { cause: e });
46
+ `To fix this, remove the .db directory: rm -rf ${process.cwd()}/.db`, { cause: error });
47
47
  }
48
48
  throw error;
49
49
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unchainedshop/mongodb",
3
- "version": "4.8.4",
3
+ "version": "5.0.0-alpha.1",
4
4
  "description": "MongoDB database abstraction layer for the Unchained Engine",
5
5
  "main": "lib/mongodb-index.js",
6
6
  "types": "lib/mongodb-index.d.ts",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "homepage": "https://github.com/unchainedshop/unchained#readme",
35
35
  "dependencies": {
36
- "@unchainedshop/utils": "^4.6.0"
36
+ "@unchainedshop/utils": "^5.0.0-alpha.1"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@mongodb-js/zstd": ">= 7 < 8",