@n8n/codemirror-lang-sql 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/tokens.js ADDED
@@ -0,0 +1,343 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tokens = exports.SQLKeywords = exports.SQLFunctions = exports.SQLTypes = void 0;
4
+ exports.dialect = dialect;
5
+ exports.tokensFor = tokensFor;
6
+ const lr_1 = require("@lezer/lr");
7
+ const grammar_sql_terms_1 = require("./grammar.sql.terms");
8
+ var Ch;
9
+ (function (Ch) {
10
+ Ch[Ch["Newline"] = 10] = "Newline";
11
+ Ch[Ch["Space"] = 32] = "Space";
12
+ Ch[Ch["DoubleQuote"] = 34] = "DoubleQuote";
13
+ Ch[Ch["Hash"] = 35] = "Hash";
14
+ Ch[Ch["Dollar"] = 36] = "Dollar";
15
+ Ch[Ch["SingleQuote"] = 39] = "SingleQuote";
16
+ Ch[Ch["ParenL"] = 40] = "ParenL";
17
+ Ch[Ch["ParenR"] = 41] = "ParenR";
18
+ Ch[Ch["Star"] = 42] = "Star";
19
+ Ch[Ch["Plus"] = 43] = "Plus";
20
+ Ch[Ch["Comma"] = 44] = "Comma";
21
+ Ch[Ch["Dash"] = 45] = "Dash";
22
+ Ch[Ch["Dot"] = 46] = "Dot";
23
+ Ch[Ch["Slash"] = 47] = "Slash";
24
+ Ch[Ch["Colon"] = 58] = "Colon";
25
+ Ch[Ch["Semi"] = 59] = "Semi";
26
+ Ch[Ch["Question"] = 63] = "Question";
27
+ Ch[Ch["At"] = 64] = "At";
28
+ Ch[Ch["BracketL"] = 91] = "BracketL";
29
+ Ch[Ch["BracketR"] = 93] = "BracketR";
30
+ Ch[Ch["Backslash"] = 92] = "Backslash";
31
+ Ch[Ch["Underscore"] = 95] = "Underscore";
32
+ Ch[Ch["Backtick"] = 96] = "Backtick";
33
+ Ch[Ch["BraceL"] = 123] = "BraceL";
34
+ Ch[Ch["BraceR"] = 125] = "BraceR";
35
+ Ch[Ch["A"] = 65] = "A";
36
+ Ch[Ch["a"] = 97] = "a";
37
+ Ch[Ch["B"] = 66] = "B";
38
+ Ch[Ch["b"] = 98] = "b";
39
+ Ch[Ch["E"] = 69] = "E";
40
+ Ch[Ch["e"] = 101] = "e";
41
+ Ch[Ch["F"] = 70] = "F";
42
+ Ch[Ch["f"] = 102] = "f";
43
+ Ch[Ch["N"] = 78] = "N";
44
+ Ch[Ch["n"] = 110] = "n";
45
+ Ch[Ch["X"] = 88] = "X";
46
+ Ch[Ch["x"] = 120] = "x";
47
+ Ch[Ch["Z"] = 90] = "Z";
48
+ Ch[Ch["z"] = 122] = "z";
49
+ Ch[Ch["_0"] = 48] = "_0";
50
+ Ch[Ch["_1"] = 49] = "_1";
51
+ Ch[Ch["_9"] = 57] = "_9";
52
+ })(Ch || (Ch = {}));
53
+ function isAlpha(ch) {
54
+ return (ch >= 65 && ch <= 90) || (ch >= 97 && ch <= 122) || (ch >= 48 && ch <= 57);
55
+ }
56
+ function isHexDigit(ch) {
57
+ return (ch >= 48 && ch <= 57) || (ch >= 97 && ch <= 102) || (ch >= 65 && ch <= 70);
58
+ }
59
+ function readLiteral(input, endQuote, backslashEscapes) {
60
+ for (let escaped = false;;) {
61
+ if (input.next < 0)
62
+ return;
63
+ if (input.next === endQuote && !escaped) {
64
+ input.advance();
65
+ return;
66
+ }
67
+ escaped = backslashEscapes && !escaped && input.next === 92;
68
+ input.advance();
69
+ }
70
+ }
71
+ function readDoubleDollarLiteral(input) {
72
+ for (;;) {
73
+ if (input.next < 0 || input.peek(1) < 0)
74
+ return;
75
+ if (input.next === 36 && input.peek(1) === 36) {
76
+ input.advance(2);
77
+ return;
78
+ }
79
+ input.advance();
80
+ }
81
+ }
82
+ function readWord(input, result) {
83
+ for (;;) {
84
+ if (input.next !== 95 && !isAlpha(input.next))
85
+ break;
86
+ if (result !== null)
87
+ result += String.fromCharCode(input.next);
88
+ input.advance();
89
+ }
90
+ return result;
91
+ }
92
+ function readWordOrQuoted(input) {
93
+ if (input.next === 39 ||
94
+ input.next === 34 ||
95
+ input.next === 96) {
96
+ const quote = input.next;
97
+ input.advance();
98
+ readLiteral(input, quote, false);
99
+ }
100
+ else {
101
+ readWord(input);
102
+ }
103
+ }
104
+ function readBits(input, endQuote) {
105
+ while (input.next === 48 || input.next === 49)
106
+ input.advance();
107
+ if (endQuote && input.next === endQuote)
108
+ input.advance();
109
+ }
110
+ function readNumber(input, sawDot) {
111
+ for (;;) {
112
+ if (input.next === 46) {
113
+ if (sawDot)
114
+ break;
115
+ sawDot = true;
116
+ }
117
+ else if (input.next < 48 || input.next > 57) {
118
+ break;
119
+ }
120
+ input.advance();
121
+ }
122
+ if (input.next === 69 || input.next === 101) {
123
+ input.advance();
124
+ const advancedInput = input;
125
+ if (advancedInput.next === 43 || advancedInput.next === 45)
126
+ input.advance();
127
+ while (input.next >= 48 && input.next <= 57)
128
+ input.advance();
129
+ }
130
+ }
131
+ function eol(input) {
132
+ while (!(input.next < 0 || input.next === 10))
133
+ input.advance();
134
+ }
135
+ function inString(ch, str) {
136
+ for (let i = 0; i < str.length; i++)
137
+ if (str.charCodeAt(i) === ch)
138
+ return true;
139
+ return false;
140
+ }
141
+ const Space = ' \t\r\n';
142
+ function keywords(keywords, types, builtin, functions) {
143
+ const result = Object.create(null);
144
+ result['true'] = result['false'] = grammar_sql_terms_1.Bool;
145
+ result['null'] = result['unknown'] = grammar_sql_terms_1.Null;
146
+ for (const kw of keywords.split(' '))
147
+ if (kw)
148
+ result[kw] = grammar_sql_terms_1.Keyword;
149
+ for (const tp of types.split(' '))
150
+ if (tp)
151
+ result[tp] = grammar_sql_terms_1.Type;
152
+ for (const kw of (builtin || '').split(' '))
153
+ if (kw)
154
+ result[kw] = grammar_sql_terms_1.Builtin;
155
+ for (const fn of (functions || '').split(' '))
156
+ if (fn)
157
+ result[fn] = grammar_sql_terms_1.Function;
158
+ return result;
159
+ }
160
+ exports.SQLTypes = 'array binary bit boolean char character clob date decimal double float int integer interval large national nchar nclob numeric object precision real smallint time timestamp varchar varying ';
161
+ exports.SQLFunctions = 'abs absolute case check cast concat coalesce cube collate count current_date current_path current_role current_time current_timestamp current_user day exists grouping hour localtime localtimestamp minute month second trim session_user size system_user treat unnest user year equals lower upper pow floor ceil exp log ifnull min max avg sum sqrt round ';
162
+ exports.SQLKeywords = 'action add after all allocate alter and any are as asc assertion at authorization before begin between both breadth by call cascade cascaded catalog close collation column commit condition connect connection constraint constraints constructor continue corresponding create cross current current_default_transform_group current_transform_group_for_type cursor cycle data deallocate declare default deferrable deferred delete depth deref desc describe descriptor deterministic diagnostics disconnect distinct do domain drop dynamic each else elseif end end-exec equals escape except exception exec execute exit external fetch first for foreign found from free full function general get global go goto grant group handle having hold identity if immediate in indicator initially inner inout input insert intersect into is isolation join key language last lateral leading leave left level like limit local locator loop map match method modifies module names natural nesting new next no none not of old on only open option or order ordinality out outer output overlaps pad parameter partial path prepare preserve primary prior privileges procedure public read reads recursive redo ref references referencing relative release repeat resignal restrict result return returns revoke right role rollback rollup routine row rows savepoint schema scroll search section select session set sets signal similar some space specific specifictype sql sqlexception sqlstate sqlwarning start state static table temporary then timezone_hour timezone_minute to trailing transaction translation trigger under undo union unique until update usage using value values view when whenever where while with without work write zone ';
163
+ const defaults = {
164
+ backslashEscapes: false,
165
+ hashComments: false,
166
+ spaceAfterDashes: false,
167
+ slashComments: false,
168
+ doubleQuotedStrings: false,
169
+ doubleDollarQuotedStrings: false,
170
+ unquotedBitLiterals: false,
171
+ treatBitsAsBytes: false,
172
+ charSetCasts: false,
173
+ operatorChars: '*+-%<>!==&|~^/',
174
+ specialVar: '?',
175
+ identifierQuotes: '"',
176
+ words: keywords(exports.SQLKeywords, exports.SQLTypes, '', exports.SQLFunctions),
177
+ };
178
+ function dialect(spec, kws, types, builtin, functions) {
179
+ const dialect = {};
180
+ for (const prop in defaults)
181
+ dialect[prop] = (Object.prototype.hasOwnProperty.call(spec, prop) ? spec : defaults)[prop];
182
+ if (kws)
183
+ dialect.words = keywords(kws, types || '', builtin, functions);
184
+ return dialect;
185
+ }
186
+ function tokensFor(d) {
187
+ return new lr_1.ExternalTokenizer((input) => {
188
+ const { next } = input;
189
+ input.advance();
190
+ if (inString(next, Space)) {
191
+ while (inString(input.next, Space))
192
+ input.advance();
193
+ input.acceptToken(grammar_sql_terms_1.Whitespace);
194
+ }
195
+ else if (next === 36 && input.next === 36 && d.doubleDollarQuotedStrings) {
196
+ readDoubleDollarLiteral(input);
197
+ input.acceptToken(grammar_sql_terms_1.String);
198
+ }
199
+ else if (next === 39 || (next === 34 && d.doubleQuotedStrings)) {
200
+ readLiteral(input, next, d.backslashEscapes);
201
+ input.acceptToken(grammar_sql_terms_1.String);
202
+ }
203
+ else if ((next === 35 && d.hashComments) ||
204
+ (next === 47 && input.next === 47 && d.slashComments)) {
205
+ eol(input);
206
+ input.acceptToken(grammar_sql_terms_1.LineComment);
207
+ }
208
+ else if (next === 45 &&
209
+ input.next === 45 &&
210
+ (!d.spaceAfterDashes || input.peek(1) === 32)) {
211
+ eol(input);
212
+ input.acceptToken(grammar_sql_terms_1.LineComment);
213
+ }
214
+ else if (next === 47 && input.next === 42) {
215
+ input.advance();
216
+ for (let depth = 1;;) {
217
+ const cur = input.next;
218
+ if (input.next < 0)
219
+ break;
220
+ input.advance();
221
+ if (cur === 42 && input.next === 47) {
222
+ depth--;
223
+ input.advance();
224
+ if (!depth)
225
+ break;
226
+ }
227
+ else if (cur === 47 && input.next === 42) {
228
+ depth++;
229
+ input.advance();
230
+ }
231
+ }
232
+ input.acceptToken(grammar_sql_terms_1.BlockComment);
233
+ }
234
+ else if ((next === 101 || next === 69) && input.next === 39) {
235
+ input.advance();
236
+ readLiteral(input, 39, true);
237
+ }
238
+ else if ((next === 110 || next === 78) &&
239
+ input.next === 39 &&
240
+ d.charSetCasts) {
241
+ input.advance();
242
+ readLiteral(input, 39, d.backslashEscapes);
243
+ input.acceptToken(grammar_sql_terms_1.String);
244
+ }
245
+ else if (next === 95 && d.charSetCasts) {
246
+ for (let i = 0;; i++) {
247
+ if (input.next === 39 && i > 1) {
248
+ input.advance();
249
+ readLiteral(input, 39, d.backslashEscapes);
250
+ input.acceptToken(grammar_sql_terms_1.String);
251
+ break;
252
+ }
253
+ if (!isAlpha(input.next))
254
+ break;
255
+ input.advance();
256
+ }
257
+ }
258
+ else if (next === 40) {
259
+ input.acceptToken(grammar_sql_terms_1.ParenL);
260
+ }
261
+ else if (next === 41) {
262
+ input.acceptToken(grammar_sql_terms_1.ParenR);
263
+ }
264
+ else if (next === 123) {
265
+ input.acceptToken(grammar_sql_terms_1.BraceL);
266
+ }
267
+ else if (next === 125) {
268
+ input.acceptToken(grammar_sql_terms_1.BraceR);
269
+ }
270
+ else if (next === 91) {
271
+ input.acceptToken(grammar_sql_terms_1.BracketL);
272
+ }
273
+ else if (next === 93) {
274
+ input.acceptToken(grammar_sql_terms_1.BracketR);
275
+ }
276
+ else if (next === 59) {
277
+ input.acceptToken(grammar_sql_terms_1.Semi);
278
+ }
279
+ else if (d.unquotedBitLiterals && next === 48 && input.next === 98) {
280
+ input.advance();
281
+ readBits(input);
282
+ input.acceptToken(grammar_sql_terms_1.Bits);
283
+ }
284
+ else if ((next === 98 || next === 66) &&
285
+ (input.next === 39 || input.next === 34)) {
286
+ const quoteStyle = input.next;
287
+ input.advance();
288
+ if (d.treatBitsAsBytes) {
289
+ readLiteral(input, quoteStyle, d.backslashEscapes);
290
+ input.acceptToken(grammar_sql_terms_1.Bytes);
291
+ }
292
+ else {
293
+ readBits(input, quoteStyle);
294
+ input.acceptToken(grammar_sql_terms_1.Bits);
295
+ }
296
+ }
297
+ else if ((next === 48 && (input.next === 120 || input.next === 88)) ||
298
+ ((next === 120 || next === 88) && input.next === 39)) {
299
+ const quoted = input.next === 39;
300
+ input.advance();
301
+ while (isHexDigit(input.next))
302
+ input.advance();
303
+ if (quoted && input.next === 39)
304
+ input.advance();
305
+ input.acceptToken(grammar_sql_terms_1.Number);
306
+ }
307
+ else if (next === 46 && input.next >= 48 && input.next <= 57) {
308
+ readNumber(input, true);
309
+ input.acceptToken(grammar_sql_terms_1.Number);
310
+ }
311
+ else if (next === 46) {
312
+ input.acceptToken(grammar_sql_terms_1.Dot);
313
+ }
314
+ else if (next >= 48 && next <= 57) {
315
+ readNumber(input, false);
316
+ input.acceptToken(grammar_sql_terms_1.Number);
317
+ }
318
+ else if (inString(next, d.operatorChars)) {
319
+ while (inString(input.next, d.operatorChars))
320
+ input.advance();
321
+ input.acceptToken(grammar_sql_terms_1.Operator);
322
+ }
323
+ else if (inString(next, d.specialVar)) {
324
+ if (input.next === next)
325
+ input.advance();
326
+ readWordOrQuoted(input);
327
+ input.acceptToken(grammar_sql_terms_1.SpecialVar);
328
+ }
329
+ else if (inString(next, d.identifierQuotes)) {
330
+ readLiteral(input, next, false);
331
+ input.acceptToken(grammar_sql_terms_1.QuotedIdentifier);
332
+ }
333
+ else if (next === 58 || next === 44) {
334
+ input.acceptToken(grammar_sql_terms_1.Punctuation);
335
+ }
336
+ else if (isAlpha(next)) {
337
+ const word = readWord(input, String.fromCharCode(next));
338
+ input.acceptToken(input.next === 46 ? grammar_sql_terms_1.Identifier : (d.words[word.toLowerCase()] ?? grammar_sql_terms_1.Identifier));
339
+ }
340
+ });
341
+ }
342
+ exports.tokens = tokensFor(defaults);
343
+ //# sourceMappingURL=tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":";;;AA4NA,0BAiBC;AAED,8BAmIC;AAjXD,kCAA8C;AAE9C,2DA2B6B;AAE7B,IAAW,EA6CV;AA7CD,WAAW,EAAE;IACZ,kCAAY,CAAA;IACZ,8BAAU,CAAA;IACV,0CAAgB,CAAA;IAChB,4BAAS,CAAA;IACT,gCAAW,CAAA;IACX,0CAAgB,CAAA;IAChB,gCAAW,CAAA;IACX,gCAAW,CAAA;IACX,4BAAS,CA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OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;YACxD,KAAK,CAAC,WAAW,CAChB,KAAK,CAAC,IAAI,OAAW,CAAC,CAAC,CAAC,8BAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,IAAI,8BAAU,CAAC,CAChF,CAAC;QACH,CAAC;IACF,CAAC,CAAC,CAAC;AACJ,CAAC;AAEY,QAAA,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { defineConfig, globalIgnores } from 'eslint/config';
2
+ import { baseConfig } from '@n8n/eslint-config/base';
3
+
4
+ export default defineConfig(baseConfig, globalIgnores(['src/grammar*.ts']), {
5
+ rules: {
6
+ '@typescript-eslint/naming-convention': 'warn',
7
+ 'no-useless-escape': 'warn',
8
+ '@typescript-eslint/unbound-method': 'warn',
9
+ '@typescript-eslint/prefer-nullish-coalescing': 'warn',
10
+ '@typescript-eslint/no-unsafe-enum-comparison': 'off',
11
+ '@typescript-eslint/naming-convention': 'off',
12
+ },
13
+ });
package/jest.config.js ADDED
@@ -0,0 +1,6 @@
1
+ import { createRequire } from 'module';
2
+
3
+ const require = createRequire(import.meta.url);
4
+
5
+ /** @type {import('jest').Config} */
6
+ export default require('../../../jest.config');
package/package.json CHANGED
@@ -1,42 +1,56 @@
1
1
  {
2
2
  "name": "@n8n/codemirror-lang-sql",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "description": "SQL + n8n expression language support for CodeMirror 6",
5
- "scripts": {
6
- "test": "cm-runtests",
7
- "prepare": "cm-buildhelper src/sql.ts"
8
- },
9
5
  "keywords": [
10
6
  "editor",
11
7
  "code"
12
8
  ],
13
9
  "author": {
14
- "name": "Iván Ovejero",
15
- "email": "ivov.src@gmail.com",
16
- "url": "https://ivov.dev"
10
+ "name": "Jan Oberhauser",
11
+ "email": "jan@n8n.io"
17
12
  },
18
- "type": "module",
19
- "main": "dist/index.cjs",
13
+ "main": "dist/index.js",
14
+ "module": "src/index.ts",
15
+ "types": "dist/index.d.ts",
20
16
  "exports": {
21
- "import": "./dist/index.js",
22
- "require": "./dist/index.cjs"
17
+ ".": {
18
+ "require": "./dist/index.js",
19
+ "import": "./src/index.ts",
20
+ "types": "./dist/index.d.ts"
21
+ },
22
+ "./*": "./*"
23
23
  },
24
- "types": "dist/index.d.ts",
25
- "module": "dist/index.js",
26
24
  "sideEffects": false,
27
- "license": "MIT",
25
+ "license": "SEE LICENSE IN LICENSE.md",
28
26
  "dependencies": {
29
27
  "@codemirror/autocomplete": "^6.0.0",
30
- "@lezer/highlight": "^1.0.0",
31
28
  "@codemirror/language": "^6.0.0",
32
29
  "@codemirror/state": "^6.0.0",
33
- "@lezer/lr": "^1.0.0"
30
+ "@lezer/highlight": "^1.0.0",
31
+ "@lezer/lr": "^1.0.0",
32
+ "@n8n/codemirror-lang": "0.3.0"
34
33
  },
35
34
  "devDependencies": {
36
- "@codemirror/buildhelper": "^0.1.5"
35
+ "@codemirror/text": "^0.19.6",
36
+ "@lezer/generator": "^1.7.0",
37
+ "@n8n/typescript-config": "1.3.0"
37
38
  },
39
+ "homepage": "https://n8n.io",
38
40
  "repository": {
39
41
  "type": "git",
40
- "url": "https://github.com/n8n-io/codemirror-lang-n8n-sql.git"
42
+ "url": "git+https://github.com/n8n-io/n8n.git"
43
+ },
44
+ "scripts": {
45
+ "clean": "rimraf dist .turbo",
46
+ "test": "jest",
47
+ "generate:sql:grammar": "lezer-generator --typeScript --output src/grammar.sql.ts src/sql.grammar",
48
+ "generate": "pnpm generate:sql:grammar && pnpm format",
49
+ "build": "tsc -p tsconfig.build.json",
50
+ "lint": "eslint . --quiet",
51
+ "lint:fix": "eslint . --fix",
52
+ "format": "biome format --write src test",
53
+ "format:check": "biome ci src test",
54
+ "typecheck": "tsc --noEmit"
41
55
  }
42
- }
56
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": ["./tsconfig.json", "@n8n/typescript-config/tsconfig.build.json"],
3
+ "compilerOptions": {
4
+ "rootDir": "src",
5
+ "outDir": "dist",
6
+ "tsBuildInfoFile": "dist/build.tsbuildinfo"
7
+ },
8
+ "include": ["src/**/*.ts"],
9
+ "exclude": ["test/**"]
10
+ }
@@ -1,22 +0,0 @@
1
- name: CI Pull Requests
2
-
3
- on: [pull_request]
4
-
5
- jobs:
6
- ci-pull-request:
7
- runs-on: ubuntu-latest
8
-
9
- steps:
10
- - name: Check out commit
11
- uses: actions/checkout@v3
12
-
13
- - name: Use Node.js 18
14
- uses: actions/setup-node@v3
15
- with:
16
- node-version: 18.x
17
-
18
- - name: Install, prepare and test
19
- run: |
20
- npm install --frozen-lockfile
21
- npm run prepare
22
- npm run test
package/CHANGELOG.md DELETED
@@ -1,148 +0,0 @@
1
- ## 6.5.0 (2023-05-16)
2
-
3
- ### New features
4
-
5
- Dialect objects now have a public `spec` property holding their configuration.
6
-
7
- ## 6.4.1 (2023-04-13)
8
-
9
- ### Bug fixes
10
-
11
- Fix a bug where tokenizing of block comments got confused when nested comment start/end markers appeared directly next to each other.
12
-
13
- ## 6.4.0 (2023-01-23)
14
-
15
- ### Bug fixes
16
-
17
- Fix syntax tree node names for curly and square brackets, which had their names swapped.
18
-
19
- ### New features
20
-
21
- The new `schemas` config option can be used to provide custom completion objects for schema completions.
22
-
23
- ## 6.3.3 (2022-11-14)
24
-
25
- ### Bug fixes
26
-
27
- Fix tokenizing of double-`$` strings in SQL dialects that support them.
28
-
29
- ## 6.3.2 (2022-10-24)
30
-
31
- ### Bug fixes
32
-
33
- Make sure the language object has a name.
34
-
35
- ## 6.3.1 (2022-10-17)
36
-
37
- ### Bug fixes
38
-
39
- Fix tokenizing of `--` line comments.
40
-
41
- ## 6.3.0 (2022-08-23)
42
-
43
- ### New features
44
-
45
- Schema-based completion now understands basic table alias syntax, and will take it into account when looking up completions.
46
-
47
- ## 6.2.0 (2022-08-14)
48
-
49
- ### New features
50
-
51
- The new `unquotedBitLiterals` dialect option controls whether `0b01` syntax is recognized.
52
-
53
- Dialects now allow a `treatBitsAsBytes` option to allow any characters inside quoted strings prefixed with `b`.
54
-
55
- ## 6.1.0 (2022-08-05)
56
-
57
- ### New features
58
-
59
- The new `doubleDollarQuotedStrings` options to SQL dialects allows parsing of text delimited by `$$` as strings. Regenerate readme
60
-
61
- ## 6.0.0 (2022-06-08)
62
-
63
- ### Breaking changes
64
-
65
- Update dependencies to 6.0.0
66
-
67
- ## 0.20.4 (2022-05-30)
68
-
69
- ### New features
70
-
71
- Schema completion descriptions may now include dots in table names to indicate nested schemas.
72
-
73
- ## 0.20.3 (2022-05-27)
74
-
75
- ### Bug fixes
76
-
77
- Fix a bug where the slash at the end of block comments wasn't considered part of the comment token.
78
-
79
- ## 0.20.2 (2022-05-24)
80
-
81
- ### Bug fixes
82
-
83
- Fix an infinite recursion bug in `schemaCompletionSource`.
84
-
85
- ## 0.20.1 (2022-05-24)
86
-
87
- ### Breaking changes
88
-
89
- The `schemaCompletion` and `keywordCompletion` exports, which returned extensions, have been replaced with `schemaCompletionSource` and `keywordCompletionSource`, which return completion sources. The old exports will remain available until the next major version.
90
-
91
- ## 0.20.0 (2022-04-20)
92
-
93
- ### Bug fixes
94
-
95
- Fix autocompletion on columns when the table name is written with upper-case letters. Move to @lezer/highlight
96
-
97
- ## 0.19.4 (2021-10-28)
98
-
99
- ### Bug fixes
100
-
101
- Remove duplicate keywords/types in dialect configurations.
102
-
103
- Fix a bug that caused characters directly before a space to be tokenized incorrectly.
104
-
105
- ## 0.19.3 (2021-08-21)
106
-
107
- ### Bug fixes
108
-
109
- Fix a bug that broke tokenization of keywords.
110
-
111
- ## 0.19.2 (2021-08-11)
112
-
113
- ## 0.19.1 (2021-08-11)
114
-
115
- ### Bug fixes
116
-
117
- Fix incorrect versions for @lezer dependencies.
118
-
119
- ## 0.19.0 (2021-08-11)
120
-
121
- ### Breaking changes
122
-
123
- Update dependencies to 0.19.0
124
-
125
- ## 0.18.0 (2021-03-03)
126
-
127
- ### Breaking changes
128
-
129
- Update dependencies to 0.18.
130
-
131
- ## 0.17.2 (2021-02-01)
132
-
133
- ### Bug fixes
134
-
135
- Fix bad syntax tree creation when the input ends with an unfinished quoted identifier.
136
-
137
- ## 0.17.1 (2021-01-06)
138
-
139
- ### New features
140
-
141
- The package now also exports a CommonJS module.
142
-
143
- ## 0.17.0 (2020-12-29)
144
-
145
- ### Breaking changes
146
-
147
- First numbered release.
148
-