@keyv/mongo 3.0.1 → 3.0.2

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/dist/index.cjs CHANGED
@@ -28,16 +28,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
 
30
30
  // src/index.ts
31
- var src_exports = {};
32
- __export(src_exports, {
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
33
  KeyvMongo: () => KeyvMongo,
34
- default: () => src_default
34
+ default: () => index_default
35
35
  });
36
- module.exports = __toCommonJS(src_exports);
36
+ module.exports = __toCommonJS(index_exports);
37
37
  var import_events = __toESM(require("events"), 1);
38
38
  var import_buffer = require("buffer");
39
39
  var import_mongodb = require("mongodb");
40
- var keyvMongoKeys = /* @__PURE__ */ new Set(["url", "collection", "namespace", "serialize", "deserialize", "uri", "useGridFS", "dialect"]);
40
+ var keyvMongoKeys = /* @__PURE__ */ new Set(["url", "collection", "namespace", "serialize", "deserialize", "uri", "useGridFS", "dialect", "db"]);
41
41
  var KeyvMongo = class extends import_events.default {
42
42
  ttlSupport = false;
43
43
  opts;
@@ -296,7 +296,7 @@ var KeyvMongo = class extends import_events.default {
296
296
  await client.mongoClient.close();
297
297
  }
298
298
  };
299
- var src_default = KeyvMongo;
299
+ var index_default = KeyvMongo;
300
300
  // Annotate the CommonJS export names for ESM import in node:
301
301
  0 && (module.exports = {
302
302
  KeyvMongo
package/dist/index.d.cts CHANGED
@@ -42,4 +42,4 @@ declare class KeyvMongo extends EventEmitter implements KeyvStoreAdapter {
42
42
  disconnect(): Promise<void>;
43
43
  }
44
44
 
45
- export { KeyvMongo, KeyvMongo as default };
45
+ export { KeyvMongo, type KeyvMongoOptions, KeyvMongo as default };
package/dist/index.d.ts CHANGED
@@ -42,4 +42,4 @@ declare class KeyvMongo extends EventEmitter implements KeyvStoreAdapter {
42
42
  disconnect(): Promise<void>;
43
43
  }
44
44
 
45
- export { KeyvMongo, KeyvMongo as default };
45
+ export { KeyvMongo, type KeyvMongoOptions, KeyvMongo as default };
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  GridFSBucket,
7
7
  MongoServerError
8
8
  } from "mongodb";
9
- var keyvMongoKeys = /* @__PURE__ */ new Set(["url", "collection", "namespace", "serialize", "deserialize", "uri", "useGridFS", "dialect"]);
9
+ var keyvMongoKeys = /* @__PURE__ */ new Set(["url", "collection", "namespace", "serialize", "deserialize", "uri", "useGridFS", "dialect", "db"]);
10
10
  var KeyvMongo = class extends EventEmitter {
11
11
  ttlSupport = false;
12
12
  opts;
@@ -265,8 +265,8 @@ var KeyvMongo = class extends EventEmitter {
265
265
  await client.mongoClient.close();
266
266
  }
267
267
  };
268
- var src_default = KeyvMongo;
268
+ var index_default = KeyvMongo;
269
269
  export {
270
270
  KeyvMongo,
271
- src_default as default
271
+ index_default as default
272
272
  };
package/package.json CHANGED
@@ -1,81 +1,81 @@
1
1
  {
2
- "name": "@keyv/mongo",
3
- "version": "3.0.1",
4
- "description": "MongoDB storage adapter for Keyv",
5
- "type": "module",
6
- "main": "dist/index.cjs",
7
- "module": "dist/index.js",
8
- "types": "dist/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "require": "./dist/index.cjs",
12
- "import": "./dist/index.js"
13
- }
14
- },
15
- "scripts": {
16
- "build": "rm -rf dist && tsup src/index.ts --format cjs,esm --dts --clean",
17
- "prepare": "yarn build",
18
- "test": "xo --fix && vitest run --coverage",
19
- "test:ci": "xo && vitest --run --sequence.setupFiles=list",
20
- "clean": "rm -rf node_modules && rm -rf ./coverage"
21
- },
22
- "xo": {
23
- "rules": {
24
- "import/no-named-as-default": "off",
25
- "unicorn/prefer-module": "off",
26
- "unicorn/prefer-event-target": "off",
27
- "unicorn/no-array-reduce": "off",
28
- "unicorn/prefer-object-from-entries": "off",
29
- "unicorn/prefer-node-protocol": "off",
30
- "@typescript-eslint/no-unsafe-assignment": "off",
31
- "@typescript-eslint/no-unsafe-call": "off",
32
- "@typescript-eslint/no-unsafe-return": "off",
33
- "@typescript-eslint/no-unsafe-argument": "off",
34
- "import/extensions": "off",
35
- "@typescript-eslint/consistent-type-imports": "off",
36
- "@typescript-eslint/naming-convention": "off",
37
- "@typescript-eslint/no-floating-promises": "off",
38
- "import/no-extraneous-dependencies": "off",
39
- "@typescript-eslint/no-confusing-void-expression": "off",
40
- "@typescript-eslint/no-empty-function": "off"
41
- }
42
- },
43
- "repository": {
44
- "type": "git",
45
- "url": "git+https://github.com/jaredwray/keyv.git"
46
- },
47
- "keywords": [
48
- "mongo",
49
- "mongodb",
50
- "keyv",
51
- "storage",
52
- "adapter",
53
- "key",
54
- "value",
55
- "store",
56
- "cache",
57
- "ttl"
58
- ],
59
- "author": "Jared Wray <me@jaredwray.com> (https://jaredwray.com)",
60
- "license": "MIT",
61
- "bugs": {
62
- "url": "https://github.com/jaredwray/keyv/issues"
63
- },
64
- "homepage": "https://github.com/jaredwray/keyv",
65
- "dependencies": {
66
- "mongodb": "^6.8.0"
67
- },
68
- "devDependencies": {
69
- "@keyv/test-suite": "*",
70
- "keyv": "^5.0.0",
71
- "tsd": "^0.31.1",
72
- "xo": "^0.59.3"
73
- },
74
- "tsd": {
75
- "directory": "test"
76
- },
77
- "files": [
78
- "dist",
79
- "LICENSE"
80
- ]
81
- }
2
+ "name": "@keyv/mongo",
3
+ "version": "3.0.2",
4
+ "description": "MongoDB storage adapter for Keyv",
5
+ "type": "module",
6
+ "main": "dist/index.cjs",
7
+ "module": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "require": "./dist/index.cjs",
12
+ "import": "./dist/index.js"
13
+ }
14
+ },
15
+ "xo": {
16
+ "rules": {
17
+ "import/no-named-as-default": "off",
18
+ "unicorn/prefer-module": "off",
19
+ "unicorn/prefer-event-target": "off",
20
+ "unicorn/no-array-reduce": "off",
21
+ "unicorn/prefer-object-from-entries": "off",
22
+ "unicorn/prefer-node-protocol": "off",
23
+ "@typescript-eslint/no-unsafe-assignment": "off",
24
+ "@typescript-eslint/no-unsafe-call": "off",
25
+ "@typescript-eslint/no-unsafe-return": "off",
26
+ "@typescript-eslint/no-unsafe-argument": "off",
27
+ "import/extensions": "off",
28
+ "@typescript-eslint/consistent-type-imports": "off",
29
+ "@typescript-eslint/naming-convention": "off",
30
+ "@typescript-eslint/no-floating-promises": "off",
31
+ "import/no-extraneous-dependencies": "off",
32
+ "@typescript-eslint/no-confusing-void-expression": "off",
33
+ "@typescript-eslint/no-empty-function": "off"
34
+ }
35
+ },
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "git+https://github.com/jaredwray/keyv.git"
39
+ },
40
+ "keywords": [
41
+ "mongo",
42
+ "mongodb",
43
+ "keyv",
44
+ "storage",
45
+ "adapter",
46
+ "key",
47
+ "value",
48
+ "store",
49
+ "cache",
50
+ "ttl"
51
+ ],
52
+ "author": "Jared Wray <me@jaredwray.com> (https://jaredwray.com)",
53
+ "license": "MIT",
54
+ "bugs": {
55
+ "url": "https://github.com/jaredwray/keyv/issues"
56
+ },
57
+ "homepage": "https://github.com/jaredwray/keyv",
58
+ "dependencies": {
59
+ "mongodb": "^6.8.0"
60
+ },
61
+ "devDependencies": {
62
+ "keyv": "^5.0.0",
63
+ "rimraf": "^6.0.1",
64
+ "tsd": "^0.31.1",
65
+ "xo": "^0.59.3",
66
+ "@keyv/test-suite": "^2.0.7"
67
+ },
68
+ "tsd": {
69
+ "directory": "test"
70
+ },
71
+ "files": [
72
+ "dist",
73
+ "LICENSE"
74
+ ],
75
+ "scripts": {
76
+ "build": "rimraf ./dist && tsup src/index.ts --format cjs,esm --dts --clean",
77
+ "test": "xo --fix && vitest run --coverage",
78
+ "test:ci": "xo && vitest --run --sequence.setupFiles=list",
79
+ "clean": "rimraf ./node_modules ./coverage ./dist"
80
+ }
81
+ }