Commit Graph

3076 Commits

Author SHA1 Message Date
Raymond Feng fcac276955 3.24.0
* 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)
2018-09-17 09:03:33 -07:00
Raymond Feng 242fd1bb56
Merge pull request #1625 from strongloop/fix-list-of-class-instances
Allow List to take items as instances of a class
2018-09-17 09:02:16 -07:00
Raymond Feng 7c7bd56b2e Add IBM copyright and MIT license headers 2018-09-17 09:00:12 -07:00
Raymond Feng 7eec7e4e34 Allow List to take items as instances of a class 2018-09-17 08:22:21 -07:00
Tom Kirkpatrick 251798c711 fix: ignore extra properties when strict=filter (#1423)
Fix for #1422
2018-08-29 22:57:37 -04:00
Kyusung Shim 2b8b6719a7
Merge pull request #1611 from strongloop/datasource-event-type
Add EventEmitter type information to DataSource type
2018-07-25 16:15:07 -04:00
shimks 1e59918c11 Add EventEmitter type info to DataSource type 2018-07-25 15:13:54 -04:00
Raymond Feng 4d14c1473f 3.23.0
* fix: update TypeScript declaration for KV (Raymond Feng)
 * Upgrade eslint-config-loopback + fix formatting (Miroslav Bajtoš)
 * Hide nyc coverage from test output (Miroslav Bajtoš)
 * Configure Mocha to use dot reporter (Miroslav Bajtoš)
2018-07-16 11:15:14 -07:00
Raymond Feng 06284be673 Merge branch 'kv-types' 2018-07-16 11:11:32 -07:00
Raymond Feng 76b87ade93 fix: update TypeScript declaration for KV 2018-07-16 11:09:29 -07:00
Raymond Feng 9717e512b4
Merge pull request #1608 from strongloop/kv-types
fix: update TypeScript declaration for KV
2018-07-16 10:43:03 -07:00
Raymond Feng 535b000195 fix: update TypeScript declaration for KV 2018-07-16 10:11:54 -07:00
Miroslav Bajtoš 3e5c805418
Merge pull request #1609 from strongloop/update-eslint-config
Upgrade eslint-config-loopback + fix formatting
2018-07-16 17:55:24 +02:00
Miroslav Bajtoš 7d50f6130b
Upgrade eslint-config-loopback + fix formatting
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.
2018-07-16 08:46:25 +02:00
Miroslav Bajtoš be7d97c885
Merge pull request #1605 from strongloop/make-test-output-concise
Make test output concise
2018-07-10 12:24:55 +02:00
Miroslav Bajtoš bc2689f58d
Hide nyc coverage from test output
Configure nyc/istanbul to generate an HTML report that can be inspected
in a browser instead of printing a long table after each test run.
2018-07-10 12:11:46 +02:00
Miroslav Bajtoš 38d5b5b4fa
Configure Mocha to use dot reporter
With 1965 tests, printing names of all tests is no longer useful.

This commit switches to "dot" reporter which prints a single dot per
test.
2018-07-10 12:11:46 +02:00
virkt25 7ae64edf3d 3.22.2
* assertation of undefined could be null (shenghu)
 * fix: regression on Operation Hooks (virkt25)
2018-07-09 16:51:30 -04:00
shenghu bc16692d9b assertation of undefined could be null 2018-07-09 11:53:27 -04:00
Miroslav Bajtoš 2f263898c6
Merge pull request #1602 from strongloop/juggler-fix
Fix regression in Operation Hooks
2018-07-09 17:04:54 +02:00
virkt25 9bd7f8d02f
fix: regression on Operation Hooks
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.
2018-07-09 16:41:56 +02:00
Miroslav Bajtoš da728b8d70
3.22.1
* [WebFM] cs/pl/ru translation (#1600) (tangyinb)
 * fixup! address code review comments (Miroslav Bajtoš)
 * Fix type definitions for PersistedModel API (Miroslav Bajtoš)
 * Fix Operation Hooks to propagate data changes (Miroslav Bajtoš)
 * Fix stalebot config to ignore "good first issue" (Miroslav Bajtoš)
2018-07-02 09:02:00 +02:00
Miroslav Bajtoš 3ac18e4e06
Merge pull request #1599 from strongloop/fix/typings
Fix type definitions for PersistedModel API
2018-07-02 09:00:56 +02:00
tangyinb b180f363ac [WebFM] cs/pl/ru translation (#1600)
cs/pl/ru translation check-in by YI TANG (tangyinb@cn.ibm.com) using
WebFM tool.
2018-06-29 09:37:15 -04:00
Miroslav Bajtoš 6f3675b13c
fixup! address code review comments 2018-06-29 08:35:22 +02:00
Miroslav Bajtoš 548379ca2a
Fix type definitions for PersistedModel API
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.
2018-06-28 13:09:47 +02:00
Miroslav Bajtoš 3938c3755e
Merge pull request #1598 from strongloop/fix/apply-updates-from-hooks
Fix Operation Hooks to propagate data changes
2018-06-28 13:05:43 +02:00
Miroslav Bajtoš 9af79cf51a
Fix Operation Hooks to propagate data changes
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.
2018-06-28 12:22:16 +02:00
Miroslav Bajtoš fa0039c6a8
Merge pull request #1595 from strongloop/good-first-issues-are-not-stale
Fix stalebot config to ignore "good first issue"
2018-06-15 08:37:43 +02:00
Miroslav Bajtoš 6846ef87b4
Fix stalebot config to ignore "good first issue" 2018-06-14 15:50:21 +02:00
Miroslav Bajtoš 5d762102fe
3.22.0
* Update strong-globalize to 4.x (Miroslav Bajtoš)
 * Update remaining dev-dependencies to latest (Miroslav Bajtoš)
 * Update eslint + config to latest (Miroslav Bajtoš)
 * Disable package-lock feature of npm (Miroslav Bajtoš)
 * Travis: add Node.js 10.x to the build matrix (Miroslav Bajtoš)
 * Drop support for Node 4.x (Miroslav Bajtoš)
2018-06-12 16:26:58 +02:00
Miroslav Bajtoš 751fd7b245
Merge pull request #1594 from strongloop/upgrade-deps
Drop support for Node.js 4.x + update dependencies
2018-06-12 16:26:07 +02:00
Miroslav Bajtoš 7a8213af43
Update strong-globalize to 4.x 2018-06-12 09:17:26 +02:00
Miroslav Bajtoš 5d8c36eca0
Update remaining dev-dependencies to latest
Keep should at 8.x for compatibility with connectors.
2018-06-12 09:13:54 +02:00
Miroslav Bajtoš d2ee73b9d3
Update eslint + config to latest 2018-06-12 09:13:32 +02:00
Miroslav Bajtoš e2d75e70d1
Disable package-lock feature of npm 2018-06-12 08:42:05 +02:00
Miroslav Bajtoš 26c795fdea
Travis: add Node.js 10.x to the build matrix 2018-06-12 08:35:04 +02:00
Miroslav Bajtoš c479be7069
Drop support for Node 4.x
Node 4.x is no longer maintained by Node.js project.
2018-06-12 08:34:49 +02:00
Raymond Feng 77f11cda3b 3.21.1
* Fix tests to ensure compatibility w/ should@10 (Raymond Feng)
2018-05-24 21:11:11 -07:00
Raymond Feng ef3191d3e5
Merge pull request #1588 from strongloop/tidy-up-tests
Fix tests to ensure upward compatibility w/ should@10
2018-05-24 21:10:13 -07:00
Raymond Feng 2b4b44292a Fix tests to ensure compatibility w/ should@10 2018-05-24 14:21:12 -07:00
Raymond Feng dafb8a1ab7 3.21.0
* Fix datasource state management (Raymond Feng)
2018-05-22 10:52:51 -07:00
Raymond Feng 41c9a6d9b0
Merge pull request #1585 from strongloop/fix-lazy-connect
Fix datasource state management
2018-05-22 10:51:35 -07:00
Raymond Feng 5a66f9ad72 Fix datasource state management
Use case:
1. Configure a datasource with lazyConnect = true
2. Do NOT start the DB
3. Start the app
4. Send first request and it fails to connnect to the DB
5. Start the DB
5. Requests are now served correctly
2018-05-22 10:46:45 -07:00
Raymond Feng dd30054138 3.20.2
* Remove node ref (Raymond Feng)
2018-05-11 09:09:58 -07:00
Raymond Feng d31c43bc09 Remove node ref 2018-05-11 09:09:31 -07:00
Raymond Feng eddb17689c 3.20.1
* Update deps (Raymond Feng)
2018-05-11 08:21:07 -07:00
Raymond Feng 2bb77e60e5 Update deps 2018-05-11 08:20:15 -07:00
Raymond Feng 965655be3a 3.20.0
* Fix typescript definitions to be compatible with LB4 (Raymond Feng)
 * Allow toObject() to accept an 'options' argument (Raymond Feng)
2018-05-10 10:20:41 -07:00
Raymond Feng e49eb47e36
Merge pull request #1583 from strongloop/fix-ts-defs
Fix ts defs
2018-05-10 10:20:10 -07:00