You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@annotator.apache.org by ra...@apache.org on 2022/04/24 04:23:40 UTC
[incubator-annotator] 07/07: Upgrade Husky from v4 to v7
This is an automated email from the ASF dual-hosted git repository.
randall pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git
commit c02ae791f5272e866f7455a83c267dab8888c9ea
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Sat Apr 23 21:15:48 2022 -0700
Upgrade Husky from v4 to v7
---
.eslintrc.js | 1 -
.ratignore | 1 +
husky.config.js | 28 -----------------------
husky/pre-commit | 23 +++++++++++++++++++
package.json | 4 +++-
yarn.lock | 67 ++++++++++++++------------------------------------------
6 files changed, 44 insertions(+), 80 deletions(-)
diff --git a/.eslintrc.js b/.eslintrc.js
index fcbd83d..cb0beeb 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -74,7 +74,6 @@ module.exports = {
'.mocharc.js',
'babel-register.js',
'babel.config.js',
- 'husky.config.js',
'nyc.config.js',
'web/webpack.config.js',
],
diff --git a/.ratignore b/.ratignore
index b31f5da..987b7b1 100644
--- a/.ratignore
+++ b/.ratignore
@@ -6,6 +6,7 @@
\.npmignore
\.ratignore
\.travis.yml
+husky.sh
lerna\.json
node_modules
package\.json
diff --git a/husky.config.js b/husky.config.js
deleted file mode 100644
index 029aa3a..0000000
--- a/husky.config.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * SPDX-FileCopyrightText: 2016-2022 The Apache Software Foundation
- * SPDX-License-Identifier: Apache-2.0
- * @license
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-module.exports = {
- hooks: {
- 'pre-commit': 'lint-staged',
- },
- skipCI: true,
-};
diff --git a/husky/pre-commit b/husky/pre-commit
new file mode 100755
index 0000000..9785eaf
--- /dev/null
+++ b/husky/pre-commit
@@ -0,0 +1,23 @@
+#!/bin/sh
+# SPDX-FileCopyrightText: 2016-2022 The Apache Software Foundation
+# SPDX-License-Identifier: Apache-2.0
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+. "$(dirname "$0")/_/husky.sh"
+
+yarn run lint-staged
diff --git a/package.json b/package.json
index d6a209d..9bc212a 100644
--- a/package.json
+++ b/package.json
@@ -22,6 +22,7 @@
"clean": "tsc --build --clean && lerna exec -- rimraf DISCLAIMER-WIP LICENSE NOTICE README.md coverage docs lib web/dist",
"docs": "tsc --build && typedoc",
"lint": "eslint .",
+ "prepare": "is-ci || husky install husky",
"prepublishOnly": "yarn run build",
"publish": "lerna publish",
"publish:ci": "yarn run publish --canary --exact --force-publish '*' --no-verify-access --yes minor",
@@ -61,7 +62,8 @@
"eslint-plugin-prettier": "^3.1.4",
"file-loader": "^6.0.0",
"global-jsdom": "^8.0.0",
- "husky": "^4.2.1",
+ "husky": "^7.0.0",
+ "is-ci": "^3.0.1",
"jsdom": "^16.2.2",
"lerna": "^3.20.2",
"lint-staged": "^10.0.2",
diff --git a/yarn.lock b/yarn.lock
index da94354..772c950 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3097,6 +3097,11 @@ ci-info@^2.0.0:
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46"
integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==
+ci-info@^3.2.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2"
+ integrity sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==
+
cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3:
version "1.0.4"
resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de"
@@ -3261,11 +3266,6 @@ compare-func@^1.3.1:
array-ify "^1.0.0"
dot-prop "^3.0.0"
-compare-versions@^3.5.1:
- version "3.5.1"
- resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.5.1.tgz#26e1f5cf0d48a77eced5046b9f67b6b61075a393"
- integrity sha512-9fGPIB7C6AyM18CJJBHt5EnCZDG3oiTJYy0NjfIAGjKpzv0tkxWko7TNQHF5ymqm7IH03tqmeuBxtvD+Izh6mg==
-
component-emitter@^1.2.1:
version "1.3.0"
resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0"
@@ -4730,7 +4730,7 @@ find-up@^3.0.0:
dependencies:
locate-path "^3.0.0"
-find-up@^4.0.0, find-up@^4.1.0:
+find-up@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19"
integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==
@@ -4738,13 +4738,6 @@ find-up@^4.0.0, find-up@^4.1.0:
locate-path "^5.0.0"
path-exists "^4.0.0"
-find-versions@^3.2.0:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-3.2.0.tgz#10297f98030a786829681690545ef659ed1d254e"
- integrity sha512-P8WRou2S+oe222TOCHitLy8zj+SIsVJh52VP4lvXkaFVnOFFdoWv1H1Jjvel1aI6NCFOAaeAVm8qrI0odiLcww==
- dependencies:
- semver-regex "^2.0.0"
-
findup-sync@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1"
@@ -5459,21 +5452,10 @@ humanize-ms@^1.2.1:
dependencies:
ms "^2.0.0"
-husky@^4.2.1:
- version "4.2.1"
- resolved "https://registry.yarnpkg.com/husky/-/husky-4.2.1.tgz#b09f1bd9129e6c323cc515dc17081d0615e2d7c1"
- integrity sha512-Qa0lRreeIf4Tl92sSs42ER6qc3hzoyQPPorzOrFWfPEVbdi6LuvJEqWKPk905fOWIR76iBpp7ECZNIwk+a8xuQ==
- dependencies:
- chalk "^3.0.0"
- ci-info "^2.0.0"
- compare-versions "^3.5.1"
- cosmiconfig "^6.0.0"
- find-versions "^3.2.0"
- opencollective-postinstall "^2.0.2"
- pkg-dir "^4.2.0"
- please-upgrade-node "^3.2.0"
- slash "^3.0.0"
- which-pm-runs "^1.0.0"
+husky@^7.0.0:
+ version "7.0.4"
+ resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.4.tgz#242048245dc49c8fb1bf0cc7cfb98dd722531535"
+ integrity sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==
iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@~0.4.13:
version "0.4.24"
@@ -5704,6 +5686,13 @@ is-ci@^2.0.0:
dependencies:
ci-info "^2.0.0"
+is-ci@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.1.tgz#db6ecbed1bd659c43dac0f45661e7674103d1867"
+ integrity sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==
+ dependencies:
+ ci-info "^3.2.0"
+
is-core-module@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a"
@@ -7320,11 +7309,6 @@ onigasm@^2.2.5:
dependencies:
lru-cache "^5.1.1"
-opencollective-postinstall@^2.0.2:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz#5657f1bede69b6e33a45939b061eb53d3c6c3a89"
- integrity sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==
-
opn@^5.5.0:
version "5.5.0"
resolved "https://registry.yarnpkg.com/opn/-/opn-5.5.0.tgz#fc7164fab56d235904c51c3b27da6758ca3b9bfc"
@@ -7778,13 +7762,6 @@ pkg-dir@^3.0.0:
dependencies:
find-up "^3.0.0"
-pkg-dir@^4.2.0:
- version "4.2.0"
- resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3"
- integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==
- dependencies:
- find-up "^4.0.0"
-
pkg-up@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f"
@@ -8543,11 +8520,6 @@ semver-compare@^1.0.0:
resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc"
integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w=
-semver-regex@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338"
- integrity sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw==
-
"semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0:
version "5.7.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
@@ -9998,11 +9970,6 @@ which-module@^2.0.0:
resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=
-which-pm-runs@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb"
- integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=
-
which@1, which@^1.2.14, which@^1.2.9, which@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"