Skip to content

Commit a5542b1

Browse files
authored
Merge pull request #1 from brianc/master
merge latest updates
2 parents e5f0e5d + 3ac356a commit a5542b1

File tree

133 files changed

+6629
-6417
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+6629
-6417
lines changed

.eslintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "standard",
3+
"rules": {
4+
"no-new-func": "off"
5+
}
6+
}

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
*~
2+
build/
3+
.lock-wscript
4+
*.log
15
node_modules/
6+
package-lock.json
27
*.swp
3-
*.log
4-
.lock-wscript
5-
build/
6-
*~

.jshintrc

Lines changed: 0 additions & 5 deletions
This file was deleted.

.npmignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
*~
2+
build/
3+
.lock-wscript
4+
*.log
15
node_modules/
6+
script/
27
*.swp
3-
*.log
4-
.lock-wscript
5-
build/
6-
*~
78
test/
8-
script/

.travis.yml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,36 @@ before_script:
66
env:
77
- CC=clang CXX=clang++ npm_config_clang=1 PGUSER=postgres PGDATABASE=postgres
88

9-
node_js: "6"
10-
addons:
11-
postgresql: "9.6"
12-
139
matrix:
1410
include:
15-
- node_js: "0.10"
11+
- node_js: "lts/boron"
1612
addons:
1713
postgresql: "9.6"
18-
env: []
19-
- node_js: "0.12"
14+
- node_js: "lts/argon"
2015
addons:
2116
postgresql: "9.6"
22-
env: []
23-
- node_js: "4"
17+
- node_js: "9"
2418
addons:
2519
postgresql: "9.6"
26-
- node_js: "5"
20+
- node_js: "10"
2721
addons:
2822
postgresql: "9.6"
29-
- node_js: "6"
23+
- node_js: "lts/carbon"
3024
addons:
3125
postgresql: "9.1"
3226
dist: precise
33-
- node_js: "6"
27+
- node_js: "lts/carbon"
3428
addons:
3529
postgresql: "9.2"
36-
- node_js: "6"
30+
- node_js: "lts/carbon"
3731
addons:
3832
postgresql: "9.3"
39-
- node_js: "6"
33+
- node_js: "lts/carbon"
4034
addons:
4135
postgresql: "9.4"
42-
- node_js: "6"
36+
- node_js: "lts/carbon"
4337
addons:
4438
postgresql: "9.5"
39+
- node_js: "lts/carbon"
40+
addons:
41+
postgresql: "9.6"

CHANGELOG.md

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,44 @@ For richer information consult the commit log on github with referenced pull req
44

55
We do not include break-fix version release in this file.
66

7+
### 7.4.0
8+
9+
- Add support for [Uint8Array](https://github.com/brianc/node-postgres/pull/1448) values.
10+
11+
### 7.3.0
12+
13+
- Add support for [statement timeout](https://github.com/brianc/node-postgres/pull/1436).
14+
15+
### 7.2.0
16+
17+
- Pinned pg-pool and pg-types to a tighter semver range. This is likely not a noticeable change for you unless you were specifically installing older versions of those libraries for some reason, but making it a minor bump here just in case it could cause any confusion.
18+
19+
### 7.1.0
20+
21+
#### Enhancements
22+
23+
- [You can now supply both a connection string and additional config options to clients.](https://github.com/brianc/node-postgres/pull/1363)
24+
25+
### 7.0.0
26+
27+
#### Breaking Changes
28+
29+
- Drop support for node < `4.x`.
30+
- Remove `pg.connect` `pg.end` and `pg.cancel` singleton methods.
31+
- `Client#connect(callback)` now returns `undefined`. It used to return an event emitter.
32+
- Upgrade [pg-pool](https://github.com/brianc/node-pg-pool) to `2.x`.
33+
- Upgrade [pg-native](https://github.com/brianc/node-pg-native) to `2.x`.
34+
- Standardize error message fields between JS and native driver. The only breaking changes were in the native driver as its field names were brought into alignment with the existing JS driver field names.
35+
- Result from multi-statement text queries such as `SELECT 1; SELECT 2;` are now returned as an array of results instead of a single result with 1 array containing rows from both queries.
36+
37+
[Please see here for a migration guide](https://node-postgres.com/guides/upgrading)
38+
39+
#### Enhancements
40+
41+
- Overhauled documentation: [https://node-postgres.com](https://node-postgres.com).
42+
- Add `Client#connect() => Promise<void>` and `Client#end() => Promise<void>` calls. Promises are now returned from all async methods on clients _if and only if_ no callback was supplied to the method.
43+
- Add `connectionTimeoutMillis` to pg-pool.
44+
745
### v6.2.0
846

947
- Add support for [parsing `replicationStart` messages](https://github.com/brianc/node-postgres/pull/1271/files).
@@ -28,7 +66,7 @@ var pg = require('pg')
2866
2967
var pool = new pg.Pool()
3068
31-
// your friendly neighboorhood pool interface, without the singleton
69+
// your friendly neighborhood pool interface, without the singleton
3270
pool.connect(function(err, client, done) {
3371
// ...
3472
})
@@ -75,7 +113,7 @@ client.query('SELECT $1::text as name', ['brianc'])
75113
- Add option to parse JS date objects in query parameters as [UTC](https://github.com/brianc/node-postgres/pull/943)
76114

77115
### v4.4.0
78-
- Warn to `stderr` if a named query exceeds 63 characters which is the max lenght supported by postgres.
116+
- Warn to `stderr` if a named query exceeds 63 characters which is the max length supported by postgres.
79117

80118
### v4.3.0
81119
- Unpin `pg-types` semver. Allow it to float against `pg-types@1.x`.
@@ -204,7 +242,7 @@ decimal | string | number (float)
204242
```
205243

206244
For more information see https://github.com/brianc/node-postgres/pull/353
207-
If you are unhappy with these changes you can always [override the built in type parsing fairly easily](https://github.com/brianc/node-pg-parse-float).
245+
If you are unhappy with these changes you can always [override the built in type parsing fairly easily](https://github.com/brianc/node-pg-parse-float).
208246

209247
### v1.3.0
210248

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2010 - 2018 Brian Carlson
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ params := $(connectionString)
77
node-command := xargs -n 1 -I file node file $(params)
88

99
.PHONY : test test-connection test-integration bench test-native \
10-
jshint publish test-missing-native update-npm
10+
lint publish test-missing-native update-npm
1111

1212
all:
1313
npm install
@@ -17,7 +17,7 @@ help:
1717

1818
test: test-unit
1919

20-
test-all: jshint test-missing-native test-unit test-integration test-native test-binary
20+
test-all: lint test-missing-native test-unit test-integration test-native
2121

2222

2323
update-npm:
@@ -36,11 +36,13 @@ test-connection:
3636
test-missing-native:
3737
@echo "***Testing optional native install***"
3838
@rm -rf node_modules/pg-native
39+
@rm -rf node_modules/libpq
3940
@node test/native/missing-native.js
4041
@rm -rf node_modules/pg-native
42+
@rm -rf node_modules/libpq
4143

4244
node_modules/pg-native/index.js:
43-
@npm i pg-native
45+
@npm i --no-save pg-native
4446

4547
test-native: node_modules/pg-native/index.js test-connection
4648
@echo "***Testing native bindings***"
@@ -58,6 +60,6 @@ test-binary: test-connection
5860
test-pool:
5961
@find test/integration/connection-pool -name "*.js" | $(node-command) binary
6062

61-
jshint:
62-
@echo "***Starting jshint***"
63-
@./node_modules/.bin/jshint lib
63+
lint:
64+
@echo "***Starting lint***"
65+
node_modules/.bin/eslint lib

0 commit comments

Comments
 (0)