From d70edafbc75e0c03d313acc559c2b6c214e9752c Mon Sep 17 00:00:00 2001 From: Jeff Dickey <216188+jdxcode@users.noreply.github.com> Date: Sun, 28 Jan 2018 02:19:08 -0800 Subject: [PATCH] fix: move @dxcli/parser into dependencies --- package-scripts.js | 37 +++++++++++++++---------- package.json | 15 ++++++---- test/tsconfig.json | 3 ++ tsconfig.json | 1 - tslint.json | 2 +- yarn.lock | 68 ++++++++++++++++++++++++++++------------------ 6 files changed, 77 insertions(+), 49 deletions(-) diff --git a/package-scripts.js b/package-scripts.js index 66a56d65..62f26d39 100644 --- a/package-scripts.js +++ b/package-scripts.js @@ -17,28 +17,35 @@ const linters = { tslint: script('tslint -p test', 'lint ts files'), } -const scripts = { - ...linters, - lint: concurrent(linters), - test: script(concurrent.nps(...Object.keys(linters), 'mocha'), 'lint and run all tests'), - mocha: script('mocha --forbid-only "test/**/*.test.ts"', 'run all mocha tests'), -} - +let test = 'mocha --forbid-only "test/**/*.test.ts"' if (process.env.CI) { if (process.env.CIRCLECI) { - scripts.test.script = series(mkdirp('reports'), scripts.test.script) // add mocha junit reporter - scripts.mocha.script = crossEnv(`MOCHA_FILE=reports/mocha.xml ${scripts.mocha.script} --reporter mocha-junit-reporter`) + test = crossEnv(`MOCHA_FILE=reports/mocha.xml ${test} --reporter mocha-junit-reporter`) // add eslint reporter - scripts.eslint.script = `${scripts.eslint.script} --format junit --output-file reports/eslint.xml` + linters.eslint.script = `${linters.eslint.script} --format junit --output-file reports/eslint.xml` // add tslint reporter - scripts.tslint.script = `${scripts.tslint.script} --format junit > reports/tslint.xml` - scripts.release = 'semantic-release -e @dxcli/dev-semantic-release' + 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/dev-nyc-config/.nycrc' + const nyc = 'nyc --nycrc-path node_modules/@dxcli/nyc-config/.nycrc' const nycReport = `${nyc} report --reporter text-lcov > coverage.lcov` - scripts.mocha.script = series(`${nyc} ${scripts.mocha.script}`, nycReport) + test = series(`${nyc} ${test}`, nycReport) } -module.exports = {scripts} +test = concurrent({ + ...linters, + test: series('nps build', test), +}) + +if (process.env.CI) test = series(mkdirp('reports'), test) + +module.exports = { + scripts: { + ...linters, + build: series('rm -rf lib', 'tsc'), + lint: concurrent(linters), + test, + release: 'semantic-release -e @dxcli/semantic-release', + }, +} diff --git a/package.json b/package.json index a00fadd4..b8a6de33 100644 --- a/package.json +++ b/package.json @@ -5,23 +5,27 @@ "author": "Jeff Dickey @jdxcode", "bugs": "https://github.com/dxcli/command/issues", "dependencies": { + "@dxcli/parser": "^0.0.5", "debug": "^3.1.0", "tslib": "^1.9.0" }, "devDependencies": { "@dxcli/config": "^0.1.27", - "@dxcli/dev": "^2.0.6", + "@dxcli/dev": "^2.0.12", "@dxcli/dev-semantic-release": "^0.2.0", - "@dxcli/parser": "^0.0.5", + "@dxcli/semantic-release": "^0.3.3", + "@dxcli/tslint": "^0.0.24", "chai": "^4.1.2", "cli-ux": "^3.2.2", "eslint": "^4.16.0", - "fancy-test": "^0.5.5", + "fancy-test": "^0.6.3", "http-call": "^5.0.2", "husky": "^0.14.3", "mocha": "^5.0.0", + "mocha-junit-reporter": "^1.17.0", "nps": "^5.7.1", "nps-utils": "^1.5.0", + "ts-node": "^4.1.0", "typedoc": "^0.9.0", "typescript": "^2.6.2" }, @@ -39,14 +43,13 @@ "main": "lib/index.js", "peerDependencies": { "@dxcli/config": "^0.1.27", - "@dxcli/parser": "^0.0.5", "cli-ux": "^3.2.2" }, "repository": "dxcli/command", "scripts": { - "commitmsg": "dxcli-dev-commitmsg", + "commitmsg": "dxcli-commitlint", "precommit": "nps lint -l warn", - "prepare": "rm -rf lib && tsc", + "prepublishOnly": "nps build", "test": "nps test -l warn" }, "types": "lib/index.d.ts" diff --git a/test/tsconfig.json b/test/tsconfig.json index 0503bd73..15a4c580 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "../tsconfig", + "compilerOptions": { + "sourceMap": true + }, "include": [ "./**/*", "../src/**/*" diff --git a/tsconfig.json b/tsconfig.json index 482dee82..e297a398 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,7 +10,6 @@ "rootDirs": [ "./src" ], - "sourceMap": true, "strict": true, "target": "es2017" }, diff --git a/tslint.json b/tslint.json index 675addf9..3a427ce1 100644 --- a/tslint.json +++ b/tslint.json @@ -1,3 +1,3 @@ { - "extends": "@dxcli/dev-tslint" + "extends": "@dxcli/tslint" } diff --git a/yarn.lock b/yarn.lock index 64e5f890..5b233067 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,7 +2,7 @@ # yarn lockfile v1 -"@commitlint/cli@^6.0.1": +"@commitlint/cli@^6.0.1", "@commitlint/cli@^6.0.2": version "6.0.2" resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-6.0.2.tgz#378d37e92c4d97346e84c3a3d6677a62e9471d66" dependencies: @@ -18,6 +18,10 @@ version "5.2.3" resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-5.2.3.tgz#63671b32b65cb68e7b238405403194b558ff559a" +"@commitlint/config-conventional@^6.0.2": + version "6.0.2" + resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-6.0.2.tgz#8ef87a6facb75b3377b2760b0e91097f8ec64db4" + "@commitlint/core@^6.0.2": version "6.0.2" resolved "https://registry.yarnpkg.com/@commitlint/core/-/core-6.0.2.tgz#8e79e18d57ea3d30ca4bbfdf028d5f5d0cd3e422" @@ -121,10 +125,6 @@ commitizen "^2.9.6" cz-conventional-changelog "^2.1.0" -"@dxcli/dev-nyc-config@^0.0.3": - version "0.0.3" - resolved "https://registry.yarnpkg.com/@dxcli/dev-nyc-config/-/dev-nyc-config-0.0.3.tgz#3ff59cf561663710f025a41f64d608d2977a3d3b" - "@dxcli/dev-semantic-release@^0.2.0": version "0.2.0" resolved "https://registry.yarnpkg.com/@dxcli/dev-semantic-release/-/dev-semantic-release-0.2.0.tgz#a749272f0d8809ff4aa687b097924b43ce315ce2" @@ -138,19 +138,11 @@ semantic-release "^12.2.5" shelljs "^0.8.1" -"@dxcli/dev-tslint@^0.0.17": - version "0.0.17" - resolved "https://registry.yarnpkg.com/@dxcli/dev-tslint/-/dev-tslint-0.0.17.tgz#f20767b72188a0695e4b34ba50976e11502d3891" +"@dxcli/dev@^2.0.12": + version "2.0.12" + resolved "https://registry.yarnpkg.com/@dxcli/dev/-/dev-2.0.12.tgz#027bcaf96d6c67eb730aa077a1625fdf4e079379" dependencies: - tslint "^5.9.1" - tslint-xo "^0.5.0" - -"@dxcli/dev@^2.0.6": - version "2.0.6" - resolved "https://registry.yarnpkg.com/@dxcli/dev/-/dev-2.0.6.tgz#5e8064afbb85d5f553bc86436f879311743ccb6a" - dependencies: - "@dxcli/dev-nyc-config" "^0.0.3" - "@dxcli/dev-tslint" "^0.0.17" + "@dxcli/nyc-config" "^0.0.4" "@types/ansi-styles" "^2.0.30" "@types/chai" "^4.1.2" "@types/lodash" "^4.14.97" @@ -161,10 +153,13 @@ "@types/read-pkg" "^3.0.0" "@types/strip-ansi" "^3.0.0" "@types/supports-color" "^3.1.0" - eslint-config-dxcli "^1.1.5" - mocha-junit-reporter "^1.17.0" + eslint-config-dxcli "^1.1.6" + nps-utils "^1.5.0" nyc "^11.4.1" - ts-node "^4.1.0" + +"@dxcli/nyc-config@^0.0.4": + version "0.0.4" + resolved "https://registry.yarnpkg.com/@dxcli/nyc-config/-/nyc-config-0.0.4.tgz#bd60c089aaa6d5da34e415bab6bc527d8c35a210" "@dxcli/parser@^0.0.5": version "0.0.5" @@ -178,6 +173,27 @@ version "0.0.1" resolved "https://registry.yarnpkg.com/@dxcli/screen/-/screen-0.0.1.tgz#9af4e8d0e5a9475e9e4b5f2da775b0447ff72fc2" +"@dxcli/semantic-release@^0.3.3": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@dxcli/semantic-release/-/semantic-release-0.3.3.tgz#b3e058935a9064b51defcbc16766b346df5904f0" + dependencies: + "@commitlint/cli" "^6.0.2" + "@commitlint/config-conventional" "^6.0.2" + "@semantic-release/changelog" "^1.0.0" + "@semantic-release/exec" "^1.0.2" + "@semantic-release/git" "^2.0.3" + "@semantic-release/github" "^3.0.3" + "@semantic-release/npm" "^2.6.4" + execa "^0.9.0" + semantic-release "^12.2.5" + +"@dxcli/tslint@^0.0.24": + version "0.0.24" + resolved "https://registry.yarnpkg.com/@dxcli/tslint/-/tslint-0.0.24.tgz#32c19a574828d643bcb446cbfc0b2dbbbf1c1da0" + dependencies: + tslint "^5.9.1" + tslint-xo "^0.5.0" + "@heroku/linewrap@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@heroku/linewrap/-/linewrap-1.0.0.tgz#a9d4e99f0a3e423a899b775f5f3d6747a1ff15c6" @@ -1478,9 +1494,9 @@ eslint-ast-utils@^1.0.0: lodash.get "^4.4.2" lodash.zip "^4.2.0" -eslint-config-dxcli@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/eslint-config-dxcli/-/eslint-config-dxcli-1.1.5.tgz#ac7bf9acaef94bbeb34bb57ff4ffbcbc71ea475a" +eslint-config-dxcli@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/eslint-config-dxcli/-/eslint-config-dxcli-1.1.6.tgz#f14d8bd748108dd57725a052f627524dedee8f4c" dependencies: eslint-config-xo-space "^0.17.0" eslint-plugin-node "^5.2.1" @@ -1740,9 +1756,9 @@ extsprintf@^1.2.0: version "1.4.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" -fancy-test@^0.5.5: - version "0.5.5" - resolved "https://registry.yarnpkg.com/fancy-test/-/fancy-test-0.5.5.tgz#e87b189a853af335c76bbcb98704db5ec8380c27" +fancy-test@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/fancy-test/-/fancy-test-0.6.3.tgz#cbcdb3bd2e969245e9885fda9d23c5874ef199e3" dependencies: lodash "^4.17.4" stdout-stderr "^0.1.4"