65 Commits

Author SHA1 Message Date
Andrés Correa Casablanca
f6ea8122b6
fix(security): avoid password leaks on query logs (#5559)
Signed-off-by: Andres Correa Casablanca <castarco@coderspirit.xyz>
2023-07-03 21:03:27 +02:00
Igor Savin
511ea2be0f
Querybuilder cleanup (#4282) 2021-02-08 16:54:00 +02:00
Igor Savin
a9773b79a3
Extract static methods outside of a formatter (#4213) 2021-01-07 02:04:10 +02:00
Igor Savin
0b2a2ca4d1
Extract static method _num out of class. Use super-methods (#4212) 2021-01-06 23:21:10 +02:00
Igor Savin
92d8f49724
Return complete list of DDL commands for creating foreign keys in SQLite (#4194) 2021-01-03 04:10:26 +02:00
Igor Savin
2aec21ed5e
Try to introduce some organization into how files are grouped (#4178) 2020-12-28 16:55:08 +02:00
maximelkin
1acb1b097b
drop fake-client and Knex.raw (#4180) 2020-12-28 02:27:48 +02:00
maximelkin
4da221ba4f
whatwg url connection string parsing (#3702) 2020-12-28 00:09:58 +02:00
Bogdan Chadkin
c54cded69d
Drop liftoff (#4122) 2020-12-26 19:29:46 +02:00
Igor Savin
ad41e1c0f4
Minor code improvements (#4167) 2020-12-20 01:43:36 +02:00
Snir Shechter
1975899c9c
Bugfix: Uses esm import if package.json type is module (#4158) 2020-12-14 01:09:43 +02:00
Ivan Starkov
84cee6c445
Fix performance of asyncStackTraces with enable-source-maps node flag (#4154) 2020-12-11 13:19:03 +02:00
Shunsuke Mano
4c42fa2520
Fix(seed:run): irregular seed file execution order (#4156) 2020-12-11 13:18:03 +02:00
Igor Savin
26f3e5d62d
Replace uuid with copied nanoid logic (#4089) 2020-10-30 14:21:17 +02:00
Bogdan Chadkin
db1b052e5d
Replace mkdirp with recursive flag (#4060) 2020-10-05 23:58:22 +03:00
Bogdan Chadkin
6f817a3b6e
Avoid lodash typecheks (#4056)
* Avoid lodash typecheks

Lodash is quite big project. Even with direct imports it loads [tons](https://github.com/knex/knex/pull/3804) of
code and still bloats node_modules. Especially since lodash mostly used
as a polyfill for modern features.

In this diff I attempted to reduce lodash usage by replacing type checks
with `typeof` operator which might be sufficient.

Also replaced lodash/isObject with custom simplified utility which does not
consider functions as objects and allows to simplify code in one place.
2020-10-05 21:29:39 +03:00
Christiano Marques
a481dde82c
feat: new config parameter / CLI flag to prefixing seed filename with a timestamp (#3873) 2020-09-19 16:11:05 +03:00
Mr D
907cc763f6
#3978 Improve mjs module support (#3980) 2020-08-15 17:54:43 +03:00
Mathieu DARTIGUES
f3c73ccd58
Add new option for seed : recursive (#3974) 2020-08-10 15:10:37 +02:00
Mathieu DARTIGUES
ab7644425d
Support multiple directories for seeds (#3967) 2020-08-08 15:21:43 +03:00
maximelkin
93f3f0ed11
rewrite delay to not node-only version (#3820) 2020-04-24 23:52:00 +02:00
Igor Savin
e37aeaa31c
Prepare for 0.21.0 release (#3811) 2020-04-19 00:40:23 +02:00
tkalliom
02d94d96b0
Reduce size of lodash in bundle (#3804) 2020-04-18 19:41:23 +02:00
Brian Lauber
8d5715a03a
Fix: Support for .finally(..) on knex's Promise-alikes (#3800) 2020-04-15 21:05:40 +02:00
Kabir Baidhya
a6551559f0
Minor improvements on the usage of fs utilities - unify all the fs functions into the same util/fs to simplify things (#3749) 2020-03-24 15:50:47 +01:00
Igor Savin
e552fbda78
Make protocol length check more defensive (#3744) 2020-03-22 23:51:42 +01:00
Kabir Baidhya
a7031c3cef
Upgrade package mkdirp and improve it's usage (#3741) 2020-03-21 11:01:10 +01:00
Brian Lauber
37d9c30347
Fix/method binding on knex proxy (#3717)
* knex methods are proxies for context methods ...

... as opposed to injecting the methods directly onto the knex
function.  (Which was then causing `this` to point to the wrong
object when evaluating the context methods)

* Moved CONTEXT_METHODS constant to a higher scope

* mv knex.context -> this.context

* Extracted KNEX_PROPERTY_DEFINITIONS to module scope ...

... which was possible since all of the properties reference
`this` instead of `knex` now

* shallowCloneFunction no longer accesses _context ...

... instead, it uses the normal context property

* transaction method delegates to _transaction ...

... This way, we can be sure that the lower-level details are
consistent across implementations.  Individual implementations
just need to handle the quirks around setting up the `config`
and `outerTx`

* CONTEXT_METHODS shared. Fixed override of withUserParams ...

Restructured the code so that CONTEXT_METHODS populates the
KNEX_PROPERTY_DEFINITIONS with the proxy methods.

In doing so, it also exposed the fact that the withUserParams(..)
method was being overridden on the Transactor instead of its
context.  So, that bug was fixed as well.

* Added a TODO to remove client.makeKnex(..) in future PR

* Added a warning about QueryBuilder.extend(..) and side-effects
2020-03-11 16:05:03 -04:00
Igor Savin
46783590be
timeout(..) function clears unnecessary timeouts (#3703) 2020-03-05 21:37:23 +01:00
maximelkin
b025aea318
remove dependency on bluebird methods from sources (#3683)
Co-authored-by: Brian Lauber <constructible.truth@gmail.com>
2020-02-25 22:50:24 +01:00
Brian Lauber
f3151bdc93
Cleanup and extract Transaction Workflow logic (rebase) (#3674) 2020-02-20 20:44:18 +01:00
maximelkin
88d832cd36
replace Bluebird.timeout (#3634) 2020-02-12 21:42:15 +01:00
Igor Savin
c14252d907
Refactor more tests to use cli-testlab (#3640) 2020-01-28 02:28:40 +01:00
Ahmed Ashour
a613fe23df Fix some spelling mistakes (#3572) 2019-12-10 22:53:05 +01:00
Andrei
07276bcbbb Add connection string qs to connection params (#3547) 2019-11-21 15:21:51 +01:00
Igor Savin
1c65562440 Prepare 0.20.0 release 2019-10-25 20:17:26 +02:00
Lorefnon
b0c0db601a Fix some issues around seed and migration generation (#3479) 2019-10-13 13:19:53 +02:00
maximelkin
f56eaf5cfc Bluebird remove map mapSeries (#3474) 2019-10-11 10:12:56 +02:00
Ricardo Graça
9aa7085b05 Rename src directory to lib (#3338) 2019-07-10 23:48:43 +02:00
Mikael Lepistö
7140a48226 Remove generated lib from repository and run build in prepublish 2016-01-21 09:59:30 +02:00
Tim Griesser
43dbdadb90 Remove invalid JoinClause require from mssql index.js 2015-12-15 16:54:43 -05:00
Dustin Martin
d9ac2c1f8f Add status method
Returns 0 if all migrations are run and DB is up to date. Return negative number if DB is missing migrations. Return positive number if DB is ahead (rare case, e.g. if migrations were run then code is reverted)
2015-11-23 10:50:19 -06:00
Mikael Lepistö
e2eacc7d6e Ran 'npm run build' since tape tests would not pass if build is not updated. 2015-11-10 23:27:26 +02:00
Rhys van der Waerden
360ffc77d3 release 0.9.0 2015-11-02 14:54:38 +11:00
harriha
478b03e106 Update lib/ via running 'npm run dev' 2015-08-30 23:34:09 +03:00
Mikael Lepistö
fef0a09197 Did npm run build 2015-08-25 10:23:34 +03:00
Tim Griesser
421cb4f4eb Commit compiled files 2015-06-01 09:17:11 -04:00
Tim Griesser
edefe53df9 Better fix for #852 2015-06-01 07:55:04 -04:00
Tim Griesser
90105e064f Fix #852, parse qs parameters for connection 2015-06-01 07:39:57 -04:00
Tim Griesser
89fe76faa3 release 0.8.6 2015-05-20 11:21:59 -04:00