Commit Graph

20 Commits

Author SHA1 Message Date
Andy Hanson
45c9246c09 Remove esModuleInterop from tsconfigs (no longer mandatory) 2018-02-14 14:55:13 -08:00
Ron Buckton
6a78b6665a
Merge pull request #23404 from leak4mk0/bookshelf-collection-method
[bookshelf] Fix return value type of orderBy method.
2018-02-07 14:39:43 -08:00
Andy
4b2d0110d5
Fix many "import *" that should be "import =" (#23443) 2018-02-05 15:35:41 -08:00
Andy
bef4d2b27d
Enable "esModuleInterop" in all tsconfigs (#23354) 2018-02-05 11:01:56 -08:00
leak4mk0
866091be53 Fix return value type of orderBy method. 2018-02-04 19:32:03 +09:00
Steve Xian
ef74cd057e incremented version 2017-11-01 17:35:05 -07:00
Steve Xian
2373810e8d The existing code forces the transaction to return a bluebird promise, which is incompatiable with es6 promises and async/await.
Thus if the user application is written in es6 promises with async/await, and have to return a bluebird promise in order to use bookshelf transactions, it becomes a burden to translate.
The bookshelf.transaction is an alias for knex.transaction(http://bookshelfjs.org/#Bookshelf-instance-transaction), and the knex.transaction uses any as a return type instead of promise.

I updated the return type of the user supplied function to PromiseLike, which both es6 and bluebird promises implement.

Tested with both bluebird and es6 promises.
2017-11-01 17:25:25 -07:00
Andy
19f89399e4 Ensure every package has a tslint.json (#21009)
* Ensure every package has a tslint.json

* Fixes
2017-10-25 11:13:50 -07:00
Andy
947a8fb761 Enable strictFunctionTypes (#20373) 2017-10-06 14:03:03 -07:00
Bowden Kelly
72c4e7d76c Merge pull request #19018 from vesse/bookshelf/enable-where-in-query
[bookshelf] Allow array value for 'in' query
2017-08-22 10:58:01 -07:00
Andy
35187e3217 bookshelf: Replace typeof Model with ModelSubclass (#19095) 2017-08-18 06:53:50 -07:00
Andy
5d6c651a1a Apply stricter lint rules (#19063) 2017-08-17 14:53:41 -07:00
Vesa Poikajärvi
60f9770c88 [bookshelf] Allow array value for 'in' query 2017-08-15 18:32:25 +03:00
Andrew Lowe
3bc7dcf296 Add foreignKeyTarget and otherKeyTarget to belongsToMany method (#18448)
Defined in bookshelf docs: http://bookshelfjs.org/#Model-instance-belongsToMany
2017-07-31 13:56:33 -07:00
Andy Hanson
c15e214e5a bluebird: Make Thenable an alias to the builtin PromiseLike. 2017-06-16 09:02:18 -07:00
Nathan Shively-Sanders
163f4438df Fix weak type errors (#16845)
* Fix first round of weak type errors

Done through griddle-react

* 95% done with weak type fixes

* Fix last couple of weak type errors

* Remove some lint from mithril tests

* mithril's Lifecycle is not a weak type any more

Restore the Lifecycle constraints in the rest of the definitions.

* Fix react-redux tests after #16652 broke them

* Remove package-lock.json
2017-06-04 22:03:03 -07:00
Vesa Poikajärvi
d93d6a53a4 [bookshelf] fetchAll supports same parameters as fetch (#16170)
* fetchAll supports same parameters as fetch

Latest Bookshelf's instance.fetchAll calls collection.fetch() with
given options, ie. it supports the same options than fetch.

For example

(new User).fetchAll({columns: ['id', 'name']}).then(...)

* Update version number

* Revert "Update version number"

This reverts commit cf4a3e6c51554d75f5408acd23bb0fade6acafef.

* remove extra slash from contributor's name
2017-05-03 13:19:42 -07:00
Vesa Poikajärvi
2ca5a0e8f4 [bookshelf] Model#orderBy and Collection#orderBy (#16277)
* Bookshelf Model#orderBy and Collection#orderBy

orderBt introduced in Bookshelf 0.9.3

* [bookshelf] orderBy explicit parameters instead of ...args

* [bookshelf] Use a type for sort order
2017-05-03 10:58:47 -07:00
Andy
8966463273 bookshelf: Don't use class before declaration (#15982) 2017-04-19 10:10:56 -07:00
Andy Hanson
354cec620d Move all packages to a types directory 2017-03-24 14:27:52 -07:00