Skip to content
Louis Chatriot edited this page Feb 15, 2016 · 59 revisions

The change log only begins at v0.7.14. I didn't feel the need to make one before but now there are more and more users wondering why they can't use functionality X when it's only a version problem.

v1.8

  • If false/undefined/null is passed as callback to CRUD functions, the executor doesn't get stuck anymore.
  • Timestamped databases now keep createdAt after an update that's a complete document replacement.
  • Fixed edge behavior where in updates false/undefined/null fields were treated as non-existent fields and replaced by a nested object when dot-notation was followed. For example for the document { nested: false } and the update query { $set: { 'nested.really': 42 } }, NeDB was wronlgy returning { nested: { really: 42 } } and now returns { nested: false }.
  • Fixed edge behavior where in updated nested objects were created on the fly while following dot notation for $unset modifier. For example for the document { hello: 'world' } and the query { $unset: { 'nested.really': true } }, NeDB was wrongly returning { hello: 'world', nested: {} } and now returns { hello: 'world' }.
  • Projection work with embedded documents and dot notation.
  • BREAKING update callback signature is now coherent in all cases.
    • v1.8 and onwards signature: (err, numAffected, affectedDocuments, upsert)
      • For an upsert, affectedDocuments contains the inserted document and the upsert flag is set to true.
      • For a standard update with returnUpdatedDocs flag set to false, affectedDocuments is not set.
      • For a standard update with returnUpdatedDocs flag set to true and multi to false, affectedDocuments is the updated document.
      • For a standard update with returnUpdatedDocs flag set to true and multi to true, affectedDocuments is the array of updated documents.
    • v1.7.4 and prior signature: (err, numAffected, affectedDocuments)
      • For an upsert, affectedDocuments is the inserted document and no upsert flag is set.
      • For a standard update with returnUpdatedDocs set to true the array of updated documents is returned, even if multi is false.

v1.7.4

  • Support for $min and $max update operators

v1.7.3

  • Support for $elemMatch find operator

v1.7.2

  • Support for $slice operator in cunjunction with $push and $each

v1.7.1

  • Support for TTL indexes able to expire and remove documents after a given period of time

v1.6.2

  • Can perform a direct array match on array fields.
  • Datastores fires an compaction.done event whenever a compaction operation finishes.

v1.6.1

  • Support for custom string comparison functions, for international datastores (JavaScript's built-in function does not play nice with accented letters in particular).

v1.6.0

  • Lots of housekeeping!

v1.5.1

  • Throw and use Error objects as errors instead of plain Javascript strings or objects, to provide more information to consumers (in particular err.stack).

v1.5

  • Flush data to disk whenever datafile is compacted to ensure no data loss possible in case of a server crash.

v1.4

  • Don't use crash safe file write on the browser to increase storage limit twofold
  • Use localforage to store data, selects the best method available (IndexedDB, WebSQL or localStorage). In most cases that means a lot of data can be stored, typically in hundreds of MB. WARNING: the storage system changed between v1.3 and v1.4 and is NOT back-compatible! Your application needs to resync client-side when you upgrade NeDB.

v1.3

  • Added document timestamping
  • Fixed rare bug causing side effects on user data

v1.2.1

  • Fix issue with $in queries that would return multiple times the same documents if the $in field is indexed

v1.2

  • Updated nedb to fully adhere to latest Node.js version (v4) which uses ES6

v1.1.4

  • Updated package mkdirp to enable use of nedb in strict mode

v1.1.3

  • Fixed bugs in Safari caused by number field names

v1.1.1

  • NeDB won't start if one hook is declared but not the other, or if they're not reverse of one another to prevent dataloss
  • NeDB won't start if too much data is detected as corrupt, threshold can be defined by user

v1.1.0

v1.0.2

  • Fixed minor bug where an upsert with a badly formatted update query would throw an error, not a standard error in the callback

v1.0.1

  • Fixed minor deep copying bug where arrays would not get deep copied
  • Fixed upsert behavior with find queries with operators to match MongoDB

v1

After 18 months, finally releasing NeDB version 1! No real bug reported on either the Nodejs or browser versions for the past 2 months, NeDB works in all environments including Tessel, is used by some major projects (looking at you Popcorn Time) and the feature set is what you would expect from a full pure JS database.

v0.11.2

  • Fixed small bug where you couldn't set a document's _id to 0

v0.11.1

  • Fixed bug on $ne operator, with undefined, null or false
  • Replaced all use of chai.should by chai.assert in the browser tests as chai.should doesn't work on Internet Explorer 9

v0.11.0

  • Implemented persistence for the browser version. Should work on all browsers NeDB works on (IE9+, Chrome, Firefox, Opera)

v0.10.11

  • Use setImmediate instead of process.nextTick to prevent event loop I/O starvation (thanks, @TomV)

v0.10.10

  • _id is guaranteed to be unique across one database. Before, there was an extremely low probability of collision (about one in a million for a datastore with 1e12 documents)

v0.10.9

  • Updated binary-search-tree to latest version
  • Added support for projections

v0.10.8

  • Minor code tidying

v0.10.7

  • Fixed strange Date behaviour in Node Webkit due to differences in the Date implementation between Node Webkit and Node (thanks, @szwacz)

v0.10.6

  • Added support for setting own _id (thanks, @pscanf)

v0.10.5

  • Fixed bug on multiple sort (thanks, @timshadel)

v0.10.4

  • Use async v0.2.10 so that NeDB works right away with browserify

v0.10.3

  • Fixed executor bug preventing running operations after an exception was thrown from within a callback. Note that you shouldn't throw exceptions in an asynchronous code anyway

v0.10.2

  • Added comparison operator $where

v0.10.1

  • When performing an upsert, the upserted document is returned instead of true

v0.10.0

  • Added Cursor API and ability to sort, skip, limit

v0.9.4

  • Added the ability to specify a handler called after autoloading the database, and a default handler that throws an exception if there is an error during load instead of failing silently

v0.9.3

  • Fixed bug in persistence with Node Webkit apps that could cause an EXDEV error in some cases
  • Deprecated the nodeWebkitAppName option

v0.9.2

  • Added removeIndex method
  • Added persistence for indexes

v0.9.1

  • Added support for $size operator
  • Added support for querying inside arrays with dot notation
  • Added support for querying specific array items with field.i notation (i integer)

v0.8.13

  • Fixed bug that could cause data loss when a process crash occured during a loadDatabase (it had never occured but that was a possible scenario)

v0.8.11

  • Added ability to bulk-insert an array of documents

v0.8.10

  • Fixed bug in indexing array fields

v0.8.9

  • Added the $pull array modifier (thanks, @szwacz)

v0.8.8

  • Fixed various minor bugs
  • Made options argument to update and remove optional

v0.8.6

  • Added Datastore.count
  • Added the $unset modifier
  • Minor fixes

v0.8.0

  • Ported NeDB to the browser (still needs to be tested on all major browsers but it works fine on Chrome). In-memory only for now

v0.7.15

  • Added support for regular expression matching in basic querying
  • Added $regex operator to be able to use regular expressions along with other operators

v0.7.14

  • CRUD functionality. Includes insert, find, findOne, update (with multi or single updates and upserts), remove (with multi or single removes)
  • Following operators for querying: $lt, $lte, $gt, $gte, $in, $nin, $ne, $exists, $or, $and, $not
  • As with Mongo, you can if a document's field is an array, matching the document means matching any element of the array
  • Modifiers to update documents: $set, $inc, and array modifiers ($push, $pop, $addToSet, $each)
  • Indexing (works with exact matching, comparison operators and $in)
  • Support for persistent (using an append-only data file) or in-memory only datastores
  • Support for database autoloading upon creation