+8
-7
@@ -66,2 +66,8 @@ #!/usr/bin/env node | ||
| } else if (stat.isDirectory() && dest && fs.statSync(dest).isDirectory()) { | ||
| const cjsDest = path.resolve(process.cwd(), dest); | ||
| process.on('exit', () => { | ||
| const cjsPackage = path.join(cjsDest, 'package.json'); | ||
| if (!fs.existsSync(cjsPackage)) | ||
| fs.writeFileSync(cjsPackage, JSON.stringify({type: 'commonjs'})); | ||
| }); | ||
| const mkdir = dir => { | ||
@@ -76,7 +82,2 @@ try{ fs.mkdirSync(dir); } | ||
| }; | ||
| const cjsFolder = path.resolve(process.cwd(), dest); | ||
| const cjsPackage = path.join(cjsFolder, 'package.json'); | ||
| if (!fs.existsSync(cjsPackage)) | ||
| fs.writeFileSync(cjsPackage, JSON.stringify({type: 'commonjs'})); | ||
| fs.writeFileSync(dest, ascjs(source)); | ||
| (function walkThrough(source, dest) { | ||
@@ -114,3 +115,3 @@ fs.readdir(source, (err, files) => { | ||
| path.resolve(process.cwd(), source), | ||
| cjsFolder | ||
| cjsDest | ||
| )); | ||
@@ -129,2 +130,2 @@ } else { | ||
| }); | ||
| } | ||
| } |
+1
-1
| { | ||
| "name": "ascjs", | ||
| "version": "3.1.1", | ||
| "version": "3.1.2", | ||
| "description": "ES2015 to CommonJS import/export transformer", | ||
@@ -5,0 +5,0 @@ "bin": "bin.js", |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
304
0.66%14795
-0.01%