mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-11-04 11:51:53 +00:00
refactor(lock): centralize lock utility functions
- Moved `withTimeout` to `src/utils.mjs` and exported it. - Updated `src/lock-utils.mjs` to re-export `withTimeout` and `mergeRelayList` from `src/utils.mjs`. - Removed duplicate local definitions of `withTimeout` and `mergeRelayList` in `src/lock-ops.mjs` and `src/lock-publisher.mjs`. - Fixed `test/utils.test.mjs` to import `mergeRelayList`. - Verified all tests pass with `npm test`. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
8d43fc1be8
commit
08d291e7fa
5 files changed
+14
-37
No files matched your search
+1
-1
@@ -2,7 +2,7 @@ import { describe, it, after } from 'node:test';
|
||||
import assert from 'node:assert';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { getIsoWeekStr, todayDateStr, nowUnix, ensureDir, detectPlatform, relayListLabel } from '../src/utils.mjs';
|
||||
import { getIsoWeekStr, todayDateStr, nowUnix, ensureDir, detectPlatform, relayListLabel, mergeRelayList } from '../src/utils.mjs';
|
||||
|
||||
describe('Date Utilities', () => {
|
||||
describe('todayDateStr', () => {
|
||||
|
||||
Reference in new issue
Block a user