pgsql-deparser 13.6.0 → 13.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,34 +1,36 @@
1
1
  /* eslint-disable no-restricted-syntax */
2
-
3
2
  export const cleanLines = sql => {
4
3
  return sql.split('\n').map(l => l.trim()).filter(a => a).join('\n');
5
4
  };
6
5
  export const transform = (obj, props) => {
7
- let copy = null;
8
- // Handle the 3 simple types, and null or undefined
6
+ let copy = null; // Handle the 3 simple types, and null or undefined
7
+
9
8
  if (obj == null || typeof obj !== 'object') {
10
9
  return obj;
11
- }
10
+ } // Handle Date
11
+
12
12
 
13
- // Handle Date
14
13
  if (obj instanceof Date) {
15
14
  copy = new Date();
16
15
  copy.setTime(obj.getTime());
17
16
  return copy;
18
- }
17
+ } // Handle Array
18
+
19
19
 
20
- // Handle Array
21
20
  if (obj instanceof Array) {
22
21
  copy = [];
22
+
23
23
  for (let i = 0, len = obj.length; i < len; i++) {
24
24
  copy[i] = transform(obj[i], props);
25
25
  }
26
+
26
27
  return copy;
27
- }
28
+ } // Handle Object
29
+
28
30
 
29
- // Handle Object
30
31
  if (obj instanceof Object || typeof obj === 'object') {
31
32
  copy = {};
33
+
32
34
  for (const attr in obj) {
33
35
  if (obj.hasOwnProperty(attr)) {
34
36
  if (props.hasOwnProperty(attr)) {
@@ -46,11 +48,15 @@ export const transform = (obj, props) => {
46
48
  copy[attr] = transform(obj[attr], props);
47
49
  }
48
50
  }
51
+
49
52
  return copy;
50
53
  }
54
+
51
55
  throw new Error("Unable to copy obj! Its type isn't supported.");
52
56
  };
57
+
53
58
  const noop = () => undefined;
59
+
54
60
  export const cleanTree = tree => {
55
61
  return transform(tree, {
56
62
  stmt_len: noop,
@@ -68,6 +74,7 @@ export const cleanTree = tree => {
68
74
  // do stmt
69
75
  obj.arg.String.str = obj.arg.String.str.trim();
70
76
  }
77
+
71
78
  return cleanTree(obj);
72
79
  } else {
73
80
  return cleanTree(obj);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pgsql-deparser",
3
- "version": "13.6.0",
3
+ "version": "13.6.1",
4
4
  "description": "PostgreSQL AST Deparser",
5
5
  "author": "Dan Lynch <pyramation@gmail.com>",
6
6
  "homepage": "https://github.com/launchql/pgsql-parser",
@@ -65,7 +65,7 @@
65
65
  "eslint-plugin-prettier": "^3.1.2",
66
66
  "glob": "7.1.6",
67
67
  "jest": "^25.1.0",
68
- "pgsql-parser": "^13.7.0",
68
+ "pgsql-parser": "^13.7.1",
69
69
  "prettier": "^2.1.2",
70
70
  "regenerator-runtime": "^0.13.2"
71
71
  },
@@ -73,6 +73,5 @@
73
73
  "@babel/runtime": "^7.11.2",
74
74
  "dotty": "^0.1.0",
75
75
  "pgsql-enums": "^13.2.0"
76
- },
77
- "gitHead": "9bf23254077a235d1ec774657e2dfba93ef298f5"
76
+ }
78
77
  }
package/CHANGELOG.md DELETED
@@ -1,459 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- # [13.6.0](https://github.com/launchql/pgsql-parser/compare/pgsql-deparser@13.5.0...pgsql-deparser@13.6.0) (2023-12-15)
7
-
8
- **Note:** Version bump only for package pgsql-deparser
9
-
10
-
11
-
12
-
13
-
14
- # [13.5.0](https://github.com/launchql/pgsql-parser/compare/pgsql-deparser@13.4.0...pgsql-deparser@13.5.0) (2023-12-15)
15
-
16
- **Note:** Version bump only for package pgsql-deparser
17
-
18
-
19
-
20
-
21
-
22
- # [13.4.0](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.3.15...pgsql-deparser@13.4.0) (2023-03-15)
23
-
24
- **Note:** Version bump only for package pgsql-deparser
25
-
26
-
27
-
28
-
29
-
30
- ## [13.3.15](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.3.14...pgsql-deparser@13.3.15) (2022-12-22)
31
-
32
- **Note:** Version bump only for package pgsql-deparser
33
-
34
-
35
-
36
-
37
-
38
- ## [13.3.14](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.3.13...pgsql-deparser@13.3.14) (2022-09-14)
39
-
40
- **Note:** Version bump only for package pgsql-deparser
41
-
42
-
43
-
44
-
45
-
46
- ## [13.3.13](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.3.12...pgsql-deparser@13.3.13) (2022-08-31)
47
-
48
- **Note:** Version bump only for package pgsql-deparser
49
-
50
-
51
-
52
-
53
-
54
- ## [13.3.12](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.3.11...pgsql-deparser@13.3.12) (2022-07-29)
55
-
56
- **Note:** Version bump only for package pgsql-deparser
57
-
58
-
59
-
60
-
61
-
62
- ## [13.3.11](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.3.10...pgsql-deparser@13.3.11) (2022-05-20)
63
-
64
- **Note:** Version bump only for package pgsql-deparser
65
-
66
-
67
-
68
-
69
-
70
- ## [13.3.10](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.3.9...pgsql-deparser@13.3.10) (2022-05-19)
71
-
72
- **Note:** Version bump only for package pgsql-deparser
73
-
74
-
75
-
76
-
77
-
78
- ## [13.3.9](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.3.8...pgsql-deparser@13.3.9) (2022-04-19)
79
-
80
- **Note:** Version bump only for package pgsql-deparser
81
-
82
-
83
-
84
-
85
-
86
- ## [13.3.8](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.3.7...pgsql-deparser@13.3.8) (2022-04-19)
87
-
88
- **Note:** Version bump only for package pgsql-deparser
89
-
90
-
91
-
92
-
93
-
94
- ## [13.3.7](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.3.6...pgsql-deparser@13.3.7) (2022-04-19)
95
-
96
- **Note:** Version bump only for package pgsql-deparser
97
-
98
-
99
-
100
-
101
-
102
- ## [13.3.6](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.3.5...pgsql-deparser@13.3.6) (2022-04-19)
103
-
104
- **Note:** Version bump only for package pgsql-deparser
105
-
106
-
107
-
108
-
109
-
110
- ## [13.3.5](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.3.4...pgsql-deparser@13.3.5) (2022-04-19)
111
-
112
- **Note:** Version bump only for package pgsql-deparser
113
-
114
-
115
-
116
-
117
-
118
- ## [13.3.4](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.3.3...pgsql-deparser@13.3.4) (2022-04-19)
119
-
120
- **Note:** Version bump only for package pgsql-deparser
121
-
122
-
123
-
124
-
125
-
126
- ## [13.3.3](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.3.2...pgsql-deparser@13.3.3) (2022-04-19)
127
-
128
- **Note:** Version bump only for package pgsql-deparser
129
-
130
-
131
-
132
-
133
-
134
- ## [13.3.2](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.3.1...pgsql-deparser@13.3.2) (2022-04-19)
135
-
136
- **Note:** Version bump only for package pgsql-deparser
137
-
138
-
139
-
140
-
141
-
142
- ## [13.3.1](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.3.0...pgsql-deparser@13.3.1) (2022-04-13)
143
-
144
- **Note:** Version bump only for package pgsql-deparser
145
-
146
-
147
-
148
-
149
-
150
- # [13.3.0](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.2.0...pgsql-deparser@13.3.0) (2022-03-18)
151
-
152
- **Note:** Version bump only for package pgsql-deparser
153
-
154
-
155
-
156
-
157
-
158
- # [13.2.0](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.1.13...pgsql-deparser@13.2.0) (2022-02-24)
159
-
160
- **Note:** Version bump only for package pgsql-deparser
161
-
162
-
163
-
164
-
165
-
166
- ## [13.1.13](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.1.12...pgsql-deparser@13.1.13) (2022-01-07)
167
-
168
- **Note:** Version bump only for package pgsql-deparser
169
-
170
-
171
-
172
-
173
-
174
- ## [13.1.12](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.1.11...pgsql-deparser@13.1.12) (2022-01-05)
175
-
176
- **Note:** Version bump only for package pgsql-deparser
177
-
178
-
179
-
180
-
181
-
182
- ## [13.1.11](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.1.10...pgsql-deparser@13.1.11) (2021-10-19)
183
-
184
- **Note:** Version bump only for package pgsql-deparser
185
-
186
-
187
-
188
-
189
-
190
- ## [13.1.10](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.1.9...pgsql-deparser@13.1.10) (2021-10-19)
191
-
192
- **Note:** Version bump only for package pgsql-deparser
193
-
194
-
195
-
196
-
197
-
198
- ## [13.1.9](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.1.8...pgsql-deparser@13.1.9) (2021-10-13)
199
-
200
- **Note:** Version bump only for package pgsql-deparser
201
-
202
-
203
-
204
-
205
-
206
- ## [13.1.8](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.1.7...pgsql-deparser@13.1.8) (2021-09-09)
207
-
208
- **Note:** Version bump only for package pgsql-deparser
209
-
210
-
211
-
212
-
213
-
214
- ## [13.1.7](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.1.6...pgsql-deparser@13.1.7) (2021-09-09)
215
-
216
- **Note:** Version bump only for package pgsql-deparser
217
-
218
-
219
-
220
-
221
-
222
- ## [13.1.6](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.1.5...pgsql-deparser@13.1.6) (2021-06-25)
223
-
224
- **Note:** Version bump only for package pgsql-deparser
225
-
226
-
227
-
228
-
229
-
230
- ## [13.1.5](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.1.4...pgsql-deparser@13.1.5) (2021-06-02)
231
-
232
- **Note:** Version bump only for package pgsql-deparser
233
-
234
-
235
-
236
-
237
-
238
- ## [13.1.4](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.1.3...pgsql-deparser@13.1.4) (2021-04-26)
239
-
240
- **Note:** Version bump only for package pgsql-deparser
241
-
242
-
243
-
244
-
245
-
246
- ## [13.1.3](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.1.2...pgsql-deparser@13.1.3) (2021-04-07)
247
-
248
- **Note:** Version bump only for package pgsql-deparser
249
-
250
-
251
-
252
-
253
-
254
- ## [13.1.2](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.1.1...pgsql-deparser@13.1.2) (2021-03-27)
255
-
256
- **Note:** Version bump only for package pgsql-deparser
257
-
258
-
259
-
260
-
261
-
262
- ## [13.1.1](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.1.0...pgsql-deparser@13.1.1) (2021-03-26)
263
-
264
- **Note:** Version bump only for package pgsql-deparser
265
-
266
-
267
-
268
-
269
-
270
- # [13.1.0](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.0.5...pgsql-deparser@13.1.0) (2021-03-20)
271
-
272
- **Note:** Version bump only for package pgsql-deparser
273
-
274
-
275
-
276
-
277
-
278
- ## [13.0.5](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.0.4...pgsql-deparser@13.0.5) (2021-03-20)
279
-
280
- **Note:** Version bump only for package pgsql-deparser
281
-
282
-
283
-
284
-
285
-
286
- ## [13.0.4](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.0.3...pgsql-deparser@13.0.4) (2021-03-19)
287
-
288
- **Note:** Version bump only for package pgsql-deparser
289
-
290
-
291
-
292
-
293
-
294
- ## [13.0.3](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.0.2...pgsql-deparser@13.0.3) (2021-03-19)
295
-
296
-
297
- ### Bug Fixes
298
-
299
- * deparser ([61e6ac6](https://github.com/pyramation/pgsql-parser/commit/61e6ac647517d066e6363d608fd02535834e67a1))
300
-
301
-
302
-
303
-
304
-
305
- ## [13.0.2](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@13.0.1...pgsql-deparser@13.0.2) (2021-03-19)
306
-
307
- **Note:** Version bump only for package pgsql-deparser
308
-
309
-
310
-
311
-
312
-
313
- ## [13.0.1](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@1.3.1...pgsql-deparser@13.0.1) (2021-03-19)
314
-
315
- **Note:** Version bump only for package pgsql-deparser
316
-
317
-
318
-
319
-
320
-
321
- ## [1.3.1](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@1.3.0...pgsql-deparser@1.3.1) (2021-03-19)
322
-
323
- **Note:** Version bump only for package pgsql-deparser
324
-
325
-
326
-
327
-
328
-
329
- # [1.3.0](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@1.2.5...pgsql-deparser@1.3.0) (2021-03-18)
330
-
331
- **Note:** Version bump only for package pgsql-deparser
332
-
333
-
334
-
335
-
336
-
337
- ## [1.2.5](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@1.2.4...pgsql-deparser@1.2.5) (2021-03-13)
338
-
339
- **Note:** Version bump only for package pgsql-deparser
340
-
341
-
342
-
343
-
344
-
345
- ## [1.2.4](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@1.2.3...pgsql-deparser@1.2.4) (2021-03-13)
346
-
347
- **Note:** Version bump only for package pgsql-deparser
348
-
349
-
350
-
351
-
352
-
353
- ## [1.2.3](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@1.2.2...pgsql-deparser@1.2.3) (2020-11-08)
354
-
355
- **Note:** Version bump only for package pgsql-deparser
356
-
357
-
358
-
359
-
360
-
361
- ## [1.2.2](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@1.2.1...pgsql-deparser@1.2.2) (2020-11-04)
362
-
363
- **Note:** Version bump only for package pgsql-deparser
364
-
365
-
366
-
367
-
368
-
369
- ## [1.2.1](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@1.2.0...pgsql-deparser@1.2.1) (2020-11-04)
370
-
371
- **Note:** Version bump only for package pgsql-deparser
372
-
373
-
374
-
375
-
376
-
377
- # [1.2.0](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@1.1.1...pgsql-deparser@1.2.0) (2020-11-03)
378
-
379
- **Note:** Version bump only for package pgsql-deparser
380
-
381
-
382
-
383
-
384
-
385
- ## [1.1.1](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@1.1.0...pgsql-deparser@1.1.1) (2020-10-27)
386
-
387
- **Note:** Version bump only for package pgsql-deparser
388
-
389
-
390
-
391
-
392
-
393
- # [1.1.0](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@1.0.7...pgsql-deparser@1.1.0) (2020-10-27)
394
-
395
- **Note:** Version bump only for package pgsql-deparser
396
-
397
-
398
-
399
-
400
-
401
- ## [1.0.7](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@1.0.6...pgsql-deparser@1.0.7) (2020-10-27)
402
-
403
- **Note:** Version bump only for package pgsql-deparser
404
-
405
-
406
-
407
-
408
-
409
- ## [1.0.6](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@1.0.5...pgsql-deparser@1.0.6) (2020-10-26)
410
-
411
- **Note:** Version bump only for package pgsql-deparser
412
-
413
-
414
-
415
-
416
-
417
- ## [1.0.5](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@1.0.4...pgsql-deparser@1.0.5) (2020-10-25)
418
-
419
- **Note:** Version bump only for package pgsql-deparser
420
-
421
-
422
-
423
-
424
-
425
- ## [1.0.4](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@1.0.3...pgsql-deparser@1.0.4) (2020-10-23)
426
-
427
- **Note:** Version bump only for package pgsql-deparser
428
-
429
-
430
-
431
-
432
-
433
- ## [1.0.3](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@1.0.2...pgsql-deparser@1.0.3) (2020-10-23)
434
-
435
- **Note:** Version bump only for package pgsql-deparser
436
-
437
-
438
-
439
-
440
-
441
- ## [1.0.2](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@1.0.1...pgsql-deparser@1.0.2) (2020-10-23)
442
-
443
- **Note:** Version bump only for package pgsql-deparser
444
-
445
-
446
-
447
-
448
-
449
- ## [1.0.1](https://github.com/pyramation/pgsql-parser/compare/pgsql-deparser@1.0.0...pgsql-deparser@1.0.1) (2020-10-22)
450
-
451
- **Note:** Version bump only for package pgsql-deparser
452
-
453
-
454
-
455
-
456
-
457
- # 1.0.0 (2020-10-19)
458
-
459
- **Note:** Version bump only for package pgsql-deparser