Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
fix: rename to oclif
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Feb 13, 2018
1 parent 4e4e500 commit 20d4584
Show file tree
Hide file tree
Showing 13 changed files with 119 additions and 98 deletions.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
- image: node:latest
working_directory: ~/cli
environment:
NYC: "yarn exec nyc -- --nycrc-path node_modules/@anycli/nyc-config/.nycrc"
NYC: "yarn exec nyc -- --nycrc-path node_modules/@oclif/nyc-config/.nycrc"
MOCHA_FILE: "reports/mocha.xml"
steps:
- checkout
Expand All @@ -15,7 +15,7 @@ jobs:
- v0-yarn-{{checksum ".circleci/config.yml"}}-{{ checksum "yarn.lock"}}
- v0-yarn-{{checksum ".circleci/config.yml"}}
- run: .circleci/greenkeeper
- run: yarn add -D nyc@11 @anycli/nyc-config@0 mocha-junit-reporter@1 @commitlint/cli@6 @commitlint/config-conventional@6
- run: yarn add -D nyc@11 @oclif/nyc-config@0 mocha-junit-reporter@1 @commitlint/cli@6 @commitlint/config-conventional@6
- run: |
mkdir -p reports
$NYC yarn test --reporter mocha-junit-reporter
Expand All @@ -34,11 +34,11 @@ jobs:
- add_ssh_keys
- checkout
- restore_cache: *restore_cache
- run: yarn global add @anycli/semantic-release@1 semantic-release@12
- run: yarn global add @oclif/semantic-release@1 semantic-release@12
- run: yarn --frozen-lockfile
- run: |
export PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH
semantic-release -e @anycli/semantic-release
semantic-release -e @oclif/semantic-release
- save_cache:
key: v0-yarn-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}}
paths:
Expand All @@ -48,7 +48,7 @@ jobs:

workflows:
version: 2
"@anycli/command":
"@oclif/command":
jobs:
- node-latest
- node-8
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "anycli"
"extends": "oclif"
}
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
@anycli/command
@oclif/command
===============

anycli base command
oclif base command

[![Version](https://img.shields.io/npm/v/@anycli/command.svg)](https://npmjs.org/package/@anycli/command)
[![CircleCI](https://circleci.com/gh/anycli/command/tree/master.svg?style=svg)](https://circleci.com/gh/anycli/command/tree/master)
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/anycli/command?branch=master&svg=true)](https://ci.appveyor.com/project/heroku/command/branch/master)
[![Codecov](https://codecov.io/gh/anycli/command/branch/master/graph/badge.svg)](https://codecov.io/gh/anycli/command)
[![Greenkeeper](https://badges.greenkeeper.io/anycli/command.svg)](https://greenkeeper.io/)
[![Known Vulnerabilities](https://snyk.io/test/npm/@anycli/command/badge.svg)](https://snyk.io/test/npm/@anycli/command)
[![Downloads/week](https://img.shields.io/npm/dw/@anycli/command.svg)](https://npmjs.org/package/@anycli/command)
[![License](https://img.shields.io/npm/l/@anycli/command.svg)](https://github.com/anycli/command/blob/master/package.json)
[![Version](https://img.shields.io/npm/v/@oclif/command.svg)](https://npmjs.org/package/@oclif/command)
[![CircleCI](https://circleci.com/gh/oclif/command/tree/master.svg?style=svg)](https://circleci.com/gh/oclif/command/tree/master)
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/oclif/command?branch=master&svg=true)](https://ci.appveyor.com/project/heroku/command/branch/master)
[![Codecov](https://codecov.io/gh/oclif/command/branch/master/graph/badge.svg)](https://codecov.io/gh/oclif/command)
[![Greenkeeper](https://badges.greenkeeper.io/oclif/command.svg)](https://greenkeeper.io/)
[![Known Vulnerabilities](https://snyk.io/test/npm/@oclif/command/badge.svg)](https://snyk.io/test/npm/@oclif/command)
[![Downloads/week](https://img.shields.io/npm/dw/@oclif/command.svg)](https://npmjs.org/package/@oclif/command)
[![License](https://img.shields.io/npm/l/@oclif/command.svg)](https://github.com/oclif/command/blob/master/package.json)
6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ cache:

install:
- ps: Install-Product node $env:nodejs_version x64
- yarn add -D nyc@11 @anycli/nyc-config@0
- yarn add -D nyc@11 @oclif/nyc-config@0
test_script:
- .\node_modules\.bin\nyc --nycrc-path node_modules/@anycli/nyc-config/.nycrc yarn test
- .\node_modules\.bin\nyc --nycrc-path node_modules/@oclif/nyc-config/.nycrc yarn test
after_test:
- .\node_modules\.bin\nyc --nycrc-path node_modules/@anycli/nyc-config/.nycrc report --reporter text-lcov > coverage.lcov
- .\node_modules\.bin\nyc --nycrc-path node_modules/@oclif/nyc-config/.nycrc report --reporter text-lcov > coverage.lcov
- ps: |
$env:PATH = 'C:\msys64\usr\bin;' + $env:PATH
Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
Expand Down
2 changes: 1 addition & 1 deletion bin/run
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require('ts-node/register')
require('../src').run()
.catch(require('@anycli/errors/handle'))
.catch(require('@oclif/errors/handle'))

// const {Command, flags, parse} = require('../src')

Expand Down
2 changes: 1 addition & 1 deletion example/ls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import * as fs from 'fs'

import Command, {flags} from '..' // use @anycli/command outside this repo
import Command, {flags} from '..' // use @oclif/command outside this repo

class LS extends Command {
static flags = {
Expand Down
29 changes: 19 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
{
"name": "@anycli/command",
"description": "anycli base command",
"name": "@oclif/command",
"description": "oclif base command",
"version": "1.2.19",
"author": "Jeff Dickey @jdxcode",
"bugs": "https://github.com/anycli/command/issues",
"bugs": "https://github.com/oclif/command/issues",
"anycli": {
"scope": "anycli",
"scope": "oclif",
"devPlugins": [
"@anycli/plugin-plugins",
"@anycli/plugin-not-found",
"@anycli/plugin-help"
]
},
"oclif": {
"scope": "oclif",
"devPlugins": [
"@anycli/plugin-plugins",
"@anycli/plugin-not-found",
"@anycli/plugin-help"
]
},
"dependencies": {
"@anycli/parser": "^3.2.6"
"@oclif/parser": "^3.2.6"
},
"devDependencies": {
"@anycli/config": "^1.3.43",
"@anycli/errors": "^0.2.2",
"@anycli/plugin-help": "^0.7.2",
"@anycli/plugin-not-found": "^0.1.19",
"@anycli/plugin-plugins": "^0.2.15",
"@anycli/tslint": "^0.2.7",
"@oclif/config": "^1.3.43",
"@oclif/errors": "^1.0.1",
"@oclif/tslint": "^0.2.7",
"@types/chai": "^4.1.2",
"@types/mocha": "^2.2.48",
"@types/node": "^9.4.1",
Expand All @@ -38,13 +47,13 @@
"files": [
"/lib"
],
"homepage": "https://github.com/anycli/command",
"homepage": "https://github.com/oclif/command",
"keywords": [
"anycli"
"oclif"
],
"license": "MIT",
"main": "lib/index.js",
"repository": "anycli/command",
"repository": "oclif/command",
"scripts": {
"build": "rm -rf lib && tsc",
"lint": "concurrently -p command \"tsc -p test --noEmit\" \"tslint -p test\"",
Expand Down
10 changes: 5 additions & 5 deletions src/command.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// tslint:disable no-implicit-dependencies
const pjson = require('../package.json')
import * as Config from '@anycli/config'
import * as Errors from '@anycli/errors'
import * as Parser from '@anycli/parser'
import * as Config from '@oclif/config'
import * as Errors from '@oclif/errors'
import * as Parser from '@oclif/parser'
import Help from '@anycli/plugin-help'
import {inspect} from 'util'

Expand Down Expand Up @@ -93,7 +93,7 @@ export default abstract class Command {

protected parse<F, A extends {[name: string]: any}>(options?: Parser.Input<F>, argv = this.argv): Parser.Output<F, A> {
if (!options) options = this.constructor as any
return require('@anycli/parser').parse(argv, {context: this, ...options})
return require('@oclif/parser').parse(argv, {context: this, ...options})
}

protected async catch(err: any) {
Expand All @@ -105,7 +105,7 @@ export default abstract class Command {
}
protected async finally(_: Error | undefined) {
try {
await require('@anycli/errors').config.errorLogger.flush()
await require('@oclif/errors').config.errorLogger.flush()
// tslint:disable-next-line no-console
} catch (err) { console.error(err) }
}
Expand Down
6 changes: 3 additions & 3 deletions src/flags.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {IConfig} from '@anycli/config'
import * as Parser from '@anycli/parser'
import {IConfig} from '@oclif/config'
import * as Parser from '@oclif/parser'
import Help from '@anycli/plugin-help'

import {Command} from '.'
Expand Down Expand Up @@ -58,7 +58,7 @@ export {_enum as enum}

const stringFlag = build({})
export {stringFlag as string}
export {boolean} from '@anycli/parser/lib/flags'
export {boolean} from '@oclif/parser/lib/flags'

export const version = (opts: Partial<Parser.flags.IBooleanFlag<boolean>> = {}) => {
return Parser.flags.boolean({
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Config from '@anycli/config'
import * as Config from '@oclif/config'

import {Command, flags} from '.'

Expand Down
20 changes: 10 additions & 10 deletions test/command.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Config from '@anycli/config'
import * as Config from '@oclif/config'
import {expect, fancy} from 'fancy-test'

import Base, {flags} from '../src'
Expand Down Expand Up @@ -84,7 +84,7 @@ describe('command', () => {
// expect(await c.load()).to.have.property('run')
// delete c.load
// expect(c).to.deep.equal({
// _base: `@anycli/command@${pjson.version}`,
// _base: `@oclif/command@${pjson.version}`,
// id: 'foo:bar',
// type: 'mytype',
// hidden: true,
Expand Down Expand Up @@ -136,7 +136,7 @@ describe('command', () => {
// expect(await c.load()).to.have.property('run')
// delete c.load
// expect(c).to.deep.equal({
// _base: `@anycli/command@${pjson.version}`,
// _base: `@oclif/command@${pjson.version}`,
// id: undefined,
// type: undefined,
// hidden: undefined,
Expand All @@ -160,7 +160,7 @@ describe('command', () => {
// expect(await c.load()).to.have.property('run')
// delete c.load
// expect(c).to.deep.equal({
// _base: `@anycli/command@${pjson.version}`,
// _base: `@oclif/command@${pjson.version}`,
// type: undefined,
// id: undefined,
// hidden: undefined,
Expand Down Expand Up @@ -220,13 +220,13 @@ describe('command', () => {
})
.catch(/EEXIT: 0/)
.it('--help', ctx => {
expect(ctx.stdout).to.contain(`anycli base command
expect(ctx.stdout).to.contain(`oclif base command
USAGE
$ @anycli/command [COMMAND]
$ @oclif/command [COMMAND]
COMMANDS
help display help for @anycli/command
help display help for @oclif/command
plugins list installed plugins
`)
Expand All @@ -241,13 +241,13 @@ COMMANDS
.catch(/EEXIT: 0/)
.it('-h', ctx => {
// expect(process.exitCode).to.equal(0)
expect(ctx.stdout).to.equal(`anycli base command
expect(ctx.stdout).to.equal(`oclif base command
USAGE
$ @anycli/command [COMMAND]
$ @oclif/command [COMMAND]
COMMANDS
help display help for @anycli/command
help display help for @oclif/command
plugins list installed plugins
`)
Expand Down
2 changes: 1 addition & 1 deletion tslint.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "@anycli/tslint"
"extends": "@oclif/tslint"
}
Loading

0 comments on commit 20d4584

Please sign in to comment.