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

@justeat/fozzie-updater

Package Overview
Dependencies
Maintainers
17
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@justeat/fozzie-updater - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

lib/services/changelog/index.js

3

lib/commands/bootstrap.js

@@ -13,4 +13,3 @@ const vorpal = require('vorpal')()

command,
state,
vorpal
state
})

@@ -17,0 +16,0 @@ }

@@ -1,30 +0,23 @@

const fs = require('fs')
const path = require('path')
const log = base.require('log')
const changelog = base.require('services/changelog')
const logFilePath = path.join(process.cwd(), 'CHANGELOG.md')
const changeLog = fs.readFileSync(logFilePath, 'utf8')
module.exports = {
name: 'run',
description: 'run package update',
actions({ command, vorpal }) {
actions({ command, state }) {
command.action((args, cb) => {
vorpal.exec('summary', (summary) => {
const firstInstance = /v\d+.\d+.\d+\n/
const result = changeLog.replace(firstInstance, match => `${summary}\n\n${match}`)
fs.writeFile(logFilePath, result, 'utf8', err => {
if (err) {
return log.error(err)
}
changelog
.compose(state)
.then(
() => {
log.success('Changelog successfully updated')
process.exit(0)
})
})
},
err => log.error(err)
)
cb()
})
cb()
})
}
}

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

const formatLineItem = (type, items=[]) => (
// capitalise line item title
// followed by line items in new line
`### ${type.substr(0, 1).toUpperCase() + type.substr(1)}
${items.map(item => ('- ' + item)).join('\n')}`
)
const changelog = base.require('services/changelog')
const parseLineItems = (lineItems) => (
Object
.keys(lineItems)
.filter(type => lineItems[type].length)
.map(type => formatLineItem(type, lineItems[type]))
.join('\n\n')
)
const summarise = (version, date, lineItems) => (
`v${version}
------------------------------
*${date}*
${parseLineItems(lineItems)}`
)
module.exports = {

@@ -29,12 +8,8 @@ name: 'summary',

command.action((args, cb) => {
const output = summarise(
state.version,
state.date,
state.lineItems
)
cb(output)
const output = changelog.summarise(state)
// add some padding for more readable output
cb(`\n${output}\n`)
})
}
}
}
{
"name": "@justeat/fozzie-updater",
"description": "Common update for use in Fozzie projects.",
"version": "0.2.4",
"version": "0.2.5",
"files": [

@@ -33,2 +33,5 @@ "bin",

],
"scripts": {
"start": "node bin/fozzie-updater.js"
},
"preferGlobal": true,

@@ -35,0 +38,0 @@ "bin": {

@@ -47,7 +47,6 @@ # Fozzie Updater

- Create tag
- Publish to npm on
- Create a release on GitHub on
- Create CHANGELOG.md if missing from directory
- Publish to npm
- Create a release on GitHub
- Allow inline modifier commands e.g. `added "this feature"`
- Version validation
- Tests
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