Skip to content

fix: support node.js runtime in wasm storage service#553

Merged
maycon-mello merged 4 commits into
masterfrom
DCKA-5493-support-node-js-runtime-in-wasm-storage-service
Jul 8, 2026
Merged

fix: support node.js runtime in wasm storage service#553
maycon-mello merged 4 commits into
masterfrom
DCKA-5493-support-node-js-runtime-in-wasm-storage-service

Conversation

@maycon-mello

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to make the WASM StorageService work in Node.js runtimes by providing a localStorage fallback (via node-localstorage) when a native Web Storage implementation isn’t available.

Changes:

  • Added a getStore() helper to choose between a native localStorage and a Node.js node-localstorage fallback.
  • Updated storage operations to use getStore() and revised getAllKeys() to enumerate keys via the Web Storage API.
  • Added node-localstorage as a dependency and marked it as external in the WASM Rollup build.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/wasm/src/services/storage/service.ts Introduces getStore() abstraction and updates storage methods to use it, plus key enumeration changes.
packages/wasm/rollup.config.mjs Adds node-localstorage to Rollup externals.
packages/wasm/package.json Adds node-localstorage dependency for the WASM package.
package-lock.json Locks node-localstorage dependency version.

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

Comment thread packages/wasm/src/services/storage/service.ts
Comment thread packages/wasm/src/services/storage/service.ts
@maycon-mello maycon-mello force-pushed the DCKA-5493-support-node-js-runtime-in-wasm-storage-service branch from f712f25 to 23be5ae Compare July 3, 2026 17:51
@maycon-mello maycon-mello merged commit 023b5d6 into master Jul 8, 2026
8 checks passed
@maycon-mello maycon-mello deleted the DCKA-5493-support-node-js-runtime-in-wasm-storage-service branch July 8, 2026 13:20
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.

3 participants