New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@zenfs/core

Package Overview
Dependencies
Maintainers
0
Versions
165
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zenfs/core - npm Package Compare versions

Comparing version 1.6.4 to 1.6.5

6

dist/inode.js

@@ -114,4 +114,5 @@ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {

const newBuffer = new Uint8Array(sz_inode);
const buf = ArrayBuffer.isView(buffer) ? buffer.buffer : buffer;
// Fill the new buffer with current data
newBuffer.set(new Uint8Array(ArrayBuffer.isView(buffer) ? buffer.buffer : buffer));
newBuffer.set(new Uint8Array(buf));
/* Add a random ino.

@@ -121,4 +122,3 @@ This will be different from the actual one,

*/
const randomIno = crypto.getRandomValues(new Uint32Array(2));
newBuffer.set(randomIno, sz_inode - 2);
new DataView(newBuffer.buffer).setBigUint64(sz_inode - 2, randomBigInt());
buffer = newBuffer;

@@ -125,0 +125,0 @@ }

import type * as fs from 'node:fs';
import type { ClassLike, OptionalTuple } from 'utilium';
import { type ClassLike, type OptionalTuple } from 'utilium';
import { type AbsolutePath } from './emulation/path.js';

@@ -4,0 +4,0 @@ import { ErrnoError } from './error.js';

@@ -0,1 +1,2 @@

import { randomHex } from 'utilium';
import { dirname, resolve } from './emulation/path.js';

@@ -221,3 +222,9 @@ import { Errno, ErrnoError } from './error.js';

export function randomBigInt() {
return crypto.getRandomValues(new BigUint64Array(1))[0];
try {
return crypto.getRandomValues(new BigUint64Array(1))[0];
}
catch {
// fallback
return BigInt('0x' + randomHex(16 /* 4 bits per char */));
}
}
{
"name": "@zenfs/core",
"version": "1.6.4",
"version": "1.6.5",
"description": "A filesystem, anywhere",

@@ -5,0 +5,0 @@ "funding": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc