Skip to content

Commit 7393084

Browse files
committed
Fix broken tests
1 parent c484282 commit 7393084

7 files changed

Lines changed: 18 additions & 42 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"packages/*"
1111
],
1212
"scripts": {
13-
"test": "yarn lerna exec yarn test",
13+
"test": "yarn lerna exec --concurrency 1 yarn test",
1414
"build": "tsc --build",
1515
"build:watch": "tsc --build --watch",
1616
"docs:build": "cd docs && yarn build",

packages/pg-cloudflare/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "pg-cloudflare",
33
"version": "1.1.1",
44
"description": "A socket implementation that can run on Cloudflare Workers using native TCP connections.",
5-
"main": "dist/empty.js",
5+
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
77
"license": "MIT",
88
"devDependencies": {
@@ -11,9 +11,9 @@
1111
},
1212
"exports": {
1313
".": {
14-
"import": "./esm/index.js",
15-
"require": "./dist/empty.js",
16-
"default": "./dist/empty.js"
14+
"import": "./esm/worker.js",
15+
"require": "./dist/index.js",
16+
"default": "./dist/index.js"
1717
},
1818
"./worker": {
1919
"import": "./esm/worker.js",

packages/pg-cursor/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict'
2-
const Result = require('pg/lib/result.js')
3-
const prepare = require('pg/lib/utils.js').prepareValue
2+
const pg = require('pg')
3+
const { Result, utils } = pg
4+
const prepare = utils.prepareValue
45
const EventEmitter = require('events').EventEmitter
56
const util = require('util')
67

packages/pg-pool/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"expect.js": "0.3.1",
4040
"lodash": "^4.17.11",
4141
"mocha": "^10.5.2",
42-
"pg-cursor": "^1.3.0"
42+
"pg-cursor": "2.13.1"
4343
},
4444
"peerDependencies": {
4545
"pg": ">=8.0"

packages/pg/lib/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
var Client = require('./client')
44
var defaults = require('./defaults')
55
var Connection = require('./connection')
6+
var Result = require('./result')
7+
var utils = require('./utils')
68
var Pool = require('pg-pool')
79
const { DatabaseError } = require('pg-protocol')
810
const { escapeIdentifier, escapeLiteral } = require('./utils')
@@ -26,6 +28,8 @@ var PG = function (clientConstructor) {
2628
this.DatabaseError = DatabaseError
2729
this.escapeIdentifier = escapeIdentifier
2830
this.escapeLiteral = escapeLiteral
31+
this.Result = Result
32+
this.utils = utils
2933
}
3034

3135
if (typeof process.env.NODE_PG_FORCE_NATIVE !== 'undefined') {

packages/pg/test/worker/src/index.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ async function test() {
2424
})
2525
try {
2626
const resp = await worker.fetch('/')
27-
const { rows } = await resp.json()
27+
const res = await resp.json()
28+
const { rows } = res
2829
assert.same(rows[0].text, 'Hello, World!')
2930
} finally {
3031
await worker.stop()

yarn.lock

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5728,11 +5728,6 @@ pg-copy-streams@0.3.0:
57285728
resolved "https://registry.npmjs.org/pg-copy-streams/-/pg-copy-streams-0.3.0.tgz"
57295729
integrity sha1-pPvCo7eI1Onab3fOs1Qi2NcEO38=
57305730

5731-
pg-cursor@^1.3.0:
5732-
version "1.3.0"
5733-
resolved "https://registry.npmjs.org/pg-cursor/-/pg-cursor-1.3.0.tgz"
5734-
integrity sha1-siDxkIl2t7QNqjc8etpfyoI6sNk=
5735-
57365731
pg-int8@1.0.1:
57375732
version "1.0.1"
57385733
resolved "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz"
@@ -6713,7 +6708,7 @@ stream-spec@~0.3.5:
67136708
dependencies:
67146709
macgyver "~1.10"
67156710

6716-
"string-width-cjs@npm:string-width@^4.2.0":
6711+
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0:
67176712
version "4.2.3"
67186713
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
67196714
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -6748,15 +6743,6 @@ string-width@^3.0.0, string-width@^3.1.0:
67486743
is-fullwidth-code-point "^2.0.0"
67496744
strip-ansi "^5.1.0"
67506745

6751-
string-width@^4.1.0, string-width@^4.2.0:
6752-
version "4.2.3"
6753-
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
6754-
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
6755-
dependencies:
6756-
emoji-regex "^8.0.0"
6757-
is-fullwidth-code-point "^3.0.0"
6758-
strip-ansi "^6.0.1"
6759-
67606746
string-width@^5.0.1, string-width@^5.1.2:
67616747
version "5.1.2"
67626748
resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794"
@@ -6796,7 +6782,7 @@ string_decoder@~1.1.1:
67966782
dependencies:
67976783
safe-buffer "~5.1.0"
67986784

6799-
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
6785+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
68006786
version "6.0.1"
68016787
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
68026788
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -6824,13 +6810,6 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0:
68246810
dependencies:
68256811
ansi-regex "^4.1.0"
68266812

6827-
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
6828-
version "6.0.1"
6829-
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
6830-
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
6831-
dependencies:
6832-
ansi-regex "^5.0.1"
6833-
68346813
strip-ansi@^7.0.1:
68356814
version "7.1.0"
68366815
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
@@ -7478,7 +7457,7 @@ wrangler@3.58.0:
74787457
optionalDependencies:
74797458
fsevents "~2.3.2"
74807459

7481-
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
7460+
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
74827461
version "7.0.0"
74837462
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
74847463
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
@@ -7496,15 +7475,6 @@ wrap-ansi@^5.1.0:
74967475
string-width "^3.0.0"
74977476
strip-ansi "^5.0.0"
74987477

7499-
wrap-ansi@^7.0.0:
7500-
version "7.0.0"
7501-
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
7502-
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
7503-
dependencies:
7504-
ansi-styles "^4.0.0"
7505-
string-width "^4.1.0"
7506-
strip-ansi "^6.0.0"
7507-
75087478
wrap-ansi@^8.1.0:
75097479
version "8.1.0"
75107480
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"

0 commit comments

Comments
 (0)