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

majo

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

majo - npm Package Compare versions

Comparing version 0.7.0 to 0.7.1

119

dist/majo.cjs.js

@@ -6,5 +6,4 @@ 'use strict';

var path = _interopDefault(require('path'));
var fs = _interopDefault(require('fs'));
var events = require('events');
var util = require('util');
var fs = _interopDefault(require('fs-extra'));
var glob = _interopDefault(require('fast-glob'));

@@ -48,99 +47,2 @@

var _0777 = parseInt('0777', 8);
var mkdirp = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
function mkdirP (p, opts, f, made) {
if (typeof opts === 'function') {
f = opts;
opts = {};
}
else if (!opts || typeof opts !== 'object') {
opts = { mode: opts };
}
var mode = opts.mode;
var xfs = opts.fs || fs;
if (mode === undefined) {
mode = _0777 & (~process.umask());
}
if (!made) made = null;
var cb = f || function () {};
p = path.resolve(p);
xfs.mkdir(p, mode, function (er) {
if (!er) {
made = made || p;
return cb(null, made);
}
switch (er.code) {
case 'ENOENT':
mkdirP(path.dirname(p), opts, function (er, made) {
if (er) cb(er, made);
else mkdirP(p, opts, cb, made);
});
break;
// In the case of any other error, just see if there's a dir
// there already. If so, then hooray! If not, then something
// is borked.
default:
xfs.stat(p, function (er2, stat) {
// if the stat fails, then that's super weird.
// let the original error be the failure reason.
if (er2 || !stat.isDirectory()) cb(er, made);
else cb(null, made);
});
break;
}
});
}
mkdirP.sync = function sync (p, opts, made) {
if (!opts || typeof opts !== 'object') {
opts = { mode: opts };
}
var mode = opts.mode;
var xfs = opts.fs || fs;
if (mode === undefined) {
mode = _0777 & (~process.umask());
}
if (!made) made = null;
p = path.resolve(p);
try {
xfs.mkdirSync(p, mode);
made = made || p;
}
catch (err0) {
switch (err0.code) {
case 'ENOENT' :
made = sync(path.dirname(p), opts, made);
sync(p, opts, made);
break;
// In the case of any other error, just see if there's a dir
// there already. If so, then hooray! If not, then something
// is borked.
default:
var stat;
try {
stat = xfs.statSync(p);
}
catch (err1) {
throw err0;
}
if (!stat.isDirectory()) throw err0;
break;
}
}
return made;
};
class Wares {

@@ -164,9 +66,2 @@ constructor() {

const readFile = util.promisify(fs.readFile);
const writeFile = util.promisify(fs.writeFile);
const ensureDir = util.promisify(mkdirp);
const removeDir = util.promisify(fs.rmdir);
const outputFile = (file, content, enc) => ensureDir(path.dirname(file)).then(() => writeFile(file, content, enc));
class Majo extends events.EventEmitter {

@@ -237,3 +132,3 @@ constructor() {

const absolutePath = path.resolve(_this.baseDir, stats.path);
return readFile(absolutePath).then(contents => {
return fs.readFile(absolutePath).then(contents => {
const file = {

@@ -306,3 +201,3 @@ contents,

if (clean) {
yield removeDir(destPath);
yield fs.remove(destPath);
}

@@ -316,3 +211,3 @@

return outputFile(target, contents);
return fs.ensureDir(path.dirname(target)).then(() => fs.writeFile(target, contents));
}));

@@ -399,8 +294,4 @@ return _this2;

majo.glob = glob;
majo.readFile = readFile;
majo.writeFile = writeFile;
majo.ensureDir = ensureDir;
majo.outputFile = outputFile;
majo.removeDir = removeDir;
majo.fs = fs;
module.exports = majo;

11

package.json
{
"name": "majo",
"version": "0.7.0",
"version": "0.7.1",
"description": "my badass project",

@@ -17,3 +17,3 @@ "repository": {

"lint": "xo",
"build": "bili --inline --external fast-glob"
"build": "bili"
},

@@ -28,5 +28,2 @@ "author": "egoist <0x142857@gmail.com>",

},
"engines": {
"node": ">=8"
},
"devDependencies": {

@@ -41,3 +38,2 @@ "@babel/core": "^7.0.0",

"jest-cli": "^22.4.3",
"mkdirp": "^0.5.1",
"xo": "^0.18.0"

@@ -60,4 +56,5 @@ },

"dependencies": {
"fast-glob": "^2.2.3"
"fast-glob": "^2.2.3",
"fs-extra": "^7.0.0"
}
}
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