Joan Miquel Torres
14dc8dd100
Use performance.now() instead of Date.now()... ( #3483 )
...
* Use performance.now() instead of Date.now()...
* Wherever applicable (measuring performance, not time).
* Failback to support node < 16.0.0 (perf_hook not globally exposed)
* Failback to Date.now() for node < 8.5.0
✔ Tests passed with node > 16.0.0 (22.12.0)
✕ Couldn't pass with node prior 16.0.0 but not due to this changes.
https://nodejs.org/docs/latest-v8.x/api/perf_hooks.html#perf_hooks_performance_now
https://w3c.github.io/hr-time/
* Yarn prettier
* More lint fixes.
* Removed polyfill code for node <16
They are no longer supported:
https://github.com/brianc/node-postgres/pull/3483#issuecomment-2967119692
2025-06-14 16:38:51 -05:00
Brian C
9e7a5d97cf
Replace all usages of var with let / const - eslint auto applied ( #3444 )
2025-04-27 11:50:33 -05:00
Nigro Simone
3c48f22b22
perf: pre allocate array instead of push item ( #3250 )
...
* fix: typo
* perf: pre allocate array instead of push item
* perf: refractoring missing push
* perf: avoid useless varible declaration
* perf: short control flow
* fix: lint
* more precise bench
* fix: lint
2025-01-17 15:27:35 -06:00
Brian C
fe88e825e5
Add pg-native to monorepo ( #3225 )
...
I didn't do much to "modernize" the pg-native codebase other than running it through the standard eslint --fix that is applied to the rest of the code. There's some easy opportunities there to update it to es6 and so on...it still uses some pretty antiquated coding styles in places. This PR re-introduces the native tests on node v20, and updates test matrix to drop unsupported versions of node & add in node v22.
2024-06-04 10:26:11 -05:00