Commit Graph

303 Commits

Author SHA1 Message Date
Simon Ho dae0bf863e Set ESLint as devdep 2016-05-10 12:38:30 -07:00
Simon Ho 5be2b3f867 Use mocha instead of Makefile for testing 2016-05-10 11:56:35 -07:00
Miroslav Bajtoš c7f34c3452 eslint config 2.0 + remove extra empty lines
Upgrade eslint-config-loopback to ^2.0.0.

Remove extra empty lines to make `npm run lint` pass again.
2016-04-19 16:11:43 +02:00
Miroslav Bajtoš 1e8fe6a0d7 3.0.0-alpha.4
* Partition by foreign key for pagination (Raymond Feng)
 * Fix style errors (Raymond Feng)
 * fix remaining eslint issues (Miroslav Bajtoš)
 * eslint --fix (Miroslav Bajtoš)
 * Add eslint as "npm run lint" and "posttest" hook (Miroslav Bajtoš)
 * Remove unused support/ files (Miroslav Bajtoš)
 * Insert copyright headers (Ryan Graham)
 * Relicense as MIT only (Ryan Graham)
 * Fix Mongo compatibility issue (Amir Jafarian)
 * Add automigrate to setup tables for replace test cases (Amir Jafarian)
 * Allow test folder to be published (Amir Jafarian)
 * support custom field settings under the connector's namespace (bitmage)
 * Update error message for missing connector (gunjpan)
 * Fix tests for mysql (Amir Jafarian)
 * Add forgotten unit test (Miroslav Bajtoš)
 * fix nin support for in memory datasource (Horia Radu)
 * Improve error message on connector init error (Miroslav Bajtoš)
 * discoverSchemas returns an error when modelName is not found, discoverSchema forwards that error and does not hang when no columns, no errors are returned (bitmage)
2016-04-07 09:21:38 +02:00
Miroslav Bajtoš fc1aefb8d4 Add eslint as "npm run lint" and "posttest" hook 2016-04-05 15:25:34 +02:00
Amir Jafarian 0b1070af01 Allow test folder to be published 2016-03-28 20:08:56 -04:00
Miroslav Bajtoš dd4530cad6 3.0.0-alpha.3
* Fix missing connector error msg for db2, cloudant (Candy)
 * Update describe-operation-hooks (Miroslav Bajtoš)
2016-02-22 10:45:06 +01:00
Miroslav Bajtoš 504675fc78 3.0.0-alpha.2
* Implementtaion of replace (Amir Jafarian)
 * Fix conversion for `updateAttributes` (Amir Jafarian)
 * Prevent constructor to be property name (Jue Hou)
 * Revert "Change "npm test" to call mocha directly" (Miroslav Bajtoš)
 * Change "npm test" to call mocha directly (Hans(Zhenghan) Zhang)
 * Refactor `updateAttributes` (Amir Jafarian)
 * Update README.md (Simon Ho)
 * Add unit test to verify fix for #754 (Tom Kirkpatrick)
 * Update package.json (Janny)
 * Try mocha test (Janny)
 * Implement `findOrCreate` for memory connector (Amir Jafarian)
 * Fix a bug when validation is off for findOrCreate (Amir Jafarian)
 * Use bluebird in utils.js Replace `global.Promise` with `bluebird` (Jue Hou)
 * Fix broken code fencings in the docs (Farid Nouri Neshat)
 * Revert "Correct syntax for should and more" (Simon Ho)
 * Fix test for shouldjs 8.0.2 upgrade (Simon Ho)
 * Upgrade shouldjs to 8.0.2 (Simon Ho)
 * Enhance "persist" hook in DAO.updateOrCreate (Miroslav Bajtoš)
 * Enhance "persisted" hook in DAO.updateAttributes (Miroslav Bajtoš)
 * "loaded" hook in DAO.find: ctx.data, not instance (Miroslav Bajtoš)
 * describe-operation-hooks: add "loaded" hook (Miroslav Bajtoš)
2016-02-05 16:42:46 +01:00
Miroslav Bajtoš 54ca067610 Revert "Change "npm test" to call mocha directly"
This reverts commit 1e9affe4ba.
2016-01-26 17:35:46 +01:00
Hans(Zhenghan) Zhang 1e9affe4ba Change "npm test" to call mocha directly
Rework the test script to call directly mocha and skip Makefile. This
allows CI enviroments to detect that this module is using Mocha as
the test runner.
2016-01-25 14:20:13 +01:00
Janny 2cdc4ddcbf Update package.json 2016-01-22 09:18:49 +08:00
Janny ccf52f0822 Try mocha test 2016-01-22 09:17:54 +08:00
Jue Hou 853ca03491 Use bluebird in utils.js
Replace `global.Promise` with `bluebird`
2016-01-07 15:27:33 -05:00
Simon Ho edd2d301e5 Upgrade shouldjs to 8.0.2 2015-12-22 15:03:16 -08:00
Miroslav Bajtoš 990307f3d5 3.0.0-alpha.1
* Start development of 3.0 (Miroslav Bajtoš)
 * Correct syntax for should and more (Amir Jafarian)
2015-12-22 13:15:52 +01:00
Miroslav Bajtoš d3e2520b1f Start development of 3.0
- Update version number in package.json, publish under "next" tag
 - Add 3.0-RELEASE-NOTES.md to incrementally build release docs
2015-12-22 12:48:06 +01:00
Raymond Feng 1e9bbd2787 2.44.0
* Fix failing test for MongoDB connector (Simon Ho)

 * Make automatic validation optional (Bert Casier)

 * Add refresh script (Simon Ho)

 * Add clean scripts (Simon Ho)

 * Refactor Makefile (Simon Ho)
2015-12-13 11:20:22 -08:00
Simon Ho 48695b711f Merge pull request #776 from strongloop/update-helper-scripts
Update helper scripts
2015-11-27 17:59:09 -08:00
Raymond Feng dbab15554d 2.43.0
* Explicitly initialize column of partition by clause and pass it in find()'s options argument (eugene-frb)

 * Fix for issue #774 (Pradeep Kumar Tippa)

 * silence a warning that introduced in bluebird 3.0 (Clark Wang)

 * fixed a bug where an error was sent to the updateAttributesCallback and then ignored (Abe BW)

 * Capture includeHasMany() as a find()'s caller by findCaller option (eugene-frb)

 * UpdateAttributes: Raises an error if database fails (Wilson Júnior)

 * fixes #753 (Joseph M. Persie)

 * typo fix (nennad)

 * Fix foreignKey length issue (nennad)
2015-11-27 10:48:29 -08:00
Simon Ho 003cb1061f Add refresh script 2015-11-24 22:46:13 -08:00
Simon Ho 70871a5a44 Add clean scripts 2015-11-24 22:46:00 -08:00
Simon Ho 974536c669 Refactor Makefile 2015-11-24 22:45:36 -08:00
Raymond Feng b8fb67beb5 2.42.0
* Correction of a regression introduced by commit 632898b: when querying an empty array ([]) with a 'neq' filter, there were no matching. (Michael Diguet)

 * dropped unused functions and tests fixed (Wert_Lex)

 * One more comment (Wert_Lex)

 * Looks better now (Wert_Lex)

 * home-written map extended with proper .set() method (Wert_Lex)

 * on the halfway to keeping original keys (Wert_Lex)

 * with updated map which stores original key and tests for them (Wert_Lex)

 * Moved inst initialization to place where it used (Wert_Lex)

 * All tests passed (Wert_Lex)

 * Dirty merge. Tests are broken (Wert_Lex)

 * include utils add. Tests ported to should.js (Wert_Lex)
2015-11-23 16:00:29 -08:00
Raymond Feng 84e606bc59 2.41.2
* Fix the typo (Raymond Feng)

 * fix typo (Clark Wang)

 * fix global leak that mocha complains (Clark Wang)

 * Refer to licenses with a link (Sam Roberts)
2015-11-17 13:28:17 -08:00
Raymond Feng 46bdb063c4 2.41.1
* Added missing callback when a model is not found (Federico Rampazzo)

 * Rewrite of variable (mdartic)

 * Filtering relations of a model with an order specified (mdartic)
2015-10-28 10:22:17 -07:00
Miroslav Bajtoš a2ed2a401b 2.41.0
* Ability to define normalization of undefined query (Ryan Schumacher)
 * findByIds would fail when an array of 0 length was passed as its first argument (James Cooke)
 * Use strongloop conventions for licensing (Sam Roberts)
2015-10-07 13:01:13 -07:00
Sam Roberts 4b16e3b0bd Use strongloop conventions for licensing 2015-09-21 16:42:54 -07:00
Raymond Feng 7ede276e44 2.40.1
* Fix the test so that it works across DBs (Raymond Feng)
2015-09-11 11:15:39 -07:00
Raymond Feng 567ffb8040 2.40.0
* Fix id comparision in tests so that they work with mongodb object id (Raymond Feng)

 * Update validations.js (Rand McKinney)

 * Add support for using UUID V4 as defaultFn (Bram Borggreve)

 * primaryKey for hasMany and belongsTo relations (sklyukin)

 * primaryKey to hasOne relation (sklyukin)

 * Add direct copmarison value for array matching (Laurent Villeneuve)

 * Add support for matching array values à la mongo. (Laurent Villeneuve)

 * Fixed ReferencesMany .findById to check the given id in the ids array of the model instance (Satyadeep)
2015-09-10 13:43:58 -07:00
Raymond Feng 0b22e2a2fb 2.39.0
* Optimze automigrate() to cut the test time signicantly (Raymond Feng)

 * Fix primary key checks (Simon Ho)

 * travis: drop 0.6 and 0.8, add iojs (Miroslav Bajtoš)

 * Upgrade Travis to container-based infrastructure (Miroslav Bajtoš)

 * Relax id requirement for basic query operations (Simon Ho)
2015-08-27 16:02:08 -07:00
Raymond Feng 347926ea13 2.38.0
* Support embedded query in memory connector. Fix memory connector bug (Laurent Villeneuve)

 * Use idEquals when comparing ids in relation definitions (Laurent Villeneuve)

 * Handle possible undefined id (Laurent Villeneuve)

 * Fix id copmarison by using strings (Laurent Villeneuve)

 * Refactor idEquals to utils (Raymond Feng)
2015-08-18 14:40:51 -07:00
Raymond Feng 84c4d0e922 2.37.0
* Do not coerce RegExp objects to strings (Simon Ho)

 * Indicate result of destroyById/protototype.destroy (Fabien Franzen)

 * Removed extra ")" (Chris Finn)

 * Fixed typo & added the filter units (Chris Finn)
2015-08-14 09:32:18 -07:00
Raymond Feng de5c63fc1e 2.36.0
* Report deferred exceptions via callback (Raymond Feng)

 * fixes issue 673: Include hasMany of relation does not return empty array (Kenta Fried)
2015-08-05 11:19:21 -07:00
Raymond Feng a41fabef70 2.35.3
* Fix the test case with automigrate (Raymond Feng)
2015-07-30 11:25:07 -07:00
Raymond Feng 78bb13db97 2.35.2
* Fix regexp error for the memory connector (Simon Ho)
2015-07-30 09:15:21 -07:00
Raymond Feng ff6a2228f2 2.35.1
* Fix error handling (Raymond Feng)
2015-07-29 10:22:04 -07:00
Raymond Feng b7042b982f 2.35.0
* Remove test for unused utility function (Simon Ho)

 * Remove try/catch from find function (Simon Ho)

 * Add support for regex operator (Simon Ho)

 * Async 'loaded' hook for find (Pradnya Baviskar)

 * Promisify all 'discover' methods (Pradnya Baviskar)

 * Fix 'persist' hook for updateAttributes() (Pradnya Baviskar)
2015-07-29 07:49:56 -07:00
Raymond Feng 5e192bda23 2.34.0
* Don't enforce strictness if allowExtendedOperators: true (MongoDB) (Fabien Franzen)

 * Take strict: validate and throw settings into account (Fabien Franzen)

 * Filter attributes when strict: true (Fabien Franzen)
2015-07-22 08:36:00 -07:00
Raymond Feng 4151302e9e 2.33.3
* Make sure done() is called within the callback (Raymond Feng)
2015-07-21 09:08:56 -07:00
Raymond Feng b9e32bf811 2.33.2
* Add NOTICE (Raymond Feng)

 * prevent upsert overwriting default values with applyDefaultValues option (Bryan Clark)

 * use fromDb to deserialize data after save in Memory connector (Bryan Clark)

 * Correctly handle validatesUniquenessOf(idName) (Fabien Franzen)
2015-07-18 22:28:15 -07:00
Raymond Feng 64b6aef924 2.33.1
* Fix object merge (Raymond Feng)
2015-07-10 14:15:33 -07:00
Raymond Feng 9d653c1a45 2.33.0
* Make sure base property definitions are cloned (Raymond Feng)
2015-07-10 10:40:29 -07:00
Raymond Feng f3b2a97c84 2.32.0
* Fix the regression for date conversion (Raymond Feng)

 * Don't cache static scope method results #575 (Fabien Franzen)
2015-07-03 09:29:58 -07:00
Raymond Feng 88229fb5cf 2.31.1
* Fix the regexp value for like/nlike (Raymond Feng)
2015-07-02 23:22:56 -07:00
Raymond Feng 62a429b2a6 2.31.0
* Assert the existence of instance (Raymond Feng)

 * Make sure operator/options are honored (Raymond Feng)

 * Fix coercion from ObjectID to String (Raymond Feng)

 * Fix #623 - use actual id order (Fabien Franzen)

 * test: fix persistence-hooks failures in MySQL (Miroslav Bajtoš)

 * Includes with transaction support (Rus1)

 * Fix updateOrCreate transaction propagation (Rus1)

 * Fix promise chaining in case of error (Rus1)

 * Promisify 'autoupdate' (Pradnya Baviskar)

 * Add new hook 'loaded' (Pradnya Baviskar)
2015-07-02 14:57:11 -07:00
Raymond Feng 019705d32f 2.30.1
* Ping async to 1.0.0 to work around context propagation (Raymond Feng)

 * Fix the test case (Raymond Feng)
2015-06-16 13:43:28 -07:00
Raymond Feng 8302b2480d Ping async to 1.0.0 to work around context propagation 2015-06-16 13:43:06 -07:00
Raymond Feng 62f3f3af0d 2.30.0
* Promisify 'automigrate' (Pradnya Baviskar)

 * check object exists before setting __cachedRelations (ningsuhen)

 * Fix the test case as updateAll takes `where` directly (Raymond Feng)

 * Fix for issues #622 & #623 (ningsuhen)

 * Add new hook 'persist' (Pradnya Baviskar)

 * Create a script to describe operation hooks (Miroslav Bajtoš)

 * Allow 0 as the FK (Raymond Feng)

 * fix typo (Clark Wang)

 * Dedupe ids args of inq for include (Raymond Feng)
2015-06-16 09:00:08 -07:00
Raymond Feng 56344fe99e 2.29.2
* Fix the test case (Raymond Feng)
2015-05-29 09:29:05 -07:00
Raymond Feng 270fc4c247 2.29.1
* Update deps (Raymond Feng)

 * Don't silently swallow db errors on validation. (Samuel Reed)

 * adapt coding style @bajtos (mamboer)

 * addressing #603 (Patrick Perini)

 * enhancement on #588 (mamboer)

 * fix issue #587 (mamboer)

 * add test suit for scope - dynamic function (Nemo)
2015-05-28 14:53:28 -07:00