From 90b5a27f7cdd4af7dfa41f334acb40ebb04bfeff Mon Sep 17 00:00:00 2001 From: hannes Date: Thu, 13 May 2021 12:18:57 +0800 Subject: [PATCH] Fix/node10 support (#2595) * Revert "fix: update dependency yargs to v17 (#2574)" This reverts commit 81c38ddf15f239b525f673b26b2ee6606f2ee8f6. * chore: fix revert conflicts * chore: fix revert conflicts --- .circleci/config.yml | 16 ++++++------- @alias/commitlint-config-angular/package.json | 2 +- .../package.json | 2 +- .../package.json | 2 +- @alias/commitlint/package.json | 2 +- @commitlint/cli/package.json | 6 ++--- .../config-angular-type-enum/package.json | 2 +- @commitlint/config-angular/package.json | 2 +- @commitlint/config-conventional/package.json | 2 +- @commitlint/config-lerna-scopes/package.json | 2 +- @commitlint/config-patternplate/package.json | 2 +- @commitlint/core/package.json | 2 +- @commitlint/ensure/package.json | 2 +- @commitlint/execute-rule/package.json | 2 +- @commitlint/format/package.json | 2 +- @commitlint/is-ignored/package.json | 2 +- @commitlint/lint/package.json | 2 +- @commitlint/load/package.json | 2 +- @commitlint/message/package.json | 2 +- @commitlint/parse/package.json | 2 +- @commitlint/prompt-cli/package.json | 2 +- @commitlint/prompt/package.json | 2 +- @commitlint/read/package.json | 4 ++-- @commitlint/resolve-extends/package.json | 2 +- @commitlint/rules/package.json | 2 +- @commitlint/to-lines/package.json | 2 +- @commitlint/top-level/package.json | 2 +- @commitlint/travis-cli/package.json | 2 +- @commitlint/types/package.json | 2 +- @packages/test-environment/package.json | 2 +- @packages/test/package.json | 4 ++-- @packages/utils/package.json | 6 ++--- README.md | 2 +- babel.config.js | 2 +- yarn.lock | 24 +++++-------------- 35 files changed, 53 insertions(+), 65 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d302fff967..268a3b08ae 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -76,19 +76,19 @@ commands: - build - test jobs: + v10: + docker: + - image: node:10 + steps: + - run-tests v12: docker: - - image: node:12-buster + - image: node:12 steps: - run-all v14: docker: - - image: node:14-buster - steps: - - run-tests - v16: - docker: - - image: node:16-buster + - image: node:14 steps: - run-tests windows-v12: @@ -99,7 +99,7 @@ jobs: workflows: node: jobs: + - v10 - v12 - v14 - - v16 - windows-v12 diff --git a/@alias/commitlint-config-angular/package.json b/@alias/commitlint-config-angular/package.json index 541e5baab2..df50d1c7cb 100644 --- a/@alias/commitlint-config-angular/package.json +++ b/@alias/commitlint-config-angular/package.json @@ -26,7 +26,7 @@ }, "homepage": "https://github.com/conventional-changelog/commitlint#readme", "engines": { - "node": ">=v12" + "node": ">=v10" }, "dependencies": { "@commitlint/config-angular": "^12.1.3" diff --git a/@alias/commitlint-config-lerna-scopes/package.json b/@alias/commitlint-config-lerna-scopes/package.json index b84e7a97ab..e649da9883 100644 --- a/@alias/commitlint-config-lerna-scopes/package.json +++ b/@alias/commitlint-config-lerna-scopes/package.json @@ -26,7 +26,7 @@ }, "homepage": "https://github.com/conventional-changelog/commitlint#readme", "engines": { - "node": ">=v12" + "node": ">=v10" }, "dependencies": { "@commitlint/config-lerna-scopes": "^12.1.3" diff --git a/@alias/commitlint-config-patternplate/package.json b/@alias/commitlint-config-patternplate/package.json index ae10399113..fb27546222 100644 --- a/@alias/commitlint-config-patternplate/package.json +++ b/@alias/commitlint-config-patternplate/package.json @@ -26,7 +26,7 @@ }, "homepage": "https://github.com/conventional-changelog/commitlint#readme", "engines": { - "node": ">=v12" + "node": ">=v10" }, "dependencies": { "@commitlint/config-patternplate": "^12.1.3" diff --git a/@alias/commitlint/package.json b/@alias/commitlint/package.json index 0777ba87c4..593167a001 100644 --- a/@alias/commitlint/package.json +++ b/@alias/commitlint/package.json @@ -13,7 +13,7 @@ "pkg": "pkg-check --skip-main" }, "engines": { - "node": ">=v12" + "node": ">=v10" }, "repository": { "type": "git", diff --git a/@commitlint/cli/package.json b/@commitlint/cli/package.json index e5efcf0ef8..5663bbcdf4 100644 --- a/@commitlint/cli/package.json +++ b/@commitlint/cli/package.json @@ -15,7 +15,7 @@ "pkg": "pkg-check" }, "engines": { - "node": ">=v12" + "node": ">=v10" }, "repository": { "type": "git", @@ -40,7 +40,7 @@ "@commitlint/utils": "^12.1.3", "@types/yargs": "^16.0.0", "execa": "^5.0.0", - "fs-extra": "^10.0.0" + "fs-extra": "^9.0.0" }, "dependencies": { "@commitlint/format": "^12.1.3", @@ -51,7 +51,7 @@ "lodash": "^4.17.19", "resolve-from": "5.0.0", "resolve-global": "1.0.0", - "yargs": "^17.0.0" + "yargs": "^16.2.0" }, "gitHead": "70f7f4688b51774e7ac5e40e896cdaa3f132b2bc" } diff --git a/@commitlint/config-angular-type-enum/package.json b/@commitlint/config-angular-type-enum/package.json index 3d376433e1..83faeaf70f 100644 --- a/@commitlint/config-angular-type-enum/package.json +++ b/@commitlint/config-angular-type-enum/package.json @@ -26,7 +26,7 @@ }, "homepage": "https://github.com/conventional-changelog/commitlint#readme", "engines": { - "node": ">=v12" + "node": ">=v10" }, "devDependencies": { "@commitlint/utils": "^12.1.3" diff --git a/@commitlint/config-angular/package.json b/@commitlint/config-angular/package.json index 5907354cac..decd1b5cba 100644 --- a/@commitlint/config-angular/package.json +++ b/@commitlint/config-angular/package.json @@ -26,7 +26,7 @@ }, "homepage": "https://github.com/conventional-changelog/commitlint#readme", "engines": { - "node": ">=v12" + "node": ">=v10" }, "devDependencies": { "@commitlint/utils": "^12.1.3" diff --git a/@commitlint/config-conventional/package.json b/@commitlint/config-conventional/package.json index bb1c058534..e216d18213 100644 --- a/@commitlint/config-conventional/package.json +++ b/@commitlint/config-conventional/package.json @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/conventional-changelog/commitlint#readme", "engines": { - "node": ">=v12" + "node": ">=v10" }, "devDependencies": { "@commitlint/lint": "^12.1.3", diff --git a/@commitlint/config-lerna-scopes/package.json b/@commitlint/config-lerna-scopes/package.json index e3bb14f0cf..025b124878 100644 --- a/@commitlint/config-lerna-scopes/package.json +++ b/@commitlint/config-lerna-scopes/package.json @@ -34,7 +34,7 @@ } }, "engines": { - "node": ">=v12" + "node": ">=v10" }, "dependencies": { "globby": "^11.0.1", diff --git a/@commitlint/config-patternplate/package.json b/@commitlint/config-patternplate/package.json index 3c825f985c..df40448096 100644 --- a/@commitlint/config-patternplate/package.json +++ b/@commitlint/config-patternplate/package.json @@ -26,7 +26,7 @@ }, "homepage": "https://github.com/conventional-changelog/commitlint#readme", "engines": { - "node": ">=v12" + "node": ">=v10" }, "dependencies": { "@commitlint/config-angular": "^12.1.3", diff --git a/@commitlint/core/package.json b/@commitlint/core/package.json index 25fe236c0d..3a15897acd 100644 --- a/@commitlint/core/package.json +++ b/@commitlint/core/package.json @@ -12,7 +12,7 @@ "pkg": "pkg-check --skip-import" }, "engines": { - "node": ">=v12" + "node": ">=v10" }, "repository": { "type": "git", diff --git a/@commitlint/ensure/package.json b/@commitlint/ensure/package.json index 95c4e2b04e..f71c7484f9 100644 --- a/@commitlint/ensure/package.json +++ b/@commitlint/ensure/package.json @@ -12,7 +12,7 @@ "pkg": "pkg-check" }, "engines": { - "node": ">=v12" + "node": ">=v10" }, "repository": { "type": "git", diff --git a/@commitlint/execute-rule/package.json b/@commitlint/execute-rule/package.json index c231c9da66..c68ffbe565 100644 --- a/@commitlint/execute-rule/package.json +++ b/@commitlint/execute-rule/package.json @@ -12,7 +12,7 @@ "pkg": "pkg-check" }, "engines": { - "node": ">=v12" + "node": ">=v10" }, "repository": { "type": "git", diff --git a/@commitlint/format/package.json b/@commitlint/format/package.json index a3e13e67c8..a28052f8cd 100644 --- a/@commitlint/format/package.json +++ b/@commitlint/format/package.json @@ -12,7 +12,7 @@ "pkg": "pkg-check --skip-import" }, "engines": { - "node": ">=v12" + "node": ">=v10" }, "repository": { "type": "git", diff --git a/@commitlint/is-ignored/package.json b/@commitlint/is-ignored/package.json index fcb560ca01..89120f3b54 100644 --- a/@commitlint/is-ignored/package.json +++ b/@commitlint/is-ignored/package.json @@ -12,7 +12,7 @@ "pkg": "pkg-check" }, "engines": { - "node": ">=v12" + "node": ">=v10" }, "repository": { "type": "git", diff --git a/@commitlint/lint/package.json b/@commitlint/lint/package.json index 7873062317..4a22264bd3 100644 --- a/@commitlint/lint/package.json +++ b/@commitlint/lint/package.json @@ -12,7 +12,7 @@ "pkg": "pkg-check --skip-import" }, "engines": { - "node": ">=v12" + "node": ">=v10" }, "repository": { "type": "git", diff --git a/@commitlint/load/package.json b/@commitlint/load/package.json index e56f4fc474..f7fde13b30 100644 --- a/@commitlint/load/package.json +++ b/@commitlint/load/package.json @@ -12,7 +12,7 @@ "pkg": "pkg-check --skip-import" }, "engines": { - "node": ">=v12" + "node": ">=v10" }, "repository": { "type": "git", diff --git a/@commitlint/message/package.json b/@commitlint/message/package.json index ab02038498..47cbc0795d 100644 --- a/@commitlint/message/package.json +++ b/@commitlint/message/package.json @@ -12,7 +12,7 @@ "pkg": "pkg-check" }, "engines": { - "node": ">=v12" + "node": ">=v10" }, "repository": { "type": "git", diff --git a/@commitlint/parse/package.json b/@commitlint/parse/package.json index cf3d627dc0..5deea68ae3 100644 --- a/@commitlint/parse/package.json +++ b/@commitlint/parse/package.json @@ -12,7 +12,7 @@ "pkg": "pkg-check" }, "engines": { - "node": ">=v12" + "node": ">=v10" }, "repository": { "type": "git", diff --git a/@commitlint/prompt-cli/package.json b/@commitlint/prompt-cli/package.json index 06847ad2bd..885fc76537 100644 --- a/@commitlint/prompt-cli/package.json +++ b/@commitlint/prompt-cli/package.json @@ -28,7 +28,7 @@ }, "homepage": "https://github.com/conventional-changelog/commitlint#readme", "engines": { - "node": ">=v12" + "node": ">=v10" }, "devDependencies": { "@commitlint/test": "^12.1.3", diff --git a/@commitlint/prompt/package.json b/@commitlint/prompt/package.json index d5dffdd584..3a86a4d1d4 100644 --- a/@commitlint/prompt/package.json +++ b/@commitlint/prompt/package.json @@ -33,7 +33,7 @@ }, "homepage": "https://github.com/conventional-changelog/commitlint#readme", "engines": { - "node": ">=v12" + "node": ">=v10" }, "devDependencies": { "@commitlint/utils": "^12.1.3", diff --git a/@commitlint/read/package.json b/@commitlint/read/package.json index 6f44e74a68..ced85408ec 100644 --- a/@commitlint/read/package.json +++ b/@commitlint/read/package.json @@ -12,7 +12,7 @@ "pkg": "pkg-check --skip-import" }, "engines": { - "node": ">=v12" + "node": ">=v10" }, "repository": { "type": "git", @@ -43,7 +43,7 @@ "dependencies": { "@commitlint/top-level": "^12.1.3", "@commitlint/types": "^12.1.3", - "fs-extra": "^10.0.0", + "fs-extra": "^9.0.0", "git-raw-commits": "^2.0.0" }, "gitHead": "70f7f4688b51774e7ac5e40e896cdaa3f132b2bc" diff --git a/@commitlint/resolve-extends/package.json b/@commitlint/resolve-extends/package.json index 73138ba9e2..46a5861048 100644 --- a/@commitlint/resolve-extends/package.json +++ b/@commitlint/resolve-extends/package.json @@ -12,7 +12,7 @@ "pkg": "pkg-check" }, "engines": { - "node": ">=v12" + "node": ">=v10" }, "repository": { "type": "git", diff --git a/@commitlint/rules/package.json b/@commitlint/rules/package.json index 730e05b9c2..f1b7df046b 100644 --- a/@commitlint/rules/package.json +++ b/@commitlint/rules/package.json @@ -12,7 +12,7 @@ "pkg": "pkg-check" }, "engines": { - "node": ">=v12" + "node": ">=v10" }, "repository": { "type": "git", diff --git a/@commitlint/to-lines/package.json b/@commitlint/to-lines/package.json index 0602cd2fb3..665914226b 100644 --- a/@commitlint/to-lines/package.json +++ b/@commitlint/to-lines/package.json @@ -12,7 +12,7 @@ "pkg": "pkg-check" }, "engines": { - "node": ">=v12" + "node": ">=v10" }, "repository": { "type": "git", diff --git a/@commitlint/top-level/package.json b/@commitlint/top-level/package.json index bb50248511..95397242cb 100644 --- a/@commitlint/top-level/package.json +++ b/@commitlint/top-level/package.json @@ -12,7 +12,7 @@ "pkg": "pkg-check" }, "engines": { - "node": ">=v12" + "node": ">=v10" }, "repository": { "type": "git", diff --git a/@commitlint/travis-cli/package.json b/@commitlint/travis-cli/package.json index ef63293966..90cf03885f 100644 --- a/@commitlint/travis-cli/package.json +++ b/@commitlint/travis-cli/package.json @@ -14,7 +14,7 @@ "pkg": "pkg-check --skip-main" }, "engines": { - "node": ">=v12" + "node": ">=v10" }, "repository": { "type": "git", diff --git a/@commitlint/types/package.json b/@commitlint/types/package.json index 142953e196..7808873171 100644 --- a/@commitlint/types/package.json +++ b/@commitlint/types/package.json @@ -11,7 +11,7 @@ "pkg": "pkg-check" }, "engines": { - "node": ">=v12" + "node": ">=v10" }, "repository": { "type": "git", diff --git a/@packages/test-environment/package.json b/@packages/test-environment/package.json index f8976a652e..4d96de6dd2 100644 --- a/@packages/test-environment/package.json +++ b/@packages/test-environment/package.json @@ -9,7 +9,7 @@ "lib/" ], "engines": { - "node": ">=v12" + "node": ">=v10" }, "repository": { "type": "git", diff --git a/@packages/test/package.json b/@packages/test/package.json index 4613c89737..f29e2b35c2 100644 --- a/@packages/test/package.json +++ b/@packages/test/package.json @@ -9,7 +9,7 @@ "lib/" ], "engines": { - "node": ">=v12" + "node": ">=v10" }, "repository": { "type": "git", @@ -33,7 +33,7 @@ "@types/fs-extra": "^9.0.1", "@types/tmp": "^0.2.0", "execa": "^5.0.0", - "fs-extra": "^10.0.0", + "fs-extra": "^9.0.0", "pkg-dir": "5.0.0", "resolve-pkg": "2.0.0", "tmp": "0.2.1" diff --git a/@packages/utils/package.json b/@packages/utils/package.json index c2a758fd5d..791b3f78c8 100644 --- a/@packages/utils/package.json +++ b/@packages/utils/package.json @@ -16,7 +16,7 @@ "pkg": "node pkg-check.js --skip-main" }, "engines": { - "node": ">=v12" + "node": ">=v10" }, "repository": { "type": "git", @@ -41,12 +41,12 @@ }, "dependencies": { "execa": "^5.0.0", - "fs-extra": "^10.0.0", + "fs-extra": "^9.0.0", "read-pkg": "6.0.0", "require-from-string": "2.0.2", "tar-fs": "2.1.1", "tmp": "0.2.1", - "yargs": "^17.0.0" + "yargs": "^16.2.0" }, "gitHead": "71f0194f33943954a8dac1c458be47e5049717cd" } diff --git a/README.md b/README.md index 23fc792447..2e3301b0c8 100644 --- a/README.md +++ b/README.md @@ -178,7 +178,7 @@ is room and need for improvement. The items on the roadmap should enhance `commi ## Version Support -- Node.js [LTS](https://github.com/nodejs/LTS#lts-schedule) `>= 12` +- Node.js [LTS](https://github.com/nodejs/LTS#lts-schedule) `>= 10.21.0` - git `>= 2.13.2` ## Related projects diff --git a/babel.config.js b/babel.config.js index 82fd0b7d59..e77a4562ba 100644 --- a/babel.config.js +++ b/babel.config.js @@ -5,7 +5,7 @@ module.exports = { '@babel/preset-env', { debug: process.env.DEBUG === 'true', - targets: {node: '12'}, + targets: {node: '10'}, }, ], ], diff --git a/yarn.lock b/yarn.lock index 0883339352..2cc4a160b6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4920,14 +4920,15 @@ fs-extra@8.1.0, fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^10.0.0: - version "10.0.0" - resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz#9ff61b655dde53fb34a82df84bb214ce802e17c1" - integrity sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ== +fs-extra@^9.0.0: + version "9.0.1" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc" + integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ== dependencies: + at-least-node "^1.0.0" graceful-fs "^4.2.0" jsonfile "^6.0.1" - universalify "^2.0.0" + universalify "^1.0.0" fs-extra@^9.1.0: version "9.1.0" @@ -10726,16 +10727,3 @@ yargs@^16.2.0: string-width "^4.2.0" y18n "^5.0.5" yargs-parser "^20.2.2" - -yargs@^17.0.0: - version "17.0.0" - resolved "https://registry.npmjs.org/yargs/-/yargs-17.0.0.tgz#147db33e222e8e6a7829df5f2ae696b58d1c82bf" - integrity sha512-gbtedDPfBgG40iLbaRXhqYJycUYqFVZQLIxl1cG5Ez/xZL/47TetSYzPSIixkWa36GKHr9D/o/oSG1vHXF4zTw== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2"