Releases: SierraSoftworks/Iridium
Version 7.0.3
This version refactors the types used for the Iridium Core's constructor configuration options so that they accurately track the MongoDB driver's connection options. This should make connecting using complex configurations less prone to failure as a result of version discrepancies.
More information about these connection options can be found in the official MongoDB driver documentation:
- http://mongodb.github.io/node-mongodb-native/2.2/api/MongoClient.html
- http://mongodb.github.io/node-mongodb-native/2.2/api/Db.html
- http://mongodb.github.io/node-mongodb-native/2.2/api/Server.html
- http://mongodb.github.io/node-mongodb-native/2.2/api/ReplSet.html
- http://mongodb.github.io/node-mongodb-native/2.2/api/Mongos.html
Version 7.0.2
This patch fixes the return value of the Model.update()
function when { multi: false }
is provided, specifically that non-error operations which didn't update any documents would previously return a 1
. This has been addressed such that it will return 1
when the document is updated and 0
when it is not (no properties changed or no documents were matched).
Version 7.0.1
This is a patch release which addresses an issue in the Model.update()
function which would prevent it from correctly handling the { multi: false }
option. This would prevent you from being able to perform replacement updates as well as leading to potentially unwanted multi-updates.
Version 7.0.0
This is the release version of Iridium 7, it has been in Alpha for a while as we've worked on stabilizing the APIs on TypeScript 2.0 and getting TypeScript type definitions sorted out.
TL;DR
- Switched from
typings
to@types/...
. - Smaller
npm
packages with the same developer experience. - Switched to TypeScript 2.0
- Much better custom validator developer experience.
- Fewer edge case bugs thanks to
strictNullChecking
in TypeScript 2.0.
- Breaking changes since
7.0.0-alpha.10
Core.connection
throws an exception if the core is not connected.- All database methods now resolve to
undefined
if the item is not found.
Changes
Specifically, we've moved to using @types/...
through npm
as a replacement for typings
, this should significantly improve the developer workflow and we've updated the Example Project to showcase this.
We've also moved towards bundling only the type definitions, compiled JS and source maps in the NPM package, this should help reduce the installed size of Iridium while still being extremely easy to use. For bonus points, take a look at source-map-support
to start getting accurate stack traces against the TypeScript files in your project.
For those of you who use custom validators, TypeScript 2.0's support for typing this
in functions should make your declarations easier than ever, finally providing accurate type information in your custom validators. This should help make them far easier to use going forward.
Last, but certainly not least, we've gone through the codebase and updated it to work with strictNullChecking
enabled, which caught a number of small corner cases which we had missed in testing.
Breaking Changes
There are, unfortunately, a couple of breaking changes in this release. This was primarily the result of switching to strict null checking, requiring us to specify the exact behaviour of certain methods.
- Accessing
Core.connection
before callingCore.connect()
will now result in an exception warning you of the fact. This was previously handled in the model and could result in situations where you received a null connection fromCore.connection
. - All database method callbacks and promises resolve to
undefined
when items are not found (they were previously unconstrained to eitherundefined
ornull
). If you are explicitly checking fornull
you will need to update your code from this:
model.get().then(item => {
if (item === null) {
// do something
}
});
to this:
model.get().then(item => {
if (item === undefined) {
// do something
}
});
or this:
model.get().then(item => {
if (!item) {
// do something
}
});
Version 7.0.0-alpha.14
This release is primarily a tooling improvement over v7.0.0-alpha.11 which makes our code coverage tools aware of that magical thing called TypeScript and fixes a couple of small bugs in the way type safety was enforced for query and change arguments in MongoDB.
Version 7.0.0-alpha.11
This release adds support for TypeScript 2.0 and takes advantage of some of its new features to make Iridium better than ever. 🎆
TL;DR
- Switched from
typings
to@types/...
. - Smaller
npm
packages with the same developer experience. - Switched to TypeScript 2.0
- Much better custom validator developer experience.
- Fewer edge case bugs thanks to
strictNullChecking
in TypeScript 2.0.
- Breaking changes since
7.0.0-alpha.10
Core.connection
throws an exception if the core is not connected.- All database methods now resolve to
undefined
if the item is not found.
Changes
Specifically, we've moved to using @types/...
through npm
as a replacement for typings
, this should significantly improve the developer workflow and we've updated the Example Project to showcase this.
We've also moved towards bundling only the type definitions, compiled JS and source maps in the NPM package, this should help reduce the installed size of Iridium while still being extremely easy to use. For bonus points, take a look at source-map-support
to start getting accurate stack traces against the TypeScript files in your project.
For those of you who use custom validators, TypeScript 2.0's support for typing this
in functions should make your declarations easier than ever, finally providing accurate type information in your custom validators. This should help make them far easier to use going forward.
Last, but certainly not least, we've gone through the codebase and updated it to work with strictNullChecking
enabled, which caught a number of small corner cases which we had missed in testing.
Breaking Changes
There are, unfortunately, a couple of breaking changes in this release. This was primarily the result of switching to strict null checking, requiring us to specify the exact behaviour of certain methods.
- Accessing
Core.connection
before callingCore.connect()
will now result in an exception warning you of the fact. This was previously handled in the model and could result in situations where you received a null connection fromCore.connection
. - All database method callbacks and promises resolve to
undefined
when items are not found (they were previously unconstrained to eitherundefined
ornull
). If you are explicitly checking fornull
you will need to update your code from this:
model.get().then(item => {
if (item === null) {
// do something
}
});
to this:
model.get().then(item => {
if (item === undefined) {
// do something
}
});
or this:
model.get().then(item => {
if (!item) {
// do something
}
});
Version 7.0.0 Alpha 3
This release is a small fix for systems with case sensitive file systems. It is for all intents and purposes identical to v7.0.0-alpha.2
Version 7.0.0 Alpha 2
This release changes from using DefinitelyTyped for type definition management to instead adopt the new Typings tool. Typings is set to replace definitely typed (and more specifically, the tsd
CLI) for type definitions going forward and provides a vastly improved developer experience.
We recommend that you switch to Typings as part of your upgrade to Iridium 7 as it will likely improve your development workflow and will also enable us to improve the way Iridium integrates going forward.
You'll also find a new Installation section in the README which showcases how one would go about installing Iridium on a new (or existing) project. It's a little bit more complex than just npm install
, however nothing too crazy and something we're working on improving.
Version 6.7.0
This release updates the typescript definitions that Iridium uses to their latest publicly available versions, it should help resolve issues people are having with the references they make use of in their projects.
Version 6.6.1
This is primarily a maintenance release involving updating the TypeScript compiler to 1.8 and making a number of style changes to the code to make life easier for contributors
You'll also notice that we've switched to BitHound as the primary code quality platform (from CodeClimate). We'll continue to evaluate BitHound and CodeClimate going forward to determine whether we should switch back at any point.