Releases: sql-formatter-org/sql-formatter
Releases · sql-formatter-org/sql-formatter
v4.0.0
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 tolanguage: "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
4.0.0-beta.0
v3.1.0
v2.3.4 - upgrade Lodash (to fix vulnerability)
@gwax/sql-formatter v3.0.0 - CLI, Spark & Redshift
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
Merge pull request #75 from zeroturnaround/dependabot/npm_and_yarn/ha…
v2.3.0 - Add support for PL/SQL
v2.1.0 - Improve bundle size
v2.0.0 - Remove line break from the end of the output
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
Merged PR #25.