Releases: sql-formatter-org/sql-formatter
6.1.4
6.1.3
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
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
6.1.0
6.0.2
6.0.1
6.0.0
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
- Fix Safari crash because of look-ahead and look-behind regexes inferrinizzard#84
6.0.0-beta.3
- Replace
indent
option with two options:tabWidth
anduseTabs
- Throw
ConfigError
instead of plainError
to distinguish configuration errors.