@naturalcycles/dev-lib 15.27.1 → 15.27.3

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/cfg/tsconfig.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "outDir": "${configDir}/dist",
11
11
 
12
12
  // Target/module
13
- "target": "es2023",
13
+ "target": "es2022", // todo: es2023 when all consumers are on ts5.6+
14
14
  "lib": ["esnext"], // add "dom" if needed
15
15
  // module `nodenext` is a modern mode that auto-detects cjs/esm
16
16
  // it also defaults `esModuleInterop` and `allowSyntheticDefaultImports` to true
@@ -1,8 +1,8 @@
1
- export declare const MOCK_TS_2018_06_21 = 1529539200;
1
+ import type { UnixTimestamp } from '@naturalcycles/js-lib';
2
+ export declare const MOCK_TS_2018_06_21: UnixTimestamp;
2
3
  /**
3
4
  * Locks time-related functions to return always same time.
4
5
  * For deterministic tests.
5
6
  */
6
- export declare function mockTime(ts?: number): void;
7
- export declare function mockTimeMillis(millis?: number): void;
7
+ export declare function mockTime(ts?: UnixTimestamp): void;
8
8
  export declare function resetTime(): void;
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MOCK_TS_2018_06_21 = void 0;
4
4
  exports.mockTime = mockTime;
5
- exports.mockTimeMillis = mockTimeMillis;
6
5
  exports.resetTime = resetTime;
7
6
  const tslib_1 = require("tslib");
8
7
  const timekeeper_1 = tslib_1.__importDefault(require("timekeeper"));
@@ -12,10 +11,7 @@ exports.MOCK_TS_2018_06_21 = 1_529_539_200;
12
11
  * For deterministic tests.
13
12
  */
14
13
  function mockTime(ts = exports.MOCK_TS_2018_06_21) {
15
- mockTimeMillis(ts * 1000);
16
- }
17
- function mockTimeMillis(millis = exports.MOCK_TS_2018_06_21 * 1000) {
18
- timekeeper_1.default.freeze(millis);
14
+ timekeeper_1.default.freeze(ts * 1000);
19
15
  }
20
16
  function resetTime() {
21
17
  timekeeper_1.default.reset();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/dev-lib",
3
- "version": "15.27.1",
3
+ "version": "15.27.3",
4
4
  "scripts": {
5
5
  "prepare": "husky",
6
6
  "tsn-debug": "tsn testScript.ts",