Skip to content

Commit

Permalink
Fix cli command name (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
finn-orsini committed May 2, 2022
1 parent 1144796 commit 1d85816
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ This changelog format is largely based on [Keep A Changelog](https://keepachange

#### 🔨 Chores & Documentation

## [0.1.1] - 2022-05-01

#### 🐛 Bug Fixes

- Fix bug in cli program name after package rename
- Republish with new public repo settings

## [0.1.0] - 2022-04-29

#### 🚀 New Features & Enhancements
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wayfair/one-version",
"version": "0.1.0",
"version": "0.1.1",
"description": "Opinionated Monorepo Dependency Management CLI",
"bin": "src/index.js",
"main": "src/index.js",
Expand Down
24 changes: 12 additions & 12 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
#! /usr/bin/env node
const {Command} = require('commander');
const {version} = require('../package.json');
const {check} = require('./check');
const chalk = require('chalk');
const { Command } = require("commander");
const { version } = require("../package.json");
const { check } = require("./check");
const chalk = require("chalk");

const program = new Command();

program
.name('one-version-rule')
.usage('command [options]')
.version(version, '-v, --version');
.name("one-version")
.usage("command [options]")
.version(version, "-v, --version");

program
.command('check')
.command("check")
.description(
'Verify that only one version of each dependency exists in a monorepo'
"Verify that only one version of each dependency exists in a monorepo"
)
.option('-p, --packageManager <type>', 'package manager', 'pnpm')
.action(({packageManager}) => {
.option("-p, --packageManager <type>", "package manager", "pnpm")
.action(({ packageManager }) => {
try {
check({packageManager});
check({ packageManager });
} catch (e) {
console.log(chalk.red(e.message));
process.exit(1);
Expand Down

0 comments on commit 1d85816

Please sign in to comment.