sqlmath 2025.1.31 → 2025.2.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/CHANGELOG.md CHANGED
@@ -1,8 +1,18 @@
1
1
  # Changelog
2
2
 
3
3
  # Todo
4
+ - sqlite - Add similar error-handling from builtin-sql-function PERCENTILE() into custom-sql-function QUANTILE().
4
5
  - none
5
6
 
7
+ # v2025.2.28
8
+ - sqlmath - Update sql-function SHA256() to use tinycrypt.
9
+ - jslint - Update shell-function shDirHttplinkValidate() with pragma <\!!--novalidate--\>.
10
+ - ci - Upgrade cpplint.py used in ci to v2.0.0.
11
+ - sqlite - Rename custom-sql-function MEDIAN() to MEDIAN2().
12
+ - sqlite - Enable builtin-sql-functions MEDIAN(), PERCENTILE(), PERCENTILE_CONT(), PERCENTILE_DISC().
13
+ - sqlite - Upgrade to sqlite-v3.47.2.
14
+ - ci - Upgrade nodejs used in ci to v22.
15
+
6
16
  # v2025.1.31
7
17
  - webdemo - Update coloring to highlight tqq/sqq stocks.
8
18
  - sqlmath - Revamp sql-function win_sinefit2() to guess frequency from stdev of tt, instead of dft.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
  # Status
5
- | Branch | [master<br>(v2025.1.31)](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.2.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) |
@@ -107,8 +107,8 @@ PORT=8080 sh jslint_ci.sh shHttpFileServer
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
109
  - [zlib](https://github.com/madler/zlib) is under [zlib License](https://github.com/madler/zlib/blob/v1.2.13/LICENSE).
110
- - [cpplint.py](cpplint.py) is under [3-Clause BSD License](https://github.com/cpplint/cpplint/blob/1.5.5/LICENSE).
111
- - [indent.exe](indent.exe) is under [GPLv3 License](https://www.gnu.org/licenses/gpl-3.0.txt).
110
+ - [cpplint.py](cpplint.py) is under [3-Clause BSD License](https://github.com/cpplint/cpplint/blob/2.0.0/LICENSE).
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.
113
113
 
114
114
 
@@ -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.1.31*
125
- py -m pip install --index-url https://test.pypi.org/simple/ sqlmath==2025.1.31
124
+ twine upload --repository testpypi dist/sqlmath-2025.2.28*
125
+ py -m pip install --index-url https://test.pypi.org/simple/ sqlmath==2025.2.28
126
126
  #
127
- twine upload dist/sqlmath-2025.1.31*
128
- pip install sqlmath==2025.1.31
127
+ twine upload dist/sqlmath-2025.2.28*
128
+ pip install sqlmath==2025.2.28
129
129
  ```
130
130
 
131
131
 
@@ -139,8 +139,8 @@ pip install sqlmath==2025.1.31
139
139
  sh jslint_ci.sh shRollupUpgrade "v4.4.0" "v4.5.0" ".ci.sh sqlmath_base.h"
140
140
  #
141
141
  # sqlite
142
- sh jslint_ci.sh shRollupUpgrade "3.46.0" "3.46.1" ".ci.sh sqlmath_external_sqlite.c"
143
- sh jslint_ci.sh shRollupUpgrade "3460000" "3460100" ".ci.sh sqlmath_external_sqlite.c"
142
+ sh jslint_ci.sh shRollupUpgrade "3.46.1" "3.47.2" ".ci.sh sqlmath_external_sqlite.c"
143
+ sh jslint_ci.sh shRollupUpgrade "3460100" "3470200" ".ci.sh sqlmath_external_sqlite.c"
144
144
  #
145
145
  # zlib
146
146
  # sh jslint_ci.sh shRollupUpgrade "1.3" "1.3.1" ".ci.sh sqlmath_external_zlib.c"
package/package.json CHANGED
@@ -32,5 +32,5 @@
32
32
  },
33
33
  "shCiArtifactUpload": 1,
34
34
  "shCiPublishNpm": 1,
35
- "version": "2025.1.31"
35
+ "version": "2025.2.28"
36
36
  }
package/sqlmath.mjs CHANGED
@@ -122,7 +122,7 @@ let {
122
122
  let sqlMessageDict = {}; // dict of web-worker-callbacks
123
123
  let sqlMessageId = 0;
124
124
  let sqlWorker;
125
- let version = "v2025.1.31";
125
+ let version = "v2025.2.28";
126
126
 
127
127
  async function assertErrorThrownAsync(asyncFunc, regexp) {
128
128
 
@@ -314,93 +314,115 @@ async function ciBuildExt1NodejsConfigure({
314
314
 
315
315
  // This function will setup posix/win32 env for building c-extension.
316
316
 
317
- let cflagsNowarning = [
318
- "-Wno-all",
319
- "-Wno-extra",
320
- "-Wno-implicit-fallthrough",
321
- "-Wno-incompatible-pointer-types",
322
- "-Wno-int-conversion",
323
- "-Wno-unreachable-code",
324
- "-Wno-unused-function",
325
- "-Wno-unused-parameter"
326
- ];
317
+ let cflagWallList = [];
318
+ let cflagWnoList = [];
319
+ String(
320
+ await fsReadFileUnlessTest(".ci.sh", "utf8", (`
321
+ SQLMATH_CFLAG_WALL_LIST=" \\
322
+ "
323
+ SQLMATH_CFLAG_WNO_LIST=" \\
324
+ "
325
+ `))
326
+ ).replace((
327
+ /(SQLMATH_CFLAG_WALL_LIST|SQLMATH_CFLAG_WNO_LIST)=" \\([\S\s]*?)"/g
328
+ ), function (ignore, cflagType, cflagList) {
329
+ cflagList = cflagList.split(/[\s\\]/).filter(noop);
330
+ switch (cflagType) {
331
+ case "SQLMATH_CFLAG_WALL_LIST":
332
+ cflagWallList = cflagList;
333
+ break;
334
+ case "SQLMATH_CFLAG_WNO_LIST":
335
+ cflagWnoList = cflagList;
336
+ break;
337
+ }
338
+ return "";
339
+ });
327
340
  consoleError(`ciBuildExt1Nodejs - configure binding.gyp`);
328
341
  await fsWriteFileUnlessTest("binding.gyp", JSON.stringify({
329
342
  "target_defaults": {
330
- "cflags": [
331
- "-Wextra",
332
- "-std=c11"
333
- ],
343
+ "cflags": cflagWnoList,
334
344
  // https://github.com/nodejs/node-gyp/blob/v9.3.1/gyp/pylib/gyp/MSVSSettings.py
335
345
  "msvs_settings": {
336
346
  "VCCLCompilerTool": {
337
- "WarningLevel": 3
347
+ "WarnAsError": 1,
348
+ "WarningLevel": 2
338
349
  }
339
350
  },
340
351
  "xcode_settings": {
341
- "OTHER_CFLAGS": [
342
- "-Wextra",
343
- "-std=c11"
344
- ]
352
+ "OTHER_CFLAGS": cflagWnoList
345
353
  }
346
354
  },
347
355
  "targets": [
348
356
  {
349
- "cflags": cflagsNowarning,
350
357
  "defines": [
351
- "SRC_SQLITE_BASE_C2"
358
+ "SRC_SQLITE_BASE_C2",
359
+ "SRC_ZLIB_C2"
352
360
  ],
353
361
  "sources": [
354
- "sqlmath_base.c",
355
362
  "sqlmath_external_sqlite.c",
356
363
  "sqlmath_external_zlib.c"
357
364
  ],
358
365
  "target_name": "SRC_SQLITE_BASE",
359
- "type": "static_library",
360
- "xcode_settings": {
361
- "OTHER_CFLAGS": cflagsNowarning
362
- }
366
+ "type": "static_library"
363
367
  },
364
368
  {
369
+ "cflags": cflagWallList,
365
370
  "defines": [
366
- "SQLMATH_CUSTOM"
371
+ "SRC_SQLMATH_BASE_C2",
372
+ "SRC_SQLMATH_CUSTOM_C2"
367
373
  ],
374
+ "msvs_settings": {
375
+ "VCCLCompilerTool": {
376
+ "WarnAsError": 1,
377
+ "WarningLevel": 4
378
+ }
379
+ },
368
380
  "sources": [
381
+ "sqlmath_base.c",
369
382
  "sqlmath_custom.c"
370
383
  ],
371
- "target_name": "SQLMATH_CUSTOM",
372
- "type": "static_library"
384
+ "target_name": "SRC_SQLMATH_CUSTOM",
385
+ "type": "static_library",
386
+ "xcode_settings": {
387
+ "OTHER_CFLAGS": cflagWallList
388
+ }
373
389
  },
374
390
  {
391
+ "cflags": cflagWallList,
375
392
  "defines": [
376
- "SQLMATH_NODEJS_C2"
393
+ "SRC_SQLMATH_NODEJS_C2"
377
394
  ],
378
395
  "dependencies": [
379
- "SQLMATH_CUSTOM",
380
- "SRC_SQLITE_BASE"
396
+ "SRC_SQLITE_BASE",
397
+ "SRC_SQLMATH_CUSTOM"
381
398
  ],
399
+ "msvs_settings": {
400
+ "VCCLCompilerTool": {
401
+ "WarnAsError": 1,
402
+ "WarningLevel": 4
403
+ }
404
+ },
382
405
  "sources": [
383
406
  "sqlmath_base.c"
384
407
  ],
385
- "target_name": "binding"
408
+ "target_name": "binding",
409
+ "xcode_settings": {
410
+ "OTHER_CFLAGS": cflagWallList
411
+ }
386
412
  },
387
413
  {
388
- "cflags": cflagsNowarning,
389
414
  "defines": [
390
415
  "SRC_SQLITE_SHELL_C2"
391
416
  ],
392
417
  "dependencies": [
393
- "SQLMATH_CUSTOM",
394
- "SRC_SQLITE_BASE"
418
+ "SRC_SQLITE_BASE",
419
+ "SRC_SQLMATH_CUSTOM"
395
420
  ],
396
421
  "sources": [
397
422
  "sqlmath_external_sqlite.c"
398
423
  ],
399
424
  "target_name": "shell",
400
- "type": "executable",
401
- "xcode_settings": {
402
- "OTHER_CFLAGS": cflagsNowarning
403
- }
425
+ "type": "executable"
404
426
  }
405
427
  ]
406
428
  }, undefined, 4) + "\n");
@@ -444,7 +466,7 @@ async function ciBuildExt2NodejsBuild({
444
466
  (`
445
467
  (set -e
446
468
  # rebuild binding
447
- rm -rf build/Release/obj/SQLMATH_CUSTOM/
469
+ rm -rf build/Release/obj/SRC_SQLMATH_CUSTOM/
448
470
  node "${binNodegyp}" build --release
449
471
  mv build/Release/binding.node "${cModulePath}"
450
472
  if [ "${process.platform}" = "win32" ]