Skip to content

Commit b3e4e16

Browse files
author
alxndrsn
committed
Merge branch 'master' into eslint-no-unreachable
2 parents 6b088df + 92cb640 commit b3e4e16

File tree

97 files changed

+715
-1404
lines changed

Some content is hidden

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

97 files changed

+715
-1404
lines changed

.devcontainer/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ ARG USERNAME=node
1616
ARG USER_UID=1000
1717
ARG USER_GID=$USER_UID
1818

19+
RUN echo "deb http://archive.debian.org/debian stretch main" > /etc/apt/sources.list
20+
1921
# Configure apt and install packages
2022
RUN apt-get update \
21-
&& apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \
23+
&& apt-get -y install --no-install-recommends dialog 2>&1 \
2224
#
2325
# Verify git and needed tools are installed
2426
&& apt-get -y install git iproute2 procps \
@@ -33,6 +35,7 @@ RUN apt-get update \
3335
&& echo "deb https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
3436
&& apt-get update \
3537
&& apt-get -y install --no-install-recommends yarn tmux locales postgresql \
38+
&& apt-get install libpq-dev g++ make \
3639
#
3740
# Install eslint globally
3841
&& npm install -g eslint \
@@ -47,7 +50,6 @@ RUN apt-get update \
4750
&& apt-get install -y sudo \
4851
&& echo node ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
4952
&& chmod 0440 /etc/sudoers.d/$USERNAME \
50-
#
5153
# Clean up
5254
&& apt-get autoremove -y \
5355
&& apt-get clean -y \

.devcontainer/devcontainer.json

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,13 @@
44
"dockerComposeFile": "docker-compose.yml",
55
"service": "web",
66
"workspaceFolder": "/workspace",
7-
8-
// Use 'settings' to set *default* container specific settings.json values on container create.
9-
// You can edit these settings after create using File > Preferences > Settings > Remote.
10-
"settings": {
11-
"terminal.integrated.shell.linux": "/bin/bash"
12-
},
13-
14-
// Uncomment the next line if you want start specific services in your Docker Compose config.
15-
// "runServices": [],
16-
17-
// Uncomment the line below if you want to keep your containers running after VS Code shuts down.
18-
// "shutdownAction": "none",
19-
20-
// Uncomment the next line to run commands after the container is created.
21-
// "postCreateCommand": "npm install",
22-
23-
// Uncomment the next line to have VS Code connect as an existing non-root user in the container. See
24-
// https://aka.ms/vscode-remote/containers/non-root for details on adding a non-root user if none exist.
25-
// "remoteUser": "node",
26-
277
// Add the IDs of extensions you want installed when the container is created in the array below.
28-
"extensions": [
29-
"dbaeumer.vscode-eslint"
30-
]
31-
}
8+
"customizations":{
9+
"vscode": {
10+
"extensions": ["dbaeumer.vscode-eslint"],
11+
"settings": {
12+
"terminal.integrated.shell.linux": "/bin/bash"
13+
}
14+
}
15+
}
16+
}

.devcontainer/docker-compose.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
44
#-------------------------------------------------------------------------------------------------------------
55

6-
version: '3'
6+
version: '3.9'
77
services:
88
web:
99
# Uncomment the next line to use a non-root user for all processes. You can also
@@ -32,16 +32,21 @@ services:
3232
# Overrides default command so things don't shut down after the process ends.
3333
command: sleep infinity
3434

35-
links:
35+
depends_on:
3636
- db
3737

38+
links:
39+
- db:db
40+
3841
db:
39-
image: postgres
42+
image: postgres:14-alpine
4043
restart: unless-stopped
4144
ports:
4245
- 5432:5432
46+
command: postgres -c password_encryption=md5
4347
environment:
48+
POSTGRES_HOST_AUTH_METHOD: trust
49+
POSTGRES_INITDB_ARGS: "--auth-local=md5"
4450
POSTGRES_PASSWORD: pass
4551
POSTGRES_USER: user
4652
POSTGRES_DB: data
47-

.github/workflows/ci.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ jobs:
2121
- run: yarn install --frozen-lockfile
2222
- run: yarn lint
2323
build:
24-
timeout-minutes: 10
24+
timeout-minutes: 15
2525
needs: lint
2626
services:
2727
postgres:
28-
image: postgres:11
28+
image: ghcr.io/railwayapp-templates/postgres-ssl
2929
env:
3030
POSTGRES_USER: postgres
3131
POSTGRES_PASSWORD: postgres
@@ -44,8 +44,8 @@ jobs:
4444
- '22'
4545
os:
4646
- ubuntu-latest
47-
name: Node.js ${{ matrix.node }} (${{ matrix.os }})
48-
runs-on: ${{ matrix.os }}
47+
name: Node.js ${{ matrix.node }}
48+
runs-on: ubuntu-latest
4949
env:
5050
PGUSER: postgres
5151
PGPASSWORD: postgres
@@ -71,5 +71,4 @@ jobs:
7171
node-version: ${{ matrix.node }}
7272
cache: yarn
7373
- run: yarn install --frozen-lockfile
74-
# TODO(bmc): get ssl tests working in ci
7574
- run: yarn test

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,11 @@ If your change involves breaking backwards compatibility please please point tha
7575
### Setting up for local development
7676

7777
1. Clone the repo
78-
2. From your workspace root run `yarn` and then `yarn lerna bootstrap`
79-
3. Ensure you have a PostgreSQL instance running with SSL enabled and an empty database for tests
80-
4. Ensure you have the proper environment variables configured for connecting to the instance
81-
5. Run `yarn test` to run all the tests
78+
2. Ensure you have installed libpq-dev in your system.
79+
3. From your workspace root run `yarn` and then `yarn lerna bootstrap`
80+
4. Ensure you have a PostgreSQL instance running with SSL enabled and an empty database for tests
81+
5. Ensure you have the proper environment variables configured for connecting to the instance
82+
6. Run `yarn test` to run all the tests
8283

8384
## Troubleshooting and FAQ
8485

packages/pg-connection-string/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pg-connection-string",
3-
"version": "2.6.4",
3+
"version": "2.7.0",
44
"description": "Functions for dealing with a PostgresSQL connection string",
55
"main": "./index.js",
66
"types": "./index.d.ts",
@@ -30,7 +30,7 @@
3030
"chai": "^4.1.1",
3131
"coveralls": "^3.0.4",
3232
"istanbul": "^0.4.5",
33-
"mocha": "^7.1.2"
33+
"mocha": "^10.5.2"
3434
},
3535
"files": [
3636
"index.js",

packages/pg-cursor/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pg-cursor",
3-
"version": "2.11.0",
3+
"version": "2.12.0",
44
"description": "Query cursor extension for node-postgres",
55
"main": "index.js",
66
"directories": {
@@ -17,8 +17,8 @@
1717
"author": "Brian M. Carlson",
1818
"license": "MIT",
1919
"devDependencies": {
20-
"mocha": "^7.1.2",
21-
"pg": "^8.12.0"
20+
"mocha": "^10.5.2",
21+
"pg": "^8.13.0"
2222
},
2323
"peerDependencies": {
2424
"pg": "^8"

packages/pg-native/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pg-native",
3-
"version": "3.1.0",
3+
"version": "3.2.0",
44
"description": "A slightly nicer interface to Postgres over node-libpq",
55
"main": "index.js",
66
"scripts": {
@@ -30,7 +30,7 @@
3030
"concat-stream": "^1.4.6",
3131
"generic-pool": "^2.1.1",
3232
"lodash": "^2.4.1",
33-
"mocha": "3.4.2",
33+
"mocha": "10.5.2",
3434
"node-gyp": ">=10.x",
3535
"okay": "^0.3.0",
3636
"semver": "^4.1.0"

packages/pg-native/test/many-connections.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var bytes = require('crypto').pseudoRandomBytes
66
describe('many connections', function () {
77
describe('async', function () {
88
var test = function (count, times) {
9-
it('connecting ' + count + ' clients ' + times, function (done) {
9+
it(`connecting ${count} clients ${times} times`, function (done) {
1010
this.timeout(200000)
1111

1212
var connectClient = function (n, cb) {
@@ -38,20 +38,9 @@ describe('many connections', function () {
3838
}
3939

4040
test(1, 1)
41-
test(1, 1)
42-
test(1, 1)
43-
test(5, 5)
4441
test(5, 5)
45-
test(5, 5)
46-
test(5, 5)
47-
test(10, 10)
4842
test(10, 10)
49-
test(10, 10)
50-
test(20, 20)
51-
test(20, 20)
5243
test(20, 20)
5344
test(30, 10)
54-
test(30, 10)
55-
test(30, 10)
5645
})
5746
})

packages/pg-pool/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pg-pool",
3-
"version": "3.6.2",
3+
"version": "3.7.0",
44
"description": "Connection pool for node-postgres",
55
"main": "index.js",
66
"directories": {
@@ -27,11 +27,11 @@
2727
},
2828
"homepage": "https://github.com/brianc/node-pg-pool#readme",
2929
"devDependencies": {
30-
"bluebird": "3.4.1",
30+
"bluebird": "3.7.2",
3131
"co": "4.6.0",
3232
"expect.js": "0.3.1",
3333
"lodash": "^4.17.11",
34-
"mocha": "^7.1.2",
34+
"mocha": "^10.5.2",
3535
"pg-cursor": "^1.3.0"
3636
},
3737
"peerDependencies": {

0 commit comments

Comments
 (0)