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

complan

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

complan - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

reports/jhudson8/smocks-magellan-nightwatch/complexity-report.json

3

index.js
#!/usr/bin/env node
'use strict'
const Debug = require('debug')('main')

@@ -32,3 +33,3 @@ const Program = require('commander')

}).then(function (path) {
var complexityReport = generateReport(path)
let complexityReport = generateReport(path, reportsPath)
Debug(JSON.stringify(complexityReport, null, 3))

@@ -35,0 +36,0 @@ }).catch(function (err) {

@@ -0,1 +1,2 @@

'use strict'
const Debug = require('debug')('clone')

@@ -2,0 +3,0 @@ const GitClone = require('git-clone')

@@ -0,1 +1,3 @@

'use strict'
const Debug = require('debug')('computeComplexity')
const Path = require('path')

@@ -6,6 +8,5 @@ const Promise = require('bluebird')

module.exports = function computeComplexity (paths, reportsPath) {
var jsonPath = Path.join(process.cwd(), 'cc.json')
var jsonReportPath = Path.join(reportsPath, 'complexity-report.json')
var crPath = Path.resolve(process.execPath, '../..', 'lib/node_modules/complan/node_modules/.bin/cr')
var cmd = crPath + ' -l -w -f json -e -x node_modules -o ' + jsonReportPath + ' ' + paths.join(' ')
const jsonPath = Path.join(process.cwd(), 'cc.json')
const crPath = Path.resolve(process.execPath, '../..', 'lib/node_modules/complan/node_modules/.bin/cr')
const cmd = crPath + ' -l -w -f json -e -x node_modules -o ' + jsonPath + ' ' + paths.join(' ')
return new Promise(function (resolve, reject) {

@@ -16,3 +17,3 @@ Exec(cmd, function (err, stdout, stderr) {

}
console.log('Successfully wrote ' + jsonReportPath)
Debug('Successfully wrote ' + jsonPath)
resolve(jsonPath)

@@ -19,0 +20,0 @@ })

@@ -1,7 +0,9 @@

const Fs = require('fs')
'use strict'
const Fse = require('fs-extra')
const Path = require('path')
module.exports = function (path) {
module.exports = function (path, reportsPath) {
var complexityReport = {}
complexityReport.report = []
var jsonReport = JSON.parse(Fs.readFileSync(path, 'utf-8'))
const jsonReport = JSON.parse(Fse.readFileSync(path, 'utf-8'))
jsonReport.reports.forEach(function (report) {

@@ -18,3 +20,5 @@ var rep = {}

complexityReport.maintainability = jsonReport.maintainability
Fse.writeFileSync(Path.join(reportsPath, 'complexity-report.json'), JSON.stringify(complexityReport, null, 3))
Fse.removeSync(Path.join(process.cwd(), 'cc.json'))
return complexityReport
}

@@ -0,1 +1,2 @@

'use strict'
const Debug = require('debug')('getJsFiles')

@@ -2,0 +3,0 @@ const Dir = require('node-dir')

@@ -0,1 +1,2 @@

'use strict'
const Debug = require('debug')('util')

@@ -18,4 +19,4 @@ const Fse = require('fs-extra')

cleanupClonedRepos: function () {
const path = Path.join(process.cwd(), 'clonedrepos')
try {
var path = Path.join(process.cwd(), 'clonedrepos')
Debug('Removing:' + path)

@@ -22,0 +23,0 @@ Fse.removeSync(path)

{
"name": "complan",
"version": "1.0.4",
"version": "1.0.5",
"description": "COMPLexity ANalyzer Tool For Javascript",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

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