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

Commit 93ed6e1

Browse files
author
dxcli
committed
fix: ran generator
1 parent 58fe3ed commit 93ed6e1

File tree

8 files changed

+79
-49
lines changed

8 files changed

+79
-49
lines changed

.circleci/config.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- v0-yarn-{{ .Environment.CIRCLE_JOB }}-{{checksum "scripts/circleci"}}-{{checksum ".circleci/config.yml"}}-{{ .Branch }}-{{checksum "yarn.lock"}}
1313
- v0-yarn-{{ .Environment.CIRCLE_JOB }}-{{checksum "scripts/circleci"}}-{{checksum ".circleci/config.yml"}}-{{ .Branch }}-
1414
- v0-yarn-{{ .Environment.CIRCLE_JOB }}-{{checksum "scripts/circleci"}}-{{checksum ".circleci/config.yml"}}-master-
15-
- run: ./scripts/circleci
15+
- run: ./scripts/circleci test
1616
- store_test_results:
1717
path: ~/cli/reports
1818
- save_cache: &save_cache
@@ -30,8 +30,7 @@ jobs:
3030
steps:
3131
- checkout
3232
- restore_cache: *restore_cache
33-
- run: yarn
34-
- run: ./node_modules/.bin/dxcli-dev-semantic-release
33+
- run: ./scripts/circleci release
3534
- save_cache: *save_cache
3635

3736
workflows:

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
* text=auto
2+
*.js text eol=lf
3+
*.ts text eol=lf

.gitignore

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
*-debug.log
22
*-error.log
3+
/.nyc_output
34
/coverage
5+
/coverage.lcov
6+
/lib
47
/node_modules
58
/tmp
6-
/lib
7-
/.nyc_output

appveyor.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ environment:
22
nodejs_version: "9"
33
cache:
44
- '%LOCALAPPDATA%\Yarn -> appveyor.yml'
5-
- node_modules -> package.json
5+
- node_modules -> yarn.lock
66

77
install:
88
- ps: Install-Product node $env:nodejs_version x64
9+
- git config --global user.email "[email protected]"
10+
- git config --global user.name "dxcli"
911
- yarn
1012
test_script:
1113
- yarn test

package.json

+8-10
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"lodash": "^4.17.4"
1010
},
1111
"devDependencies": {
12-
"@dxcli/dev": "^1.1.2",
12+
"@dxcli/dev": "^1.1.3",
1313
"@dxcli/dev-semantic-release": "^0.0.3",
14-
"@dxcli/dev-test": "^0.0.1",
15-
"@dxcli/dev-tslint": "^0.0.8",
14+
"@dxcli/dev-test": "^0.1.1",
15+
"@dxcli/dev-tslint": "^0.0.9",
1616
"@heroku/linewrap": "^1.0.0",
1717
"@types/chalk": "^2.2.0",
1818
"@types/node": "^9.3.0",
@@ -28,18 +28,16 @@
2828
"workflows": {
2929
"test": [
3030
"eslint .",
31-
"tsc",
32-
"tslint -p .",
33-
"commitlint --from master",
3431
"tsc -p test --noEmit",
32+
"tslint -p test",
33+
"commitlint --from origin/master",
3534
"mocha \"test/**/*.ts\""
3635
],
3736
"lint": [
3837
"eslint .",
39-
"tsc",
40-
"tslint -p .",
41-
"commitlint --from master",
42-
"tsc -p test --noEmit"
38+
"tsc -p test --noEmit",
39+
"tslint -p test",
40+
"commitlint --from origin/master"
4341
]
4442
}
4543
},

scripts/circleci

+51-23
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,61 @@
22

33
set -ex
44

5+
duration() {
6+
set +x
7+
start=$(date +%s)
8+
"$@"
9+
end=$(date +%s)
10+
python -c "print 'Ran $1 in %u:%02u' % ((${end} - ${start})/60, (${end} - ${start})%60)"
11+
set -x
12+
}
13+
514
PATH=/usr/local/share/.config/yarn/global/node_modules/.bin:$PATH
615

7-
CLI_ENGINE_UTIL_YARN_ARGS="--frozen-lockfile"
16+
if [[ ! -z "$GIT_EMAIL" ]] & [[ ! -z "$GIT_USERNAME" ]]; then
17+
git config --global push.default simple
18+
git config --global user.email "$GIT_EMAIL"
19+
git config --global user.user "$GIT_USERNAME"
20+
fi
21+
22+
_test() {
23+
CLI_ENGINE_UTIL_YARN_ARGS="--frozen-lockfile"
824

9-
if [[ "$CIRCLE_BRANCH" == greenkeeper/* ]]; then
10-
CLI_ENGINE_GREENKEEPER_BRANCH=1
11-
CLI_ENGINE_UTIL_YARN_ARGS=""
12-
if [[ ! -x "$(command -v greenkeeper-lockfile-update)" ]]; then
13-
yarn global add greenkeeper-lockfile@1
25+
if [[ "$CIRCLE_BRANCH" == greenkeeper/* ]]; then
26+
CLI_ENGINE_GREENKEEPER_BRANCH=1
27+
CLI_ENGINE_UTIL_YARN_ARGS=""
28+
if [[ ! -x "$(command -v greenkeeper-lockfile-update)" ]]; then
29+
duration yarn global add greenkeeper-lockfile@1
30+
fi
31+
duration greenkeeper-lockfile-update
1432
fi
15-
greenkeeper-lockfile-update
16-
fi
1733

18-
yarn install $CLI_ENGINE_UTIL_YARN_ARGS
34+
duration yarn install $CLI_ENGINE_UTIL_YARN_ARGS
1935

20-
if [[ "$CLI_ENGINE_GREENKEEPER_BRANCH" == 1 ]]; then
21-
greenkeeper-lockfile-upload
22-
fi
36+
if [[ "$CLI_ENGINE_GREENKEEPER_BRANCH" == 1 ]]; then
37+
duration greenkeeper-lockfile-upload
38+
fi
2339

24-
CWD=$(pwd)
25-
NYC="./node_modules/.bin/nyc --nycrc-path node_modules/@dxcli/dev-nyc-config/.nycrc"
26-
mkdir -p reports
27-
MOCHA_FILE="$CWD/reports/mocha.xml" \
28-
DXCLI_MOCHA_OPTS="--reporter mocha-junit-reporter" \
29-
DXCLI_ESLINT_OPTS="--format junit --output-file $CWD/reports/eslint.xml" \
30-
DXCLI_TSLINT_OPTS="--format junit > $CWD/reports/tslint.xml" \
31-
$NYC yarn test
32-
$NYC report --reporter=text-lcov > coverage.lcov
33-
34-
curl -s https://codecov.io/bash | bash
40+
CWD=$(pwd)
41+
NYC=(./node_modules/.bin/nyc --nycrc-path node_modules/@dxcli/dev-nyc-config/.nycrc)
42+
mkdir -p reports
43+
MOCHA_FILE="$CWD/reports/mocha.xml" \
44+
DXCLI_MOCHA_OPTS="--reporter mocha-junit-reporter" \
45+
DXCLI_ESLINT_OPTS="--format junit --output-file $CWD/reports/eslint.xml" \
46+
DXCLI_TSLINT_OPTS="--format junit > $CWD/reports/tslint.xml" \
47+
duration "${NYC[@]}" yarn test
48+
49+
duration "${NYC[@]}" report --reporter=text-lcov > coverage.lcov
50+
51+
duration curl -s https://codecov.io/bash | bash
52+
}
53+
54+
_release() {
55+
yarn --frozen-lockfile
56+
./node_modules/.bin/dxcli-dev-semantic-release
57+
}
58+
59+
case "$1" in
60+
release) _release;;
61+
*) _test;;
62+
esac

test/parse.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ See more help with --help`)
214214
foo: flags.string(),
215215
},
216216
})
217-
expect(out.flags.foo!.toUpperCase()).to.equal('C')
217+
expect(out.flags.foo.toUpperCase()).to.equal('C')
218218
expect(out.flags.bar.join('|')).to.equal('a|b')
219219
})
220220
})

yarn.lock

+9-9
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@
130130
"@semantic-release/npm" "^2.6.1"
131131
semantic-release "^12.2.0"
132132

133-
"@dxcli/dev-test@^0.0.1":
134-
version "0.0.1"
135-
resolved "https://registry.yarnpkg.com/@dxcli/dev-test/-/dev-test-0.0.1.tgz#8440c7fec40ccf7ad5dc21d5224be09ca42a4cb4"
133+
"@dxcli/dev-test@^0.1.1":
134+
version "0.1.1"
135+
resolved "https://registry.yarnpkg.com/@dxcli/dev-test/-/dev-test-0.1.1.tgz#6a03471c700412e3b04724501e083310777beda1"
136136
dependencies:
137137
"@dxcli/dev-nyc-config" "^0.0.3"
138138
"@types/ansi-styles" "^2.0.30"
@@ -147,16 +147,16 @@
147147
strip-ansi "^4.0.0"
148148
ts-node "^4.1.0"
149149

150-
"@dxcli/dev-tslint@^0.0.8":
151-
version "0.0.8"
152-
resolved "https://registry.yarnpkg.com/@dxcli/dev-tslint/-/dev-tslint-0.0.8.tgz#f07750d0152b26764b43fd99110076db87b4a22e"
150+
"@dxcli/dev-tslint@^0.0.9":
151+
version "0.0.9"
152+
resolved "https://registry.yarnpkg.com/@dxcli/dev-tslint/-/dev-tslint-0.0.9.tgz#552b62b769ede24b30fdc3b8c04e10b1a60f027f"
153153
dependencies:
154154
tslint "^5.9.1"
155155
tslint-xo "^0.5.0"
156156

157-
"@dxcli/dev@^1.1.2":
158-
version "1.1.2"
159-
resolved "https://registry.yarnpkg.com/@dxcli/dev/-/dev-1.1.2.tgz#66acd0b6d5cc9cf8a94a00692c67d40c94ebf81b"
157+
"@dxcli/dev@^1.1.3":
158+
version "1.1.3"
159+
resolved "https://registry.yarnpkg.com/@dxcli/dev/-/dev-1.1.3.tgz#da1b929372cae0af15f78849483494a74c3c075e"
160160
dependencies:
161161
cli-ux "^2.0.21"
162162
concurrently "^3.5.1"

0 commit comments

Comments
 (0)