uranio 0.1.14 → 0.1.15

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.
@@ -23,6 +23,6 @@
23
23
  "typescript": "^5.2.2"
24
24
  },
25
25
  "dependencies": {
26
- "uranio": "0.1.14"
26
+ "uranio": "0.1.15"
27
27
  }
28
28
  }
@@ -4,7 +4,7 @@
4
4
  *
5
5
  */
6
6
 
7
- import mongodb from 'mongodb';
7
+ import mongodb, {ObjectId} from 'mongodb';
8
8
 
9
9
  import {atom, Query, Shape} from './types';
10
10
 
@@ -122,7 +122,7 @@ function _remove_id<A extends atom>(atom: Partial<A>): Shape<A> {
122
122
  function _instance_object_id<A extends atom>(query: Query<A>): Query<A> {
123
123
  for (let [key, value] of Object.entries(query)) {
124
124
  if (key === '_id' && typeof value === 'string') {
125
- query['_id'] = new mongodb.ObjectId(value) as any;
125
+ query['_id'] = new ObjectId(value) as any;
126
126
  }
127
127
  if (value && typeof value === 'object') {
128
128
  value = _instance_object_id(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uranio",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "Uranio is a type-safe ODM for MongoDB",
5
5
  "main": "dist/index.js",
6
6
  "repository": {