-
-
Notifications
You must be signed in to change notification settings - Fork 119
Open
Description
Summary
We've been porting several utilities from this repository into @overeng/effect-utils, an Effect-first utilities package. These utilities are now available with full Effect integration and typed errors.
Ported Utilities
The following utilities from @livestore/utils and @livestore/adapter-web have been ported:
Browser Utilities (@overeng/utils/browser)
| Original Location | Ported As | Description |
|---|---|---|
adapter-web/src/opfs-utils.ts |
OPFS.* |
OPFS utilities with Effect-wrapped errors |
utils/src/browser.ts |
detectBrowserName(), isBrowser() |
Browser detection |
utils/src/effect/WebLock.ts |
WebLock.* |
Web Locks API with Effect integration |
utils/src/base64.ts |
base64.* |
Base64 encode/decode |
Isomorphic Utilities (@overeng/utils)
| Original Location | Ported As | Description |
|---|---|---|
utils/src/guards.ts |
isNotNull, isNil, isNotNil, etc. |
Type guards |
utils/src/effect/Error.ts |
UnknownError |
Generic tagged error |
utils/src/misc.ts |
prettyBytes |
Byte formatting |
Improvements in the Port
- Full Effect integration: All async operations wrapped in
Effect.Effectwith typed errors - Schema.TaggedError: Proper error classes (
OPFSNotSupportedError,OPFSError,WebLockNotSupportedError,UnknownError) - Environment guards: Safe checks for
navigator.storage,navigator.locks, etc. - TypeScript strict mode: Compatible with
exactOptionalPropertyTypes,noUncheckedIndexedAccess
Proposal
Would you be interested in:
- Option A: Adding
@overeng/utilsas a dependency and re-exporting from@livestore/utils - Option B: Adding as a git submodule for more control
- Option C: Collaborating on a shared utilities package
This could reduce maintenance burden and allow both projects to benefit from improvements.
Links
- Package: https://github.com/overengineeringstudio/effect-utils/tree/main/packages/%40overeng/utils
- Browser utilities:
src/browser/directory
This issue was created on behalf of @schickling by Claude Code.
Metadata
Metadata
Assignees
Labels
No labels