Socket
Socket
Sign inDemoInstall

bare-fs

Package Overview
Dependencies
Maintainers
2
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bare-fs - npm Package Compare versions

Comparing version 1.6.0 to 1.6.1

174

index.js

@@ -380,20 +380,3 @@ const { Readable, Writable } = require('streamx')

const data = {
dev: 0,
mode: 0,
nlink: 0,
uid: 0,
gid: 0,
rdev: 0,
ino: 0,
size: 0,
blksize: 0,
blocks: 0,
flags: 0,
gen: 0,
atim: 0,
mtim: 0,
ctim: 0,
birthtim: 0
}
const data = new Array(Stats.length)

@@ -404,3 +387,3 @@ const req = getReq()

if (err) cb(err, null)
else cb(null, new Stats(data))
else cb(null, new Stats(...data))
}

@@ -416,20 +399,3 @@

const data = {
dev: 0,
mode: 0,
nlink: 0,
uid: 0,
gid: 0,
rdev: 0,
ino: 0,
size: 0,
blksize: 0,
blocks: 0,
flags: 0,
gen: 0,
atim: 0,
mtim: 0,
ctim: 0,
birthtim: 0
}
const data = new Array(Stats.length)

@@ -439,3 +405,3 @@ const res = binding.statSync(path, data)

return new Stats(data)
return new Stats(...data)
}

@@ -452,20 +418,3 @@

const data = {
dev: 0,
mode: 0,
nlink: 0,
uid: 0,
gid: 0,
rdev: 0,
ino: 0,
size: 0,
blksize: 0,
blocks: 0,
flags: 0,
gen: 0,
atim: 0,
mtim: 0,
ctim: 0,
birthtim: 0
}
const data = new Array(Stats.length)

@@ -476,3 +425,3 @@ const req = getReq()

if (err) cb(err, null)
else cb(null, new Stats(data))
else cb(null, new Stats(...data))
}

@@ -488,20 +437,3 @@

const data = {
dev: 0,
mode: 0,
nlink: 0,
uid: 0,
gid: 0,
rdev: 0,
ino: 0,
size: 0,
blksize: 0,
blocks: 0,
flags: 0,
gen: 0,
atim: 0,
mtim: 0,
ctim: 0,
birthtim: 0
}
const data = new Array(Stats.length)

@@ -511,3 +443,3 @@ const res = binding.lstatSync(path, data)

return new Stats(data)
return new Stats(...data)
}

@@ -528,20 +460,3 @@

const data = {
dev: 0,
mode: 0,
nlink: 0,
uid: 0,
gid: 0,
rdev: 0,
ino: 0,
size: 0,
blksize: 0,
blocks: 0,
flags: 0,
gen: 0,
atim: 0,
mtim: 0,
ctim: 0,
birthtim: 0
}
const data = new Array(Stats.length)

@@ -552,3 +467,3 @@ const req = getReq()

if (err) cb(err, null)
else cb(null, new Stats(data))
else cb(null, new Stats(...data))
}

@@ -568,20 +483,3 @@

const data = {
dev: 0,
mode: 0,
nlink: 0,
uid: 0,
gid: 0,
rdev: 0,
ino: 0,
size: 0,
blksize: 0,
blocks: 0,
flags: 0,
gen: 0,
atim: 0,
mtim: 0,
ctim: 0,
birthtim: 0
}
const data = new Array(Stats.length)

@@ -591,3 +489,3 @@ const res = binding.fstatSync(fd, data)

return new Stats(data)
return new Stats(...data)
}

@@ -785,2 +683,6 @@

const {
withFileTypes = false
} = opts
opendir(path, opts, async (err, dir) => {

@@ -790,3 +692,3 @@ if (err) return cb(err, null)

dir
.on('data', (entry) => result.push(entry))
.on('data', (entry) => result.push(withFileTypes ? entry : entry.name))
.on('error', (err) => cb(err, null))

@@ -966,23 +868,21 @@ .on('end', () => cb(null, result))

class Stats {
constructor (props) {
this.dev = props.dev
this.mode = props.mode
this.nlink = props.nlink
this.uid = props.uid
this.gid = props.gid
this.rdev = props.rdev
this.ino = props.ino
this.size = props.size
this.blksize = props.blksize
this.blocks = props.blocks
this.flags = props.flags
this.gen = props.gen
this.atimeMs = props.atim
this.mtimeMs = props.mtim
this.ctimeMs = props.ctim
this.birthtimeMs = props.birthtim
this.atime = new Date(props.atim)
this.mtime = new Date(props.mtim)
this.ctime = new Date(props.ctim)
this.birthtime = new Date(props.birthtim)
constructor (dev, mode, nlink, uid, gid, rdev, blksize, ino, size, blocks, atimeMs, mtimeMs, ctimeMs, birthtimeMs) {
this.dev = dev
this.mode = mode
this.nlink = nlink
this.uid = uid
this.gid = gid
this.rdev = rdev
this.blksize = blksize
this.ino = ino
this.size = size
this.blocks = blocks
this.atimeMs = atimeMs
this.mtimeMs = mtimeMs
this.ctimeMs = ctimeMs
this.birthtimeMs = birthtimeMs
this.atime = new Date(atimeMs)
this.mtime = new Date(mtimeMs)
this.ctime = new Date(ctimeMs)
this.birthtime = new Date(birthtimeMs)
}

@@ -1166,3 +1066,3 @@

close (cb) {
close (cb = noop) {
if (this._closed) return

@@ -1169,0 +1069,0 @@

{
"name": "bare-fs",
"version": "1.6.0",
"version": "1.6.1",
"description": "Native file system for Javascript",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

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