npm-scripts-versioning
Advanced tools
@@ -26,7 +26,10 @@ #!/usr/bin/env node | ||
| const fs = require('fs'); | ||
| const { files, version } = require('./package.json'); | ||
| const fs = require('fs'); | ||
| const path = require('path'); | ||
| const process = require('process'); | ||
| const { files, version } = require(path.join(process.cwd(), 'package.json')); | ||
| const filePaths = pkg.files.filter((filePath) => (filePath.startsWith("!") === false)); | ||
@@ -36,3 +39,3 @@ | ||
| if (fs.existsSync('./package-lock.json')) { | ||
| if (fs.existsSync('package-lock.json')) { | ||
| filePaths.push('package-lock.json'); | ||
@@ -39,0 +42,0 @@ } |
@@ -26,6 +26,9 @@ #!/usr/bin/env node | ||
| const { version } = require('./package.json'); | ||
| const path = require('path'); | ||
| const process = require('process'); | ||
| const { version } = require(path.join(process.cwd(), 'package.json')); | ||
| if (!which('git')) { | ||
@@ -32,0 +35,0 @@ echo("git executable not found! Install git and try again."); |
@@ -26,7 +26,10 @@ #!/usr/bin/env node | ||
| const escapeStringRegexp = require('escape-string-regexp'); | ||
| const { name, files, version } = require('./package.json'); | ||
| const escapeStringRegexp = require('escape-string-regexp'); | ||
| const path = require('path'); | ||
| const process = require('process'); | ||
| const { name, files, version } = require(path.join(process.cwd(), 'package.json')); | ||
| const filePaths = files.filter((filePath) => (filePath.startsWith("!") === false)); | ||
@@ -33,0 +36,0 @@ |
+1
-1
| { | ||
| "name": "npm-scripts-versioning", | ||
| "version": "1.0.0-beta.2", | ||
| "version": "1.0.0-beta.3", | ||
| "description": "", | ||
@@ -5,0 +5,0 @@ "authors": [ |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
9007
3.27%118
5.36%5
150%