Skip to content

Releases: vitaly-t/pg-minify

v.0.3.0

23 Apr 17:37

Choose a tag to compare

Type SQLParsingError extended with property error - original parsing error message.

v.0.2.5

23 Apr 17:09

Choose a tag to compare

Improved error reporting. Type SQLParsingError got method toString to properly format itself, plus inspect override that calls toString for proper output into the console.

Example of the console output when doing console.log(error):

SQLParsingError {
    code: parsingErrorCode.unclosedQI
    message: "Unclosed quoted identifier."
    position: {line: 1, col: 6}
}

v.0.2.4

28 Feb 13:28

Choose a tag to compare

Improving some special cases of sql compression + general minification.

for the following case:

select'\ntext'

to become:

select E'\ntext'

and not this:

selectE'\ntext'

i.e. injecting a leading space where necessary.

v.0.2.2

28 Feb 12:50

Choose a tag to compare

Fixing an issue with compression for multi-line text, when compressing the following SQL:

select '
text'

would result in:

selectE'\ntext'

It is now formatted correctly as:

select E'\ntext'

v.0.2.1

31 Jan 11:24

Choose a tag to compare

Improved SQL compression for JSON syntax.

v.0.2.0

30 Jan 19:25

Choose a tag to compare

  • Added support for options as the second parameter
  • Added option compress to completely uglify the output sql
  • Added multiple new tests
  • Documentation updates

v.0.1.5

28 Jan 21:10

Choose a tag to compare

Minor documentation updates.

v.0.1.4

21 Jan 03:36

Choose a tag to compare

Added support for tabs within text blocks, to be automatically replaced with \t, and to add E in front of the block, if it is not there.

See Advanced Examples

v.0.1.3

21 Jan 02:41

Choose a tag to compare

Improved support for quoted identifiers:

  • Throwing an error on unclosed quoted identifiers
  • Throwing an error on multi-line quoted identifiers as unsupported (they should never be used).
  • Added new tests.

v.0.1.2

20 Jan 10:15

Choose a tag to compare

Improved support for multi-line text strings, by trimming them correctly, as shown in the example here: Multi-line text strings, the part where:

Also, the first string is trimmed on the right (removing tabs and spaces), the last one is trimmed on the left, and all strings in between are trimmed on both sides.