Commit 84b513e
committed
v5.0.0-beta
PR (#27)
* configure for typescript
* prettier
* convert to typescript
* add default options
* fix uppercase default for tests
add count keyword
* sort and dedupe keywords
* add support for escaped keywords as identifiers
* fix keyword identifier for non critical tests
* add @typescript-eslint/eslint-plugin
* fix webpack
* add basic alias processing
missing double word case
* add missing keywords to redshift
fix column alias edge case
* add alias tests
* ♻️
* fix handling of never alias option
* prettier check
* add newline for itemCount setting
* add newline for lineWidth
* update newline hybrid rule logic
* implement newline mode tests
* ♻️
* prettier check
* add eslint-config-airbnb-typescript
* add @typescript-eslint/parser
* fix eslint errors
* convert relevant import to type imports
* remove ts extension from import in test files
* remove sqlformatter d ts
* add dense operator option
* add operator test
* add NewlineMode enum
* move types to types file
* add AliasMode enum
* convert enums into string enums
* ♻️
* add semicolon newline option
* add unit test for semicolon newline
* add maxLength function
* add tabulation function
* add KeywordMode type
* add keyword style examples
* remove TopLevelIndents and merge reserved token logic
* add basic 10-space keyword positioning
* add support for multi item clauses
* add support for long keywords
* add unit tests for tenSpace modes
fix block end index logic
* add tests to accept tenSpace modes
* fix ON keyword
* fix bug with TopLevelIndent on nested blocks starting with FROM (
* add commaPosition option
* add post format method
* add basic tabular mode
* add formatting for comma before column
* add unit test for comma modes
fix tabular option
* add tests for accepting comma modes
* add AliasPosition flag
* add basic tabular alias function
* add unit tests for alias position
fix alias joining
* add tests for accepting tabular aliases
* switch delta from unit test as potential keyword
* fix regex flags
* fix alias tests
* add tests for aliasPosition x keywordPosition edge cases
* limit keywordPosition to standard and tenSpace
* add test case for long keywords
* move keywords that should be in reservedNewlineWords
* dedupe keywords
* update redshift keywords
* split reserved words into categories
add links to docs
* update Db2 keywords
* update MariaDb keywords
* update MySql keywords
* update N1ql keywords
* update Postgres keywords
* update Spark keywords
* update TSQL keywords
* update union/intersect/except lists
* split reservedDependentClause from reservedNewline
* fix case statements to support dependent clause
* update dependent clauses for remaining messages
* fix tests and keyword discrepancies
* rename TopLevelWord to Command
* rename TopLevelNoIndent to Binary Command
* move joins to BinaryCommands
* rename Newline words to Logical Operators
* rename reservedWords to Keywords
* rename openParen to Block Start
* rename closeParen to Block End
* move Logical Operator down
* add comments for reserved word categories
* fix PlSql test with CROSS/OUTER APPLY
* convert all members for formatters classes to static
* add paren options type
* add basic formatting for open paren position
* add basic close paren position formatting
* add test for open and close paren position
* decline reservedFunctionParens and functionParenSpace
* convert token type into TokenType enum
* use TypeToken enum to build mapped Regex table
* simplify tokenizer class
* simplify isToken
* update Tokenizer with PR comments
* rename isTopLevel to IsCommand
* add flag to toggle breaking before boolean operator
* support break after operator
add test
* update tests with static class members
* Update Db2FormatterTest.js
* add changelog
* update README
* update package.json
* fix semicolonNewline type
* Create dependabot.yml
* update sqlfmt node script to use config file
* add changelog
* Create dependabot.yml
* update README
* update package.json
* fix semicolonNewline type1 parent 3cd6d98 commit 84b513e
File tree
88 files changed
+19977
-16479
lines changed- bin
- src
- core
- languages
- test
- features
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
88 files changed
+19977
-16479
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
4 | 4 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
21 | 41 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
4 | 10 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
25 | 34 | | |
26 | 35 | | |
27 | 36 | | |
| |||
31 | 40 | | |
32 | 41 | | |
33 | 42 | | |
34 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
35 | 46 | | |
36 | 47 | | |
37 | 48 | | |
| |||
52 | 63 | | |
53 | 64 | | |
54 | 65 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
59 | 70 | | |
60 | 71 | | |
61 | 72 | | |
| |||
75 | 86 | | |
76 | 87 | | |
77 | 88 | | |
78 | | - | |
| 89 | + | |
79 | 90 | | |
80 | 91 | | |
81 | 92 | | |
| |||
84 | 95 | | |
85 | 96 | | |
86 | 97 | | |
87 | | - | |
| 98 | + | |
88 | 99 | | |
89 | 100 | | |
90 | 101 | | |
| |||
94 | 105 | | |
95 | 106 | | |
96 | 107 | | |
97 | | - | |
98 | | - | |
| 108 | + | |
| 109 | + | |
99 | 110 | | |
100 | 111 | | |
101 | 112 | | |
102 | 113 | | |
103 | | - | |
| 114 | + | |
104 | 115 | | |
105 | 116 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
118 | 125 | | |
119 | 126 | | |
120 | 127 | | |
121 | 128 | | |
122 | 129 | | |
123 | 130 | | |
124 | | - | |
| 131 | + | |
125 | 132 | | |
126 | 133 | | |
127 | 134 | | |
| |||
133 | 140 | | |
134 | 141 | | |
135 | 142 | | |
136 | | - | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
137 | 171 | | |
138 | 172 | | |
139 | 173 | | |
| |||
0 commit comments