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

changelog_output

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

changelog_output - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

39

cli.js

@@ -99,7 +99,8 @@ #!/usr/bin/env node

function getCommitsFromVersion(data) {
const versionRegex = /\d.\d.\d/g
const versionRegex = /\[(\d.\d.\d)\]/g
const versions = data.match(versionRegex)
// RegExp for \s\S needs additional slash as being stripped
version = versions[0]
const allCommitsRegex = RegExp(versions[0] + '([\\s\\S]*?)' + versions[1], 'gm')
const version0 = versions[0].replace('[', 'v').replace(']', '')
const version1 = versions[1].replace('[', 'v').replace(']', '')
const allCommitsRegex = RegExp(version0 + '([\\s\\S]*?)' + version1, 'gm')
const allCommits = data.match(allCommitsRegex)

@@ -110,21 +111,19 @@ const commitRegex = /\*\*([\s\S]*?)\n/g

for (let i = 0; i < allCommits.length; i++) {
const match = allCommits[i].match(commitRegex)
const match = allCommits[0].match(commitRegex)
if (match && match.length > 0) {
for (let m = 0; m < match.length; m++) {
const issue = match[m]
currentCharCount = currentCharCount + issue.length
if (match && match.length > 0) {
for (let m = 0; m < match.length; m++) {
const issue = match[m]
currentCharCount = currentCharCount + issue.length
if (currentCharCount > slackCharSafeLimit) {
++issueCount
currentCharCount = 0
}
if (issues[issueCount]) {
issues[issueCount].push(issue)
} else {
issues.push([])
issues[issueCount].push(issue)
}
if (currentCharCount > slackCharSafeLimit) {
++issueCount
currentCharCount = 0
}
if (issues[issueCount]) {
issues[issueCount].push(issue)
} else {
issues.push([])
issues[issueCount].push(issue)
}
}

@@ -195,2 +194,4 @@ }

console.warn('Output data', blocks)
if (slackPath) {

@@ -197,0 +198,0 @@ axios({

{
"name": "changelog_output",
"version": "1.0.5",
"version": "1.0.6",
"description": "",

@@ -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