Commit Graph

3271 Commits

Author SHA1 Message Date
Miroslav Bajtoš 88312422d8
4.6.3
* Add support for Node.js 12.x (Miroslav Bajtoš)
 * fix: coerce primitive properties on update (biniam)
 * fix: coerce date array properties (biniam)
 * fix: normalize include with boolean or number (spurreiter)
2019-04-30 10:52:46 +02:00
Miroslav Bajtoš 6793be20ca
Merge pull request #1728 from strongloop/chore/add-node-12
Add support for Node.js 12.x
2019-04-30 09:09:37 +02:00
Miroslav Bajtoš 5c3405eceb
Add support for Node.js 12.x
- Fix code to pass all tests on Node.js 12
- Add Node.js 12 to the list of Travis CI platforms
2019-04-29 09:46:57 +02:00
Biniam Admikew 47addd943a
Merge pull request #1702 from strongloop/fix/nested-property-resolution
fix: primitive data type coercion
2019-04-16 12:00:24 -04:00
biniam 48af738ec4 fix: coerce primitive properties on update 2019-04-16 10:51:44 -04:00
biniam 1534392c62 fix: coerce date array properties 2019-04-16 10:50:54 -04:00
Miroslav Bajtoš fe83f3cfd1
Merge pull request #1581 from spurreiter/include-crashes
fix: normalize include with boolean or number
2019-04-12 17:05:02 +02:00
jannyHou b3945fcd33 4.6.2
* chore: update CODEOWNERS (#1712) (Diana Lau)
 * fix: ignore git file (#1714) (Janny)
 * remove kv-extreme-scale ctor from downstream test (#1710) (Diana Lau)
2019-04-10 11:59:45 -04:00
Diana Lau 11f9c1f23a
chore: update CODEOWNERS (#1712) 2019-04-10 11:07:55 -04:00
Janny b4d89fc7c5
fix: ignore git file (#1714) 2019-04-10 10:51:21 -04:00
Diana Lau 7288277e87
remove kv-extreme-scale ctor from downstream test (#1710) 2019-04-10 10:20:38 -04:00
Miroslav Bajtoš 095fe62fa6
4.6.1
* Improve tests for empty vs. default values (Miroslav Bajtoš)
 * Do not apply default values on data from database (Miroslav Bajtoš)
 * Update datasource-connector.md (#1703) (Jam Risser)
 * feat: support array within array (Hage Yaapa)
 * fix: update lodash (#1696) (Janny)
2019-04-09 18:20:02 +02:00
Miroslav Bajtoš a8d0d78913
Merge pull request #1707 from strongloop/test/fix-default-values
Improve tests for empty vs. default values
2019-04-09 18:12:40 +02:00
Miroslav Bajtoš 7d69bdab70
Improve tests for empty vs. default values 2019-04-09 15:54:52 +02:00
spurreiter 55b10a43c4 fix: normalize include with boolean or number
- On include = true or include = 1 the lib crashes with
  "TypeError: includes.forEach is not a function".
- checking for boolean and number type and return empty array.
- fix: include symbol and function in normalization
- fix: review changes; adding debug stmt + early exit for tests
2019-04-05 19:02:57 +02:00
Miroslav Bajtoš 84eee5a69e
Merge pull request #1704 from strongloop/fix/default-value-in-response
fix: do not apply default values on data from database
2019-04-04 10:10:23 +02:00
Miroslav Bajtoš e45292de08
Do not apply default values on data from database
Before this change, when a property was configured with a default value
at LoopBack side and the database was returned a record with a missing
value for such property, then we would supply use the configured
default.

This behavior is problematic for reasons explained in #1692.

In this commit, we are fixing DAO operations like `find` and
`findOrCreate` so that they do NOT apply default property values on
data returned by the database (connector).

Please note that most of the other CRUD methods were already not
applying default values on database data as long as the connector
provided native implementation of the operation.
2019-04-04 09:47:31 +02:00
Jam Risser ff5a3fa8bf Update datasource-connector.md (#1703)
Corrected typo in docs
2019-03-28 16:34:35 -04:00
Hage Yaapa 3f9448f5d2
Merge pull request #1699 from strongloop/fix/list-format
feat: support array within array
2019-03-19 19:06:08 +05:30
Hage Yaapa 80d8fcd8b1 feat: support array within array 2019-03-07 15:58:26 +05:30
Janny 5a7c0326ab
fix: update lodash (#1696) 2019-03-01 14:29:56 -05:00
Diana Lau ce7194ff6a 4.6.0
* feat: Support "type" key in sub-properties (Hage Yaapa)
 * fix: use correct callback for geo find queries (biniam)
 * fix: update typescript declarations (biniam)
2019-02-26 14:27:50 -05:00
biniam 75a8c6a309 4.5.4
* fix: use correct callback for geo find queries (biniam)
 * fix: update typescript declarations (biniam)
2019-02-26 14:22:13 -05:00
Hage Yaapa 01df3705d1
Merge pull request #1693 from strongloop/feat/type-sub-property
feat: Support "type" key in sub-properties
2019-02-26 20:49:52 +05:30
Hage Yaapa a391c83a2c feat: Support "type" key in sub-properties 2019-02-21 13:58:34 +05:30
Biniam Admikew 70b3bb6aae
Merge pull request #1690 from strongloop/fix/near-filter-cb
Fix callback for find queries with near filters
2019-02-15 11:00:30 -05:00
biniam 5e0c73bec7 fix: use correct callback for geo find queries 2019-02-14 15:45:13 -05:00
Biniam Admikew c7d23d18d0
Merge pull request #1654 from strongloop/fix/types
fix: update typescript declarations
2019-01-31 00:33:19 -05:00
biniam 4b705b127c fix: update typescript declarations 2019-01-31 00:29:35 -05:00
Miroslav Bajtoš 4d288813e2
4.5.3
* Support nested properties with class type (Miroslav Bajtoš)
2019-01-29 15:51:58 +01:00
Miroslav Bajtoš c0a778eeab
Merge pull request #1670 from up-group/master
Enable to target ES6
2019-01-29 15:50:56 +01:00
Miroslav Bajtoš fd99c6dc6e
Support nested properties with class type
When converting plain-data object values into model instances,
correctly handle the case where the constructor functions is a class
constructor and must be invoked via `new`.
2019-01-25 10:05:36 +01:00
Miroslav Bajtoš 4c69781504
4.5.2
* Improve Model type definitions (Miroslav Bajtoš)
 * fix: use existing field in exclude test (biniam)
2019-01-24 16:55:49 +01:00
Miroslav Bajtoš 928747f795
Merge pull request #1685 from strongloop/fix/type-defs
Improve Model type definitions
2019-01-24 16:54:37 +01:00
Miroslav Bajtoš 81fc722b72
Improve Model type definitions
Define two new types: ModelSettings and ModelProperties to describe the
objects describing model properties and settings.

Add static property `base` and static method `extend` to the definition
of `ModelBase` class.

Add property `defaultModelBaseClass` to `ModelBuilder` class definition.

Fix `PropertyDefinition` interface: remove `name`, add optional `id`.
2019-01-24 16:27:40 +01:00
Biniam Admikew 0ec951ee11
Merge pull request #1682 from strongloop/fix/include-test
fix: use existing field in exclude test
2019-01-16 14:33:55 -05:00
biniam 0b81425a13 fix: use existing field in exclude test
Co-authored-by: Raymond Feng <rfeng@us.ibm.com>
2019-01-16 13:24:27 -05:00
Diana Lau d3f63a8ecd 4.5.0
* Revert "5.0.0". It was released accidentally. (Diana Lau)
 * Upgrade eslint-config-loopback to latest (Miroslav Bajtoš)
 * manually fix remaining problems (Miroslav Bajtoš)
 * autofix eslint errors (Miroslav Bajtoš)
 * eslint: enable no-var and prefer-const rules (Miroslav Bajtoš)
 * Update eslint-config-loopback to latest (Miroslav Bajtoš)
 * Update dependencies to latest versions (Miroslav Bajtoš)
 * Upgrade bson to 4.x (latest) (Miroslav Bajtoš)
 * feat: dataSource.execute(cmd, args, opts, cb) (Miroslav Bajtoš)
 * eslint: enable ES2017 (async functions) (Miroslav Bajtoš)
2018-12-14 08:49:17 -05:00
Diana Lau 92499aa152 Revert "5.0.0". It was released accidentally.
This reverts commit caa36a21da.
2018-12-14 08:47:15 -05:00
Diana Lau caa36a21da 5.0.0
* Upgrade eslint-config-loopback to latest (Miroslav Bajtoš)
 * manually fix remaining problems (Miroslav Bajtoš)
 * autofix eslint errors (Miroslav Bajtoš)
 * eslint: enable no-var and prefer-const rules (Miroslav Bajtoš)
 * Update eslint-config-loopback to latest (Miroslav Bajtoš)
 * Update dependencies to latest versions (Miroslav Bajtoš)
 * Upgrade bson to 4.x (latest) (Miroslav Bajtoš)
 * feat: dataSource.execute(cmd, args, opts, cb) (Miroslav Bajtoš)
 * eslint: enable ES2017 (async functions) (Miroslav Bajtoš)
2018-12-14 08:29:22 -05:00
Miroslav Bajtoš 47ef38e9f1
Merge pull request #1675 from strongloop/upgrade-eslint-config
Upgrade eslint-config-loopback to latest
2018-12-07 17:15:44 +01:00
Miroslav Bajtoš 09e2208062
Upgrade eslint-config-loopback to latest 2018-12-07 17:09:10 +01:00
Miroslav Bajtoš bd5fd07d27
Merge pull request #1674 from strongloop/eslint/use-const-not-var
Refactor: migrate from "var" to "const"
2018-12-07 16:56:45 +01:00
Miroslav Bajtoš 9e0f624ad5
manually fix remaining problems 2018-12-07 16:46:15 +01:00
Miroslav Bajtoš 422ec9ad4f
autofix eslint errors 2018-12-07 16:46:15 +01:00
Miroslav Bajtoš 261ca1f092
eslint: enable no-var and prefer-const rules 2018-12-07 16:40:03 +01:00
Miroslav Bajtoš 8684df62a6
Merge pull request #1673 from strongloop/upgrade-deps
Upgrade dependencies to their latest versions
2018-12-07 16:31:17 +01:00
Miroslav Bajtoš 84322d07a9
Update eslint-config-loopback to latest 2018-12-07 16:22:59 +01:00
Miroslav Bajtoš e513c0d355
Update dependencies to latest versions
Skip update of shouldjs to avoid breaking tests in connectors.
2018-12-07 16:22:59 +01:00
Miroslav Bajtoš e834368502
Upgrade bson to 4.x (latest) 2018-12-07 16:22:59 +01:00