Skip to content

Releases: sql-formatter-org/sql-formatter

v4.0.0

31 Jan 18:56
Compare
Choose a tag to compare

Breaking changes:

  • Standard SQL formatter ("sql") now only supports standard SQL. This means:
    • single-quotes for strings and double-quotes for identifiers and no other quote types;
    • only ? placeholders for parameters;
    • only standard SQL operators;
    • only standard SQL sql -- and /* */ comments,
    • if you used language: "sql" before, you're likely better off switching to language: "postgresql" | "mariadb" | "mysql" | "tsql".
  • Dropped -f / --file option from CLI. Instead a positional file argument can be used, like with any normal UNIX tool).
  • Default export no more exists. Only named export of format function (and supportedDialects - used by CLI).
  • Removed FORMATTERS export.
  • "pl/sql" alias has been removed. Use "plsql" instead.

New dialects:

  • PostgreSQL support
  • MariaDB support
  • MySQL support
  • Transact-SQL support

Fixes:

  • Proper formatting of BETWEEN _ AND _
  • Bunch of additional operators supported
  • No more mixing UNIX and Windows line endings - output is always converted to UNIX LF line endings.

Internal:

  • Better whitespace handling without having a separate whitespace token.
  • Upgrade to argparse 2.0
  • Lots of refactoring and reorganization of tests.

v4.0.0-beta.0

25 Jan 10:09
Compare
Choose a tag to compare
v4.0.0-beta.0 Pre-release
Pre-release
4.0.0-beta.0

v3.1.0

25 Jan 09:32
Compare
Choose a tag to compare

Re-release of the changes released as @gwax/sql-formatter 3.0.3 with one change:

  • When format() is not called with string argument, throws an error, instead of silently succeeding.

v2.3.4 - upgrade Lodash (to fix vulnerability)

25 Jan 09:36
Compare
Choose a tag to compare

@gwax/sql-formatter v3.0.0 - CLI, Spark & Redshift

25 Jan 09:56
Compare
Choose a tag to compare

New features:

  • Command line interface
  • Amazone Redshift support
  • Spark SQL support
  • uppercase option for converting keywords to uppercase

Bugfixes:

  • Proper unicode support (e.g. table and column names written in Chinese hieroglyphs or Cyrillic)
  • Support all PostgreSQL operators and := operator.
  • Support CASE...WHEN in standard SQL
  • Handle Windows line endings in comments
  • When format() not called with string, no more throws error from inside the Tokenizer, just returns empty string.
  • Fix block-comment indentation
  • Support scientific notation for floating point numbers (e.g. 1.5e-10)
  • Prevent splitting of compound tokens like UNION ALL
  • Improve open paren indentation after comma without whitespace

Internals:

  • Adopt prettier, re-indent all the code (huh-huh)
  • Drop Lodash library dependency

v2.3.3 - Upgrade dependencies

10 Jun 13:32
5ed09d9
Compare
Choose a tag to compare
Merge pull request #75 from zeroturnaround/dependabot/npm_and_yarn/ha…

v2.3.0 - Add support for PL/SQL

11 Apr 09:47
Compare
Choose a tag to compare

v2.1.0 - Improve bundle size

18 Sep 10:06
Compare
Choose a tag to compare

Big thanks goes to @osv who added tree-shaking support for Lodash by using implicit import.

Old bundle:

sql-formatter.js  607 kB
sql-formatter.min.js  96.6 kB

New bundle:

sql-formatter.js  102 kB
sql-formatter.min.js  35.3 kB

Check out PR #32

v2.0.0 - Remove line break from the end of the output

12 Jul 07:23
Compare
Choose a tag to compare

From now on SQL formatter does not add an extra newline to the end of the output.

Check out PR #27.

v1.3.0 - IBM DB2 support

07 Jul 12:18
Compare
Choose a tag to compare