Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@waiting/shared-core

waitingsong659MIT23.26.0TypeScript support: included

node core function re export with Promise or Observable

node, ESM, typescript

readme

Shared types and utils

GitHub tag License ci codecov

Install global deps for development

npm i -g c8 lerna madge rollup tsx zx

Initialization

npm i && npm run build

Test

  • Use npm run lint to check code style.
  • Use npm run test to run unit test.

Note

  • Run npm run clean before npm run build, if any file under typescript outDir folder was deleted manually.
  • Default publish registry is NPM, configurated in file lerna.json

Packages

Package Version
types types-svg
core core-svg

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

23.26.0 (2025-02-26)

Features

23.25.5 (2024-12-22)

Note: Version bump only for package @waiting/shared

23.25.4 (2024-12-22)

Bug Fixes

  • core: result of getCallerStack(), getCallerInfo() under nodejs v22.12 (ca50f74)

23.25.3 (2024-11-21)

Bug Fixes

  • core: getCallerInfo() for nodejs v20/23 (6cd2ae8)

23.25.2 (2024-11-20)

Bug Fixes

23.25.1 (2024-11-20)

Note: Version bump only for package @waiting/shared

23.25.0 (2024-11-20)

Features

  • core: update getCallerInfo() (c19199a)

23.24.1 (2024-11-20)

Bug Fixes

  • core: getCallerStack() srcPath (ad55d29)

23.24.0 (2024-11-20)

Features

  • core: expose getCallerInfo() (107c7d9)

23.23.0 (2024-10-26)

Note: Version bump only for package @waiting/shared

23.22.0 (2024-10-09)

Bug Fixes

Features

  • core: retrieveFilename(), retrieveDirname() (7b2fdfe)

23.21.0 (2024-08-26)

Features

  • core: compareVersions() (4d91bd2)

23.20.2 (2024-07-12)

Bug Fixes

  • types: template literal process when none string property (5e7ce5c)

23.20.1 (2024-07-12)

Reverts

23.20.0 (2024-07-05)

Features

  • core: isArrowFunction() (1ea5907)

23.19.1 (2024-07-05)

Note: Version bump only for package @waiting/shared

23.19.0 (2024-06-25)

Features

  • types: type ToAsyncFunction (036f4ba)

23.18.1 (2024-06-24)

Note: Version bump only for package @waiting/shared

23.18.0 (2024-06-23)

Features

  • types: FlattenNestedTuple (cdaa6ae)

23.17.0 (2024-06-23)

Features

  • types: update type TupleToUnion, accepts readonly any[] (83ce7d9)

23.16.0 (2024-06-23)

Features

  • types: update type TupleToUnion (f8386f4)

23.15.1 (2024-06-21)

Note: Version bump only for package @waiting/shared

23.15.0 (2024-06-21)

Features

  • core: expandFFIParamArray() (a11488d)

23.14.0 (2024-06-21)

Features

  • core: fix patchZxQuote() and expose $ from zx (835ac6b)

23.13.0 (2024-06-12)

Features

  • types: change default type value to any of MethodType, MethodTypeUnknown, AsyncMethodType (0ed8a7c)

23.12.0 (2024-06-12)

Features

  • types: add this generics param of MethodType, MethodTypeUnknown, AsyncMethodType (158cb83)

23.11.0 (2024-05-27)

Features

23.10.1 (2024-05-09)

Bug Fixes

  • core: shell createUser() (2f8d8f0)

23.10.0 (2024-05-09)

Features

  • core: shell add property sshSelfWithoutPassword of type CreateUserOptions (23bf0bb)

23.9.0 (2024-05-09)

Features

  • core: shell updateSshAllowUser() (f3f8607)

23.8.0 (2024-05-08)

Features

  • core: add property sshAllowUser of CreateUserOptions (bed4f83)
  • core: update UserShell (68176db)

23.7.0 (2024-05-08)

Features

  • core: genRandomString() (6d7fe6a)
  • core: user functions of shell (8ecac13)

23.6.1 (2024-04-21)

Note: Version bump only for package @waiting/shared

23.6.0 (2024-04-21)

Features

  • core: retrieveArgsFromProcess() accepts generics (adfd22c)

23.5.1 (2024-04-14)

Note: Version bump only for package @waiting/shared

23.5.0 (2024-04-14)

Features

  • core: detect package scope within getNpmPkgViewFromRegistry() (382d49e)

Reverts

  • core: genModuleAbsolutePathIfExists() (7bb32d1)
  • core: zx version to ^7.2.3 (f68b7cb)

23.4.0 (2024-04-14)

Features

  • core: change return type of genModuleAbsolutePathIfExists() from undefined to '.' (769b295)
  • types: update type MethodType accepts generics (3b68601)

23.3.0 (2024-03-27)

Features

  • core: add genModuleAbsolutePathIfExists() (14449b1)

23.2.1 (2024-03-27)

Note: Version bump only for package @waiting/shared

23.2.0 (2024-03-07)

Features

  • core: getKeyByEnumValue() (85c31a8)

23.1.1 (2024-03-05)

Bug Fixes

  • core: return type of formatDateTime() to string (2399d4b)

23.1.0 (2024-03-05)

Features

23.0.2 (2024-02-28)

Note: Version bump only for package @waiting/shared

23.0.1 (2024-01-24)

Bug Fixes

  • boilerplate: package.json db:gen (e1b4a74)

23.0.0 (2024-01-16)

Bug Fixes

  • boilerplate: package.json db:gen (e1b4a74)

22.0.0 (2023-09-18)

Note: Version bump only for package @waiting/shared

21.6.1 (2023-09-18)

Bug Fixes

  • boilerplate: package.json db:gen (e1b4a74)

21.6.0 (2023-09-18)

Bug Fixes

  • boilerplate: package.json db:gen (e1b4a74)

Features

  • core: add retrieveArgsFromProcess() (e01253a)

21.5.0 (2023-08-21)

Features

  • core: add 2nd param separator of functions (7097d7a)

21.4.2 (2023-08-18)

Bug Fixes

  • core: import('zx') dynamically for cjs bundle (a4daa34)

21.4.1 (2023-08-17)

Note: Version bump only for package @waiting/shared

21.4.0 (2023-08-17)

Features

  • core: add getNpmPkgViewFromRegistry() (2965cc1)
  • types: add types NpmPkgView, NpmPkgDist (957fc0a)

21.3.1 (2023-08-17)

Note: Version bump only for package @waiting/shared

21.3.0 (2023-07-28)

Features

  • core: add isExecWithEnableSourceMaps() (af1a5b6)
  • core: add node20+ support for functions (e201aaf)
  • core: add retrieveNodeExecOptions() (e46fdd2)

21.2.1 (2023-05-08)

Note: Version bump only for package @waiting/shared

21.2.0 (2023-05-06)

Features

  • types: add types MethodTypeUnknown, AsyncMethodType (4e28418)

21.1.0 (2023-04-10)

Features

  • types: declare type MethodType (794b49d)

21.0.1 (2023-04-06)

Note: Version bump only for package @waiting/shared

21.0.0 (2023-03-23)

Bug Fixes

  • boilerplate: define enum without const (37ffd10)
  • boilerplate: devDeps version (2e29b42)

Features

  • breaking change re-design types CamelToSnake, SnakeToCamel, SnakeToPascal (de1a478)

20.13.0 (2023-02-23)

Features

  • types: update declare Decimal (3f54640)

20.12.0 (2023-02-06)

Bug Fixes

  • boilerplate: define enum without const (37ffd10)
  • boilerplate: devDeps version (2e29b42)

20.11.5 (2023-01-31)

Bug Fixes

  • boilerplate: define enum without const (37ffd10)
  • boilerplate: devDeps version (2e29b42)

20.11.4 (2023-01-18)

Bug Fixes

  • core: path from retrievePath() and getCallerStack() f7f3e96

20.11.3 (2023-01-18)

Note: Version bump only for package @waiting/shared

20.11.2 (2022-12-22)

Note: Version bump only for package @waiting/shared

20.11.1 (2022-12-21)

Note: Version bump only for package @waiting/shared

20.11.0 (2022-12-14)

Features

  • types: export Func a8710b7
  • types: export type Decimal cb26da7

20.10.1 (2022-11-13)

Bug Fixes

  • core: getCallerStack() 9c0e0d0

20.10.0 (2022-11-13)

Features

  • core: change default value of initInfo fa98c42

Performance Improvements

  • core: update getCallerStack() b60ecd5

20.9.2 (2022-11-12)

Note: Version bump only for package @waiting/shared

20.9.1 (2022-11-12)

Bug Fixes

  • core: getCallerStack() depth 4f0e73b

20.9.0 (2022-11-12)

Features

  • core: getStackCallerSites() accept parameter stackTraceLimit, default 10 219cec9

Performance Improvements

  • core: update getCallerStack() 29b1b32

20.8.0 (2022-11-06)

Features

  • core: update retrieving className within getCallerStack() 2d45a76

20.7.1 (2022-11-06)

Bug Fixes

  • core: exports c6cefdf

20.7.0 (2022-11-06)

Features

  • core: add call stack functions bad12d7

20.6.3 (2022-08-30)

Bug Fixes

  • boilerplate: define enum without const 37ffd10
  • boilerplate: devDeps version 2e29b42
  • core: ReturnType of retrieveProcInfo() properties optional 8abf9ae

20.6.2 (2022-08-15)

Note: Version bump only for package @waiting/shared

20.6.1 (2022-08-15)

Bug Fixes

  • midway: revert kmore version 23e740a

20.6.0 (2022-08-14)

Bug Fixes

  • boilerplate: define enum without const 37ffd10
  • boilerplate: devDeps version 2e29b42

Features

  • midway: bump deps version e07d9c1

20.5.0 (2022-08-14)

Features

  • types: types for join table 43e3919

20.4.4 (2022-08-12)

Note: Version bump only for package @waiting/shared

20.4.3 (2022-08-12)

Bug Fixes

  • boilerplate: define enum without const 37ffd10
  • boilerplate: devDeps version 2e29b42

20.4.2 (2022-08-10)

Note: Version bump only for package @waiting/shared

20.4.1 (2022-08-10)

Note: Version bump only for package @waiting/shared

20.4.0 (2022-08-10)

Features

  • types: TupleShift, alias of TupleTail 032944c

20.3.0 (2022-07-12)

Features

  • core: genAbsolutePath() accepts 2nd param fileUrlPrefix 69ec87f

20.2.0 (2022-07-12)

Bug Fixes

  • boilerplate: define enum without const 37ffd10
  • boilerplate: devDeps version 2e29b42

Features

  • core: genAbsolutePath() 1857b5e

20.1.1 (2022-07-11)

Bug Fixes

  • boilerplate: define enum without const 37ffd10
  • boilerplate: devDeps version 2e29b42

20.1.0 (2022-07-08)

Bug Fixes

  • boilerplate: define enum without const 37ffd10
  • boilerplate: devDeps version 2e29b42

Features

  • midway: add MyError.details to store cause 164c880

20.0.0 (2022-07-08)

Features

  • core: breaking change removing exports 85439cb
  • core: breaking change retrieveHeadersItem() returns string | undefined only 8c4a160

19.5.1 (2022-07-07)

Note: Version bump only for package @waiting/shared

19.5.0 (2022-07-07)

Features

  • midway: implementation ba06388

19.4.0 (2022-07-07)

Features

  • core: retrieveFirstIp() ac0e913

19.3.0 (2022-07-07)

Features

  • core: sleep() 315e3f6

19.2.0 (2022-07-07)

Bug Fixes

  • boilerplate: define enum without const 37ffd10
  • boilerplate: devDeps version 2e29b42

Features

  • core: saveHeapSnapshot() b474ec0

19.1.0 (2022-07-05)

Features

  • core: snakeKeys() 2fdeaf4

19.0.1 (2022-07-05)

Bug Fixes

  • boilerplate: define enum without const 37ffd10
  • boilerplate: devDeps version 2e29b42

19.0.0 (2022-07-05)

Bug Fixes

  • boilerplate: define enum without const 37ffd10
  • boilerplate: devDeps version 2e29b42

Features

  • core: breaking change strategy of case conversion 416ec24
  • types: breaking changes strategy of case conversion and typo f9962ac

18.1.1 (2022-07-04)

Bug Fixes

  • boilerplate: define enum without const 37ffd10
  • boilerplate: devDeps version 2e29b42
  • types: isInLiteralTuple e919051

18.1.0 (2022-05-16)

Features

  • core: genCurrentFilename() and genCurrentDirname() for ESM 517f154

18.0.0 (2022-05-14)

Bug Fixes

  • boilerplate: define enum without const 37ffd10
  • boilerplate: devDeps version 2e29b42

17.0.0 (2022-04-12)

Note: Version bump only for package @waiting/shared

16.4.0 (2022-04-11)

Features

  • types: add RecusiveSnakeKeys 3d8cbe4

16.3.1 (2022-04-11)

Bug Fixes

  • types: CamelToSnake 32eae17

16.3.0 (2022-04-11)

Features

  • types: add type CamelToSnake afb37e4

16.2.0 (2022-04-11)

Features

  • types: update Trim<T, K> support K 04f9226
  • types: update TrimEnd<T, K> support K 7f53489
  • types: update TrimStart<T, K> support K 483c28a

16.1.0 (2022-04-11)

Bug Fixes

  • boilerplate: devDeps version 2e29b42

Features

  • types: add type Trim, TrimStart, TrimEnd d53e117

16.0.0 (2022-03-10)

Features

  • core: rule accept function within isPathMatchRules() 4ec766c
  • types: change type PathPatternFunc 67b8912

15.3.0 (2022-03-09)

Bug Fixes

  • boilerplate: devDeps version 2e29b42

Features

  • types: MiddlewareConfig has generics param cc5354e
  • types: MiddlewarePathPattern accepts PathPatternFunc a0c4c9f

15.2.0 (2022-02-25)

Features

  • core: isPathMatchRules() 38e75f7
  • types: add MiddlewareConfig b6d17ea
  • types: add XOR<T,U> 6ddac45

15.1.1 (2022-02-10)

Note: Version bump only for package @waiting/shared

15.1.0 (2021-11-22)

Features

  • types: add types 8c6e7e4

15.0.0 (2021-11-22)

Note: Version bump only for package @waiting/shared

14.4.2 (2021-07-28)

Note: Version bump only for package @waiting/shared

14.4.1 (2021-07-06)

Note: Version bump only for package @waiting/shared

14.4.0 (2021-06-25)

Features

  • core: export retrieveHeadersItem() (821259e)

14.3.0 (2021-06-24)

Features

14.2.0 (2021-06-22)

Features

  • types: add RecusiveCamelKeys, RecusiveParscalKeys (4cccf14)

14.1.1 (2021-06-22)

Performance Improvements

14.1.0 (2021-06-22)

Features

  • core: camelToSnakeCase() (b5c48fa)

14.0.0 (2021-06-18)

Features

  • bump typescript, ts-node version (1ee3fe9)

13.2.0 (2021-06-16)

Features

  • core: add retrieveExternalNetWorkInfo() (95e5807)

13.1.0 (2021-06-14)

Features

  • core: retrieveProcInfo() accept parameter (80d474c)

13.0.0 (2021-06-13)

Features

  • core: breaking change remove ppid from HumanMemoryUsage (e2d5d8c)

12.0.0 (2021-06-09)

Features

  • types: breaking change rename JsonResp.dat to JsonResp.data (5d1b619)

11.2.0 (2021-06-08)

Features

  • core: update return type of humanMemoryUsage() with pid, ppid (5a5f326)

11.1.1 (2021-06-07)

Note: Version bump only for package @waiting/shared

11.1.0 (2021-06-06)

Performance Improvements

  • core: Promise.all() of retrieveProcInfo() (43171f5)

11.0.0 (2021-06-04)

Features

  • core: increase pkg.engines.node to ">=14.15.0" (6add7ac)

10.1.0 (2021-05-28)

Note: Version bump only for package @waiting/shared

10.0.0 (2021-05-14)

Features

  • types: remove types about database (d0889d7)

9.2.0 (2021-05-13)

Note: Version bump only for package @waiting/shared

9.1.0 (2021-05-12)

Note: Version bump only for package @waiting/shared

9.0.0 (2021-05-10)

Note: Version bump only for package @waiting/shared

8.6.0 (2021-04-28)

Note: Version bump only for package @waiting/shared

8.5.1 (2021-04-25)

Note: Version bump only for package @waiting/shared

8.5.0 (2021-04-01)

Note: Version bump only for package @waiting/shared

8.4.2 (2021-03-31)

Bug Fixes

  • types-dev: create comments space (5a716ab)

8.4.1 (2021-03-31)

Bug Fixes

  • types-dev: compare path via toLocaleLowerCase() (43d3cba)

8.4.0 (2021-03-31)

Note: Version bump only for package @waiting/shared

8.3.0 (2021-03-31)

Note: Version bump only for package @waiting/shared

8.2.0 (2021-03-30)

Features

  • types-dev: export isKeysCallExpression() (0edf004)

8.1.1 (2021-03-30)

Bug Fixes

  • types-dev: runtime path resolve (df183a7)

8.1.0 (2021-03-30)

Note: Version bump only for package @waiting/shared

8.0.0 (2021-03-29)

Features

  • types-dev: add createObjectLiteralExpression() (6320785)

7.4.0 (2021-03-26)

Features

  • types-dev: update params of transformCallExpressionToLiteralType() (0408d90)

7.3.0 (2021-03-26)

Note: Version bump only for package @waiting/shared

7.2.3 (2021-03-25)

Note: Version bump only for package @waiting/shared

7.2.2 (2021-03-25)

Note: Version bump only for package @waiting/shared

7.2.1 (2021-03-25)

Note: Version bump only for package @waiting/shared

7.2.0 (2021-03-25)

Note: Version bump only for package @waiting/shared

7.1.0 (2021-03-19)

Note: Version bump only for package @waiting/shared

7.0.0 (2021-03-18)

Note: Version bump only for package @waiting/shared

6.1.1 (2021-03-18)

Note: Version bump only for package @waiting/shared

6.1.0 (2021-03-17)

Note: Version bump only for package @waiting/shared

6.0.2 (2021-03-17)

Note: Version bump only for package @waiting/shared

6.0.1 (2021-03-12)

Bug Fixes

  • types: suppress type error under typescript v4.2 (210d08b)

6.0.0 (2021-02-23)

Note: Version bump only for package @waiting/shared

5.9.1 (2021-02-23)

Bug Fixes

5.9.0 (2021-02-23)

Features

  • types: add KnownKeys<T> (5f293f4)

5.8.0 (2021-02-23)

Note: Version bump only for package @waiting/shared

5.7.2 (2021-02-23)

Note: Version bump only for package @waiting/shared

5.7.1 (2021-02-18)

Note: Version bump only for package @waiting/shared

5.7.0 (2021-02-17)

Features

5.6.2 (2021-02-17)

Note: Version bump only for package @waiting/shared

5.6.1 (2021-02-08)

Bug Fixes

  • types: FormatCapitalize and FormatCamelCase 755bdf8

5.6.0 (2021-01-17)

Features

  • types: add JsonResp['codeKey'] optional dc45e0b

5.5.1 (2020-12-20)

Note: Version bump only for package @waiting/shared

5.5.0 (2020-12-19)

Features

  • types: add 2nd param of FormatIntersect 912b7dd
  • types: add template-literal.ts e513ad0
  • types: add type TupleToUnion 48b4b81

Performance Improvements

  • types: update JoinTableDistinct 48407bf

5.4.0 (2020-12-19)

Bug Fixes

  • types: TuplePush 8fcf34e

Features

  • types: update JsonResp<T> b145c4d

5.3.0 (2020-12-19)

Features

  • types: update JsonResp with optional prop reqId: string a22c419

5.2.0 (2020-11-24)

Features

  • types: add JsonObject 64dc5f0
  • types: change generics of JsonResp to unknow 083d50f

5.1.0 (2020-07-17)

Features

  • types: update generics param of JsonResp<> 786914c

5.0.0 (2020-07-17)

Features

  • types: add type isInLiteralTuple 6d23af5
  • types: breaking change params of PickDuplicateKeys<> to array 8e084ea
  • types: rename type JoinTableUnique to JoinTableDistinct 678b9c5

4.8.1 (2020-07-16)

Bug Fixes

  • types: remove undefined from type Json 584fb0f

Features

  • types: add type DbAliasCols a3a2e5d

4.8.0 (2020-07-14)

Features

  • types: add type JoinTableWithAlias b05e312
  • types: update type FormatIntersect deeply b24f097

4.7.1 (2020-07-13)

Bug Fixes

  • types: type TypeFromJointTable 997d757

4.7.0 (2020-07-13)

Features

  • types: add types for database 5af329e

4.6.1 (2020-07-11)

Performance Improvements

  • types: update FormatIntersect da57cbe

4.6.0 (2020-07-10)

Features

  • types: add type EqualsExt<> 6917f32
  • types: add type FormatIntersect<> 1b0a92b

4.5.0 (2020-06-30)

Features

  • types: add types of database c2cdbe8

4.4.0 (2020-06-30)

Features

  • types: add types, set deprecated types 79e1f17

4.3.0 (2020-06-21)

Features

  • types: add type UnionToTuple d3dd1ae
  • types: exports type UnionToIntersection 764a368

4.2.0 (2020-06-12)

Features

  • types: add type Equals<X, Y> a4d3688

4.1.0 (2020-06-12)

Features

  • types: add type AllValues 98043f9
  • types: add type Invert<T> 0bf9e9e
  • types: add type KeyFromValue<T, V> 33c87d6

4.0.0 (2020-06-11)

Bug Fixes

  • core: createFileAsync() types of param data d19f510

Features

  • increase pkg.engines.node to >=12.13.0 b296c00

3.5.1 (2020-03-18)

Note: Version bump only for package @waiting/shared

3.5.0 (2020-03-18)

Features

  • types: add Spread 1927800

3.4.0 (2020-03-03)

Features

  • types: add type DateISOString (ISO 8601) 285eb43

3.3.1 (2020-01-09)

Bug Fixes

  • types: expose alias d02805f

3.3.0 (2020-01-09)

Features

  • types: add alias.ts 1e08c0f

3.2.0 (2019-11-26)

Features

  • add type NpmPkg for package.json e65b717

3.1.0 (2019-11-16)

Bug Fixes

  • lint: minors ecc3672
  • ab2str() 0a09e04
  • not reading content of COMMIT_EDITMSG with isSkipCommitlint() 54bf9b5

Features

  • add ab2buf(), buf2ab() 56b99c7
  • add ab2str(), str2ab(), genRandomInt() 8914fae
  • add readFileLineRx() 39c69c5
  • add SetPathDirectory() 658218f
  • add src files d8e21f7
  • add types 1a2d9cd
  • add validateDllFile() c7de681
  • change types JsonResp ea34168
  • export helper d85170c
  • export isDirFileExists() dd56e9d
  • update type JsonResp 9700bcd
  • types: add Concat 2f71b17
  • types: add type JsonType 3cad591
  • types: add type KnownKeys 8f05f43
  • types: add types below 0109140
  • export const isWin32, userHome 03da0fa
  • genFileFromExample() bb8ea22
  • isSkipCommitlint() check whether skip commitlint 8845ad3

BREAKING CHANGES

  • use code instead of err, and generics accepts any