Comparing version 2.3.44 to 2.3.46
@@ -1,16 +0,17 @@ | ||
// npm version <update_type> | ||
const fs = require('fs'); | ||
const childProcess = require('child_process'); | ||
const logger = require('mii-logger.js'); | ||
const jsonPackageRaw = fs.readFileSync('./package.json', { encoding: 'utf8' }); | ||
const jsonPackage = JSON.parse(jsonPackageRaw); | ||
const json_package = console.jsonFromFile('./package.json') | ||
const new_version = json_package.version.split('.').map((v, index, data) => { | ||
const newVersion = jsonPackage.version.split('.').map((v, index, data) => { | ||
return index == 2 ? ((+v) + 1) : v; | ||
}); | ||
const old_version = json_package.version; | ||
json_package.version = new_version.join('.'); | ||
// console.json({old_version, new_version: json_package.version}) | ||
const oldVersion = jsonPackage.version; | ||
jsonPackage.version = newVersion.join('.'); | ||
// console.json({oldVersion, newVersion: jsonPackage.version}) | ||
console.log(' #version: [' + old_version + '] => [' + json_package.version + ']'); | ||
console.jsonToFile('./package.json', json_package, true); | ||
console.log(' #version: [' + oldVersion + '] => [' + jsonPackage.version + ']'); | ||
fs.writeFileSync('./package.json', JSON.stringify(jsonPackage, null, 2), { encoding: 'utf8' }); | ||
@@ -24,3 +25,3 @@ // return; | ||
postCmds.map((C, index) => { | ||
postCmds[index].res = console.shell.sync(C.cmd); | ||
postCmds[index].res = childProcess.execSync(C.cmd); | ||
}); | ||
@@ -27,0 +28,0 @@ |
"use strict"; | ||
const logger = require('mii-logger.js'); | ||
const json_package = console.jsonFromFile('./package.json'); | ||
const new_version = json_package.version.split('.').map((v, index, data) => { | ||
const fs = require('fs'); | ||
const childProcess = require('child_process'); | ||
const jsonPackageRaw = fs.readFileSync('./package.json', { encoding: 'utf8' }); | ||
const jsonPackage = JSON.parse(jsonPackageRaw); | ||
const newVersion = jsonPackage.version.split('.').map((v, index, data) => { | ||
return index == 2 ? ((+v) + 1) : v; | ||
}); | ||
const old_version = json_package.version; | ||
json_package.version = new_version.join('.'); | ||
console.log(' #version: [' + old_version + '] => [' + json_package.version + ']'); | ||
console.jsonToFile('./package.json', json_package, true); | ||
const oldVersion = jsonPackage.version; | ||
jsonPackage.version = newVersion.join('.'); | ||
console.log(' #version: [' + oldVersion + '] => [' + jsonPackage.version + ']'); | ||
fs.writeFileSync('./package.json', JSON.stringify(jsonPackage, null, 2), { encoding: 'utf8' }); | ||
const postCmds = [ | ||
@@ -15,4 +17,4 @@ { name: 'publish', cmd: 'npm publish', res: '' }, | ||
postCmds.map((C, index) => { | ||
postCmds[index].res = console.shell.sync(C.cmd); | ||
postCmds[index].res = childProcess.execSync(C.cmd); | ||
}); | ||
console.ok(' Done ...'); |
@@ -8,3 +8,3 @@ { | ||
"description": "", | ||
"version": "2.3.44", | ||
"version": "2.3.46", | ||
"scripts": { | ||
@@ -11,0 +11,0 @@ "deploy": "node ./deploy.js", |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
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
56776
1326
17
2