@mongosh/types 1.10.6 → 2.0.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.
package/lib/index.d.ts CHANGED
@@ -241,9 +241,9 @@ export declare class CliUserConfigValidator extends SnippetShellUserConfigValida
241
241
  static validate<K extends keyof CliUserConfig>(key: K, value: CliUserConfig[K]): Promise<string | null>;
242
242
  }
243
243
  export interface ConfigProvider<T> {
244
- getConfig<K extends keyof T>(key: K): Promise<T[K]>;
244
+ getConfig<K extends keyof T>(key: K): Promise<T[K] | undefined> | undefined;
245
245
  setConfig<K extends keyof T>(key: K, value: T[K]): Promise<'success' | 'ignored'>;
246
246
  resetConfig<K extends keyof T>(key: K): Promise<'success' | 'ignored'>;
247
247
  validateConfig<K extends keyof T>(key: K, value: T[K]): Promise<string | null>;
248
- listConfigOptions(): string[] | Promise<string[]>;
248
+ listConfigOptions(): string[] | undefined | Promise<string[]>;
249
249
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mongosh/types",
3
- "version": "1.10.6",
3
+ "version": "2.0.1",
4
4
  "description": "Types for mongosh internals",
5
5
  "author": "Anna Henningsen <anna.henningsen@mongodb.com>",
6
6
  "homepage": "https://github.com/mongodb-js/mongosh/tree/main/packages/types#readme",
@@ -26,6 +26,8 @@
26
26
  "prepublish": "npm run compile",
27
27
  "test": "mocha --timeout 15000 -r ts-node/register \"./src/*.spec.ts\"",
28
28
  "test-ci": "node ../../scripts/run-if-package-requested.js npm test",
29
+ "test-coverage": "nyc --no-clean --cwd ../.. --reporter=none npm run test",
30
+ "test-ci-coverage": "nyc --no-clean --cwd ../.. --reporter=none npm run test-ci",
29
31
  "prettier": "prettier",
30
32
  "reformat": "npm run prettier -- --write . && npm run eslint --fix"
31
33
  },
@@ -36,16 +38,16 @@
36
38
  "unitTestsOnly": true
37
39
  },
38
40
  "dependencies": {
39
- "@mongodb-js/devtools-connect": "^2.3.1"
41
+ "@mongodb-js/devtools-connect": "^2.4.1"
40
42
  },
41
43
  "devDependencies": {
42
- "@mongodb-js/eslint-config-mongosh": "1.10.6",
44
+ "@mongodb-js/eslint-config-mongosh": "^1.0.0",
43
45
  "@mongodb-js/prettier-config-devtools": "^1.0.1",
44
- "@mongodb-js/tsconfig-mongosh": "1.10.6",
46
+ "@mongodb-js/tsconfig-mongosh": "^1.0.0",
45
47
  "depcheck": "^1.4.3",
46
48
  "eslint": "^7.25.0",
47
- "mongodb": "^5.7.0",
49
+ "mongodb": "^6.0.0",
48
50
  "prettier": "^2.8.8"
49
51
  },
50
- "gitHead": "6bcde16381f6258d9be713998c67c48a99cfd691"
52
+ "gitHead": "225d4603f0d43d500a8847beaa980e906e9a35be"
51
53
  }
package/src/index.ts CHANGED
@@ -555,7 +555,7 @@ export class CliUserConfigValidator extends SnippetShellUserConfigValidator {
555
555
  }
556
556
 
557
557
  export interface ConfigProvider<T> {
558
- getConfig<K extends keyof T>(key: K): Promise<T[K]>;
558
+ getConfig<K extends keyof T>(key: K): Promise<T[K] | undefined> | undefined;
559
559
  setConfig<K extends keyof T>(
560
560
  key: K,
561
561
  value: T[K]
@@ -565,7 +565,7 @@ export interface ConfigProvider<T> {
565
565
  key: K,
566
566
  value: T[K]
567
567
  ): Promise<string | null>;
568
- listConfigOptions(): string[] | Promise<string[]>;
568
+ listConfigOptions(): string[] | undefined | Promise<string[]>;
569
569
  }
570
570
 
571
571
  function isValidUrl(url: string): boolean {