Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
notheotherben committed Jun 9, 2017
2 parents bad4b0d + a1ad0ec commit f9feb69
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 17 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ For a human friendly description of what changed in each release, take a look
at the [Releases](https://github.com/SierraSoftworks/Iridium/releases) page.


## Version [7.2.2](https://github.com/SierraSoftworks/Iridium/releases/tag/v7.2.2)
<a style="border-radius: 2px; padding: 4px 8px; background: rgb(64, 120, 192); color: #fff;" href="https://github.com/SierraSoftworks/Iridium/releases/tag/v7.2.2">tag: **v7.2.2**</a>

```sh
npm install iridium@7.2.2
```

### Changes
- [5453437](https://github.com/SierraSoftworks/Iridium/commit/5453437) 7.2.2
- [33d7019](https://github.com/SierraSoftworks/Iridium/commit/33d7019) chore: Update to support latest TypeScript compiler and MongoDB type definitions
- [fdc71d1](https://github.com/SierraSoftworks/Iridium/commit/fdc71d1) doc: Update changelog
- [6e726ea](https://github.com/SierraSoftworks/Iridium/commit/6e726ea) doc: Update documentation

## Version [7.2.1](https://github.com/SierraSoftworks/Iridium/releases/tag/v7.2.1)
<a style="border-radius: 2px; padding: 4px 8px; background: rgb(64, 120, 192); color: #fff;" href="https://github.com/SierraSoftworks/Iridium/releases/tag/v7.2.1">tag: **v7.2.1**</a>

Expand Down
2 changes: 1 addition & 1 deletion doc
Submodule doc updated 45 files
+4 −4 classes/cacheonid.html
+21 −21 classes/core.html
+15 −15 classes/cursor.html
+32 −32 classes/instance.html
+4 −4 classes/memorycache.html
+67 −67 classes/model.html
+5 −5 classes/modelcache.html
+5 −5 classes/modelhandlers.html
+11 −11 classes/modelhelpers.html
+3 −3 classes/noopcache.html
+33 −33 classes/omnom.html
+18 −18 globals.html
+62 −62 interfaces/bsonarray.html
+3 −3 interfaces/cache.html
+4 −4 interfaces/cachedirector.html
+1 −1 interfaces/callback.html
+13 −13 interfaces/changes.html
+7 −7 interfaces/configuration.html
+7 −7 interfaces/createoptions.html
+1 −1 interfaces/expressmiddleware.html
+4 −4 interfaces/hooks.html
+3 −3 interfaces/index.html
+2 −2 interfaces/instanceconstructor.html
+12 −12 interfaces/instanceimplementation.html
+5 −5 interfaces/instanceinternals.html
+1 −1 interfaces/mapfunction.html
+2 −2 interfaces/mapreduceddocument.html
+2 −2 interfaces/mapreducefunctions.html
+11 −11 interfaces/mapreduceoptions.html
+1 −1 interfaces/middlewarefactory.html
+1 −1 interfaces/modelspecificinstanceconstructor.html
+3 −3 interfaces/plugin.html
+1 −1 interfaces/predicate.html
+4 −4 interfaces/property.html
+1 −1 interfaces/propertygetter.html
+1 −1 interfaces/propertysetter.html
+2 −2 interfaces/propertytransform.html
+5 −5 interfaces/queryoptions.html
+1 −1 interfaces/reducefunction.html
+4 −4 interfaces/removeoptions.html
+1 −1 interfaces/schema.html
+2 −2 interfaces/transformoptions.html
+2 −2 interfaces/transforms.html
+5 −5 interfaces/updateoptions.html
+1 −1 modules/__global.html
9 changes: 6 additions & 3 deletions lib/Model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ export class Model<TDocument extends { _id?: any }, TInstance> {

return cursor.next((err, result) => {
if (err) return reject(err);
return resolve(result);
return resolve(<TDocument|null>result);
});
});
}).then((document) => {
Expand Down Expand Up @@ -799,15 +799,18 @@ export class Model<TDocument extends { _id?: any }, TInstance> {
*/
dropIndex(index: Index.IndexSpecification, callback?: General.Callback<boolean>): Bluebird<boolean>;
dropIndex(specification: string | Index.IndexSpecification, callback?: General.Callback<boolean>): Bluebird<boolean> {
let index: string;
let index: string|undefined;

if (typeof (specification) === "string") index = <string>specification;
else {
index = _(<Index.IndexSpecification>specification).map((direction: number, key: string) => `${key}_${direction}`).reduce<string>((x, y) => `${x}_${y}`);
}

if (!index)
return Bluebird.reject(new Error("Expected a valid index name to be provided"));

return new Bluebird<boolean>((resolve, reject) => {
this.collection.dropIndex(index, (err: Error, result: { ok: number }) => {
this.collection.dropIndex(index!, (err: Error, result: { ok: number }) => {
if (err) return reject(err);
return resolve(<any>!!result.ok);
});
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iridium",
"version": "7.2.1",
"version": "7.2.2",
"author": "Benjamin Pannell <admin@sierrasoftworks.com>",
"description": "A custom lightweight ORM for MongoDB designed for power-users",
"license": "MIT",
Expand Down Expand Up @@ -52,11 +52,11 @@
"dependencies": {
"@types/bluebird": "^3.5.4",
"@types/lodash": "^4.14.64",
"@types/mongodb": "^2.2.2",
"@types/mongodb": "^2.2.4",
"@types/chai": "^3.5.2",
"bluebird": "^3.5.0",
"lodash": "^4.17.4",
"mongodb": "^2.2.26",
"mongodb": "^2.2.28",
"skmatc": "~1.2.2"
},
"peerDependencies": {
Expand Down
12 changes: 2 additions & 10 deletions test/Core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,20 +150,12 @@ describe("Core",() => {
let core = new Iridium.Core({
database: "test",
options: {
server: {
socketOptions: {
connectTimeoutMS: 1000
}
}
connectTimeoutMS: 1000
}
});

chai.expect(core.settings!.options).to.eql({
server: {
socketOptions: {
connectTimeoutMS: 1000
}
}
connectTimeoutMS: 1000
});
});
});
Expand Down

0 comments on commit f9feb69

Please sign in to comment.