sqlmath 2022.12.31 → 2023.2.26

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
@@ -3,6 +3,21 @@
3
3
  # Todo
4
4
  - none
5
5
 
6
+ # v2023.2.26
7
+ - chart - bugfix - use spy for reference previous-ydate instead of 1a_mybot
8
+ - sqlmath - add functions dbExecAndReturnLastJsonAsync(), dbExecAndReturnLastTextAsync()
9
+ - sqlmath - add sql-functions jfromfloat64array(), jtofloat64array()
10
+ - sqlite - update to sqlite v3.39.4
11
+ - ci - replace shell-function shGithubPushBackupAndSquash() with simplified shGitCommitPushOrSquash()
12
+ - ci - in windows-ci-env, alias node=node.exe instead of using winpty for pipes
13
+
14
+ # v2023.1.29
15
+ - ci - add auto-logo-creation in private repo
16
+ - ci - auto-create asset_image_logo_512.png from asset_image_logo_512.html
17
+ - jslint-ci - revamp auto-updating and add shell-function shGithubCheckoutRemote
18
+ - chart - remove unused external libraries chart.js, moment.js
19
+ - demo - bugfix - fix 1-week-chart ignoring friday before monday-holiday
20
+
6
21
  # v2022.12.31
7
22
  - chart - bugfix - fix intraday-weekly-chart truncating first datapoint
8
23
  - demo - use intraday data for weekly chart
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
  # Status
5
- | Branch | [master<br>(v2022.12.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>(v2023.2.26)](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) |
Binary file
Binary file
Binary file
package/jslint.mjs CHANGED
@@ -131,11 +131,11 @@
131
131
  stack, stack_trace, start, startOffset, startsWith, statement,
132
132
  statement_prv, stdio, stop, stop_at, stringify, subscript, switch,
133
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
134
+ toLocaleString, toString, token, token_global, token_list, token_nxt,
135
+ token_tree, tokens, trace, tree, trim, trimEnd, trimRight, try, type,
136
+ unlink, unordered, unshift, url, used, v8CoverageListMerge,
137
+ v8CoverageReportCreate, value, variable, version, versions, warn, warn_at,
138
+ warning, warning_list, warnings, white, wrapped, writeFile
139
139
  */
140
140
 
141
141
  // init debugInline
@@ -165,7 +165,7 @@ let jslint_charset_ascii = (
165
165
  + "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
166
166
  + "`abcdefghijklmnopqrstuvwxyz{|}~\u007f"
167
167
  );
168
- let jslint_edition = "v2022.12.1-beta";
168
+ let jslint_edition = "v2022.2.1-beta";
169
169
  let jslint_export; // The jslint object to be exported.
170
170
  let jslint_fudge = 1; // Fudge starting line and starting
171
171
  // ... column to 1.
@@ -4185,6 +4185,9 @@ function jslint_phase3_parse(state) {
4185
4185
  }
4186
4186
  }).reduce(function (aa, bb) {
4187
4187
  if (
4188
+
4189
+ // PR-419 - Hide warning about unordered case-statements behind beta-flag.
4190
+
4188
4191
  option_dict.beta
4189
4192
  && !option_dict.unordered
4190
4193
  && aa && bb
@@ -9978,6 +9981,10 @@ function jstestOnExit(exitCode, mode) {
9978
9981
  )
9979
9982
  + " tests total - " + jstestCountTotal + "\n"
9980
9983
  + " tests failed - " + jstestCountFailed + "\n"
9984
+ + "\n"
9985
+ + " time finished - "
9986
+ + Number(Date.now() - jstestTimeStart).toLocaleString()
9987
+ + " ms\n"
9981
9988
  + "\u001b[39m"
9982
9989
  );
9983
9990
  if (mode !== "testsFailed") {
@@ -11229,25 +11236,27 @@ function sentinel() {}
11229
11236
  }
11230
11237
  }));
11231
11238
  exitCode = await new Promise(function (resolve) {
11232
- moduleChildProcess.spawn((
11233
- processArgv[0] === "npm"
11239
+ moduleChildProcess.spawn(
11240
+ (
11241
+ processArgv[0] === "npm"
11234
11242
 
11235
11243
  // If win32 environment, then replace program npm with npm.cmd.
11236
11244
  // Coverage-hack - Ugly-hack to get test-coverage under both win32 and linux.
11237
11245
 
11238
- ? process.platform.replace("win32", "npm.cmd").replace(
11239
- process.platform,
11240
- "npm"
11241
- )
11242
- : processArgv[0]
11243
- ), processArgv.slice(1), {
11244
- env: Object.assign({}, process.env, {
11245
- NODE_V8_COVERAGE: coverageDir
11246
- }),
11247
- stdio: [
11248
- "ignore", 1, 2
11249
- ]
11250
- }).on("exit", resolve);
11246
+ ? process.platform.replace("win32", "npm.cmd").replace(
11247
+ process.platform,
11248
+ "npm"
11249
+ )
11250
+ : processArgv[0]
11251
+ ),
11252
+ processArgv.slice(1),
11253
+ {
11254
+ env: Object.assign({}, process.env, {
11255
+ NODE_V8_COVERAGE: coverageDir
11256
+ }),
11257
+ stdio: ["ignore", 1, 2]
11258
+ }
11259
+ ).on("exit", resolve);
11251
11260
  });
11252
11261
  }
11253
11262
 
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "engines": {
12
12
  "node": ">=14"
13
13
  },
14
- "fileCount": 30,
14
+ "fileCount": 33,
15
15
  "homepage": "https://github.com/sqlmath/sqlmath",
16
16
  "keywords": [
17
17
  "data-science",
@@ -34,8 +34,9 @@
34
34
  "scripts": {
35
35
  "build": "sh jslint_ci.sh shCiBuildNodejs",
36
36
  "test": "sh jslint_ci.sh shCiTestNodejs",
37
- "test2": "sh jslint_ci.sh shCiBase",
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]});\""
37
+ "test2": "sh jslint_ci.sh shCiBase"
39
38
  },
40
- "version": "2022.12.31"
39
+ "shCiArtifactUpload": 1,
40
+ "shCiNpmPublish": 1,
41
+ "version": "2023.2.26"
41
42
  }
package/sqlmath.mjs CHANGED
@@ -87,7 +87,7 @@ let debugInline = (function () {
87
87
  let sqlMessageDict = {}; // dict of web-worker-callbacks
88
88
  let sqlMessageId = 0;
89
89
  let sqlWorker;
90
- let version = "v2022.12.31";
90
+ let version = "v2023.2.26";
91
91
 
92
92
  function assertJsonEqual(aa, bb, message) {
93
93
 
@@ -304,6 +304,26 @@ function dbExecAndReturnLastBlobAsync({
304
304
  });
305
305
  }
306
306
 
307
+ async function dbExecAndReturnLastJsonAsync(option) {
308
+
309
+ // This function will exec <sql> in <db> and return last value retrieved
310
+ // from execution as raw text.
311
+
312
+ return JSON.parse(
313
+ await dbExecAndReturnLastTextAsync(option)
314
+ );
315
+ }
316
+
317
+ async function dbExecAndReturnLastTextAsync(option) {
318
+
319
+ // This function will exec <sql> in <db> and return last value retrieved
320
+ // from execution as raw text.
321
+
322
+ return new TextDecoder().decode(
323
+ await dbExecAndReturnLastBlobAsync(option)
324
+ );
325
+ }
326
+
307
327
  async function dbExecAsync({
308
328
  bindList = [],
309
329
  db,
@@ -977,6 +997,8 @@ export {
977
997
  assertOrThrow,
978
998
  dbCloseAsync,
979
999
  dbExecAndReturnLastBlobAsync,
1000
+ dbExecAndReturnLastJsonAsync,
1001
+ dbExecAndReturnLastTextAsync,
980
1002
  dbExecAsync,
981
1003
  dbFileExportAsync,
982
1004
  dbFileImportAsync,