Skip to content

Commit a42de30

Browse files
committed
please eslint
1 parent 2524083 commit a42de30

File tree

7 files changed

+24
-18
lines changed

7 files changed

+24
-18
lines changed

cf/src/subscribe.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@ export default function Subscribe(postgres, options) {
105105
return { stream, state: xs.state }
106106

107107
function error(e) {
108-
console.error('Unexpected error during logical streaming - reconnecting', e)
108+
console.error('Unexpected error during logical streaming - reconnecting', e) // eslint-disable-line
109109
}
110110

111111
function data(x) {
112-
if (x[0] === 0x77)
112+
if (x[0] === 0x77) {
113113
parse(x.subarray(25), state, sql.options.parsers, handle, options.transform)
114-
else if (x[0] === 0x6b && x[17]) {
114+
} else if (x[0] === 0x6b && x[17]) {
115115
state.lsn = x.subarray(1, 9)
116116
pong()
117117
}

cjs/src/subscribe.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ module.exports = Subscribe;function Subscribe(postgres, options) {
104104
return { stream, state: xs.state }
105105

106106
function error(e) {
107-
console.error('Unexpected error during logical streaming - reconnecting', e)
107+
console.error('Unexpected error during logical streaming - reconnecting', e) // eslint-disable-line
108108
}
109109

110110
function data(x) {
111-
if (x[0] === 0x77)
111+
if (x[0] === 0x77) {
112112
parse(x.subarray(25), state, sql.options.parsers, handle, options.transform)
113-
else if (x[0] === 0x6b && x[17]) {
113+
} else if (x[0] === 0x6b && x[17]) {
114114
state.lsn = x.subarray(1, 9)
115115
pong()
116116
}

cjs/tests/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,15 +1791,17 @@ t('Recreate prepared statements on RevalidateCachedQuery error', async() => {
17911791

17921792
t('Properly throws routine error on not prepared statements', async() => {
17931793
await sql`create table x (x text[])`
1794-
const { routine } = await sql.unsafe(`insert into x(x) values (('a', 'b'))`).catch(e => e)
1794+
const { routine } = await sql.unsafe(`
1795+
insert into x(x) values (('a', 'b'))
1796+
`).catch(e => e)
17951797

17961798
return ['transformAssignedExpr', routine, await sql`drop table x`]
17971799
})
17981800

17991801
t('Properly throws routine error on not prepared statements in transaction', async() => {
18001802
const { routine } = await sql.begin(sql => [
18011803
sql`create table x (x text[])`,
1802-
sql`insert into x(x) values (('a', 'b'))`,
1804+
sql`insert into x(x) values (('a', 'b'))`
18031805
]).catch(e => e)
18041806

18051807
return ['transformAssignedExpr', routine]

deno/src/subscribe.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@ export default function Subscribe(postgres, options) {
105105
return { stream, state: xs.state }
106106

107107
function error(e) {
108-
console.error('Unexpected error during logical streaming - reconnecting', e)
108+
console.error('Unexpected error during logical streaming - reconnecting', e) // eslint-disable-line
109109
}
110110

111111
function data(x) {
112-
if (x[0] === 0x77)
112+
if (x[0] === 0x77) {
113113
parse(x.subarray(25), state, sql.options.parsers, handle, options.transform)
114-
else if (x[0] === 0x6b && x[17]) {
114+
} else if (x[0] === 0x6b && x[17]) {
115115
state.lsn = x.subarray(1, 9)
116116
pong()
117117
}

deno/tests/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1793,15 +1793,17 @@ t('Recreate prepared statements on RevalidateCachedQuery error', async() => {
17931793

17941794
t('Properly throws routine error on not prepared statements', async() => {
17951795
await sql`create table x (x text[])`
1796-
const { routine } = await sql.unsafe(`insert into x(x) values (('a', 'b'))`).catch(e => e)
1796+
const { routine } = await sql.unsafe(`
1797+
insert into x(x) values (('a', 'b'))
1798+
`).catch(e => e)
17971799

17981800
return ['transformAssignedExpr', routine, await sql`drop table x`]
17991801
})
18001802

18011803
t('Properly throws routine error on not prepared statements in transaction', async() => {
18021804
const { routine } = await sql.begin(sql => [
18031805
sql`create table x (x text[])`,
1804-
sql`insert into x(x) values (('a', 'b'))`,
1806+
sql`insert into x(x) values (('a', 'b'))`
18051807
]).catch(e => e)
18061808

18071809
return ['transformAssignedExpr', routine]

src/subscribe.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ export default function Subscribe(postgres, options) {
104104
return { stream, state: xs.state }
105105

106106
function error(e) {
107-
console.error('Unexpected error during logical streaming - reconnecting', e)
107+
console.error('Unexpected error during logical streaming - reconnecting', e) // eslint-disable-line
108108
}
109109

110110
function data(x) {
111-
if (x[0] === 0x77)
111+
if (x[0] === 0x77) {
112112
parse(x.subarray(25), state, sql.options.parsers, handle, options.transform)
113-
else if (x[0] === 0x6b && x[17]) {
113+
} else if (x[0] === 0x6b && x[17]) {
114114
state.lsn = x.subarray(1, 9)
115115
pong()
116116
}

tests/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,15 +1791,17 @@ t('Recreate prepared statements on RevalidateCachedQuery error', async() => {
17911791

17921792
t('Properly throws routine error on not prepared statements', async() => {
17931793
await sql`create table x (x text[])`
1794-
const { routine } = await sql.unsafe(`insert into x(x) values (('a', 'b'))`).catch(e => e)
1794+
const { routine } = await sql.unsafe(`
1795+
insert into x(x) values (('a', 'b'))
1796+
`).catch(e => e)
17951797

17961798
return ['transformAssignedExpr', routine, await sql`drop table x`]
17971799
})
17981800

17991801
t('Properly throws routine error on not prepared statements in transaction', async() => {
18001802
const { routine } = await sql.begin(sql => [
18011803
sql`create table x (x text[])`,
1802-
sql`insert into x(x) values (('a', 'b'))`,
1804+
sql`insert into x(x) values (('a', 'b'))`
18031805
]).catch(e => e)
18041806

18051807
return ['transformAssignedExpr', routine]

0 commit comments

Comments
 (0)