Skip to content

Commit

Permalink
Merge branch 'v4' into kormanowsky/fetch-redirect-support
Browse files Browse the repository at this point in the history
  • Loading branch information
kormanowsky committed Dec 2, 2024
2 parents 514ff02 + 68a41ff commit f814c65
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ via `propagateStatusAndHeaders` option `core/request/engines/composition`

* Added support for `redirect` option `core/request/engines/fetch`

## v4.0.0-alpha.50 (2024-11-26)

#### :rocket: New Feature

* `stderr` can now accept error details and pass them to the logger `core/prelude/global`

## v4.0.0-alpha.49 (2024-10-31)

#### :bug: Bug Fix
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "lib/core/index.js",
"typings": "index.d.ts",
"license": "MIT",
"version": "4.0.0-alpha.49",
"version": "4.0.0-alpha.50",
"author": "kobezzza <[email protected]> (https://github.com/kobezzza)",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions src/core/prelude/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ Changelog
> - :house: [Internal]
> - :nail_care: [Polish]
## v4.0.0-alpha.50 (2024-11-26)

#### :rocket: New Feature

* `stderr` can now accept error details and pass them to the logger

## v4.0.0-alpha.49 (2024-10-31)

#### :bug: Bug Fix
Expand Down
6 changes: 3 additions & 3 deletions src/core/prelude/global/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ import { errorsToIgnore } from 'core/prelude/global/const';
extend(globalThis, 'Any', (obj) => obj);

/** @see stderr */
extend(globalThis, 'stderr', (err) => {
extend(globalThis, 'stderr', (err, ...details: unknown[]) => {
if (err instanceof Object) {
if (errorsToIgnore[err.type] === true) {
log.info('stderr', err);
log.info('stderr', err, ...details);
return;
}

log.error('stderr', err);
log.error('stderr', err, ...details);
}
});
3 changes: 2 additions & 1 deletion ts-definitions/prelude/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ declare function Any(obj: any): any;
/**
* STDERR wrapper
* @param err
* @param details
*/
declare function stderr(err: any): void;
declare function stderr(err: any, ...details: unknown[]): void;

type i18n = (key: string | TemplateStringsArray, params?: I18nParams) => string;

Expand Down

0 comments on commit f814c65

Please sign in to comment.