Skip to content

Releases: sql-formatter-org/sql-formatter

6.1.4

09 Jun 14:28
Compare
Choose a tag to compare

Broken release. Tried to fix the previous release... didn't succeed :(

6.1.3

09 Jun 12:26
Compare
Choose a tag to compare

Mostly a changes related to repository transfer from github.com/zeroturnaround to github.com/sql-formatter-org.

  • Dropped . and @ characters support from PL/SQL identifiers (which weren't valid anyway).

  • Dropped support for TypeScript < 4.5.

Broken release because of internal import paths refactoring. Fixed in 6.1.5.

6.1.2

24 May 07:45
Compare
Choose a tag to compare

Bugfixes:

  • Add missing PostgreSQL JSON operators #> and #>> #217
  • Don't add extra newline before a lonely semicolon when using newlineBeforeSemicolon: true

Internals:

  • Rewrite of SQL string building logic
  • Remove ZWS-replacement hack from indentStyle: tabular* token formatting
  • Store both raw and clean values inside tokens

6.1.1

16 May 11:07
Compare
Choose a tag to compare

Fixes:

  • Add CASE expression support for DB2 and Redshift. This means, all SQL dialects now support CASE..END syntax.

Internals:

  • Reorganization of CASE expression formatting code.
  • Reorganization of token preprocessing.

6.1.0

12 May 14:06
Compare
Choose a tag to compare

New language: SQLite

  • Merged in support for SQLite formatting #189

Fixes

  • Restore regression in DELETE FROM formatting

6.0.2

12 May 10:29
Compare
Choose a tag to compare

Minor enhancements:

  • Don't crash with default "sql" language when encountering "@" character #214
  • Better error message when tokenizer fails

6.0.1

12 May 09:45
Compare
Choose a tag to compare

Single bugfix:

  • Avoid breaking up ON UPDATE and ON DELETE #215

6.0.0

11 May 12:04
Compare
Choose a tag to compare

From 4.x to 6.x

This release is mostly a back-merge of the Prettier SQL fork.

The latest stable release of SQL Formatter was 4.0.2. Prettier SQL continued from that, releasing Prettier SQL 5.0 ... 5.1.1. Now back in SQL Formatter we're skipping the 5.x versions and going straight to 6.

Breaking changes since 4.x

Command line options --indent (-i), --tab-indent (-t), --uppercase (-u) and --lines-between-queries have been removed in favor of using a JSON config file which can be specified using --config (-c) option.

The equivalent options in a config file are as follows:

{
  "tabWidth": 4,
  "useTabs": true,
  "keywordCase": "upper",
  "linesBetweenQueries": 2
}

When used as a library, the indent and uppercase options have been replaced similarly.

New features

New SQL Dialects: GCP BigQuery, Apache Hive.

Lots of new configuration options. See the README for a full list.

Bugfixes and minor enhancements

  • Added support for DB2 hex literals #123
  • Added support for PL/SQL $$ ... $$ quoted strings #183
  • Added support for Postgres C-style escaped strings #198
  • Scientific notation now supported for numbers #153
  • Various fixes operator handling #125 #135 #150 #167 #176 #201
  • Backtick-quoted identifiers and single-quoted strings now supported again in default language: "sql" #139 #147 #192
  • Fixed formatting of CHARACTER SET #181
  • The RETURNING keyword is now properly recognized in Postgres, MariaDB, N1QL and PL/SQL #196
  • Improved STDOUT handling #194
  • Fixed CLI command regressions #209 #210
  • Fixed crash in Safary caused by regex look-behind inferrinizzard#84

6.0.0-beta.4

11 May 11:51
Compare
Choose a tag to compare
6.0.0-beta.4 Pre-release
Pre-release

6.0.0-beta.3

10 May 10:07
Compare
Choose a tag to compare
6.0.0-beta.3 Pre-release
Pre-release
  • Replace indent option with two options: tabWidth and useTabs
  • Throw ConfigError instead of plain Error to distinguish configuration errors.