* Update LTS versions in README (Miroslav Bajtoš)
* Switch from Bluebird to native Promise (Miroslav Bajtoš)
* Start 4.0 development, drop support for Node 6 (Miroslav Bajtoš)
This is a breaking change. Juggler methods are no longer returning
instances of Bluebird Promise, but return a native Promise instead.
As a result, API consumers can no longer use sugar APIs provided by
Bluebird, e.g. `spread`, `delay`, etc.
Migration guide: rewrite your code from `.then()` style into `async`
functions using `await` statements.
* Add IBM copyright and MIT license headers (Raymond Feng)
* Allow List to take items as instances of a class (Raymond Feng)
* fix: ignore extra properties when strict=filter (#1423) (Tom Kirkpatrick)
* Add EventEmitter type info to DataSource type (shimks)
The new version of our config enabled function-paren-newline rule,
this commit fixes the codebase to use more consistent handling
of newlines when calling functions.
Fix the regression introduced by 9af79cf51a where updateAttributes
and replaceAttributes was incorrectly handling the response returned
by the database.
This commit restores the old behaviour where `context.data` is updated
only by a connector-provided function and reverts an incorrect change
of a test file made as part of the faulty fix.
Besides the fixes, this patch also renames `data` to `dbResponse` and
add comments explaining the structure of the response object for more
clarity.
Callback's first argument is an optional Error now. Was: required `any`.
PersistedModel methods return `PersistedModel` now. Before this change,
methods were returning `PersistedData` (`PersistedModel | AnyObject`).
The problem with `AnyObject` is that it does not contain any
`PersistedModel` instance data and cannot be assigned to functions
expecting `Partial<PersistedModel>`. As a result, consumers of this API
were forced to either cast the result to `PersistedModel` (which feels
wrong) or deal with the `AnyObject` case (which never happen at
runtime).
Fix definition of `ModelData<T>` to `T | Partial<T>`. Before this
change, `ModelData` allowed any values not related to the actual
model at all, for example arrays.
Before this change, many Operation Hooks were not correctly propagating
changes made to `ctx.data` via reassigning ctx.data to a new object.
This change modifies existing tests to account for this different
scenario, adds few more tests for scenarios that were not covered by
tests before and finally fixes the problem discovered.