Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

directory-fixture-provider

Package Overview
Dependencies
Maintainers
1
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

directory-fixture-provider - npm Package Compare versions

Comparing version 1.1.13 to 1.2.0

30

dist/src/index.js

@@ -17,12 +17,24 @@ 'use strict';

var tmpSubFolder = 'directory-fixture-provider-destination';
var unlimitedCurry = require('unlimited-curry');
module.exports = exports = function exports(fixturesRoot) {
module.exports = exports = unlimitedCurry(function (e, parameters) {
var fixturesRoot = parameters.data.returnArray[0];
var commands = parameters.getFrom(1, parameters.data);
var isPermanent = parameters.command.has('permanent');
var permanentParam = isPermanent ? parameters.command.getArguments('permanent')[0][0] : false;
module.fixturesRoot = fixturesRoot;
module._destinationDirecoryRoot = path.join(tmpDir, tmpSubFolder, randomstring.generate({
length: 12,
charset: 'alphabetic'
}));
if (!isPermanent) {
module._destinationDirecoryRoot = path.join(tmpDir, tmpSubFolder, randomstring.generate({
length: 12,
charset: 'alphabetic'
}));
}
if (isPermanent) {
module._destinationDirecoryRoot = path.join(tmpDir, tmpSubFolder, fixturesRoot);
}
return {

@@ -37,3 +49,3 @@ tmpSubFolder: tmpSubFolder,

if (emptyDir(fixturePath)) {
throw String('Please put some files to the ' + fixturePath + ' directory,\nyou might not want to test with no files right?\n ');
throw String('Please put some files to the ' + fixturePath + ' directory,\nyou might not want to test with no files right?');
}

@@ -45,2 +57,6 @@

mkdirp(dir);
if (permanentParam === 'overwrite') {
fsExtra.emptyDirSync(dir);
}
fsExtra.copySync(fixturePath, dir);

@@ -129,3 +145,3 @@

};
};
});

@@ -132,0 +148,0 @@ module.getFixturePath = function () {

{
"name": "directory-fixture-provider",
"version": "1.1.13",
"version": "1.2.0",
"description": "Provides directories for testing.",

@@ -49,3 +49,4 @@ "main": "dist/src/index.js",

"randomstring": "^1.1.5",
"recursive-readdir-sync": "^1.0.6"
"recursive-readdir-sync": "^1.0.6",
"unlimited-curry": "^1.2.0"
},

@@ -52,0 +53,0 @@ "devDependencies": {

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