Skip to content

Commit 50762d4

Browse files
committed
Update deno std to 0.132 and enable last tests
1 parent e5b8554 commit 50762d4

File tree

11 files changed

+31
-34
lines changed

11 files changed

+31
-34
lines changed

deno/polyfills.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* global Deno */
22

3-
import { Buffer } from 'https://deno.land/std@0.120.0/node/buffer.ts'
3+
import { Buffer } from 'https://deno.land/std@0.132.0/node/buffer.ts'
44

55
const events = () => ({ data: [], error: [], drain: [], connect: [], secureConnect: [], close: [] })
66

deno/src/bytes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Buffer } from 'https://deno.land/std@0.120.0/node/buffer.ts'
1+
import { Buffer } from 'https://deno.land/std@0.132.0/node/buffer.ts'
22
const size = 256
33
let buffer = Buffer.allocUnsafe(size)
44

deno/src/connection.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { HmacSha256 } from 'https://deno.land/std@0.120.0/hash/sha256.ts'
2-
import { Buffer } from 'https://deno.land/std@0.120.0/node/buffer.ts'
1+
import { HmacSha256 } from 'https://deno.land/std@0.132.0/hash/sha256.ts'
2+
import { Buffer } from 'https://deno.land/std@0.132.0/node/buffer.ts'
33
import { setImmediate, clearImmediate } from '../polyfills.js'
44
import { net } from '../polyfills.js'
55
import { tls } from '../polyfills.js'
6-
import crypto from 'https://deno.land/std@0.120.0/node/crypto.ts'
7-
import Stream from 'https://deno.land/std@0.120.0/node/stream.ts'
6+
import crypto from 'https://deno.land/std@0.132.0/node/crypto.ts'
7+
import Stream from 'https://deno.land/std@0.132.0/node/stream.ts'
88

99
import { Identifier, Builder, handleValue, arrayParser, arraySerializer } from './types.js'
1010
import { Errors } from './errors.js'

deno/src/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import process from 'https://deno.land/std@0.120.0/node/process.ts'
2-
import os from 'https://deno.land/std@0.120.0/node/os.ts'
3-
import fs from 'https://deno.land/std@0.120.0/node/fs.ts'
1+
import process from 'https://deno.land/std@0.132.0/node/process.ts'
2+
import os from 'https://deno.land/std@0.132.0/node/os.ts'
3+
import fs from 'https://deno.land/std@0.132.0/node/fs.ts'
44

55
import {
66
mergeUserTypes,

deno/src/large.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Stream from 'https://deno.land/std@0.120.0/node/stream.ts'
1+
import Stream from 'https://deno.land/std@0.132.0/node/stream.ts'
22

33
export default function largeObject(sql, oid, mode = 0x00020000 | 0x00040000) {
44
return new Promise(async(resolve, reject) => {

deno/src/subscribe.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Buffer } from 'https://deno.land/std@0.120.0/node/buffer.ts'
1+
import { Buffer } from 'https://deno.land/std@0.132.0/node/buffer.ts'
22
export default function Subscribe(postgres, options) {
33
const listeners = new Map()
44

deno/src/types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Buffer } from 'https://deno.land/std@0.120.0/node/buffer.ts'
1+
import { Buffer } from 'https://deno.land/std@0.132.0/node/buffer.ts'
22
import { Query } from './query.js'
33
import { Errors } from './errors.js'
44

deno/tests/bootstrap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { spawn } from 'https://deno.land/std@0.120.0/node/child_process.ts'
1+
import { spawn } from 'https://deno.land/std@0.132.0/node/child_process.ts'
22

33
await exec('psql', ['-c', 'alter system set ssl=on'])
44
await exec('psql', ['-c', 'create user postgres_js_test'])

deno/tests/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { Buffer } from 'https://deno.land/std@0.120.0/node/buffer.ts'
1+
import { Buffer } from 'https://deno.land/std@0.132.0/node/buffer.ts'
22
/* eslint no-console: 0 */
33

44
import { exec } from './bootstrap.js'
55

66
import { t, nt, ot } from './test.js' // eslint-disable-line
77
import { net } from '../polyfills.js'
8-
import fs from 'https://deno.land/std@0.120.0/node/fs.ts'
9-
import crypto from 'https://deno.land/std@0.120.0/node/crypto.ts'
8+
import fs from 'https://deno.land/std@0.132.0/node/fs.ts'
9+
import crypto from 'https://deno.land/std@0.132.0/node/crypto.ts'
1010

1111
import postgres from '../src/index.js'
1212
const delay = ms => new Promise(r => setTimeout(r, ms))
@@ -1632,7 +1632,7 @@ t('Copy write as first works', async() => {
16321632
]
16331633
})
16341634

1635-
nt('Copy from file works', async() => {
1635+
t('Copy from file works', async() => {
16361636
await sql`create table test (x int, y int, z int)`
16371637
await new Promise(async r => fs
16381638
.createReadStream(rel('copy.csv'))
@@ -1662,7 +1662,7 @@ t('Copy from works in transaction', async() => {
16621662
]
16631663
})
16641664

1665-
nt('Copy from abort works', async() => {
1665+
t('Copy from abort works', async() => {
16661666
const sql = postgres(options)
16671667
const readable = fs.createReadStream(rel('copy.csv'))
16681668

@@ -1827,7 +1827,7 @@ t('Describe a statement without columns', async() => {
18271827
]
18281828
})
18291829

1830-
nt('Large object', async() => {
1830+
t('Large object', async() => {
18311831
const file = rel('index.js')
18321832
, md5 = crypto.createHash('md5').update(fs.readFileSync(file)).digest('hex')
18331833

deno/tests/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import process from 'https://deno.land/std@0.120.0/node/process.ts'
1+
import process from 'https://deno.land/std@0.132.0/node/process.ts'
22
/* eslint no-console: 0 */
33

4-
import util from 'https://deno.land/std@0.120.0/node/util.ts'
4+
import util from 'https://deno.land/std@0.132.0/node/util.ts'
55

66
let done = 0
77
let only = false

0 commit comments

Comments
 (0)