Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

swagit

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagit - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

16

bin/swagit.js
#!/usr/bin/env node
const args = require('args');
const fuzzy = require('fuzzy');
const inquirer = require('inquirer');
const { yellow, magenta } = require('chalk');
inquirer.registerPrompt(
'autocomplete',
require('inquirer-autocomplete-prompt')
);
const checkUpdate = require('../lib/check-update');

@@ -26,9 +32,15 @@ const checkNodeVersion = require('../lib/check-node-version');

const search = branches => (ans, input = '') =>
new Promise(resolve => {
const fuzzyResult = fuzzy.filter(input, branches.map(({ value }) => value));
resolve(fuzzyResult.map(el => el.original));
});
const startCheckout = async branches => {
const { branch } = await inquirer.prompt([
{
type: 'list',
type: 'autocomplete',
name: 'branch',
message: 'Which branch do you want to checkout?',
choices: branches,
source: search(branches),
},

@@ -35,0 +47,0 @@ ]);

33

package.json

@@ -12,3 +12,3 @@ {

},
"version": "0.1.4",
"version": "0.1.5",
"bin": {

@@ -23,3 +23,2 @@ "sg": "./bin/swagit.js",

"scripts": {
"precommit": "lint-staged",
"lint": "eslint bin lib",

@@ -31,17 +30,25 @@ "test": "yarn lint"

"chalk": "^2.4.1",
"inquirer": "^6.0.0",
"node-version": "^1.1.3",
"simple-git": "^1.95.1",
"fuzzy": "^0.1.3",
"inquirer": "^6.2.0",
"inquirer-autocomplete-prompt": "^1.0.1",
"node-version": "^1.2.0",
"simple-git": "^1.107.0",
"update-check": "^1.5.2"
},
"devDependencies": {
"eslint": "^4.19.1",
"eslint-config-yoctol-base": "^0.15.1",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-prettier": "^2.6.0",
"husky": "^0.14.3",
"lint-staged": "^7.2.0",
"prettier": "^1.13.5",
"prettier-package-json": "^1.6.0"
"eslint": "^5.9.0",
"eslint-config-yoctol-base": "^0.18.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-prettier": "^3.0.0",
"eslint-plugin-sort-imports-es6-autofix": "^0.3.0",
"husky": "^1.1.4",
"lint-staged": "^8.0.4",
"prettier": "^1.15.2",
"prettier-package-json": "^2.0.1"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {

@@ -48,0 +55,0 @@ "*.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