@naturalcycles/js-lib 15.0.0 → 15.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.
|
@@ -69,7 +69,7 @@ function mergeTypes(types, samples) {
|
|
|
69
69
|
if (type === 'array') {
|
|
70
70
|
// possible feature: detect if it's a tuple
|
|
71
71
|
// currently assume no-tuple
|
|
72
|
-
const items = samples.filter(r => Array.isArray(r)).flat(
|
|
72
|
+
const items = samples.filter(r => Array.isArray(r)).flat();
|
|
73
73
|
const itemTypes = _uniq(items.map(i => getTypeOfValue(i)));
|
|
74
74
|
return {
|
|
75
75
|
type: 'array',
|
package/package.json
CHANGED
|
@@ -1,39 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturalcycles/js-lib",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "15.
|
|
5
|
-
"scripts": {
|
|
6
|
-
"prepare": "husky",
|
|
7
|
-
"build": "dev-lib build",
|
|
8
|
-
"test": "dev-lib test",
|
|
9
|
-
"lint": "dev-lib lint",
|
|
10
|
-
"bt": "dev-lib bt",
|
|
11
|
-
"lbt": "dev-lib lbt",
|
|
12
|
-
"test-tz1": "TZ=Europe/Stockholm yarn test local",
|
|
13
|
-
"test-tz2": "TZ=JST-9 yarn test local",
|
|
14
|
-
"test-ny": "TZ=GMT-0500 yarn test localTime",
|
|
15
|
-
"docs-dev": "vitepress dev docs --open",
|
|
16
|
-
"docs-build": "vitepress build docs",
|
|
17
|
-
"docs-preview": "vitepress preview docs"
|
|
18
|
-
},
|
|
4
|
+
"version": "15.1.0",
|
|
19
5
|
"dependencies": {
|
|
20
6
|
"tslib": "^2",
|
|
21
7
|
"zod": "^3"
|
|
22
8
|
},
|
|
23
9
|
"devDependencies": {
|
|
24
|
-
"@naturalcycles/
|
|
25
|
-
"@naturalcycles/dev-lib": "^18",
|
|
26
|
-
"@naturalcycles/nodejs-lib": "^14",
|
|
27
|
-
"@naturalcycles/time-lib": "^3",
|
|
10
|
+
"@naturalcycles/dev-lib": "*",
|
|
28
11
|
"@types/crypto-js": "^4",
|
|
29
12
|
"@types/node": "^22",
|
|
30
13
|
"@types/semver": "^7",
|
|
31
|
-
"@vitest/coverage-v8": "^3",
|
|
32
14
|
"crypto-js": "^4",
|
|
33
|
-
"
|
|
34
|
-
"vitepress": "^1",
|
|
35
|
-
"vitest": "^3",
|
|
36
|
-
"vue": "^3"
|
|
15
|
+
"dayjs": "^1"
|
|
37
16
|
},
|
|
38
17
|
"files": [
|
|
39
18
|
"dist",
|
|
@@ -55,7 +34,8 @@
|
|
|
55
34
|
},
|
|
56
35
|
"repository": {
|
|
57
36
|
"type": "git",
|
|
58
|
-
"url": "
|
|
37
|
+
"url": "git@github.com:NaturalCycles/js-libs.git",
|
|
38
|
+
"directory": "packages/js-lib"
|
|
59
39
|
},
|
|
60
40
|
"description": "Standard library for universal (browser + Node.js) javascript",
|
|
61
41
|
"keywords": [
|
|
@@ -65,5 +45,16 @@
|
|
|
65
45
|
"standard library"
|
|
66
46
|
],
|
|
67
47
|
"author": "Natural Cycles Team",
|
|
68
|
-
"license": "MIT"
|
|
69
|
-
|
|
48
|
+
"license": "MIT",
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "dev-lib build",
|
|
51
|
+
"test": "dev-lib test",
|
|
52
|
+
"lint": "dev-lib lint",
|
|
53
|
+
"bt": "dev-lib bt",
|
|
54
|
+
"lbt": "dev-lib lbt",
|
|
55
|
+
"check": "dev-lib lbt",
|
|
56
|
+
"test-tz1": "TZ=Europe/Stockholm yarn test local",
|
|
57
|
+
"test-tz2": "TZ=JST-9 yarn test local",
|
|
58
|
+
"test-ny": "TZ=GMT-0500 yarn test localTime"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -105,7 +105,7 @@ function mergeTypes(types: Type[], samples: any[]): JsonSchema | undefined {
|
|
|
105
105
|
if (type === 'array') {
|
|
106
106
|
// possible feature: detect if it's a tuple
|
|
107
107
|
// currently assume no-tuple
|
|
108
|
-
const items = samples.filter(r => Array.isArray(r)).flat(
|
|
108
|
+
const items = samples.filter(r => Array.isArray(r)).flat()
|
|
109
109
|
const itemTypes = _uniq(items.map(i => getTypeOfValue(i)))
|
|
110
110
|
|
|
111
111
|
return {
|