Skip to content

Releases: nene/prettier-plugin-sql-cst

0.11.8

16 Nov 20:06

Choose a tag to compare

Improved PostgreSQL support

  • Formatting of CREATE/ALTER/DROP DOMAIN
  • Formatting of CREATE/ALTER/DROP TYPE

Other

  • Upgraded parser to 0.29.1

0.11.7

29 Aug 06:40

Choose a tag to compare

Small bugfix

  • Preserve parenthesis around SELECT inside function arguments #28 (thanks to @bparnell-4tel)

0.11.6

05 Aug 07:23

Choose a tag to compare

Upgrade sql-parser-cst to 0.28.1

0.11.5

27 Mar 07:24

Choose a tag to compare

Improved PostgreSQL support

  • Formatting of ALTER FUNCTION/PROCEDURE
  • Formatting of CREATE TRIGGER

Fixes

  • Various parsing fixes and improvements from sql-parser-cst 0.28.0

0.11.4

13 Feb 19:56

Choose a tag to compare

Update parser to 0.27.1

  • Bringing in support for $nr parameter types.

0.11.3

09 Feb 09:30

Choose a tag to compare

Support for latest BigQuery syntax

Upgraded the parser to support latest (as of 31. Jan 2024) BigQuery syntax.
Notably this includes:

  • support for PRIMARY KEY and FOREIGN KEY
  • OPTIONS() in view columns
  • GROUP BY with CUBE(), ROLLUP(), GROUPING SETS

Improved PostgreSQL support

  • CREATE/DROP/ALTER INDEX and REINDEX are now supported

0.11.2

03 Feb 14:26

Choose a tag to compare

Improved PostgreSQL support

  • Formatting of CREATE TABLE
  • Formatting of CREATE FOREIGN TABLE
  • Formatting of ALTER TABLE
  • Formatting of CREATE/ALTER/DROP SEQUENCE
  • Formatting of CREATE/ALTER/DROP VIEW
  • Formatting of CREATE/ALTER/DROP MATERIALIZED VIEW
  • Formatting of REFRESH MATERIALIZED VIEW
  • Formatting of CREATE/ALTER/DROP SCHEMA

0.11.1

28 Jan 09:43

Choose a tag to compare

Improved PostgreSQL support

  • Formatting of CREATE FUNCTION
  • Formatting of CREATE PROCEDURE
  • Formatting of DROP FUNCTION
  • Formatting of DROP PROCEDURE

0.11.0

22 Jan 18:01

Choose a tag to compare

New features

  • New option sqlCanonicalSyntax. When enabled (which is the default), the formatter will perform various transformations on the source code, like adding AS keywords to table and column aliases, replacing some deprecated syntax with more modern one, etc.

Improved PostgreSQL and MySQL support

  • Much improved formatting of CREATE TABLE and ALTER TABLE.
  • Along with other parsing improvements form sql-parser-cst 0.23.0

Formatting improvements

  • The formatting of various statements will now adapt to existing code. Similarly to how the formatting of SELECT statement already behaved - i.e. when the original code is on a single line, the formatter also tries to place it on a single line and will only break it up to multiple lines when the statement is short enough.

Bugfixes

  • Created a script to automatically check for unused CST node fields, which uncovered several cases, where the formatter would end up silently deleting code. All fixed now and hopefully won't happen again.

0.10.2

11 Jan 10:03

Choose a tag to compare

Improved PostgreSQL support

  • PostgreSQL statements INSERT, UPDATE, DELETE, MERGE are now supported.

Improved MySQL support

  • MySQL RENAME TABLE is now properly formatted

Bugfixes

  • Bugfixes and performance improvements from sql-parser-cst 0.22.0 and 0.22.1.