Skip to content

HawkStorage abstraction added#164

Merged
Reversean merged 1 commit intomasterfrom
refactor/hawk-storage
Mar 5, 2026
Merged

HawkStorage abstraction added#164
Reversean merged 1 commit intomasterfrom
refactor/hawk-storage

Conversation

@Reversean
Copy link
Member

@Reversean Reversean commented Feb 16, 2026

Related #151

Added HawkStorage interface which could be used as env-agnositc abstraction to store key-values.

Also HawkLocalStorage implementation based on browser localStorage added.

@Reversean Reversean force-pushed the refactor/hawk-storage branch 3 times, most recently from c3013b6 to 223001d Compare February 17, 2026 13:27
@Reversean Reversean changed the base branch from chore/browser-workspace to chore/core-workspace February 17, 2026 13:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an environment-agnostic storage abstraction to @hawk.so/core and introduces a browser localStorage-backed implementation in @hawk.so/javascript, aligning with the repo’s ongoing split between shared core logic and runtime-specific implementations (Issue #151).

Changes:

  • Added HawkStorage interface to @hawk.so/core and exported it from the core entrypoint.
  • Added HawkLocalStorage implementation and corresponding unit tests in @hawk.so/javascript.
  • Added Vitest coverage support/config updates for the JavaScript package.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
yarn.lock Adds dependencies for Vitest v8 coverage reporting.
packages/javascript/tsconfig.test.json Adds Vitest globals types to the test TS config.
packages/javascript/tests/storages/hawk-local-storage.test.ts Introduces unit tests for the new HawkLocalStorage.
packages/javascript/src/storages/hawk-local-storage.ts Adds a localStorage-backed HawkStorage implementation.
packages/javascript/package.json Adds test:coverage script and coverage dependency.
packages/core/src/storages/hawk-storage.ts Adds the storage interface contract in core.
packages/core/src/index.ts Exports HawkStorage from the core public entrypoint.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Reversean Reversean force-pushed the refactor/hawk-storage branch 3 times, most recently from cd47f1e to 7c1ad96 Compare February 22, 2026 14:47
@Reversean Reversean force-pushed the refactor/hawk-storage branch from 7c1ad96 to 591724a Compare February 25, 2026 17:23
@Reversean Reversean changed the base branch from chore/core-workspace to test/catcher February 25, 2026 17:24
Copy link
Contributor

@FeironoX5 FeironoX5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HawkLocalStorage could be just assigned with localStorage (rolled back, I understood why we need a class wrapping)

@FeironoX5 FeironoX5 force-pushed the refactor/hawk-storage branch from d4c780e to 591724a Compare February 26, 2026 21:30
Base automatically changed from test/catcher to master March 5, 2026 08:38
@Reversean Reversean force-pushed the refactor/hawk-storage branch from 591724a to a2abcb9 Compare March 5, 2026 08:41
@Reversean Reversean merged commit ae271b1 into master Mar 5, 2026
3 checks passed
@Reversean Reversean deleted the refactor/hawk-storage branch March 5, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants