@naturalcycles/js-lib 15.0.0 → 15.0.1

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.
@@ -1,4 +1,4 @@
1
- import { isServerSide } from '@naturalcycles/js-lib';
1
+ import { isServerSide } from '../index.js';
2
2
  import { loadScript } from './script.util.js';
3
3
  /* eslint-disable unicorn/prefer-global-this */
4
4
  /**
@@ -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(1);
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,17 @@
1
1
  {
2
2
  "name": "@naturalcycles/js-lib",
3
3
  "type": "module",
4
- "version": "15.0.0",
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.0.1",
19
5
  "dependencies": {
20
6
  "tslib": "^2",
21
7
  "zod": "^3"
22
8
  },
23
9
  "devDependencies": {
24
- "@naturalcycles/bench-lib": "^4",
25
- "@naturalcycles/dev-lib": "^18",
26
- "@naturalcycles/nodejs-lib": "^14",
27
10
  "@naturalcycles/time-lib": "^3",
28
11
  "@types/crypto-js": "^4",
29
12
  "@types/node": "^22",
30
13
  "@types/semver": "^7",
31
- "@vitest/coverage-v8": "^3",
32
- "crypto-js": "^4",
33
- "tsx": "^4",
34
- "vitepress": "^1",
35
- "vitest": "^3",
36
- "vue": "^3"
14
+ "crypto-js": "^4"
37
15
  },
38
16
  "files": [
39
17
  "dist",
@@ -55,7 +33,8 @@
55
33
  },
56
34
  "repository": {
57
35
  "type": "git",
58
- "url": "https://github.com/NaturalCycles/js-lib"
36
+ "url": "git@github.com:NaturalCycles/js-lib.git",
37
+ "directory": "packages/js-lib"
59
38
  },
60
39
  "description": "Standard library for universal (browser + Node.js) javascript",
61
40
  "keywords": [
@@ -65,5 +44,15 @@
65
44
  "standard library"
66
45
  ],
67
46
  "author": "Natural Cycles Team",
68
- "license": "MIT"
69
- }
47
+ "license": "MIT",
48
+ "scripts": {
49
+ "build": "dev-lib build",
50
+ "test": "dev-lib test",
51
+ "lint": "dev-lib lint",
52
+ "bt": "dev-lib bt",
53
+ "lbt": "dev-lib lbt",
54
+ "test-tz1": "TZ=Europe/Stockholm yarn test local",
55
+ "test-tz2": "TZ=JST-9 yarn test local",
56
+ "test-ny": "TZ=GMT-0500 yarn test localTime"
57
+ }
58
+ }
@@ -1,4 +1,4 @@
1
- import { isServerSide } from '@naturalcycles/js-lib'
1
+ import { isServerSide } from '../index.js'
2
2
  import { loadScript } from './script.util.js'
3
3
 
4
4
  declare global {
@@ -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(1)
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 {