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

@datreeio/version-compare

Package Overview
Dependencies
Maintainers
7
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datreeio/version-compare - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

17

index.js

@@ -14,2 +14,7 @@ const program = require('commander')

)
.option('-p, --payload <payload>', 'JSON formatted payload of expected and actual code component versions')
.option(
'-f, --file-path <file_path>',
'path to JSON formatted payload of expected and actual code component versions'
)
.option('-u, --pr-url <pull_request_url>', 'pull request url')

@@ -24,3 +29,11 @@ .parse(process.argv)

const versionsPayload = fs.readFileSync(program.filePath, 'utf8')
let versionsPayload
if (program.filePath) {
versionsPayload = fs.readFileSync(program.filePath, 'utf8')
} else if (program.payload) {
versionsPayload = program.payload
} else {
console.log('no payload received')
process.exitCode = 1
}

@@ -53,6 +66,8 @@ const body = {

console.log('datree policy is running, check github for more information - ', program.prUrl)
process.exitCode = 0
})
.catch(err => {
console.log('api failure - ', err.message)
process.exitCode = 1
})
}

2

package.json
{
"name": "@datreeio/version-compare",
"version": "1.0.3",
"version": "1.0.4",
"description": "command line script that runs the datree version compare policy",

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

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