diff --git a/package.json b/package.json index cdbcc2d..bac98d5 100644 --- a/package.json +++ b/package.json @@ -9,11 +9,11 @@ "stdout-stderr": "^0.1.6" }, "devDependencies": { - "@commitlint/cli": "^6.0.5", - "@commitlint/config-conventional": "^6.0.4", + "@commitlint/cli": "^6.1.0", + "@commitlint/config-conventional": "^6.1.0", "@dxcli/tslint": "^0.1.3", "@types/chai": "^4.1.2", - "@types/lodash": "^4.14.99", + "@types/lodash": "^4.14.100", "@types/mocha": "^2.2.48", "@types/nock": "^9.1.2", "@types/node": "^9.4.0", @@ -22,7 +22,7 @@ "@types/sinon": "^4.1.3", "chai": "^4.1.2", "chalk": "^2.3.0", - "eslint": "^4.16.0", + "eslint": "^4.17.0", "eslint-config-dxcli": "^1.2.1", "http-call": "^5.0.2", "husky": "^0.14.3", diff --git a/src/base.ts b/src/base.ts index bcce928..50484a9 100644 --- a/src/base.ts +++ b/src/base.ts @@ -67,6 +67,8 @@ const base = (context: I): Types.Base => { .reduce((plugins, [k, v]) => { plugins[k] = (...args: any[]) => { const plugin = v(...args) + // clone context first + context = {...context as any} if (plugin.init) plugin.init(context) return base({ ...context as any, diff --git a/yarn.lock b/yarn.lock index 5344afa..a38d0ea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,11 +2,11 @@ # yarn lockfile v1 -"@commitlint/cli@^6.0.5": - version "6.0.5" - resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-6.0.5.tgz#c159c41434d24167c2f52c29e81cffc1959a6d0f" +"@commitlint/cli@^6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-6.1.0.tgz#0a545088b4e0268cca1dca7e8ccd95bd55847b88" dependencies: - "@commitlint/core" "^6.0.5" + "@commitlint/core" "^6.1.0" babel-polyfill "6.26.0" chalk "2.3.0" get-stdin "5.0.1" @@ -14,20 +14,20 @@ lodash.pick "4.4.0" meow "3.7.0" -"@commitlint/config-conventional@^6.0.4": - version "6.0.4" - resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-6.0.4.tgz#f5332c3aaf5423f2fa62287849859a9b769484f3" - -"@commitlint/core@^6.0.5": - version "6.0.5" - resolved "https://registry.yarnpkg.com/@commitlint/core/-/core-6.0.5.tgz#a0f174f08a377eb9e5571bf31c2c9f60964a6ed9" - dependencies: - "@commitlint/execute-rule" "^6.0.4" - "@commitlint/is-ignored" "^6.0.4" - "@commitlint/parse" "^6.0.4" - "@commitlint/resolve-extends" "^6.0.4" - "@commitlint/rules" "^6.0.4" - "@commitlint/top-level" "^6.0.5" +"@commitlint/config-conventional@^6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-6.1.0.tgz#1f1c1577f1ca10f112e4346d9c94af1f8936f0c5" + +"@commitlint/core@^6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/core/-/core-6.1.0.tgz#41b2482044039435cb9673995598717038f2f6d0" + dependencies: + "@commitlint/execute-rule" "^6.1.0" + "@commitlint/is-ignored" "^6.1.0" + "@commitlint/parse" "^6.1.0" + "@commitlint/resolve-extends" "^6.1.0" + "@commitlint/rules" "^6.1.0" + "@commitlint/top-level" "^6.1.0" "@marionebl/sander" "^0.6.0" babel-runtime "^6.23.0" chalk "^2.0.1" @@ -39,9 +39,9 @@ lodash.topairs "4.3.0" resolve-from "4.0.0" -"@commitlint/ensure@^6.0.4": - version "6.0.4" - resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-6.0.4.tgz#c5ae6d0a24797e58caceee61608c6ac9ced64691" +"@commitlint/ensure@^6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-6.1.0.tgz#567f029d816b6b5ca16bf62499230324c99a8fa9" dependencies: lodash.camelcase "4.3.0" lodash.kebabcase "4.1.1" @@ -49,32 +49,32 @@ lodash.startcase "4.4.0" lodash.upperfirst "4.3.1" -"@commitlint/execute-rule@^6.0.4": - version "6.0.4" - resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-6.0.4.tgz#5db080be51b2cc057028ce24a1cd9142283774fc" +"@commitlint/execute-rule@^6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-6.1.0.tgz#4f56e5855a5e25ebcbc985d2209ea29f1bb89774" dependencies: babel-runtime "6.26.0" -"@commitlint/is-ignored@^6.0.4": - version "6.0.4" - resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-6.0.4.tgz#cc4cde7be8d101e848fa70b37381687fa837c417" +"@commitlint/is-ignored@^6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-6.1.0.tgz#0b86f8b37dfc693d6d66760b36fee1aba50882d8" dependencies: semver "5.5.0" -"@commitlint/message@^6.0.4": - version "6.0.4" - resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-6.0.4.tgz#80fe320285cab5f0f4ab3847e8d3b98a3fd1e389" +"@commitlint/message@^6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-6.1.0.tgz#ee4ca775ad876ba59d23d02ba386c9b9038969e3" -"@commitlint/parse@^6.0.4": - version "6.0.4" - resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-6.0.4.tgz#3d7403b024200d32d66e913ee464eaf46bbac075" +"@commitlint/parse@^6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-6.1.0.tgz#e4ba58ab632371078b9b9609ae7af03c2e7b3a3e" dependencies: conventional-changelog-angular "^1.3.3" conventional-commits-parser "^2.1.0" -"@commitlint/resolve-extends@^6.0.4": - version "6.0.4" - resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-6.0.4.tgz#8cce624e856df7582d5621c882e83f69b44c18c4" +"@commitlint/resolve-extends@^6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-6.1.0.tgz#b3d92f69e3746e94de0023f8be3b1f605a20839a" dependencies: babel-runtime "6.26.0" lodash.merge "4.6.0" @@ -83,22 +83,22 @@ resolve-from "^4.0.0" resolve-global "^0.1.0" -"@commitlint/rules@^6.0.4": - version "6.0.4" - resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-6.0.4.tgz#6891d7e37908d6438dc3b382f193774ab4a36479" +"@commitlint/rules@^6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-6.1.0.tgz#564b69503a3a4d09d03a9a077731c9655ee8f4df" dependencies: - "@commitlint/ensure" "^6.0.4" - "@commitlint/message" "^6.0.4" - "@commitlint/to-lines" "^6.0.4" + "@commitlint/ensure" "^6.1.0" + "@commitlint/message" "^6.1.0" + "@commitlint/to-lines" "^6.1.0" babel-runtime "^6.23.0" -"@commitlint/to-lines@^6.0.4": - version "6.0.4" - resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-6.0.4.tgz#c0bb6ca0b5c5f565f18d9747de12067cb2c4cc34" +"@commitlint/to-lines@^6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-6.1.0.tgz#9e130254c980dbd456e1693df1082a77ba7114a0" -"@commitlint/top-level@^6.0.5": - version "6.0.5" - resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-6.0.5.tgz#01cac031f7452c0bebfda75d6ef7fb79d1714f81" +"@commitlint/top-level@^6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-6.1.0.tgz#b420c1e9166df3afa000186a42b7f49cae4014cc" dependencies: find-up "^2.1.0" @@ -121,9 +121,9 @@ version "4.1.2" resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.1.2.tgz#f1af664769cfb50af805431c407425ed619daa21" -"@types/lodash@^4.14.99": - version "4.14.99" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.99.tgz#e6e10c0a4cc16c7409b3181f1e66880d2fb7d4dc" +"@types/lodash@^4.14.100": + version "4.14.100" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.100.tgz#f353dd9d3a9785638b6cb8023e6639097bd31969" "@types/mocha@^2.2.48": version "2.2.48" @@ -744,9 +744,9 @@ eslint-visitor-keys@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" -eslint@^4.16.0: - version "4.16.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.16.0.tgz#934ada9e98715e1d7bbfd6f6f0519ed2fab35cc1" +eslint@^4.17.0: + version "4.17.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.17.0.tgz#dc24bb51ede48df629be7031c71d9dc0ee4f3ddf" dependencies: ajv "^5.3.0" babel-code-frame "^6.22.0"