Skip to content

Commit e1f0fc5

Browse files
committed
update dev-dependencies
1 parent 28af406 commit e1f0fc5

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

.prettierrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"printWidth": 120,
33
"tabWidth": 4,
4-
"singleQuote": true
4+
"singleQuote": true,
5+
"trailingComma": "none"
56
}

lib/sql.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ function funcToSQL(expr) {
139139
*/
140140
function columnsToSQL(columns) {
141141
return columns
142-
.map(column => {
142+
.map((column) => {
143143
let str = exprToSQL(column.expr);
144144

145145
if (column.as !== null) {
@@ -198,7 +198,7 @@ function withToSql(withExpr) {
198198
'WITH ' +
199199
(withExpr[0].recursive ? 'RECURSIVE ' : '') +
200200
withExpr
201-
.map(cte => {
201+
.map((cte) => {
202202
const name = `"${cte.name}"`;
203203
const columns = Array.isArray(cte.columns) ? '(' + cte.columns.join(', ') + ')' : '';
204204

@@ -240,7 +240,7 @@ function selectToSQL(stmt) {
240240
if (has(stmt, 'having') && stmt.having !== null) clauses.push('HAVING ' + exprToSQL(stmt.having));
241241

242242
if (Array.isArray(stmt.orderby) && stmt.orderby.length > 0) {
243-
const orderExpressions = stmt.orderby.map(expr => exprToSQL(expr.expr) + ' ' + expr.type);
243+
const orderExpressions = stmt.orderby.map((expr) => exprToSQL(expr.expr) + ' ' + expr.type);
244244
clauses.push('ORDER BY', orderExpressions.join(', '));
245245
}
246246

@@ -271,12 +271,12 @@ exprToSQLConvertFn = {
271271
case: caseToSQL,
272272
cast: castToSQL,
273273
column_ref: columnRefToSQL,
274-
expr_list: expr => {
274+
expr_list: (expr) => {
275275
const str = getExprListSQL(expr.value);
276276
return !expr.parentheses ? str : `(${str})`;
277277
},
278278
function: funcToSQL,
279-
select: expr => {
279+
select: (expr) => {
280280
const str = typeof expr._next !== 'object' ? selectToSQL(expr) : unionToSQL(expr);
281281
return !expr.parentheses ? str : `(${str})`;
282282
},

lib/util.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ function createBinaryExpr(operator, left, right) {
5454
*/
5555
function replaceParams(ast, data) {
5656
Object.keys(ast)
57-
.filter(key => {
57+
.filter((key) => {
5858
const value = ast[key];
5959
return Array.isArray(value) || (typeof value === 'object' && value !== null);
6060
})
61-
.forEach(key => {
61+
.forEach((key) => {
6262
const expr = ast[key];
6363

6464
if (!(typeof expr === 'object' && expr.type === 'param')) return replaceParams(expr, data);

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@
5252
"has": "^1.0.3"
5353
},
5454
"devDependencies": {
55-
"@types/chai": "^4.2.11",
56-
"@types/mocha": "^7.0.2",
55+
"@types/chai": "^4.2.12",
56+
"@types/mocha": "^8.0.3",
5757
"chai": "^4.2.0",
58-
"eslint": "^7.4.0",
58+
"eslint": "^7.9.0",
5959
"eslint-config-prettier": "^6.11.0",
6060
"eslint-plugin-prettier": "^3.1.4",
61-
"mocha": "^8.0.1",
61+
"mocha": "^8.1.3",
6262
"pegjs": "^0.10.0",
6363
"pre-commit": "^1.2.2",
64-
"prettier": "^2.0.5"
64+
"prettier": "^2.1.2"
6565
}
6666
}

0 commit comments

Comments
 (0)