5.2.4 - 2024-09-12
- Update eslint/prettier/metarhia configs
5.2.3 - 2024-08-30
- Update eslint to 9.x and prettier with configs
- Add node.js 22 to CI
- Add await for res.json()
5.2.2 - 2024-04-26
- Fix Content-length on httpApiCall
- Fix memory-leak on fetch
- Validate collected data
- Update dependencies
5.2.1 - 2024-02-10
- Fixed abort handling in
Collector
- Fixed
Pool
: release captured items to queue - Update dependencies
5.2.0 - 2023-12-20
- Added
defaults
toCollector
options - Collector: fix signel getter
- Collector: use
Signal.timeout
instead ofsetTimeout
- Collector: add
.signal: AbortSignal
andabort()
5.1.0 - 2023-12-17
- Support waiting for promise in
Collector.wait
- Add
reassign: boolean
toCollector
options
5.0.0 - 2023-12-10
- Changed
Semaphore
signature, moved all parameters tooptions
- Changed
generateKey
parameter order - Replaced
node:http/https
with node nativefetch
forhttpApiCall
- Move
EventEmitter
polyfill from metacom (with improvements) - Added customHeaders option for
httpApiCall
- Implemented async collection:
Collector
- Fixed sync capture in
Pool
4.0.1 - 2023-11-18
- Fix package: add
dist.js
- Fix browser support: change
global
toglobalThis
- Deprecate
fetch
polyfill
4.0.0 - 2023-11-17
- Add browser support
- Change IPv4 representation in integer
- Implement
intToIp
- Update dependencies and add node.js 21
3.15.0 - 2023-10-21
- Add error.code ETIMEOUT for timeouts
3.14.0 - 2023-10-09
- Implement titeoutify
3.13.0 - 2023-10-06
- Use buf.subarray instead of buf.slice
- Drop node.js 16 and 19, update dependencies
- Convert lockfileVersion 2 to 3
3.12.0 - 2023-08-26
- Add
projection
to copy subset of fields - Improve
random
andcryptoRandom
contracts to(min?, max?)
- Copy
shuffle
implementation frommetarhia/common
- Pass
random
function as parameter toshuffle
andsample
3.11.0 - 2023-07-22
- New utilities:
serializeArguments
,httpApiCall
,trimLines
- New fs utilities:
directoryExists
,ensureDirectory
- Added
toBool
for converting promises to boolean
3.10.0 - 2023-06-30
- Implement DomainError
- Improve
Error
class, add{ cause, code }
- Fix error handling in fetch
3.9.1 - 2023-06-18
- Actualize all .d.ts typings and update short docs in README.md
- Optimize
nextEvent
,sizeToBytes
(support10kb
and10 kB
) - More checks/validation and tests for crypto submodule
- Refactor
generateKey
usingUint8Array
for speed - Use constant-time algorithm to compare CRC for security
3.9.0 - 2023-06-16
- Implement
parseRange
for HTTP headers - Restructure submodules
3.8.0 - 2023-06-08
- Moved from impress:
getSignature
andError
- Regroup submodules, new
error.js
andoop.js
- Implement
getX509names(cert): Array<string>
3.7.3 - 2023-06-05
- Fix fileExt to support dotfiles
- Update dependencies
3.7.2 - 2023-04-29
- Drop node.js 14 support, add node.js 20
- Convert package_lock.json to lockfileVersion 2
- Update dependencies
3.7.1 - 2023-03-12
- Use native UUID from
node:crypto
- Remove
defaultHash
(empty string) in crypto module - Use
crypto.randomInt
forgenerateKey
- Fix
fetch
polyfill
3.7.0 - 2023-03-04
- Add
generateUUID
implementation - Improve
AbortController
polyfill and use native if available
3.6.0 - 2022-12-19
- Use native
fetch
from node.js if available - Fix
fetch
polyfill to be compatible with node.jsfetch
implementation - Use
receiveBody
infetch
polyfill - Optimize
fileExt
3.5.25 - 2022-08-30
- Optimize
parseCookies
- Improve code style, apply optimizations, update dependencies
3.5.24 - 2022-08-30
- Add
isError(instance): boolean
- Support POST requests with body and custom headers in
fetch()
3.5.23 - 2022-08-12
- Add
flatObject(sourceObject: object, fieldNames: Array<string>): object
- Add
unflatObject(sourceObject: object, fieldNames: Array<string>): object;
3.5.22 - 2022-07-29
- New functions:
parseDay
andparseMonth
- Fixed and
parseEvery
andnextEvent
, more tests cases - Add year support to
Every
format - Add function
flatObject(sourceObject: object, fieldNames: Array<string>): object
- Add function
isHashObject(o: string | number | boolean | object): boolean
3.5.21 - 2022-06-27
- Update dependencies, eslint, and optimize package
3.5.20 - 2022-05-09
- Fix isFirstUpper bug with special characters
- Add isFirstLower and isFirstLetter functions
3.5.19 - 2022-03-15
- Add nodejs 17 to CI
- Update dependencies
3.5.18 - 2022-01-29
- Fix semaphore bug with counter and queue
3.5.17 - 2022-01-26
- Add function
nowDateTimeUTC(date?: Date, timeSep?: string): string
- Add case functions:
toLower
,toCamel
,spinalToCamel
, andsnakeToCamel
- Fixed floating bug in tests for
nowDateTimeUTC
3.5.16 - 2021-10-10
- Add
Pool
methodisFree(item: object): boolean
- Add function
jsonParse(buffer: Buffer): object | null
- Add function
receiveBody(req: IncomingMessage): Promise<string | null>
3.5.15 - 2021-09-23
- Fixed Pool infinite loop case
- Add simple
fetch
API implementation
3.5.14 - 2021-09-21
- Fix bugs in Pool and add tests for important cases
3.5.13 - 2021-09-20
- Wait for available (released) item in Pool with waiting timeout
- Pool: prevent to add duplicates and to release not captured items
- Regrouped utilities into modules and tests
3.5.12 - 2021-09-18
- Pool implementation with round-robian and exclusive item capture/release
- Move parsePath from impress
3.5.11 - 2021-09-09
- Add
namespaceByPath(namespace: object, path: string): object | null
- Add
md5(fileName: string): Promise<string>
3.5.10 - 2021-08-25
- Add and optimize
bytesToSize
andsizeToBytes
from metarhia/common - Update dependencies
3.5.9 - 2021-07-27
- Optimize Semaphore
- Add Semaphore properties:
concurrency: number
addempty: boolean
3.5.8 - 2021-07-22
- Return
-1
if past events detected bynextEvent
3.5.7 - 2021-07-21
- Initial implementation of
parseEvery
- Initial implementation of
nextEvent
3.5.6 - 2021-07-18
- Move types to package root
- Publish signatures in README.md
3.5.5 - 2021-07-09
- Add split and parseParams
- Update dependencies
3.5.4 - 2021-05-24
- Semaphore default parameters
- Package maintenance
3.5.3 - 2021-05-05
- Implement 'toLowerCamel' and 'toUpperCamel'
- Package maintenance and update dependencies
3.5.2 - 2021-04-20
- Semaphore bug: remove promise from queue on timeout
- Improve typings: use object as dictionary, import without require
3.5.1 - 2021-03-04
- Add typings
3.5.0 - 2021-02-22
- Implemented
await delay(msec, signal)
- Fix timeout behaviour to reject promise (throw)
- Generate errors on timeout and on abort timeout
3.4.0 - 2021-02-21
- Implement simple polyfill for AbortController
- Support AbortController in
await timeout
3.3.0 - 2021-02-19
- Change library file structure
- Move Semaphore from metacom with fixes
- Move timeout function from metacom
3.2.0 - 2021-02-03
- Add parseCookies (moved from impress/auth)
- Add hashPassword, validatePassword (moved from impress/security)
3.1.0 - 2021-01-22
- Added isFirstUpper to check is first char an upper case letter
- Added isConstant to check is string UPPER_SNAKE case
- Added makePrivate to emulate protected fields for objects
- Added protect to freeze interfaces except listed
3.0.1 - 2021-01-18
- Optimize buffering crypto random generator
3.0.0 - 2021-01-06
- Forked from https://github.com/metarhia/common after 2.2.0
- Removed everything except what we need in impress and its dependencies
2.2.0 - 2020-07-10
See this link for 2.2.0 and all previous versions: https://github.com/metarhia/common/blob/master/CHANGELOG.md