sqlmath 2025.8.30 → 2025.12.28

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/.npmignore CHANGED
@@ -1,12 +1,15 @@
1
1
  *
2
2
  .*
3
3
  node_modules
4
+
4
5
  !.npmignore
5
6
  !CHANGELOG.md
6
7
  !LICENSE
7
8
  !README.md
8
9
 
9
- !_binary_*
10
+ !_sqlmath*
10
11
  !jslint.mjs
11
12
  !sqlmath.mjs
13
+ !sqlmath_browser.mjs
12
14
  !sqlmath_custom.mjs
15
+ !test.mjs
package/CHANGELOG.md CHANGED
@@ -1,10 +1,32 @@
1
1
  # Changelog
2
2
 
3
3
  # Todo
4
+ - betadog - Add function taskBacktest() to auto-remove features with low feature-importance.
4
5
  - sqlmath - Re-introduce sliding-discrete-fourier-transform to improve initial guess in sql-function WIN_SINEFIT2().
5
6
  - sqlite - Add similar error-handling from builtin-sql-function PERCENTILE() into custom-sql-function QUANTILE().
6
7
  - none
7
8
 
9
+ # v2025.12.28
10
+ - jslint - Upgrade to jslint-v2025.12.28.
11
+ - sqlmath - Update function dbOpenAsync() with default-prm timeoutBusy=5000.
12
+ - ci - Upgrade nodejs used in ci to v24.
13
+
14
+ # v2025.9.30
15
+ - sqlmath - Update function dbExecProfile() with additional-arg sqlLength.
16
+ - sqlmath - Update function dbOpenAsync() with default-filename :memory:.
17
+ - coverage - Add coverage-directives '/*coverage-disable*/', '/*coverage-enable*/'. '//coverage-ignore-line'.
18
+ - sqlmath - Add function dbExecProfile() to profile sql-queries.
19
+ - sqlmath - Update function dbCallAsync() to include db.filename in error-message.
20
+ - sqlmath - Replace miniz-library with native-zib-library.
21
+ - sqlmath - ugly-hack - win32-sqlite-shell doesn't like nodejs-builtin-zlib, so link with external-zlib.
22
+ - sqlmath - Replace sql-functions ZLIB_COMPRESS() to GZIP_COMPRESS(), ZLIB_UNCOMPRESS() to GZIP_UNCOMPRESS().
23
+ - sqlmath - Prefer platform-native zlib over sqlmath_external_sqlite.c.
24
+ - sqlmath - bugfix - Fix sql-functions ZLIB_COMPRESS(), ZLIB_UNCOMPRESS() crashing sqlite-shell-executable.
25
+ - ml - Update sql-function LGBM_TRAINFROMTABLE() to use C_API_FEATURE_IMPORTANCE_GAIN instead of C_API_FEATURE_IMPORTANCE_SPLIT.
26
+ - sqlmath - Update function win_sinefit() to rename outputs from/to xx0/xxa, xx1/xxb, yy0/yya, yy1/yyb, rr0/rra, rr1/rrb.
27
+ - sqlmath - Update sql-function SINEFIT_REFITLAST() to create copy of wsf-blob, so original argument is not mutated.
28
+ - sqlmath - Update function win_sinefit() to allow outputting prm grr, mrr, vrr.
29
+
8
30
  # v2025.8.30
9
31
  - sqlite - Upgrade to sqlite-v3.50.4.
10
32
  - python - Add support for PEP 703 – Making the Global Interpreter Lock Optional in CPython.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
  # Status
5
- | Branch | [master<br>(v2025.8.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) |
5
+ | Branch | [master<br>(v2025.12.28)](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) |
@@ -106,7 +106,7 @@ PORT=8080 sh jslint_ci.sh shHttpFileServer
106
106
  # License
107
107
  - [sqlite](https://github.com/sqlite/sqlite) is under [public domain](https://www.sqlite.org/copyright.html).
108
108
  - [jslint](https://github.com/jslint-org/jslint) is under [Unlicense License](https://github.com/jslint-org/jslint/blob/master/LICENSE).
109
- - [zlib](https://github.com/madler/zlib) is under [zlib License](https://github.com/madler/zlib/blob/v1.2.13/LICENSE).
109
+ - [zlib](https://github.com/madler/zlib) is under [zlib License](https://github.com/madler/zlib/blob/v1.3.1/LICENSE).
110
110
  - [cpplint.py](cpplint.py) is under [3-Clause BSD License](https://github.com/cpplint/cpplint/blob/2.0.0/LICENSE).
111
111
  - [indent.exe](indent.exe) is under [GPLv3 License](https://www.gnu.org/licenses/gpl-3.0.txt)<!--no-validate-->.
112
112
  - Everything else is under MIT License.
@@ -121,11 +121,11 @@ PORT=8080 sh jslint_ci.sh shHttpFileServer
121
121
  ```shell
122
122
  python -m build
123
123
  #
124
- twine upload --repository testpypi dist/sqlmath-2025.8.30*
125
- py -m pip install --index-url https://test.pypi.org/simple/ sqlmath==2025.8.30
124
+ twine upload --repository testpypi dist/sqlmath-2025.12.28*
125
+ py -m pip install --index-url https://test.pypi.org/simple/ sqlmath==2025.12.28
126
126
  #
127
- twine upload dist/sqlmath-2025.8.30*
128
- pip install sqlmath==2025.8.30
127
+ twine upload dist/sqlmath-2025.12.28*
128
+ pip install sqlmath==2025.12.28
129
129
  ```
130
130
 
131
131
 
@@ -142,9 +142,6 @@ pip install sqlmath==2025.8.30
142
142
  sh jslint_ci.sh shRollupUpgrade "3.50.3" "3.50.4" ".ci.sh sqlmath_external_sqlite.c"
143
143
  sh jslint_ci.sh shRollupUpgrade "3500300" "3500400" ".ci.sh sqlmath_external_sqlite.c"
144
144
  #
145
- # zlib
146
- # sh jslint_ci.sh shRollupUpgrade "1.3" "1.3.1" ".ci.sh sqlmath_external_zlib.c"
147
- #
148
145
  # shSqlmathUpdate
149
146
  read -p "Press Enter to shSqlmathUpdate:"
150
147
  sh jslint_ci.sh shSqlmathUpdate
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/jslint.mjs CHANGED
@@ -106,9 +106,9 @@
106
106
  formatted_message, free, freeze, from, froms, fsWriteFileWithParents,
107
107
  fud_stmt, functionName, function_list, function_stack, functions, get,
108
108
  getset, github_repo, globExclude, global, global_dict, global_list,
109
- holeList, htmlEscape, id, identifier, import, import_list, import_meta_url,
110
- inc, includeList, indent2, index, indexOf, init, initial, isArray,
111
- isBlockCoverage, isHole, isNaN, is_equal, is_weird, join, jslint,
109
+ holeList, htmlEscape, id, identifier, ignoreLine, import, import_list,
110
+ import_meta_url, inc, includeList, indent2, index, indexOf, init, initial,
111
+ isArray, isBlockCoverage, isHole, isNaN, is_equal, is_weird, join, jslint,
112
112
  jslint_apidoc, jslint_assert, jslint_charset_ascii, jslint_cli,
113
113
  jslint_edition, jslint_phase1_split, jslint_phase2_lex, jslint_phase3_parse,
114
114
  jslint_phase4_walk, jslint_phase5_whitage, jslint_report, json,
@@ -163,7 +163,7 @@ let jslint_charset_ascii = (
163
163
  + "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
164
164
  + "`abcdefghijklmnopqrstuvwxyz{|}~\u007f"
165
165
  );
166
- let jslint_edition = "v2025.3.31";
166
+ let jslint_edition = "v2025.12.28";
167
167
  let jslint_export; // The jslint object to be exported.
168
168
  let jslint_fudge = 1; // Fudge starting line and starting
169
169
  // ... column to 1.
@@ -4674,7 +4674,13 @@ function jslint_phase3_parse(state) {
4674
4674
 
4675
4675
  test_cause("free");
4676
4676
  the_paren.free = true;
4677
- if (the_argument.wrapped === true) {
4677
+ if (
4678
+ the_argument.wrapped === true
4679
+
4680
+ // PR-483 - Allow parenthesis after ellipsis inside a function call.
4681
+
4682
+ && the_argument.ellipsis !== true
4683
+ ) {
4678
4684
 
4679
4685
  // test_cause:
4680
4686
  // ["aa((0))", "infix_lparen", "unexpected_a", "(", 3]
@@ -5158,6 +5164,10 @@ function jslint_phase3_parse(state) {
5158
5164
  the_label.dead = false;
5159
5165
  the_label.init = true;
5160
5166
  the_statement = parse_statement();
5167
+
5168
+ // Issue #458 - Regression - Warn about variable usage before initialization.
5169
+
5170
+ the_label.dead = true;
5161
5171
  functionage.statement_prv = the_statement;
5162
5172
  the_statement.label = the_label;
5163
5173
  the_statement.statement = true;
@@ -5204,9 +5214,13 @@ function jslint_phase3_parse(state) {
5204
5214
  }
5205
5215
  semicolon();
5206
5216
  }
5207
- if (the_label !== undefined) {
5208
- the_label.dead = true;
5209
- }
5217
+
5218
+ // Issue #458 - Regression - Warn about variable usage before initialization.
5219
+
5220
+ // if (the_label !== undefined) {
5221
+ // the_label.dead = true;
5222
+ // }
5223
+
5210
5224
  return the_statement;
5211
5225
  }
5212
5226
 
@@ -6987,8 +7001,16 @@ function jslint_phase3_parse(state) {
6987
7001
  the_variable.names.push(name);
6988
7002
  enroll(name, "variable", mode_const);
6989
7003
  }
6990
- name.dead = false;
7004
+
7005
+ // Issue #458 - Regression - Warn about variable usage before initialization.
7006
+
7007
+ // name.dead = false;
7008
+
6991
7009
  name.init = true;
7010
+
7011
+ // test_cause:
7012
+ // ["const {aa}=bb;\nconst bb=0;", "lookup", "out_of_scope_a", "bb", 12]
7013
+
6992
7014
  if (token_nxt.id === "=") {
6993
7015
 
6994
7016
  // test_cause:
@@ -7039,8 +7061,16 @@ function jslint_phase3_parse(state) {
7039
7061
  advance();
7040
7062
  the_variable.names.push(name);
7041
7063
  enroll(name, "variable", mode_const);
7042
- name.dead = false;
7064
+
7065
+ // Issue #458 - Regression - Warn about variable usage before initialization.
7066
+
7067
+ // name.dead = false;
7068
+
7043
7069
  name.init = true;
7070
+
7071
+ // test_cause:
7072
+ // ["const [aa]=bb;\nconst bb=0;", "lookup", "out_of_scope_a", "bb", 12]
7073
+
7044
7074
  if (ellipsis) {
7045
7075
  name.ellipsis = true;
7046
7076
  break;
@@ -7073,8 +7103,16 @@ function jslint_phase3_parse(state) {
7073
7103
  enroll(name, "variable", mode_const);
7074
7104
  if (token_nxt.id === "=" || mode_const) {
7075
7105
  advance("=");
7076
- name.dead = false;
7106
+
7107
+ // Issue #458 - Regression - Warn about variable usage before initialization.
7108
+
7109
+ // name.dead = false;
7110
+
7077
7111
  name.init = true;
7112
+
7113
+ // test_cause:
7114
+ // ["const aa=bb;\nconst bb=0;", "lookup", "out_of_scope_a", "bb", 10]
7115
+
7078
7116
  name.expression = parse_expression(0);
7079
7117
  }
7080
7118
  the_variable.names.push(name);
@@ -10882,12 +10920,15 @@ body {
10882
10920
  background: #9d9;
10883
10921
  }
10884
10922
  .coverage .count {
10885
- color: #666;
10923
+ color: #333;
10886
10924
  }
10887
10925
  .coverage .coverageIgnore {
10888
10926
  background: #ccc;
10889
10927
  }
10890
10928
  .coverage .coverageLow,
10929
+ .coverage .ignore {
10930
+ background: #ccc;
10931
+ }
10891
10932
  .coverage .uncovered {
10892
10933
  background: #ebb;
10893
10934
  }
@@ -10911,6 +10952,10 @@ body {
10911
10952
  .coverage tr:hover td {
10912
10953
  background: #7d7;
10913
10954
  }
10955
+ .coverage pre:hover span.ignore,
10956
+ .coverage tr:hover td.coverageIgnore {
10957
+ background: #ccc;
10958
+ }
10914
10959
  .coverage pre:hover span.uncovered,
10915
10960
  .coverage tr:hover td.coverageLow {
10916
10961
  background: #f99;
@@ -11112,6 +11157,7 @@ body {
11112
11157
  lineList.forEach(function ({
11113
11158
  count,
11114
11159
  holeList,
11160
+ ignoreLine,
11115
11161
  line,
11116
11162
  startOffset
11117
11163
  }, ii) {
@@ -11159,7 +11205,11 @@ body {
11159
11205
  // true.
11160
11206
 
11161
11207
  if (isHole) {
11162
- lineHtml += " class=\"uncovered\"";
11208
+ lineHtml += (
11209
+ ignoreLine
11210
+ ? " class=\"ignore\""
11211
+ : " class=\"uncovered\""
11212
+ );
11163
11213
  }
11164
11214
  lineHtml += ">";
11165
11215
  chunk = "";
@@ -11179,7 +11229,9 @@ body {
11179
11229
  </span>
11180
11230
  <span class="count
11181
11231
  ${(
11182
- count <= 0
11232
+ (count <= 0 && ignoreLine)
11233
+ ? "ignore"
11234
+ : count <= 0
11183
11235
  ? "uncovered"
11184
11236
  : ""
11185
11237
  )}"
@@ -11416,6 +11468,7 @@ function sentinel() {}
11416
11468
  functions,
11417
11469
  url: pathname
11418
11470
  }) {
11471
+ let ignoreBlock = false;
11419
11472
  let lineList;
11420
11473
  let linesCovered;
11421
11474
  let linesTotal;
@@ -11425,14 +11478,23 @@ function sentinel() {}
11425
11478
  source.replace((
11426
11479
  /^.*$/gm
11427
11480
  ), function (line, startOffset) {
11481
+ if (line === "/*coverage-disable*/") {
11482
+ ignoreBlock = true;
11483
+ }
11428
11484
  lineList[lineList.length - 1].endOffset = startOffset - 1;
11429
11485
  lineList.push({
11430
11486
  count: -1,
11431
11487
  endOffset: 0,
11432
11488
  holeList: [],
11489
+ ignoreLine: (
11490
+ ignoreBlock || line.endsWith("//coverage-ignore-line")
11491
+ ),
11433
11492
  line,
11434
11493
  startOffset
11435
11494
  });
11495
+ if (line === "/*coverage-enable*/") {
11496
+ ignoreBlock = false;
11497
+ }
11436
11498
  return "";
11437
11499
  });
11438
11500
  lineList.shift();
@@ -11485,11 +11547,13 @@ function sentinel() {}
11485
11547
  });
11486
11548
  });
11487
11549
  linesTotal = lineList.length;
11488
- linesCovered = lineList.filter(function ({
11489
- count
11550
+ linesCovered = 0;
11551
+ lineList.forEach(function ({
11552
+ count,
11553
+ ignoreLine
11490
11554
  }) {
11491
- return count > 0;
11492
- }).length;
11555
+ linesCovered += count > 0 || ignoreLine;
11556
+ });
11493
11557
  await moduleFs.promises.mkdir((
11494
11558
  modulePath.dirname(coverageDir + pathname)
11495
11559
  ), {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "email": "kaizhu256@gmail.com",
4
4
  "name": "kai zhu"
5
5
  },
6
- "counter": 2,
6
+ "counter": 0,
7
7
  "description": "sqlite for data-science",
8
8
  "fileCount": 46,
9
9
  "homepage": "https://github.com/sqlmath/sqlmath",
@@ -32,5 +32,5 @@
32
32
  },
33
33
  "shCiArtifactUpload": 1,
34
34
  "shCiPublishNpm": 1,
35
- "version": "2025.8.30"
35
+ "version": "2025.12.28"
36
36
  }