diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 75088ce..5a66d92 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v3 with: - node-version: 20.x + node-version: 22 registry-url: 'https://registry.npmjs.org' - run: npm version - run: npm install diff --git a/_sandbox/using.ts b/_sandbox/using.ts index 2852303..bdfe43e 100755 --- a/_sandbox/using.ts +++ b/_sandbox/using.ts @@ -6,7 +6,7 @@ // try { // // @ts-expect-error just a polyfill -// Symbol.dispose ??= Symbol("Symbol.dispose") +// Symbol.dispose ??= Symbol("Symbol.dispose") // // @ts-expect-error just a polyfill // Symbol.asyncDispose ??= Symbol("Symbol.asyncDispose") // } finally { } @@ -17,7 +17,7 @@ function useTempFile(path: string) { path, [Symbol.dispose]() { console.log('4 dispose') - } + }, } } diff --git a/package.json b/package.json index 23a5710..1a21fa7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "zeed", "type": "module", - "version": "0.20.9", + "version": "0.20.10", "description": "🌱 Simple foundation library", "author": { "name": "Dirk Holtwick", @@ -49,7 +49,7 @@ }, "scripts": { "build": "nr clean && NODE_ENV=production tsup", - "build:docs": "typedoc --skipErrorChecking ./src/index.all.ts", + "build:docs": "nlx typedoc --skipErrorChecking ./src/index.all.ts", "check": "tsc --noEmit --skipLibCheck", "credits": "nlx credits-cli", "circles": "nlx madge --circular --summary --orphans --leaves --warning --extensions ts src", @@ -72,7 +72,6 @@ "esbuild": "^0.21.5", "eslint": "<9", "tsup": "^8.1.0", - "typedoc": "^0.25.13", "typescript": "^5.5.2", "vite": "^5.3.1", "vitest": "^1.6.0" diff --git a/src/browser/log/log-colors.ts b/src/browser/log/log-colors.ts index 45d22b8..97fde37 100644 --- a/src/browser/log/log-colors.ts +++ b/src/browser/log/log-colors.ts @@ -11,16 +11,18 @@ export function browserSupportsColors(): boolean { && window.process // @ts-expect-error xxx && (window.process.type === 'renderer' || window.process.__nwjs) - ) + ) { return true + } // Internet Explorer and Edge do not support colors. if ( typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/) - ) + ) { return false + } // Is webkit? http://stackoverflow.com/a/16459606/376773 // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 diff --git a/src/common/exec/pool.ts b/src/common/exec/pool.ts index 7b6fee6..48e57db 100644 --- a/src/common/exec/pool.ts +++ b/src/common/exec/pool.ts @@ -166,8 +166,9 @@ export function usePool(config: PoolConfig = {}) { && tt.id !== t.id && tt.group === t.group, ) - ) + ) { continue + } // fifo if (taskInfo == null || t.priority < taskInfo.priority) diff --git a/src/common/log/log-filter.ts b/src/common/log/log-filter.ts index f8087d6..b94235d 100644 --- a/src/common/log/log-filter.ts +++ b/src/common/log/log-filter.ts @@ -18,8 +18,9 @@ export function getNamespaceFilterString(defaultNamespaceFilter: any): string { || defaultNamespaceFilter === 'true' || defaultNamespaceFilter === '1' || (typeof defaultNamespaceFilter === 'number' && defaultNamespaceFilter !== 0) - ) + ) { defaultNamespaceFilter = '*' + } else if ( defaultNamespaceFilter === false || defaultNamespaceFilter === 'false' @@ -28,10 +29,12 @@ export function getNamespaceFilterString(defaultNamespaceFilter: any): string { || defaultNamespaceFilter == null || defaultNamespaceFilter === 'null' || defaultNamespaceFilter === 'undefined' - ) + ) { defaultNamespaceFilter = '' - else + } + else { defaultNamespaceFilter = String(defaultNamespaceFilter) + } return defaultNamespaceFilter }