@naturalcycles/js-lib 15.15.0 → 15.15.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,6 +1,5 @@
1
1
  import { _deepEquals } from '../object/deepEquals.js';
2
2
  import { _stringify } from '../string/stringify.js';
3
- import { TS_2000, TS_2500 } from '../zod/zod.shared.schemas.js';
4
3
  import { _isBackendErrorResponseObject, _isErrorObject, AssertionError } from './error.util.js';
5
4
  /**
6
5
  * Evaluates the `condition` (casts it to Boolean).
@@ -106,6 +105,8 @@ export function _assertTypeOf(v, expectedType, message) {
106
105
  export function asUnixTimestamp(n) {
107
106
  return n;
108
107
  }
108
+ const TS_2500 = 16725225600; // 2500-01-01
109
+ const TS_2000 = 946684800; // 2000-01-01
109
110
  /**
110
111
  * Casts an arbitrary number as UnixTimestamp2000.
111
112
  * Throws if the number is not inside 2000-01-01 and 2500-01-01 time interval,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/js-lib",
3
3
  "type": "module",
4
- "version": "15.15.0",
4
+ "version": "15.15.1",
5
5
  "dependencies": {
6
6
  "tslib": "^2",
7
7
  "zod": "^3"
@@ -2,7 +2,6 @@ import { _deepEquals } from '../object/deepEquals.js'
2
2
  import { _stringify } from '../string/stringify.js'
3
3
  import type { Class } from '../typeFest.js'
4
4
  import type { UnixTimestamp } from '../types.js'
5
- import { TS_2000, TS_2500 } from '../zod/zod.shared.schemas.js'
6
5
  import type { BackendErrorResponseObject, ErrorData, ErrorObject } from './error.model.js'
7
6
  import { _isBackendErrorResponseObject, _isErrorObject, AssertionError } from './error.util.js'
8
7
 
@@ -152,6 +151,9 @@ export function asUnixTimestamp(n: number): UnixTimestamp {
152
151
  return n as UnixTimestamp
153
152
  }
154
153
 
154
+ const TS_2500 = 16725225600 // 2500-01-01
155
+ const TS_2000 = 946684800 // 2000-01-01
156
+
155
157
  /**
156
158
  * Casts an arbitrary number as UnixTimestamp2000.
157
159
  * Throws if the number is not inside 2000-01-01 and 2500-01-01 time interval,