Skip to content

Releases: sql-formatter-org/sql-formatter

12.0.0-beta.2

20 Oct 13:04
Compare
Choose a tag to compare
12.0.0-beta.2 Pre-release
Pre-release

Bugfixes

  • Add package.json to list of exports #499

12.0.0-beta.1

11 Oct 16:55
Compare
Choose a tag to compare
12.0.0-beta.1 Pre-release
Pre-release

Major formatting style change

Most of the simple statements are now formatted more so on one line (#483).

For example the following SQL, previously formatted as follows:

ALTER TABLE
  foo
ALTER COLUMN
  col1
SET DEFAULT
  10;

DROP TABLE
  my_tbl;

DELETE FROM
  customers
WHERE
  age > 99;

UPDATE
  orders
SET
  price = 0,
  total = 0
WHERE
  deleted = TRUE;

will now be formatted on a single line:

ALTER TABLE foo
ALTER COLUMN col1
SET DEFAULT 10;

DROP TABLE my_tbl;

DELETE FROM customers
WHERE
  age > 99;

UPDATE orders
SET
  price = 0,
  total = 0
WHERE
  deleted = TRUE;

Breaking change in extension API

Instead of extending the Formatter class, there's now a DialectOptions object (#493).
This object can now be supplied to language parameter to implement a custom SQL dialect.

Bugfixes

  • Support nested CASE expressions (#494)
  • The MySQL USE keyword formatting should no more cause syntax error (#456)

11.0.2

05 Oct 06:50
Compare
Choose a tag to compare

Bugfixes

  • Fix indentation of first comment in file #481

11.0.1

03 Oct 13:02
Compare
Choose a tag to compare

Bugfixes

  • Fix ESM/TypeScript module resolution #487 #488 (thanks to An Phi)

11.0.0

30 Sep 07:40
Compare
Choose a tag to compare

Potentially breaking changes

  • The library is now exported as ES module #455, #105

New features

  • Added support for Snowflake dialect #454

Improvements

  • Better CASE expression formatting #458, #401, #459
  • Better formatting of inline block-comments #462
  • Better ON UPDATE/DELETE constraints formatting #478
  • denseOperators config now also applies to : operator.

11.0.0-beta.2

29 Sep 16:41
Compare
Choose a tag to compare
11.0.0-beta.2 Pre-release
Pre-release

Improvements

  • Improved Snowflake ALTER TABLE syntax support #479
  • Improve ON DELETE / ON UPDATE constraints formatting #478

11.0.0-beta.1

29 Sep 10:57
Compare
Choose a tag to compare
11.0.0-beta.1 Pre-release
Pre-release

New features

  • Added support for Snowflake dialect #454

10.8.0-beta.6

29 Sep 06:51
Compare
Choose a tag to compare
10.8.0-beta.6 Pre-release
Pre-release

Improvements

  • Target Node 14.x in ESM build #474

10.8.0-beta.5

27 Sep 08:43
Compare
Choose a tag to compare
10.8.0-beta.5 Pre-release
Pre-release
  • Fix bad merge #470

10.8.0-beta.4

27 Sep 08:32
Compare
Choose a tag to compare
10.8.0-beta.4 Pre-release
Pre-release

Improvements

  • Allow comments inside CASE sub-expressions #464
  • Better formatting of inline block-comments #462