Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@livestorm/cli

Package Overview
Dependencies
Maintainers
5
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@livestorm/cli - npm Package Compare versions

Comparing version
1.2.0
to
1.3.0
+1
-1
package.json
{
"name": "@livestorm/cli",
"version": "1.2.0",
"version": "1.3.0",
"description": "CLI that allows you to build and deploy your Livestorm plugin",

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

const { execSync } = require('child_process')
const { default: fetch } = require('node-fetch')
const prompts = require('prompts')

@@ -7,10 +6,4 @@ const semverGte = require('semver/functions/gte')

const configStore = require('../helpers/configStore.js')
const checkCurrentVersion = require('./version').getModuleVersion
const { checkCurrentVersion, checkLatestVersion } = require('./version')
async function checkLatestVersion() {
const response = await fetch('https://registry.npmjs.org/@livestorm/cli')
const json = await response.json()
return json['dist-tags']['latest']
}
async function checkCandidateForUpgrade() {

@@ -51,4 +44,3 @@ try {

console.log('Upgrading @livestorm/cli to the latest version ...')
execSync('yarn global upgrade @livestorm/cli@latest')
console.log('All done 🙌')
execSync('yarn global upgrade @livestorm/cli@latest', { stdio: 'inherit' })
}

@@ -55,0 +47,0 @@

const fs = require('fs')
const path = require('path');
const path = require('path')
const { default: fetch } = require('node-fetch')
const semverGte = require('semver/functions/gte')
function getModuleVersion() {
function checkCurrentVersion() {
const file = fs.readFileSync(path.resolve(__dirname, '../../package.json'), 'utf8')

@@ -9,9 +11,24 @@ return JSON.parse(file).version

function printModuleVersion() {
console.log(getModuleVersion())
async function checkLatestVersion() {
const response = await fetch('https://registry.npmjs.org/@livestorm/cli')
const json = await response.json()
return json['dist-tags']['latest']
}
async function printModuleVersion() {
const currentVersion = checkCurrentVersion()
const latestVersion = await checkLatestVersion()
console.log(`Current version: ${currentVersion}`)
if (semverGte(currentVersion, latestVersion)) {
return console.log('You are using the latest version')
}
console.log(`You can upgrade to ${latestVersion} with \`livestorm upgrade\``)
}
module.exports = {
getModuleVersion,
printModuleVersion
checkCurrentVersion,
printModuleVersion,
checkLatestVersion
}