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

youzanyun

Package Overview
Dependencies
Maintainers
2
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

youzanyun - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

src/version.js

42

bin/youzanyun.js
#!/usr/bin/env node
const commander = require('commander');
const fs = require("fs-extra");
const path = require("path");
const chalk = require('chalk');
const upload = require('./youzanyun-upload');
const save = require('./youzanyun-save');
const { promiseExec } = require('../src/utils/run');
const { logger } = require('../src/utils/logger');
const package = require('../package.json');
const checkVersion = require('../src/version');
commander
.version(package.version)
.usage('<command> [options]');
commander
.command('upload')

@@ -21,28 +22,7 @@ .action(upload);

async function checkVersion () {
try {
const versions = await promiseExec('npm view youzanyun versions --json', {
cwd: '',
});
const versionList = JSON.parse(versions);
const leatestVersion = versionList.pop();
const packagePath = path.resolve(__dirname, '../package.json');
const packageInfo = await fs.readFile(packagePath, "utf8");
const currentVersion = JSON.parse(packageInfo).version;
if (currentVersion !== leatestVersion) {
logger.warn('version update:');
console.log(' ┌---------------------------------------------┐')
console.log(` ├ Update aviailable ${currentVersion} -> ` + chalk.blue(leatestVersion) + ' ┤')
console.log(' ├ Run ' + chalk.yellow('npm i -g youzanyun') + ' to update ┤')
console.log(' └---------------------------------------------┘')
}
commander.parse(process.argv);
} catch (error) {
console.log(error)
checkVersion(() => {
commander.parse(process.argv);
if(commander.args.length==0){
commander.help();
}
}
checkVersion();
});
{
"name": "youzanyun",
"version": "0.0.5",
"version": "0.0.6",
"description": "有赞云工具",

@@ -18,2 +18,3 @@ "main": "./lib/index.js",

"lodash": "^4.17.4",
"ora": "^3.2.0",
"path": "^0.12.7",

@@ -20,0 +21,0 @@ "qiniu": "^7.2.1",

@@ -50,9 +50,2 @@ const path = require("path");

/* const info = await promiseSpawm('git', ['remote', '-v'], {
cwd: process.cwd(),
});
console.log('info', info)
const appNameArr = info.split('/').pop().split('.');
const appName = appNameArr.slice(0, appNameArr.length - 1).join('/');
console.log('appName', appName) */
const appName = getGitInfo().appName;

@@ -59,0 +52,0 @@

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