@travetto/base
Advanced tools
Comparing version 3.4.0 to 3.4.1
@@ -5,3 +5,2 @@ export * from './src/console'; | ||
export * from './src/error'; | ||
export * from './src/error-util'; | ||
export * from './src/exec'; | ||
@@ -8,0 +7,0 @@ export * from './src/env'; |
{ | ||
"name": "@travetto/base", | ||
"version": "3.4.0", | ||
"version": "3.4.1", | ||
"description": "Environment config and common utilities for travetto applications.", | ||
@@ -30,4 +30,4 @@ "keywords": [ | ||
"@travetto/manifest": "^3.4.0", | ||
"@types/node": "^20.8.10", | ||
"@types/source-map-support": "^0.5.9", | ||
"@types/node": "^20.9.2", | ||
"@types/source-map-support": "^0.5.10", | ||
"source-map-support": "^0.5.21" | ||
@@ -34,0 +34,0 @@ }, |
@@ -71,9 +71,2 @@ import { Class } from './types'; | ||
/** | ||
* Is an error object | ||
*/ | ||
static isError(a: unknown): a is Error { | ||
return !!a && (a instanceof Error || (typeof a === 'object' && 'message' in a && 'stack' in a)); | ||
} | ||
/** | ||
* Is a promise object | ||
@@ -80,0 +73,0 @@ */ |
@@ -5,3 +5,5 @@ import { setTimeout } from 'timers/promises'; | ||
import { RootIndex } from '@travetto/manifest'; | ||
import { Env } from './env'; | ||
import { ObjectUtil } from './object'; | ||
@@ -15,6 +17,2 @@ export type Closeable = { | ||
function isPromise(a: unknown): a is Promise<unknown> { | ||
return !!a && (a instanceof Promise || (typeof a === 'object') && 'then' in a); | ||
} | ||
/** | ||
@@ -57,3 +55,3 @@ * Shutdown manager, allowing for hooks into the shutdown process. | ||
const res = handler(); | ||
if (isPromise(res)) { | ||
if (ObjectUtil.isPromise(res)) { | ||
// If a promise, queue for handling | ||
@@ -60,0 +58,0 @@ promises.push(res); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
93152
22
2028
Updated@types/node@^20.9.2