Comparing version
@@ -6,11 +6,12 @@ const gulp = require('gulp'); | ||
gulp.task('build-ts', () => { | ||
return gulp.src('src/**/*.ts') | ||
.pipe(ts({ | ||
"target": "es5", | ||
"module": "commonjs", | ||
"removeComments": false, | ||
"noImplicitAny": false, | ||
"sourceMap": false, | ||
})) | ||
.pipe(gulp.dest('lib')); | ||
return gulp.src([ | ||
'src/**/*.ts', | ||
'!src/**/__tests__/**' | ||
]).pipe(ts({ | ||
"target": "es5", | ||
"module": "commonjs", | ||
"removeComments": false, | ||
"noImplicitAny": false, | ||
"sourceMap": false, | ||
})).pipe(gulp.dest('lib')); | ||
}); |
@@ -190,2 +190,20 @@ "use strict"; | ||
}; | ||
Node.prototype.del = function () { | ||
this.emit('delete', this); | ||
}; | ||
Node.prototype.toJSON = function () { | ||
return { | ||
ino: this.ino, | ||
uid: this.uid, | ||
gid: this.gid, | ||
atime: this.atime.getTime(), | ||
mtime: this.mtime.getTime(), | ||
ctime: this.ctime.getTime(), | ||
perm: this.perm, | ||
mode: this.mode, | ||
nlink: this.nlink, | ||
symlink: this.symlink, | ||
data: this.getString(), | ||
}; | ||
}; | ||
return Node; | ||
@@ -286,2 +304,12 @@ }(events_1.EventEmitter)); | ||
}; | ||
Link.prototype.toJSON = function () { | ||
for (var ch in this.children) { | ||
console.log('ch', ch); | ||
} | ||
return { | ||
steps: this.steps, | ||
ino: this.ino, | ||
children: Object.keys(this.children), | ||
}; | ||
}; | ||
return Link; | ||
@@ -288,0 +316,0 @@ }(events_1.EventEmitter)); |
{ | ||
"name": "memfs", | ||
"version": "2.5.4", | ||
"version": "2.5.5", | ||
"description": "In-memory file-system with Node's fs API.", | ||
@@ -31,2 +31,4 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"jest": "^21.1.0", | ||
"ts-jest": "^21.0.1", | ||
"mocha": "3.4.2", | ||
@@ -43,30 +45,5 @@ "chai": "4.1.0", | ||
"watch": "^1.0.0", | ||
"@types/mocha": "2.2.41", | ||
"@types/chai": "4.0.1", | ||
"@types/node": "8.0.17" | ||
"@types/node": "8.0.17", | ||
"@types/jest": "^20.0.8" | ||
}, | ||
"nyc": { | ||
"per-file": true, | ||
"include": [ | ||
"src/**/*.ts" | ||
], | ||
"exclude": [ | ||
"src/**/*.test.ts" | ||
], | ||
"extension": [ | ||
".ts" | ||
], | ||
"require": [ | ||
"ts-node/register" | ||
], | ||
"reporter": [ | ||
"text", | ||
"json", | ||
"lcov", | ||
"text-summary" | ||
], | ||
"sourceMap": true, | ||
"instrument": true, | ||
"cache": true | ||
}, | ||
"scripts": { | ||
@@ -76,9 +53,19 @@ "build": "npm run build-ts && npm run build-js", | ||
"build-js": "babel src --out-dir lib", | ||
"test": "npm run test-basic-js", | ||
"test-basic-js": "mocha lib/**/**/**/*.test.js", | ||
"test-basic-ts": "mocha --require ts-node/register src/**/**/**/*.test.ts", | ||
"test-watch-ts": "mocha --require ts-node/register src/**/**/**/*.test.ts --watch", | ||
"test-coverage-ts": "nyc --per-file mocha --require ts-node/register --require source-map-support/register --full-trace --bail src/**/**/**/*.test.ts", | ||
"test": "jest", | ||
"test:coverage": "jest --coverage", | ||
"test:watch": "jest --watch", | ||
"watch": "watch 'npm run build' ./src" | ||
}, | ||
"jest": { | ||
"moduleFileExtensions": [ | ||
"ts", | ||
"tsx", | ||
"js", | ||
"jsx" | ||
], | ||
"transform": { | ||
"^.+\\.tsx?$": "<rootDir>/node_modules/ts-jest/preprocessor.js" | ||
}, | ||
"testRegex": ".*/__tests__/.*\\.(test|spec)\\.(jsx?|tsx?)$" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
3
-25%144256
-26.95%15
7.14%23
-42.5%3273
-26.47%