@naturalcycles/dev-lib 15.0.5 → 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.
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,12 @@
1
+ export declare function buildEsmCjs(): Promise<void>;
2
+ export declare function buildProd(): Promise<void>;
3
+ /**
4
+ * Use '.' to indicate root.
5
+ */
6
+ export declare function runTSCInFolders(tsconfigPaths: string[], args?: string[], parallel?: boolean): Promise<void>;
7
+ /**
8
+ * Pass '.' to run in root.
9
+ */
10
+ export declare function runTSCInFolder(tsconfigPath: string, args?: string[]): Promise<void>;
11
+ export declare function runTSCProd(): Promise<void>;
12
+ export declare function buildCopy(): void;
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export declare function initFromDevLibCommand(): void;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Based on: https://github.com/palmerj3/jest-offline/blob/master/index.js
3
+ */
4
+ export declare function jestOffline(): void;
5
+ /**
6
+ * Undo/reset the jestOffline() function by allowing network calls again.
7
+ */
8
+ export declare function jestOnline(): void;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Run all linters.
3
+ */
4
+ export declare function lintAllCommand(): Promise<void>;
5
+ interface EslintAllOptions {
6
+ ext?: string;
7
+ fix?: boolean;
8
+ }
9
+ /**
10
+ * Runs `eslint` command for all predefined paths (e.g /src, /scripts, etc).
11
+ */
12
+ export declare function eslintAll(opt?: EslintAllOptions): Promise<void>;
13
+ export declare function runPrettier(): void;
14
+ export declare function stylelintAll(): void;
15
+ export declare function lintStagedCommand(): Promise<void>;
16
+ export declare function runCommitlintCommand(): void;
17
+ export {};
@@ -0,0 +1,6 @@
1
+ export declare const projectDir: string;
2
+ export declare const srcDir: string;
3
+ export declare const testDir: string;
4
+ export declare const cfgDir: string;
5
+ export declare const cfgOverwriteDir: string;
6
+ export declare const scriptsDir: string;
@@ -0,0 +1,10 @@
1
+ interface RunJestOpt {
2
+ integration?: boolean;
3
+ manual?: boolean;
4
+ leaks?: boolean;
5
+ }
6
+ /**
7
+ * 1. Adds `--silent` if running all tests at once.
8
+ */
9
+ export declare function runJest(opt?: RunJestOpt): void;
10
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * expectResults(v => JSON.stringify(v), [
3
+ * 1,
4
+ * 2,
5
+ * 3
6
+ * ]).toMatchSnapshot()
7
+ */
8
+ export declare function expectResults(fn: (...args: any[]) => any, values: any[]): jest.JestMatchers<Map<any, any>>;
@@ -0,0 +1,8 @@
1
+ import { expectTypeOf } from 'expect-type';
2
+ import timekeeper from 'timekeeper';
3
+ export * from '../jestOffline.util';
4
+ export * from './expect.util';
5
+ export * from './mockAllKindsOfThings';
6
+ export * from './testing.util';
7
+ export * from './time.util';
8
+ export { expectTypeOf, timekeeper };
@@ -0,0 +1 @@
1
+ export declare const mockAllKindsOfThings: () => any[];
@@ -0,0 +1,3 @@
1
+ export declare function silentConsole(): void;
2
+ export declare const jestLogger: import("@naturalcycles/js-lib").CommonLogger;
3
+ export declare const jestLog: import("@naturalcycles/js-lib").CommonLogFunction;
@@ -0,0 +1,8 @@
1
+ export declare const MOCK_TS_2018_06_21 = 1529539200;
2
+ /**
3
+ * Locks time-related functions to return always same time.
4
+ * For deterministic tests.
5
+ */
6
+ export declare function mockTime(ts?: number): void;
7
+ export declare function mockTimeMillis(millis?: number): void;
8
+ export declare function resetTime(): void;
@@ -0,0 +1,2 @@
1
+ export declare function up(): void;
2
+ export declare function upnc(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/dev-lib",
3
- "version": "15.0.5",
3
+ "version": "15.1.0",
4
4
  "scripts": {
5
5
  "prepare": "husky",
6
6
  "tsn-debug": "tsn testScript.ts",
@@ -33,7 +33,7 @@
33
33
  "eslint-plugin-jest": "^28.0.0",
34
34
  "eslint-plugin-jsdoc": "^48.0.1",
35
35
  "eslint-plugin-simple-import-sort": "^12.1.1",
36
- "eslint-plugin-unicorn": "^54.0.0",
36
+ "eslint-plugin-unicorn": "^55.0.0",
37
37
  "eslint-plugin-unused-imports": "^4.0.0",
38
38
  "eslint-plugin-vue": "^9.0.0",
39
39
  "expect-type": "^0.19.0",
@@ -61,6 +61,8 @@
61
61
  "cfg/overwrite/.gitignore",
62
62
  "cfg"
63
63
  ],
64
+ "main": "dist/index.js",
65
+ "types": "dist/index.d.ts",
64
66
  "bin": {
65
67
  "dev-lib": "dist/bin/dev-lib.js",
66
68
  "up": "dist/bin/up.js",