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

Commit

Permalink
fix: anycli rename
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Jan 31, 2018
1 parent 527270a commit 72eb874
Show file tree
Hide file tree
Showing 14 changed files with 164 additions and 2,271 deletions.
17 changes: 4 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ jobs:
- v0-yarn-{{checksum ".circleci/config.yml"}}-{{ .Branch }}-{{checksum "yarn.lock"}}
- v0-yarn-{{checksum ".circleci/config.yml"}}-{{ .Branch }}-
- v0-yarn-{{checksum ".circleci/config.yml"}}-master-
- run: .circleci/setup_git
- run: .circleci/yarn
- run: yarn test
- run: curl -s https://codecov.io/bash | bash
- run: .circleci/test
- store_test_results: &store_test_results
path: ~/cli/reports
- save_cache: &save_cache
Expand All @@ -31,25 +28,19 @@ jobs:
steps:
- checkout
- restore_cache: *restore_cache
- run: .circleci/setup_git
- run: .circleci/yarn
- run: yarn test
- run: curl -s https://codecov.io/bash | bash
- run: .circleci/test
- store_test_results: *store_test_results
release:
<<: *test
steps:
- add_ssh_keys
- checkout
- restore_cache: *restore_cache
- run: .circleci/setup_git
- run: .circleci/yarn
- run: yarn add -D @dxcli/semantic-release@1
- run: yarn exec nps release
- run: .circleci/release

workflows:
version: 2
"@dxcli/config":
"@anycli/config":
jobs:
- node-latest
- node-8
Expand Down
22 changes: 0 additions & 22 deletions .circleci/greenkeeper

This file was deleted.

11 changes: 11 additions & 0 deletions .circleci/release
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

set -ex

.circleci/setup_git

PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH

yarn global add @dxcli/semantic-release@1 semantic-release@12
yarn install --frozen-lockfile
semantic-release -e @dxcli/semantic-release
7 changes: 7 additions & 0 deletions .circleci/yarn → .circleci/test
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -ex

.circleci/setup_git

PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH

CLI_ENGINE_UTIL_YARN_ARGS="--frozen-lockfile"
Expand All @@ -20,3 +22,8 @@ yarn install $CLI_ENGINE_UTIL_YARN_ARGS
if [[ "$CLI_ENGINE_GREENKEEPER_BRANCH" == 1 ]]; then
greenkeeper-lockfile-upload
fi

yarn add -D nyc @dxcli/nyc-config
yarn test

curl -s https://codecov.io/bash | bash
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "dxcli"
"extends": "anycli"
}
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
@dxcli/config
=============
@anycli/config
==============

base config object and standard interfaces for dxcli components
base config object and standard interfaces for anycli components

[![Version](https://img.shields.io/npm/v/@dxcli/config.svg)](https://npmjs.org/package/@dxcli/config)
[![CircleCI](https://circleci.com/gh/dxcli/config/tree/master.svg?style=svg)](https://circleci.com/gh/dxcli/config/tree/master)
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/dxcli/config?branch=master&svg=true)](https://ci.appveyor.com/project/heroku/config/branch/master)
[![Codecov](https://codecov.io/gh/dxcli/config/branch/master/graph/badge.svg)](https://codecov.io/gh/dxcli/config)
[![Greenkeeper](https://badges.greenkeeper.io/dxcli/config.svg)](https://greenkeeper.io/)
[![Known Vulnerabilities](https://snyk.io/test/npm/@dxcli/config/badge.svg)](https://snyk.io/test/npm/@dxcli/config)
[![Downloads/week](https://img.shields.io/npm/dw/@dxcli/config.svg)](https://npmjs.org/package/@dxcli/config)
[![License](https://img.shields.io/npm/l/@dxcli/config.svg)](https://github.com/dxcli/config/blob/master/package.json)
[![Version](https://img.shields.io/npm/v/@anycli/config.svg)](https://npmjs.org/package/@anycli/config)
[![CircleCI](https://circleci.com/gh/anycli/config/tree/master.svg?style=svg)](https://circleci.com/gh/anycli/config/tree/master)
[![Appveyor CI](https://ci.appveyor.com/api/projects/status/github/anycli/config?branch=master&svg=true)](https://ci.appveyor.com/project/heroku/config/branch/master)
[![Codecov](https://codecov.io/gh/anycli/config/branch/master/graph/badge.svg)](https://codecov.io/gh/anycli/config)
[![Greenkeeper](https://badges.greenkeeper.io/anycli/config.svg)](https://greenkeeper.io/)
[![Known Vulnerabilities](https://snyk.io/test/npm/@anycli/config/badge.svg)](https://snyk.io/test/npm/@anycli/config)
[![Downloads/week](https://img.shields.io/npm/dw/@anycli/config.svg)](https://npmjs.org/package/@anycli/config)
[![License](https://img.shields.io/npm/l/@anycli/config.svg)](https://github.com/anycli/config/blob/master/package.json)
6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ install:
- ps: Install-Product node $env:nodejs_version x64
- git submodule sync
- git submodule update --init --recursive
- git config --global user.email "dxcli@example.com"
- git config --global user.name "dxcli"
- yarn
- git config --global user.email "anycli@example.com"
- git config --global user.name "anycli"
- yarn add -D nyc @anycli/nyc-config
test_script:
- yarn test
after_test:
Expand Down
3 changes: 1 addition & 2 deletions package-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if (process.env.CI) {
linters.tslint.script = `${linters.tslint.script} --format junit > reports/tslint.xml`
}
// add code coverage reporting with nyc
const nyc = 'nyc --nycrc-path node_modules/@dxcli/nyc-config/.nycrc'
const nyc = 'nyc --nycrc-path node_modules/@anycli/nyc-config/.nycrc'
const nycReport = `${nyc} report --reporter text-lcov > coverage.lcov`
mocha = series(`${nyc} ${mocha}`, nycReport)
}
Expand All @@ -49,6 +49,5 @@ module.exports = {
lint: concurrent(linters),
test,
mocha,
release: 'dxcli-semantic-release -e @dxcli/semantic-release',
},
}
30 changes: 17 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@dxcli/config",
"description": "base config object and standard interfaces for dxcli components",
"name": "@anycli/config",
"description": "base config object and standard interfaces for anycli components",
"version": "0.1.40",
"author": "Jeff Dickey @jdxcode",
"bugs": "https://github.com/dxcli/config/issues",
"bugs": "https://github.com/anycli/config/issues",
"dependencies": {
"cli-ux": "^3.3.8",
"debug": "^3.1.0",
Expand All @@ -13,20 +13,24 @@
"read-pkg": "^3.0.0"
},
"devDependencies": {
"@anycli/tslint": "^0.1.3",
"@commitlint/cli": "^6.0.2",
"@commitlint/config-conventional": "^6.0.2",
"@dxcli/command": "^0.2.5",
"@dxcli/config": "^0.1.37",
"@dxcli/dev": "^2.0.16",
"@dxcli/engine": "^0.1.18",
"@dxcli/nyc-config": "^0.0.4",
"@dxcli/semantic-release": "1",
"@dxcli/tslint": "^0.1.3",
"@dxcli/command": "^0.2.8",
"@dxcli/config": "^0.1.40",
"@heroku-cli/config-edit": "^1.0.4",
"@types/chai": "^4.1.2",
"@types/fs-extra": "^5.0.0",
"@types/load-json-file": "^2.0.7",
"@types/lodash": "^4.14.98",
"@types/mocha": "^2.2.47",
"@types/nock": "^9.1.2",
"@types/node": "^9.4.0",
"@types/node-notifier": "^0.0.28",
"@types/read-pkg": "^3.0.0",
"chai": "^4.1.2",
"eslint": "^4.16.0",
"eslint-config-anycli": "^1.2.1",
"fancy-test": "^0.6.4",
"husky": "^0.14.3",
"mocha": "^5.0.0",
Expand All @@ -42,13 +46,13 @@
"files": [
"/lib"
],
"homepage": "https://github.com/dxcli/config",
"homepage": "https://github.com/anycli/config",
"keywords": [
"dxcli"
"anycli"
],
"license": "MIT",
"main": "lib/index.js",
"repository": "dxcli/config",
"repository": "anycli/config",
"scripts": {
"commitmsg": "commitlint -x @commitlint/config-conventional -e $GIT_PARAMS",
"precommit": "nps lint -l warn",
Expand Down
38 changes: 19 additions & 19 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export type ArchTypes = 'arm' | 'arm64' | 'mips' | 'mipsel' | 'ppc' | 'ppc64' |

export interface IConfig {
/**
* @dxcli/config version
* @anycli/config version
*/
_base: string
/**
Expand Down Expand Up @@ -138,7 +138,7 @@ export interface IConfig {
*/
debug: number
/**
* active @dxcli/engine
* active @anycli/engine
*/
engine: IEngine
/**
Expand All @@ -147,7 +147,7 @@ export interface IConfig {
npmRegistry: string

/**
* a Heroku pre-dxcli plugin
* a Heroku pre-anycli plugin
*/
legacy: boolean

Expand All @@ -170,7 +170,7 @@ export interface ConfigOptions {
baseConfig?: IConfig
}

const debug = require('debug')('@dxcli/config')
const debug = require('debug')('@anycli/config')

export class Config implements IConfig {
/**
Expand Down Expand Up @@ -220,12 +220,12 @@ export class Config implements IConfig {

this.name = this.pjson.name
this.version = this.pjson.version
if (!this.pjson.dxcli) {
if (!this.pjson.anycli) {
this.legacy = true
this.pjson.dxcli = this.pjson['cli-engine'] || {}
this.pjson.anycli = this.pjson['cli-engine'] || {}
}
this.bin = this.pjson.dxcli.bin || base.bin || this.name
this.dirname = this.pjson.dxcli.dirname || base.dirname || this.name
this.bin = this.pjson.anycli.bin || base.bin || this.name
this.dirname = this.pjson.anycli.dirname || base.dirname || this.name
this.userAgent = `${this.name}/${this.version} (${this.platform}-${this.arch}) node-${process.version}`
this.shell = this._shell()
this.debug = this._debug()
Expand All @@ -237,18 +237,18 @@ export class Config implements IConfig {
this.errlog = path.join(this.cacheDir, 'error.log')

this.tsconfig = await this._tsConfig()
if (this.pjson.dxcli.commands) {
this.commandsDir = path.join(this.root, this.pjson.dxcli.commands)
this.commandsDirTS = await this._tsPath(this.pjson.dxcli.commands)
if (this.pjson.anycli.commands) {
this.commandsDir = path.join(this.root, this.pjson.anycli.commands)
this.commandsDirTS = await this._tsPath(this.pjson.anycli.commands)
}
this.hooks = _.mapValues(this.pjson.dxcli.hooks || {}, h => _.castArray(h).map(h => path.join(this.root, h)))
this.hooks = _.mapValues(this.pjson.anycli.hooks || {}, h => _.castArray(h).map(h => path.join(this.root, h)))
this.hooksTS = await this._hooks()
if (typeof this.pjson.dxcli.plugins === 'string') {
this.pluginsModule = path.join(this.root, this.pjson.dxcli.plugins)
this.pluginsModuleTS = await this._tsPath(this.pjson.dxcli.plugins)
if (typeof this.pjson.anycli.plugins === 'string') {
this.pluginsModule = path.join(this.root, this.pjson.anycli.plugins)
this.pluginsModuleTS = await this._tsPath(this.pjson.anycli.plugins)
}
this.npmRegistry = this.scopedEnvVar('NPM_REGISTRY') || this.pjson.dxcli.npmRegistry || 'https://registry.yarnpkg.com'
this.topics = topicsToArray(this.pjson.dxcli.topics || {})
this.npmRegistry = this.scopedEnvVar('NPM_REGISTRY') || this.pjson.anycli.npmRegistry || 'https://registry.yarnpkg.com'
this.topics = topicsToArray(this.pjson.anycli.topics || {})

return this
}
Expand Down Expand Up @@ -330,8 +330,8 @@ export class Config implements IConfig {

private async _hooks(): Promise<{[k: string]: string[]} | undefined> {
const hooks: {[k: string]: string[]} = {}
if (_.isEmpty(this.pjson.dxcli.hooks)) return
for (let [k, h] of Object.entries(this.pjson.dxcli.hooks)) {
if (_.isEmpty(this.pjson.anycli.hooks)) return
for (let [k, h] of Object.entries(this.pjson.anycli.hooks)) {
hooks[k] = []
for (let m of _.castArray(h)) {
const ts = await this._tsPath(m)
Expand Down
4 changes: 2 additions & 2 deletions src/pjson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {Package} from 'read-pkg'
export interface IPJSON extends Package {
name: string
version: string
dxcli: {
anycli: {
bin?: string
npmRegistry?: string
dirname?: string
Expand All @@ -13,7 +13,7 @@ export interface IPJSON extends Package {
topics: {
[k: string]: {
description?: string
subtopics?: IPJSON['dxcli']['topics']
subtopics?: IPJSON['anycli']['topics']
hidden?: boolean
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ts-plugin",
"private": true,
"dxcli": {
"anycli": {
"plugins": "./lib/plugins",
"commands": "./lib/commands",
"hooks": {
Expand Down
2 changes: 1 addition & 1 deletion tslint.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@dxcli/tslint",
"extends": "@anycli/tslint",
"linterOptions": {
"exclude": [
"test/fixtures/**"
Expand Down
Loading

0 comments on commit 72eb874

Please sign in to comment.