Commit Graph

3211 Commits

Author SHA1 Message Date
Miroslav Bajtoš a456700ea2
Merge tag 'v4.16.0'
Merge v4.16.0 release that was accidentally not merged to master
at publishing time.
2019-12-06 13:56:47 +01:00
Miroslav Bajtoš af4f4dfa87
Merge pull request #1808 from strongloop/fix/typo
Fix typo introduced by 19048cd7
2019-12-06 13:41:36 +01:00
Miroslav Bajtoš abdd5675b0
Fix typo introduced by 19048cd7
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2019-12-06 10:35:19 +01:00
Miroslav Bajtoš 002137dd5d
Merge pull request #1799 from jeznag/fix-issue-with-new-array
Fix issue with broken compatibility with array constructor
2019-12-06 10:18:17 +01:00
Jeremy Nagel b328934b6c [BUGFIX] Fix issue with with array constructor
- You can do new Array(4) to generate an array with 4 empty items
- Doing the same with list caused an error
- This broke lodash.deepclone
- This PR restores compatibility with the array constructor

Fixes #1798
2019-12-06 10:13:27 +11:00
Miroslav Bajtoš c555dedfeb
Merge pull request #1807 from strongloop/fix/datasource-typings
Fix Promise/Callback variants in datasource types
2019-12-05 17:03:55 +01:00
Miroslav Bajtoš 19048cd716
Fix Promise/Callback variants in datasource types
Remove usage of `PromiseOrVoid`, it makes it difficult to consume
the API via `await`. For each async method, define multiple variants
to correctly describe what's returned when a callback arg was provided
(`void`) and what's returned when called with no callback
(`Promise<T>`).

Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2019-12-05 16:30:22 +01:00
Miroslav Bajtoš 2f867576b6
Merge pull request #1804 from strongloop/update-deps
Update strong-globalize and async to their latest versions
2019-12-03 16:13:52 +01:00
Miroslav Bajtoš 606880bf79
Merge pull request #1803 from strongloop/update-eslint
chore: update eslint to 6.x
2019-12-03 16:13:31 +01:00
Miroslav Bajtoš a9611a0430
chore: update async to v3.x
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2019-12-03 10:12:32 +01:00
Miroslav Bajtoš 1d4ad278c9
chore: update strong-globalize to 5.x
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2019-12-03 10:12:10 +01:00
Miroslav Bajtoš 1b7858a857
chore: update eslint to 6.x
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2019-12-03 10:09:16 +01:00
Miroslav Bajtoš 770f11b3a6
Merge pull request #1790 from mitsos1os/return-promise-on-error
Convert error thrown by a property setter to a rejected promise
2019-11-29 10:15:52 +01:00
Hage Yaapa 89503bb233 4.16.0
* feat: applyDefaultOnWrites in nested properties (Hage Yaapa)
 * chore: disable security issue reporting (Nora)
2019-11-28 14:13:49 +05:30
Hage Yaapa 89a964e919 feat: applyDefaultOnWrites in nested properties
Adds support for `applyDefaultOnWrites` in nested properties.
2019-11-28 13:59:47 +05:30
Dimitris Xalatsis b30fbf8c1e return failed promise on error 2019-11-22 19:38:43 +02:00
Nora d54d769477
Merge pull request #1792 from strongloop/chore/improve-issue-templates
chore: disable security issue reporting
2019-11-19 01:17:05 -05:00
Miroslav Bajtoš f921a4f630
4.15.0
* Fix generated string id's (Francisco Buceta)
 * Remove loopback-connector-ibmi from downstream (Miroslav Bajtoš)
2019-11-18 08:34:56 +01:00
Miroslav Bajtoš 5578ab4ea7
Merge pull request #1783 from frbuceta/fix/lb4-issue-3602
Fix issue with lb4 id different to int
2019-11-18 08:34:06 +01:00
Nora a1817a40e6 chore: disable security issue reporting 2019-11-15 20:50:45 -05:00
Francisco Buceta b9f0284a28
Fix generated string id's
Co-authored-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2019-11-15 16:15:38 +01:00
Miroslav Bajtoš b07bdfc71a
Merge pull request #1791 from strongloop/ci/skip-ibmi-downstream
chore: remove loopback-connector-ibmi from downstream list
2019-11-05 17:32:38 +01:00
Miroslav Bajtoš 28d457d357
Remove loopback-connector-ibmi from downstream
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2019-11-05 17:22:34 +01:00
Diana Lau 8b75767daf 4.14.0
* fix #1781 (#1782) (Dimitris Halatsis)
 * Introduce issue templates for bugs, features, etc. (Miroslav Bajtoš)
 * Improve PULL_REQUEST_TEMPLATE (Miroslav Bajtoš)
2019-10-21 13:13:03 -04:00
Dimitris Halatsis ab11205fa0 fix #1781 (#1782) 2019-10-21 12:55:14 -04:00
Miroslav Bajtoš 23949703b0
Merge pull request #1779 from strongloop/improve/github-templates
Improve issue & pull-request templates
2019-10-08 08:17:40 +02:00
Miroslav Bajtoš 063e0f173f
Introduce issue templates for bugs, features, etc.
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2019-10-07 10:58:14 +02:00
Miroslav Bajtoš 071f93762c
Improve PULL_REQUEST_TEMPLATE
Make it easier for contributors to mix the text provided by GitHub
from the commit messages with the template content.

Rework the checklist to follow the style we use in loopback-next.

Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2019-10-07 10:58:07 +02:00
Raymond Feng 15251880a1 4.13.0
* Fix typescript typing for DataSource.getModel (Raymond Feng)
2019-09-19 13:08:16 -07:00
Raymond Feng 8946516614
Merge pull request #1778 from strongloop/fix-datasource-getmodel-typing
Fix typescript typing for DataSource.prototype.getModel()
2019-09-19 13:05:50 -07:00
Raymond Feng 1e8b8a041b Fix typescript typing for DataSource.getModel
See https://github.com/strongloop/loopback-next/pull/3722
2019-09-19 09:25:24 -07:00
Diana Lau ad1777fcd3 4.12.1
* chore: reduce identifier length (Hage Yaapa)
2019-09-04 11:55:36 -04:00
Hage Yaapa 6f491dc756 chore: reduce identifier length
Existing identifier length exceeds Oracle DB's limit
2019-09-03 20:46:08 +05:30
Diana Lau fa7c38cad8 4.12.0
* feat: add applyDefaultOnWrites property (Hage Yaapa)
 * Fix polymorphic hasMany inverse relation (#1621) (Ayeni Olusegun)
2019-08-19 12:13:47 -04:00
Hage Yaapa 464610ef0a feat: add applyDefaultOnWrites property
Adds the ability to ignore writing default values to the database.
2019-08-19 17:11:27 +05:30
Ayeni Olusegun 814c55c7cd Fix polymorphic hasMany inverse relation (#1621)
* Polymorphic hasMany inverse relation

* rename test suit to eslint error
2019-08-12 15:30:28 -04:00
Diana Lau ac955826f5 4.11.0
* fix: prevent max listeners warning (Dominique Emond)
2019-08-09 13:23:25 -04:00
Nora a90dc0eac4
Merge pull request #1767 from strongloop/dremond_migrate_errors
fix: prevent max listeners warning
2019-08-09 09:18:38 -04:00
Dominique Emond bca631518b fix: prevent max listeners warning
If establishing a database connection is slow
and database migration runs and there are many
models, sql operations are queued up and this
leads to the node.js max emitters exceeded
warning.

A default value for max emitters has now
been introduced, and it can also be configured
in datasources.json.

Co-authored-by: Dominique Emond <dremond@ca.ibm.com>
2019-08-09 09:03:51 -04:00
Miroslav Bajtoš ad4edc6a15
4.10.1
* Fix coercion of PK value in `replaceById` method (Miroslav Bajtoš)
 * Fix autoupdate queueing automigrate instead (#1762) (darthmaim)
2019-07-26 09:22:59 +02:00
Miroslav Bajtoš 74c43ca358
Merge pull request #1763 from strongloop/fix/PK-coercion-in-replaceById
Fix coercion of PK value in `replaceById` method
2019-07-26 09:22:27 +02:00
Miroslav Bajtoš f1fa976f50
Fix coercion of PK value in `replaceById` method
Before this change, when both the PK value (`id`) and the `data` object
were provided as plain-data values (e.g. as received in a JSON request),
and the connector was using a complex PK type (e.g. `ObjectID`
in MongoDB), then `replaceById` operation was printing confusing
warnings:

    WARNING: id property cannot be changed from 5d39775a59f5f541513c5e05
        to 5d39775a59f5f541513c5e05 for model:Post
        in 'before save' operation hook

    WARNING: id property cannot be changed from 5d39775a59f5f541513c5e05
        to 5d39775a59f5f541513c5e05 for model:Post
        in 'loaded' operation hook

This commit fixes the problem by applying the same type coercion on the
PK value (`id`) as has been applied by the model constructor on the PK
property (`data.id`).

Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2019-07-26 09:02:52 +02:00
darthmaim dd7167b533 Fix autoupdate queueing automigrate instead (#1762)
Fixes #1761
2019-07-25 14:17:34 -04:00
Miroslav Bajtoš ca4ede014e
4.10.0
* fix: use only promises for beginTransaction (Biniam Admikew)
 * feat: add DataSource.deleteAllModels() API (Miroslav Bajtoš)
2019-07-23 16:48:45 +02:00
Biniam Admikew 6b83b6f4d1
Merge pull request #1760 from strongloop/fix/begintransaction-api
fix: use only promises for beginTransaction
2019-07-19 11:11:58 -04:00
Biniam Admikew e3c276720f fix: use only promises for beginTransaction
Co-authored-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2019-07-19 10:30:10 -04:00
Miroslav Bajtoš 6478c73dde
Merge pull request #1759 from strongloop/feat/reset-datasource
feat: add DataSource.deleteAllModels() API
2019-07-18 18:22:37 +02:00
Miroslav Bajtoš 78c5b12740
feat: add DataSource.deleteAllModels() API
When writing tests, for performance reasons we often want to reuse
the same data-source instance for many tests suites. At the same time,
we want to keep such test suites independent and allow them to reuse
the same model name for different model classes.

Juggler does support redefinition of a model with the same name.

This change is adding a new API called that allows tests to remove all
old models before creating new ones. This API would be typically
called from a `before` hook.

Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2019-07-18 17:56:41 +02:00
Biniam Admikew 6aea50ad27 4.9.0
* fix: report errors from automigrate/autoupdate (Miroslav Bajtoš)
 * feat: add beginTransaction API on datasource (Biniam Admikew)
 * Revert "chore: expose beginTransaction API" (Biniam Admikew)
2019-07-15 17:27:53 -04:00
Miroslav Bajtoš 0c2bb81dac
Merge pull request #1756 from strongloop/fix/migrate-errors
fix: report errors from automigrate/autoupdate
2019-07-04 13:51:36 +02:00