Skip to content
This repository was archived by the owner on Feb 1, 2022. It is now read-only.

Commit 8ce11fc

Browse files
committed
fix: remove extra newline from styledJSON
1 parent 83f0f3d commit 8ce11fc

File tree

11 files changed

+65
-142
lines changed

11 files changed

+65
-142
lines changed

.circleci/config.yml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,38 +5,46 @@ jobs:
55
docker:
66
- image: node:latest
77
working_directory: ~/cli
8+
environment:
9+
NYC: "yarn exec nyc -- --nycrc-path node_modules/@anycli/nyc-config/.nycrc"
10+
MOCHA_FILE: "reports/mocha.xml"
811
steps:
912
- checkout
1013
- restore_cache: &restore_cache
1114
keys:
12-
- v0-yarn-{{checksum ".circleci/config.yml"}}-{{ .Branch }}-{{checksum "yarn.lock"}}
13-
- v0-yarn-{{checksum ".circleci/config.yml"}}-{{ .Branch }}-
14-
- v0-yarn-{{checksum ".circleci/config.yml"}}-master-
15-
- run: .circleci/test
15+
- v0-yarn-{{checksum ".circleci/config.yml"}}-{{ checksum "yarn.lock"}}
16+
- v0-yarn-{{checksum ".circleci/config.yml"}}
17+
- run: .circleci/greenkeeper
18+
- run: yarn add -D nyc@11 @anycli/nyc-config@0 mocha-junit-reporter@1 @commitlint/cli@6 @commitlint/config-conventional@6
19+
- run: |
20+
mkdir -p reports
21+
$NYC yarn test --reporter mocha-junit-reporter
22+
$NYC report --reporter text-lcov > coverage.lcov
23+
curl -s https://codecov.io/bash | bash
24+
- run: yarn exec commitlint -- -x @commitlint/config-conventional --from origin/master
1625
- store_test_results: &store_test_results
1726
path: ~/cli/reports
18-
- save_cache: &save_cache
19-
key: v0-yarn-{{checksum ".circleci/config.yml"}}-{{ .Branch }}-{{checksum "yarn.lock"}}
20-
paths:
21-
- ~/cli/node_modules
22-
- /usr/local/share/.cache/yarn
23-
- /usr/local/share/.config/yarn
2427
node-8:
2528
<<: *test
2629
docker:
2730
- image: node:8
28-
steps:
29-
- checkout
30-
- restore_cache: *restore_cache
31-
- run: .circleci/test
32-
- store_test_results: *store_test_results
3331
release:
3432
<<: *test
3533
steps:
3634
- add_ssh_keys
3735
- checkout
3836
- restore_cache: *restore_cache
39-
- run: .circleci/release
37+
- run: yarn global add @anycli/semantic-release@1 semantic-release@12
38+
- run: yarn --frozen-lockfile
39+
- run: |
40+
export PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH
41+
semantic-release -e @anycli/semantic-release
42+
- save_cache:
43+
key: v0-yarn-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}}
44+
paths:
45+
- ~/cli/node_modules
46+
- /usr/local/share/.cache/yarn
47+
- /usr/local/share/.config/yarn
4048

4149
workflows:
4250
version: 2

.circleci/greenkeeper

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex
4+
5+
PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH
6+
7+
if [[ "$CIRCLE_BRANCH" != greenkeeper/* ]]; then
8+
yarn
9+
yarn check
10+
exit 0
11+
fi
12+
13+
if [[ ! -z "$GIT_EMAIL" ]] & [[ ! -z "$GIT_USERNAME" ]]; then
14+
git config --global push.default simple
15+
git config --global user.email "$GIT_EMAIL"
16+
git config --global user.name "$GIT_USERNAME"
17+
fi
18+
19+
if [[ ! -x "$(command -v greenkeeper-lockfile-update)" ]]; then
20+
yarn global add greenkeeper-lockfile@1
21+
fi
22+
23+
greenkeeper-lockfile-update
24+
yarn install
25+
greenkeeper-lockfile-upload

.circleci/release

Lines changed: 0 additions & 11 deletions
This file was deleted.

.circleci/setup_git

Lines changed: 0 additions & 12 deletions
This file was deleted.

.circleci/test

Lines changed: 0 additions & 29 deletions
This file was deleted.

appveyor.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,11 @@ cache:
66

77
install:
88
- ps: Install-Product node $env:nodejs_version x64
9-
- git submodule sync
10-
- git submodule update --init --recursive
11-
- git config --global user.email "anycli@example.com"
12-
- git config --global user.name "anycli"
13-
- yarn add -D nyc @anycli/nyc-config
9+
- yarn add -D nyc@11 @anycli/nyc-config@0
1410
test_script:
15-
- yarn test
11+
- .\node_modules\.bin\nyc --nycrc-path node_modules/@anycli/nyc-config/.nycrc yarn test
1612
after_test:
13+
- .\node_modules\.bin\nyc --nycrc-path node_modules/@anycli/nyc-config/.nycrc report --reporter text-lcov > coverage.lcov
1714
- ps: |
1815
$env:PATH = 'C:\msys64\usr\bin;' + $env:PATH
1916
Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh

package-scripts.js

Lines changed: 0 additions & 53 deletions
This file was deleted.

package.json

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222
"supports-color": "^5.1.0"
2323
},
2424
"devDependencies": {
25-
"@anycli/tslint": "^0.2.1",
26-
"@commitlint/cli": "^6.0.5",
27-
"@commitlint/config-conventional": "^6.0.4",
25+
"@anycli/tslint": "^0.2.2",
2826
"@types/ansi-styles": "^2.0.30",
2927
"@types/chai": "^4.1.2",
3028
"@types/clean-stack": "^1.3.0",
@@ -41,14 +39,12 @@
4139
"@types/strip-ansi": "^3.0.0",
4240
"@types/supports-color": "^3.1.0",
4341
"chai": "^4.1.2",
42+
"concurrently": "^3.5.1",
4443
"eslint": "^4.16.0",
4544
"eslint-config-anycli": "^1.3.1",
4645
"fancy-test": "^0.6.6",
4746
"husky": "^0.14.3",
4847
"mocha": "^5.0.0",
49-
"mocha-junit-reporter": "^1.17.0",
50-
"nps": "^5.7.1",
51-
"nps-utils": "^1.5.0",
5248
"ts-node": "^4.1.0",
5349
"typescript": "^2.7.1"
5450
},
@@ -66,10 +62,11 @@
6662
"main": "lib/index.js",
6763
"repository": "anycli/cli-ux",
6864
"scripts": {
69-
"commitmsg": "commitlint -x @commitlint/config-conventional -e $GIT_PARAMS",
70-
"precommit": "nps lint -l warn",
71-
"prepublishOnly": "nps build",
72-
"test": "nps test -l warn"
65+
"build": "rm -rf lib && tsc",
66+
"lint": "concurrently -p command \"eslint .\" \"tsc -p test --noEmit\" \"tslint -p test\"",
67+
"posttest": "yarn run lint",
68+
"prepublishOnly": "yarn run build",
69+
"test": "mocha --forbid-only \"test/**/*.test.ts\""
7370
},
7471
"types": "lib/index.d.ts"
7572
}

src/styled/json.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ export default function styledJSON(obj: any) {
1212
}
1313
let cardinal = require('cardinal')
1414
let theme = require('cardinal/themes/jq')
15-
cli.info(cardinal.highlight(json, {json: true, theme}) + '\n')
15+
cli.info(cardinal.highlight(json, {json: true, theme}))
1616
}

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"noUnusedLocals": true,
88
"noUnusedParameters": true,
99
"outDir": "./lib",
10+
"pretty": true,
1011
"rootDirs": [
1112
"./src"
1213
],

0 commit comments

Comments
 (0)