🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

@muhammedv/powersync-attachments-for-node

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@muhammedv/powersync-attachments-for-node

An PowerSync library to manage attachments for TypeScript and React Native apps - Fixed version for Node.js compatibility

latest
Source
npmnpm
Version
2.3.1
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

@muhammedv/powersync-attachments-for-node

This is a fixed version of @powersync/attachments that resolves Node.js compatibility issues.

What was fixed

1. ES Module Import Issues

  • Fixed relative imports in lib/index.js and lib/AbstractAttachmentQueue.js to include .js extensions
  • Original: export * from './Schema'
  • Fixed: export * from './Schema.js'

2. Node.js Compatibility

  • Replaced FileReader (browser API) with Node.js Buffer for blob-to-base64 conversion
  • Original: Used FileReader which doesn't exist in Node.js
  • Fixed: Used Buffer.from(arrayBuffer).toString('base64')

3. File Extension Handling

  • Updated all import statements to include proper file extensions for ES modules

Installation

npm install @muhammedv/powersync-attachments-for-node

Usage

Replace the original package import:

// Before
import { AbstractAttachmentQueue } from '@powersync/attachments';

// After
import { AbstractAttachmentQueue } from '@muhammedv/powersync-attachments-for-node';

Changes Made

  • lib/index.js: Added .js extensions to all export statements
  • lib/AbstractAttachmentQueue.js:
    • Added .js extensions to import statements
    • Replaced FileReader with Buffer for base64 conversion
  • package.json: Updated name and version to avoid conflicts

License

Same as original: Apache-2.0

Original Package

This is a fork of @powersync/attachments version 2.3.1 with Node.js compatibility fixes.

FAQs

Package last updated on 02 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts