@sprucelabs/data-stores 18.1.25 → 18.1.28

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.
@@ -19,4 +19,4 @@
19
19
  "skipped": [],
20
20
  "skips": []
21
21
  }
22
- }
22
+ }
@@ -3,7 +3,7 @@
3
3
  /// <reference lib="esnext.asynciterable" />
4
4
  import { checkServerIdentity } from 'tls';
5
5
  import { Binary, Decimal128, Double, Int32, Long, ObjectId, Timestamp } from 'bson';
6
- import { BSONType, ChangeStream, ResumeToken } from 'mongodb';
6
+ import { BSONType, ResumeToken } from 'mongodb';
7
7
  import { AggregationCursor, Code } from 'mongodb';
8
8
  import { ClientSession, MongoClient, MongoError, ReadPreference } from 'mongodb';
9
9
  declare type Cursor<A = any> = A extends true ? any : any;
@@ -1608,20 +1608,6 @@ export interface Collection<TSchema extends {
1608
1608
  updateOne(filter: FilterQuery<TSchema>, update: UpdateQuery<TSchema> | Partial<TSchema>, callback: MongoCallback<UpdateWriteOpResult>): void;
1609
1609
  updateOne(filter: FilterQuery<TSchema>, update: UpdateQuery<TSchema> | Partial<TSchema>, options?: UpdateOneOptions): Promise<UpdateWriteOpResult>;
1610
1610
  updateOne(filter: FilterQuery<TSchema>, update: UpdateQuery<TSchema> | Partial<TSchema>, options: UpdateOneOptions, callback: MongoCallback<UpdateWriteOpResult>): void;
1611
- /**
1612
- * Create a new Change Stream, watching for new changes (insertions, updates, replacements, deletions, and invalidations) in this collection.
1613
- *
1614
- * @param pipeline An array of {@link https://docs.mongodb.com/v3.6/reference/operator/aggregation-pipeline/ aggregation pipeline stages}
1615
- * through which to pass change stream documents. This allows for filtering (using `$match`) and manipulating the change stream documents.
1616
- * @param options Optional settings
1617
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/Collection.html#watch
1618
- */
1619
- watch<T = TSchema>(pipeline?: object[], options?: ChangeStreamOptions & {
1620
- session?: ClientSession | undefined;
1621
- }): ChangeStream<T>;
1622
- watch<T = TSchema>(options?: ChangeStreamOptions & {
1623
- session?: ClientSession | undefined;
1624
- }): ChangeStream<T>;
1625
1611
  }
1626
1612
  /** Update Query */
1627
1613
  declare type KeysOfAType<TSchema, Type> = {
@@ -1900,6 +1886,7 @@ export declare type FilterQuery<T> = {
1900
1886
  /** @see https://docs.mongodb.com/v3.6/reference/method/db.collection.bulkWrite/#insertone */
1901
1887
  export declare type BulkWriteInsertOneOperation<TSchema> = {
1902
1888
  insertOne: {
1889
+ /** @ts-ignore */
1903
1890
  document: OptionalId<TSchema>;
1904
1891
  };
1905
1892
  };
@@ -3,7 +3,7 @@
3
3
  /// <reference lib="esnext.asynciterable" />
4
4
  import { checkServerIdentity } from 'tls';
5
5
  import { Binary, Decimal128, Double, Int32, Long, ObjectId, Timestamp } from 'bson';
6
- import { BSONType, ChangeStream, ResumeToken } from 'mongodb';
6
+ import { BSONType, ResumeToken } from 'mongodb';
7
7
  import { AggregationCursor, Code } from 'mongodb';
8
8
  import { ClientSession, MongoClient, MongoError, ReadPreference } from 'mongodb';
9
9
  declare type Cursor<A = any> = A extends true ? any : any;
@@ -1608,20 +1608,6 @@ export interface Collection<TSchema extends {
1608
1608
  updateOne(filter: FilterQuery<TSchema>, update: UpdateQuery<TSchema> | Partial<TSchema>, callback: MongoCallback<UpdateWriteOpResult>): void;
1609
1609
  updateOne(filter: FilterQuery<TSchema>, update: UpdateQuery<TSchema> | Partial<TSchema>, options?: UpdateOneOptions): Promise<UpdateWriteOpResult>;
1610
1610
  updateOne(filter: FilterQuery<TSchema>, update: UpdateQuery<TSchema> | Partial<TSchema>, options: UpdateOneOptions, callback: MongoCallback<UpdateWriteOpResult>): void;
1611
- /**
1612
- * Create a new Change Stream, watching for new changes (insertions, updates, replacements, deletions, and invalidations) in this collection.
1613
- *
1614
- * @param pipeline An array of {@link https://docs.mongodb.com/v3.6/reference/operator/aggregation-pipeline/ aggregation pipeline stages}
1615
- * through which to pass change stream documents. This allows for filtering (using `$match`) and manipulating the change stream documents.
1616
- * @param options Optional settings
1617
- * @see https://mongodb.github.io/node-mongodb-native/3.6/api/Collection.html#watch
1618
- */
1619
- watch<T = TSchema>(pipeline?: object[], options?: ChangeStreamOptions & {
1620
- session?: ClientSession | undefined;
1621
- }): ChangeStream<T>;
1622
- watch<T = TSchema>(options?: ChangeStreamOptions & {
1623
- session?: ClientSession | undefined;
1624
- }): ChangeStream<T>;
1625
1611
  }
1626
1612
  /** Update Query */
1627
1613
  declare type KeysOfAType<TSchema, Type> = {
@@ -1900,6 +1886,7 @@ export declare type FilterQuery<T> = {
1900
1886
  /** @see https://docs.mongodb.com/v3.6/reference/method/db.collection.bulkWrite/#insertone */
1901
1887
  export declare type BulkWriteInsertOneOperation<TSchema> = {
1902
1888
  insertOne: {
1889
+ /** @ts-ignore */
1903
1890
  document: OptionalId<TSchema>;
1904
1891
  };
1905
1892
  };
@@ -1,7 +1,7 @@
1
1
  import { QuerySelector } from '../databases/mongo.types';
2
2
  declare type QueryPredicate<Query, K extends keyof Query> = Query[K] | QuerySelector<Query[K]> | string;
3
3
  declare type Obj = Record<string, any>;
4
- export declare type QueryBuilder<Query extends Obj> = {
4
+ export declare type QueryBuilder<Query> = {
5
5
  [K in keyof Query]?: QueryPredicate<Query, K>;
6
6
  } & {
7
7
  id?: string | QuerySelector<string>;
@@ -1,7 +1,7 @@
1
1
  import { QuerySelector } from '../databases/mongo.types';
2
2
  declare type QueryPredicate<Query, K extends keyof Query> = Query[K] | QuerySelector<Query[K]> | string;
3
3
  declare type Obj = Record<string, any>;
4
- export declare type QueryBuilder<Query extends Obj> = {
4
+ export declare type QueryBuilder<Query> = {
5
5
  [K in keyof Query]?: QueryPredicate<Query, K>;
6
6
  } & {
7
7
  id?: string | QuerySelector<string>;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "18.1.25",
6
+ "version": "18.1.28",
7
7
  "files": [
8
8
  "build/**/*",
9
9
  "!build/__tests__",
@@ -72,9 +72,9 @@
72
72
  "upgrade.packages.test": "yarn upgrade.packages.all && yarn lint && yarn build.dev && yarn test"
73
73
  },
74
74
  "dependencies": {
75
- "@sprucelabs/error": "^5.0.502",
76
- "@sprucelabs/schema": "^28.4.31",
77
- "@sprucelabs/spruce-skill-utils": "^26.4.52",
75
+ "@sprucelabs/error": "^5.0.504",
76
+ "@sprucelabs/schema": "^28.4.34",
77
+ "@sprucelabs/spruce-skill-utils": "^26.4.56",
78
78
  "globby": "^11.0.4",
79
79
  "just-clone": "^6.1.1",
80
80
  "lodash": "^4.17.21",
@@ -82,28 +82,28 @@
82
82
  "nedb": "^1.8.0"
83
83
  },
84
84
  "devDependencies": {
85
- "@sprucelabs/esm-postbuild": "^1.0.566",
86
- "@sprucelabs/jest-json-reporter": "^6.0.459",
87
- "@sprucelabs/jest-sheets-reporter": "^1.3.91",
88
- "@sprucelabs/resolve-path-aliases": "^1.1.89",
85
+ "@sprucelabs/esm-postbuild": "^1.0.569",
86
+ "@sprucelabs/jest-json-reporter": "^6.0.462",
87
+ "@sprucelabs/jest-sheets-reporter": "^1.3.93",
88
+ "@sprucelabs/resolve-path-aliases": "^1.1.92",
89
89
  "@sprucelabs/semantic-release": "^4.0.8",
90
- "@sprucelabs/test": "^7.7.352",
91
- "@sprucelabs/test-utils": "^3.1.71",
90
+ "@sprucelabs/test": "^7.7.354",
91
+ "@sprucelabs/test-utils": "^3.1.73",
92
92
  "@types/lodash": "^4.14.184",
93
93
  "@types/nedb": "^1.8.12",
94
94
  "@types/node": "17.0.5",
95
95
  "chokidar-cli": "^3.0.0",
96
96
  "concurrently": "^7.3.0",
97
- "dotenv": "^16.0.1",
97
+ "dotenv": "^16.0.2",
98
98
  "eslint": "^8.23.0",
99
- "eslint-config-spruce": "^10.11.3",
100
- "jest": "^29.0.1",
101
- "jest-circus": "^29.0.1",
99
+ "eslint-config-spruce": "^10.11.4",
100
+ "jest": "^29.0.2",
101
+ "jest-circus": "^29.0.2",
102
102
  "prettier": "^2.7.1",
103
103
  "ts-node": "^10.9.1",
104
104
  "tsc-watch": "^5.0.3",
105
105
  "tsconfig-paths": "^4.1.0",
106
- "typescript": "4.7.4"
106
+ "typescript": "^4.8.2"
107
107
  },
108
108
  "engines": {
109
109
  "node": ">=12",