sqlmath 2022.5.20 → 2022.6.30

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/CHANGELOG.md CHANGED
@@ -1,8 +1,56 @@
1
1
  # Changelog
2
2
 
3
3
  # Todo
4
+ - add dbtable-crud-operations dbtableOpenCsv, dbtableOpenJson
5
+ - sqlmath - add sql-extension carrayblob()
4
6
  - none
5
7
 
8
+ # v2022.6.30
9
+ - add dbtable-crud-operations dbtableRename, dbcolumnAdd, dbcolumnRename, dbcolumnDrop
10
+ - demo - add web-demo in README.md
11
+ - webapp - add ui-loading when running onDbAction(), onDbExec()
12
+ - add dbtable-crud-operations dbquerySaveCsv, dbquerySaveJson, dbtableDrop, dbtableSaveCsv, dbtableSaveJson
13
+ - add contextmenu and dbtable-crud-operation dbtableDrop
14
+ - add database-crud-operations
15
+ - merge rendering of sql-queries and sql-tables into one
16
+ - optimization - defer rendering data in dttable until you scroll into it in viewport
17
+ - add modal to display sql-query errors
18
+ - bugfix - fix broken sorting
19
+ - merge datatables css into file index.html
20
+ - merge datatables code into file sqlmath_browser.mjs and remove jquery-dependency
21
+ - bugfix - fix ci-function shCiBuildWasm() not updating output sqlmath_wasm.wasm
22
+ - wasm - rewrite file sqlmath_wrapper_wasm.js to pass jslint
23
+ - datatables - rewrite datatables-function _fnDraw() for faster rendering
24
+ - sqlmath - milestone - functional index.html
25
+ - add files asset_sqlmath_external_rollup.css, asset_sqlmath_external_rollup.js
26
+ - bugfix - fix memory-leak by replacing all free()/malloc() with sqlite3_free()/sqlite3_malloc()
27
+ - wasm - update functions dbFileExportAsync(), dbFileImportAsync() to be able to export/import raw-db-arraybuffer
28
+ - remove obsolete csv-json-import functions like dbTableInsert(), superseded by json_each()
29
+ - wasm - update function dbOpen() to be able to import raw dbData arraybuffer
30
+ - merge function dbExecWithRetryAsync() into dbExecAsync()
31
+ - rename function dbMemoryLoadOrSave to dbFileImportOrExport()
32
+ - add file csslint.js
33
+ - wasm - replace sqljs-api with sqlmath-api in wasm - part1
34
+ - remove jslint-dependency in sqlmath-core to prepare sqlmath for browser/wasm env
35
+ - emscripten updated to v3.1.3, allowing es6 syntax in sqlmath_wrapper_wasm.js
36
+ - jenks - streamline jenksCreate() return object to simple double-array instead of struct
37
+ - jenks - inline jenks-function jenksCalcRange() from recursion to iteration
38
+ - jenks - optimize jenks-function jenksCalcRange() from recursion to iteration
39
+ - jenks - replace class-based api with static-function
40
+ - jsbaton - migrate function dbExec() to new unified jsbaton
41
+ - error - add sqlite errcode SQLITE_ERROR_ZSQL_NULL
42
+ - jsbaton - migrate function dbTableInsert() to new unified jsbaton
43
+ - jsbaton - migrate functions dbClose(), dbMemoryLoadOrSave(), dbNoop(), dbOpen() to new, streamlined jsbaton2
44
+ - add js-function jsbatonPushValue() to dynamically push value to jsbaton
45
+ - napi - decouple c-functions dbClose(), dbExec(), dbMemoryLoadOrSave(), dbNoop(), dbOpen(), dbTableInsert() from napi
46
+ - perf - reduce unnecessary copying, replacing SQLITE_TRANSIENT with SQLITE_STATIC
47
+ - sqlmath - wrap c-functions jsonInit(), jsonInitNoContext() with jsonInit2() that auto jsonGrow/malloc str99->zBuf
48
+ - sqlmath - streamline function cCall() to cCallAsync(), which only returns a promise
49
+ - wasm - migrate from sqljs-api to sqlmath-api in wasm - part1
50
+ - gc - replace node-specific-gc __dbFinalizerCreate() with more-webassembly-friendly FinalizationRegistry()
51
+ - sqlmath - add sql-extension copyblob(), matrix2d_concat()
52
+ - sqlmath - re-include carray-extension
53
+
6
54
  # v2022.5.20
7
55
  - sqlite - update to sqlite v3.38.5
8
56
  - sqlmath - add sql-functions castrealorzero(), casttextorempty()
package/README.md CHANGED
@@ -2,21 +2,31 @@
2
2
 
3
3
 
4
4
  # Status
5
- | Branch | [master<br>(v2022.5.20)](https://github.com/sqlmath/sqlmath/tree/master) | [beta<br>(Web Demo)](https://github.com/sqlmath/sqlmath/tree/beta) | [alpha<br>(Development)](https://github.com/sqlmath/sqlmath/tree/alpha) |
5
+ | Branch | [master<br>(v2022.6.30)](https://github.com/sqlmath/sqlmath/tree/master) | [beta<br>(Web Demo)](https://github.com/sqlmath/sqlmath/tree/beta) | [alpha<br>(Development)](https://github.com/sqlmath/sqlmath/tree/alpha) |
6
6
  |--:|:--:|:--:|:--:|
7
7
  | CI | [![ci](https://github.com/sqlmath/sqlmath/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/sqlmath/sqlmath/actions?query=branch%3Amaster) | [![ci](https://github.com/sqlmath/sqlmath/actions/workflows/ci.yml/badge.svg?branch=beta)](https://github.com/sqlmath/sqlmath/actions?query=branch%3Abeta) | [![ci](https://github.com/sqlmath/sqlmath/actions/workflows/ci.yml/badge.svg?branch=alpha)](https://github.com/sqlmath/sqlmath/actions?query=branch%3Aalpha) |
8
8
  | Coverage | [![coverage](https://sqlmath.github.io/sqlmath/branch-master/.artifact/coverage/coverage_badge.svg)](https://sqlmath.github.io/sqlmath/branch-master/.artifact/coverage/index.html) | [![coverage](https://sqlmath.github.io/sqlmath/branch-beta/.artifact/coverage/coverage_badge.svg)](https://sqlmath.github.io/sqlmath/branch-beta/.artifact/coverage/index.html) | [![coverage](https://sqlmath.github.io/sqlmath/branch-alpha/.artifact/coverage/coverage_badge.svg)](https://sqlmath.github.io/sqlmath/branch-alpha/.artifact/coverage/index.html) |
9
+ | Demo | [<img src="asset_image_github_brands.svg" height="32">](https://sqlmath.github.io/sqlmath/branch-master/index.html) | [<img src="asset_image_github_brands.svg" height="32">](https://sqlmath.github.io/sqlmath/branch-beta/index.html) | [<img src="asset_image_github_brands.svg" height="32">](https://sqlmath.github.io/sqlmath/branch-alpha/index.html) |
9
10
  | Artifacts | [<img src="asset_image_folder_open_solid.svg" height="30">](https://github.com/sqlmath/sqlmath/tree/gh-pages/branch-master/.artifact) | [<img src="asset_image_folder_open_solid.svg" height="30">](https://github.com/sqlmath/sqlmath/tree/gh-pages/branch-beta/.artifact) | [<img src="asset_image_folder_open_solid.svg" height="30">](https://github.com/sqlmath/sqlmath/tree/gh-pages/branch-alpha/.artifact) |
10
11
 
11
12
 
12
13
  <br><br>
13
14
  # Table of Contents
14
15
 
15
- 1. [Package Listing](#package-listing)
16
+ 1. [Web Demo](#web-demo)
16
17
 
17
- 2. [Changelog](#changelog)
18
+ 2. [Package Listing](#package-listing)
18
19
 
19
- 3. [License](#license)
20
+ 3. [Changelog](#changelog)
21
+
22
+ 4. [License](#license)
23
+
24
+
25
+ <br><br>
26
+ # Web Demo
27
+ - https://sqlmath.github.io/sqlmath/index.html
28
+
29
+ [![screenshot](https://sqlmath.github.io/sqlmath/branch-beta/.artifact/screenshot_browser__2fsqlmath_2fbranch-beta_2findex.html.png)](https://sqlmath.github.io/sqlmath/index.html)
20
30
 
21
31
 
22
32
  <br><br>
@@ -33,7 +43,7 @@
33
43
 
34
44
  <br><br>
35
45
  # License
36
- - SQLite is under public domain.
46
+ - SQLite is under [public domain](https://www.sqlite.org/copyright.html).
37
47
  - JSLint is under [Unlicense License](https://github.com/jslint-org/jslint/blob/master/LICENSE).
38
48
  - [cpplint.py](cpplint.py) is under [BSD 3-clause license](https://github.com/cpplint/cpplint/blob/develop/LICENSE).
39
49
  - [indent.exe](indent.exe) is under [GPLv3 License](https://www.gnu.org/licenses/gpl-3.0.txt).
Binary file
Binary file
Binary file
package/jslint.mjs CHANGED
@@ -94,69 +94,66 @@
94
94
 
95
95
  /*jslint beta, node*/
96
96
  /*property
97
- excludeList,
98
- globExclude,
99
- import_meta_url, includeList,
100
- pathnameList,
101
97
  JSLINT_BETA, NODE_V8_COVERAGE, a, all, argv, arity, artifact,
102
98
  assertErrorThrownAsync, assertJsonEqual, assertOrThrow, assign, async, b,
103
99
  beta, bitwise, block, body, browser, c, calls, catch, catch_list,
104
100
  catch_stack, causes, char, children, clear, closer, closure, code, column,
105
101
  concat, consoleError, console_error, console_log, constant, context,
106
102
  convert, count, coverageDir, create, cwd, d, dead, debugInline, default,
107
- delta, devel, directive, directive_list, directive_quiet, directives,
103
+ delta, devel, directive, directive_ignore_line, directive_list, directives,
108
104
  dirname, disrupt, dot, edition, elem_list, ellipsis, else, end, endOffset,
109
- endsWith, entries, env, error, eval, every, example_list, exec, execArgv,
110
- exit, exitCode, export_dict, exports, expression, extra, file, fileList,
111
- fileURLToPath, filter, finally, flag, floor, for, forEach,
105
+ endsWith, entries, env, error, eval, every, example_list, excludeList, exec,
106
+ execArgv, exit, exitCode, export_dict, exports, expression, extra, file,
107
+ fileList, fileURLToPath, filter, finally, flag, floor, for, forEach,
112
108
  formatted_message, free, freeze, from, froms, fsWriteFileWithParents,
113
109
  fud_stmt, functionName, function_list, function_stack, functions, get,
114
- getset, github_repo, global, global_dict, global_list, holeList, htmlEscape,
115
- id, identifier, import, import_list, inc, indent2, index, indexOf, init,
116
- initial, isArray, isBlockCoverage, isHole, isNaN, is_equal, is_fart,
117
- is_weird, join, jslint, jslint_apidoc, jslint_assert, jslint_charset_ascii,
118
- jslint_cli, jslint_edition, jslint_phase1_split, jslint_phase2_lex,
119
- jslint_phase3_parse, jslint_phase4_walk, jslint_phase5_whitage,
120
- jslint_report, json, jstestDescribe, jstestIt, jstestOnExit, keys, label,
121
- lbp, led_infix, length, level, line, lineList, line_list, line_offset,
122
- line_source, lines, linesCovered, linesTotal, live, log, long, loop, m, map,
123
- margin, match, max, message, meta, min, mkdir, modeCoverageIgnoreFile,
124
- modeIndex, mode_cli, mode_conditional, mode_json, mode_module, mode_noop,
125
- mode_property, mode_shebang, mode_stop, module, moduleFsInit, moduleName,
126
- module_list, name, names, node, noop, now, nr, nud_prefix,
110
+ getset, github_repo, globExclude, global, global_dict, global_list,
111
+ holeList, htmlEscape, id, identifier, import, import_list, import_meta_url,
112
+ inc, includeList, indent2, index, indexOf, init, initial, isArray,
113
+ isBlockCoverage, isHole, isNaN, is_equal, is_fart, is_weird, join, jslint,
114
+ jslint_apidoc, jslint_assert, jslint_charset_ascii, jslint_cli,
115
+ jslint_edition, jslint_phase1_split, jslint_phase2_lex, jslint_phase3_parse,
116
+ jslint_phase4_walk, jslint_phase5_whitage, jslint_report, json,
117
+ jstestDescribe, jstestIt, jstestOnExit, keys, label, lbp, led_infix, length,
118
+ level, line, lineList, line_list, line_offset, line_source, lines,
119
+ linesCovered, linesTotal, live, log, long, loop, m, map, margin, match, max,
120
+ message, meta, min, mkdir, modeCoverageIgnoreFile, modeIndex, mode_cli,
121
+ mode_conditional, mode_json, mode_module, mode_noop, mode_property,
122
+ mode_shebang, mode_stop, module, moduleFsInit, moduleName, module_list,
123
+ name, names, node, nomen, noop, now, nr, nud_prefix,
127
124
  objectDeepCopyWithKeysSorted, ok, on, open, opening, option, option_dict,
128
125
  order, package_name, padEnd, padStart, parameters, parent, parentIi, parse,
129
- pathname, platform, pop, processArgv, process_argv, process_env,
130
- process_exit, promises, property, property_dict, push, quote, ranges,
131
- readFile, readdir, readonly, recursive, reduce, repeat, replace, resolve,
132
- result, reverse, role, round, scriptId, search, set, shebang, shift,
133
- signature, single, slice, some, sort, source, spawn, splice, split, stack,
134
- stack_trace, start, startOffset, startsWith, statement, statement_prv,
135
- stdio, stop, stop_at, stringify, switch, syntax_dict, tenure, test,
136
- test_cause, test_internal_error, this, thru, toString, token, token_global,
137
- token_list, token_nxt, token_tree, tokens, trace, tree, trim, trimEnd,
138
- trimRight, try, type, unlink, unordered, unshift, url, used,
139
- v8CoverageListMerge, v8CoverageReportCreate, value, variable, version,
140
- versions, warn, warn_at, warning, warning_list, warnings, white, wrapped,
141
- writeFile
126
+ pathname, pathnameList, platform, pop, processArgv, process_argv,
127
+ process_env, process_exit, promises, property, property_dict, push, quote,
128
+ ranges, readFile, readdir, readonly, recursive, reduce, repeat, replace,
129
+ resolve, result, reverse, role, round, scriptId, search, set, shebang,
130
+ shift, signature, single, slice, some, sort, source, spawn, splice, split,
131
+ stack, stack_trace, start, startOffset, startsWith, statement,
132
+ statement_prv, stdio, stop, stop_at, stringify, subscript, switch,
133
+ syntax_dict, tenure, test, test_cause, test_internal_error, this, thru,
134
+ toString, token, token_global, token_list, token_nxt, token_tree, tokens,
135
+ trace, tree, trim, trimEnd, trimRight, try, type, unlink, unordered,
136
+ unshift, url, used, v8CoverageListMerge, v8CoverageReportCreate, value,
137
+ variable, version, versions, warn, warn_at, warning, warning_list, warnings,
138
+ white, wrapped, writeFile
142
139
  */
143
140
 
144
141
  // init debugInline
145
142
  let debugInline = (function () {
146
- let consoleError = function () {
143
+ let __consoleError = function () {
147
144
  return;
148
145
  };
149
146
  function debug(...argv) {
150
147
 
151
148
  // This function will print <argv> to stderr and then return <argv>[0].
152
149
 
153
- consoleError("\n\ndebugInline");
154
- consoleError(...argv);
155
- consoleError("\n");
150
+ __consoleError("\n\ndebugInline");
151
+ __consoleError(...argv);
152
+ __consoleError("\n");
156
153
  return argv[0];
157
154
  }
158
155
  debug(); // Coverage-hack.
159
- consoleError = console.error;
156
+ __consoleError = console.error;
160
157
  return debug;
161
158
  }());
162
159
  let jslint_charset_ascii = (
@@ -168,7 +165,7 @@ let jslint_charset_ascii = (
168
165
  + "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
169
166
  + "`abcdefghijklmnopqrstuvwxyz{|}~\u007f"
170
167
  );
171
- let jslint_edition = "v2022.6.1-beta";
168
+ let jslint_edition = "v2022.7.1-beta";
172
169
  let jslint_export; // The jslint object to be exported.
173
170
  let jslint_fudge = 1; // Fudge starting line and starting
174
171
  // ... column to 1.
@@ -472,7 +469,9 @@ function globExclude({
472
469
  // $()*+-./?[\]^{|}
473
470
 
474
471
  strRegex = strRegex.replace((
475
- // ignore [-/]
472
+
473
+ // Ignore [-/].
474
+
476
475
  /[$()*+.?\[\\\]\^{|}]/g
477
476
  ), "\\$&");
478
477
 
@@ -716,10 +715,11 @@ function jslint(
716
715
  return false;
717
716
  }
718
717
  if (aa.arity === bb.arity && aa.id === bb.id) {
719
- if (aa.id === ".") {
718
+ if (aa.id === "." || aa.id === "?.") {
720
719
 
721
720
  // test_cause:
722
721
  // ["aa.bb&&aa.bb", "is_equal", "recurse_arity_id", "", 0]
722
+ // ["aa?.bb&&aa?.bb", "is_equal", "recurse_arity_id", "", 0]
723
723
 
724
724
  test_cause("recurse_arity_id");
725
725
  return (
@@ -1219,12 +1219,12 @@ function jslint(
1219
1219
  if (option_dict.trace) {
1220
1220
  warning.stack_trace = new Error().stack;
1221
1221
  }
1222
- if (warning.directive_quiet) {
1222
+ if (warning.directive_ignore_line) {
1223
1223
 
1224
1224
  // test_cause:
1225
- // ["0 //jslint-quiet", "semicolon", "directive_quiet", "", 0]
1225
+ // ["0 //jslint-ignore-line", "semicolon", "directive_ignore_line", "", 0]
1226
1226
 
1227
- test_cause("directive_quiet");
1227
+ test_cause("directive_ignore_line");
1228
1228
  return warning;
1229
1229
  }
1230
1230
  warning_list.push(warning);
@@ -1258,7 +1258,7 @@ function jslint(
1258
1258
  mode_json: false, // true if parsing JSON.
1259
1259
  mode_module: false, // true if import or export was used.
1260
1260
  mode_property: false, // true if directive /*property*/ is
1261
- // used.
1261
+ // ... used.
1262
1262
  mode_shebang: false, // true if #! is seen on the first line.
1263
1263
  option_dict,
1264
1264
  property_dict,
@@ -2413,7 +2413,7 @@ function jslint_phase2_lex(state) {
2413
2413
  if (!option_dict.devel && jslint_rgx_todo.test(snippet)) {
2414
2414
 
2415
2415
  // test_cause:
2416
- // ["//todo", "lex_comment", "todo_comment", "(comment)", 1] //jslint-quiet
2416
+ // ["//todo", "lex_comment", "todo_comment", "(comment)", 1] //jslint-ignore-line
2417
2417
 
2418
2418
  warn("todo_comment", the_comment);
2419
2419
  }
@@ -2473,6 +2473,7 @@ function jslint_phase2_lex(state) {
2473
2473
  global_dict[key] = "user-defined";
2474
2474
 
2475
2475
  // PR-347 - Disable warning "unexpected_directive_a".
2476
+ //
2476
2477
  // state.mode_module = the_comment;
2477
2478
 
2478
2479
  break;
@@ -3288,9 +3289,10 @@ function jslint_phase2_lex(state) {
3288
3289
  case "getset": // Allow get() and set().
3289
3290
  case "indent2": // Use 2-space indent.
3290
3291
  case "long": // Allow long lines.
3291
- case "name": // Allow weird property names.
3292
3292
  case "node": // Assume Node.js environment.
3293
+ case "nomen": // Allow weird property names.
3293
3294
  case "single": // Allow single-quote strings.
3295
+ case "subscript": // Allow identifier in subscript-notation.
3294
3296
  case "test_cause": // Test jslint's causes.
3295
3297
  case "test_internal_error": // Test jslint's internal-error
3296
3298
  // ... handling-ability.
@@ -3303,6 +3305,16 @@ function jslint_phase2_lex(state) {
3303
3305
  case "white": // Allow messy whitespace.
3304
3306
  option_dict[key] = val;
3305
3307
  break;
3308
+
3309
+ // PR-404 - Alias "evil" to jslint-directive "eval" for backwards-compat.
3310
+
3311
+ case "evil":
3312
+ return option_set_item("eval", val);
3313
+
3314
+ // PR-404 - Alias "nomen" to jslint-directive "name" for backwards-compat.
3315
+
3316
+ case "name":
3317
+ return option_set_item("nomen", val);
3306
3318
  default:
3307
3319
  return false;
3308
3320
  }
@@ -3391,6 +3403,7 @@ console.log(JSON.stringify(Object.keys(window).sort(), undefined, 4));
3391
3403
  "location",
3392
3404
  // "name",
3393
3405
  "navigator",
3406
+ "postMessage",
3394
3407
  // "screen",
3395
3408
  "sessionStorage",
3396
3409
  // "setInterval",
@@ -3645,7 +3658,7 @@ import moduleHttps from "https";
3645
3658
  ) {
3646
3659
 
3647
3660
  // test_cause:
3648
- // ["/////////////////////////////////////////////////////////////////////////////////", "read_line", "too_long", "", 1] //jslint-quiet
3661
+ // ["/////////////////////////////////////////////////////////////////////////////////", "read_line", "too_long", "", 1] //jslint-ignore-line
3649
3662
 
3650
3663
  warn_at("too_long", line);
3651
3664
  }
@@ -3663,7 +3676,7 @@ import moduleHttps from "https";
3663
3676
  // Scan each line for following ignore-directives:
3664
3677
  // "/*jslint-disable*/"
3665
3678
  // "/*jslint-enable*/"
3666
- // "//jslint-quiet"
3679
+ // "//jslint-ignore-line"
3667
3680
 
3668
3681
  if (line_source === "/*jslint-disable*/") {
3669
3682
 
@@ -3681,13 +3694,16 @@ import moduleHttps from "https";
3681
3694
  stop_at("unopened_enable", line);
3682
3695
  }
3683
3696
  line_disable = undefined;
3684
- } else if (line_source.endsWith(" //jslint-quiet")) {
3697
+ } else if (
3698
+ line_source.endsWith(" //jslint-ignore-line")
3699
+ || line_source.endsWith(" //jslint-quiet")
3700
+ ) {
3685
3701
 
3686
3702
  // test_cause:
3687
- // ["0 //jslint-quiet", "read_line", "jslint_quiet", "", 0]
3703
+ // ["0 //jslint-ignore-line", "read_line", "jslint_ignore_line", "", 0]
3688
3704
 
3689
- test_cause("jslint_quiet");
3690
- line_list[line].directive_quiet = true;
3705
+ test_cause("jslint_ignore_line");
3706
+ line_list[line].directive_ignore_line = true;
3691
3707
  }
3692
3708
  if (line_disable !== undefined) {
3693
3709
 
@@ -4487,6 +4503,8 @@ function jslint_phase3_parse(state) {
4487
4503
  left.id !== "["
4488
4504
  || (
4489
4505
  name.id !== "concat"
4506
+ && name.id !== "flat"
4507
+ && name.id !== "flatMap"
4490
4508
  && name.id !== "forEach"
4491
4509
  && name.id !== "join"
4492
4510
  && name.id !== "map"
@@ -4546,7 +4564,10 @@ function jslint_phase3_parse(state) {
4546
4564
  let the_subscript = parse_expression(0);
4547
4565
  if (the_subscript.id === "(string)" || the_subscript.id === "`") {
4548
4566
  name = survey(the_subscript);
4549
- if (jslint_rgx_identifier.test(name)) {
4567
+
4568
+ // PR-404 - Add new directive "subscript" to play nice with Google Closure.
4569
+
4570
+ if (!option_dict.subscript && jslint_rgx_identifier.test(name)) {
4550
4571
 
4551
4572
  // test_cause:
4552
4573
  // ["aa[`aa`]", "infix_lbracket", "subscript_a", "aa", 4]
@@ -5275,10 +5296,13 @@ function jslint_phase3_parse(state) {
5275
5296
  functionage.async += 1;
5276
5297
  }
5277
5298
  if (the_await.arity === "statement") {
5278
- the_await.block = parse_expression();
5299
+
5300
+ // PR-405 - Bugfix - fix expression after "await" mis-identified as statement.
5301
+
5302
+ the_await.expression = parse_expression(150);
5279
5303
  semicolon();
5280
5304
  } else {
5281
- the_await.expression = parse_expression();
5305
+ the_await.expression = parse_expression(150);
5282
5306
  }
5283
5307
  return the_await;
5284
5308
  }
@@ -6344,6 +6368,7 @@ function jslint_phase3_parse(state) {
6344
6368
  let names;
6345
6369
 
6346
6370
  // PR-347 - Disable warning "unexpected_directive_a".
6371
+ //
6347
6372
  // if (typeof state.mode_module === "object") {
6348
6373
  //
6349
6374
  // // test_cause:
@@ -6701,12 +6726,16 @@ function jslint_phase3_parse(state) {
6701
6726
  // Restore previous catch-scope after catch-block.
6702
6727
 
6703
6728
  catchage = catch_stack.pop();
6704
- } else {
6705
6729
 
6706
- // test_cause:
6707
- // ["try{}finally{break;}", "stmt_try", "expected_a_before_b", "finally", 6]
6730
+ // PR-404 - Relax warning about missing `catch` in `try...finally` statement.
6731
+ //
6732
+ // } else {
6733
+ //
6734
+ // // test_cause:
6735
+ // // ["try{}finally{break;}", "stmt_try", "expected_a_before_b", "finally", 6]
6736
+ //
6737
+ // warn("expected_a_before_b", token_nxt, "catch", artifact());
6708
6738
 
6709
- warn("expected_a_before_b", token_nxt, "catch", artifact());
6710
6739
  }
6711
6740
  if (token_nxt.id === "finally") {
6712
6741
  functionage.finally += 1;
@@ -6827,12 +6856,14 @@ function jslint_phase3_parse(state) {
6827
6856
  return stop("expected_identifier_a");
6828
6857
  }
6829
6858
 
6830
- // PR-363 - Bugfix - fix false-warning
6831
- // <uninitialized 'bb'> in code '/*jslint node*/\nlet {aa:bb} = {}; bb();'
6859
+ // PR-363 - Bugfix
6860
+ // Add test against false-warning <uninitialized 'bb'> in code
6861
+ // '/*jslint node*/\nlet {aa:bb} = {}; bb();'.
6862
+ //
6863
+ // token_nxt.label = name;
6864
+ // the_variable.names.push(token_nxt);
6865
+ // enroll(token_nxt, "variable", mode_const);
6832
6866
 
6833
- // token_nxt.label = name;
6834
- // the_variable.names.push(token_nxt);
6835
- // enroll(token_nxt, "variable", mode_const);
6836
6867
  name = token_nxt;
6837
6868
  the_variable.names.push(name);
6838
6869
  survey(name);
@@ -7055,7 +7086,7 @@ function jslint_phase3_parse(state) {
7055
7086
  warn("unregistered_property_a", name);
7056
7087
  }
7057
7088
  } else if (
7058
- !option_dict.name
7089
+ !option_dict.nomen
7059
7090
  && name.identifier
7060
7091
  && jslint_rgx_weird_property.test(id)
7061
7092
  ) {
@@ -8468,9 +8499,6 @@ function jslint_phase4_walk(state) {
8468
8499
  // ["+[]", "walk_statement", "unexpected_expression_a", "+", 1]
8469
8500
  // ["+new aa()", "walk_statement", "unexpected_expression_a", "+", 1]
8470
8501
  // ["0", "walk_statement", "unexpected_expression_a", "0", 1]
8471
- // ["
8472
- // async function aa(){await 0;}
8473
- // ", "walk_statement", "unexpected_expression_a", "0", 27]
8474
8502
  // ["typeof 0", "walk_statement", "unexpected_expression_a", "typeof", 1]
8475
8503
 
8476
8504
  warn("unexpected_expression_a", thing);
@@ -9805,6 +9833,7 @@ async function jstestDescribe(description, testFunction) {
9805
9833
 
9806
9834
  let message;
9807
9835
  let result;
9836
+ let timerTimeout;
9808
9837
 
9809
9838
  // Init jstestTimeStart.
9810
9839
 
@@ -9820,7 +9849,9 @@ async function jstestDescribe(description, testFunction) {
9820
9849
 
9821
9850
  // Wait for jstestItList to resolve.
9822
9851
 
9852
+ timerTimeout = setTimeout(noop, 0x7fffffff);
9823
9853
  result = await Promise.all(jstestItList);
9854
+ clearTimeout(timerTimeout);
9824
9855
 
9825
9856
  // Print test results.
9826
9857
 
@@ -10186,7 +10217,7 @@ function v8CoverageListMerge(processCovs) {
10186
10217
  let resultTree;
10187
10218
  let rightChildren;
10188
10219
 
10189
- // TODO(perf): Binary search (check overhead) //jslint-quiet
10220
+ // TODO(perf): Binary search (check overhead) //jslint-ignore-line
10190
10221
 
10191
10222
  while (ii < tree.children.length) {
10192
10223
  child = tree.children[ii];
@@ -10264,7 +10295,7 @@ function v8CoverageListMerge(processCovs) {
10264
10295
 
10265
10296
  // This function will normalize-and-sort <funcCov>.ranges.
10266
10297
  // Sorts the ranges (pre-order sort).
10267
- // TODO: Tree-based normalization of the ranges. //jslint-quiet
10298
+ // TODO: Tree-based normalization of the ranges. //jslint-ignore-line
10268
10299
  // @param funcCov Function coverage to normalize.
10269
10300
 
10270
10301
  funcCov.ranges = treeToRanges(treeFromSortedRanges(
@@ -11092,15 +11123,13 @@ function sentinel() {}
11092
11123
  processArgElem[1] = processArgElem.slice(1).join("=");
11093
11124
  switch (processArgElem[0]) {
11094
11125
 
11095
- // PR-371
11096
- // Add cli-option `--exclude=...`.
11126
+ // PR-371 - Add cli-option `--exclude=...`.
11097
11127
 
11098
11128
  case "--exclude":
11099
11129
  excludeList.push(processArgElem[1]);
11100
11130
  break;
11101
11131
 
11102
- // PR-371
11103
- // Add cli-option `--include=...`
11132
+ // PR-371 - Add cli-option `--include=...`
11104
11133
 
11105
11134
  case "--include":
11106
11135
  includeList.push(processArgElem[1]);
@@ -11200,15 +11229,13 @@ function sentinel() {}
11200
11229
  pathnameDict[pathname] = scriptCov;
11201
11230
  });
11202
11231
 
11203
- // PR-400
11204
- // Filter directory `node_modules`.
11232
+ // PR-400 - Filter directory `node_modules`.
11205
11233
 
11206
11234
  if (!modeIncludeNodeModules) {
11207
11235
  excludeList.push("node_modules/");
11208
11236
  }
11209
11237
 
11210
- // PR-400
11211
- // Filter files by glob-patterns in excludeList, includeList.
11238
+ // PR-400 - Filter files by glob-patterns in excludeList, includeList.
11212
11239
 
11213
11240
  data.result = globExclude({
11214
11241
  excludeList,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "email": "kaizhu256@gmail.com",
4
4
  "name": "kai zhu"
5
5
  },
6
- "counter": 10,
6
+ "counter": 13,
7
7
  "cpu": [
8
8
  "x64"
9
9
  ],
@@ -11,7 +11,7 @@
11
11
  "engines": {
12
12
  "node": ">=14"
13
13
  },
14
- "fileCount": 29,
14
+ "fileCount": 34,
15
15
  "homepage": "https://github.com/sqlmath/sqlmath",
16
16
  "keywords": [
17
17
  "data-science",
@@ -37,5 +37,5 @@
37
37
  "test2": "sh jslint_ci.sh shCiBase",
38
38
  "test_win32": "node -e \"require('child_process').spawn('C:\\\\Program Files\\\\Git\\\\bin\\\\bash.exe',['-c','npm run test' + ' ' + process.argv.slice(1).join(' ')],{stdio:['ignore',1,2]});\""
39
39
  },
40
- "version": "2022.5.20"
40
+ "version": "2022.6.30"
41
41
  }