diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 000000000..d2ae35e84 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +yarn lint-staged diff --git a/dist/index.js b/dist/index.js index c2cadc5f1..f66b3940a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -78499,7 +78499,7 @@ module.exports = VerifyStream; const path = __nccwpck_require__(71017); const fs = __nccwpck_require__(18962); const stripBom = __nccwpck_require__(88551); -const parseJson = __nccwpck_require__(81680); +const parseJson = __nccwpck_require__(86615); const pify = __nccwpck_require__(64810); const parse = (data, filePath, options = {}) => { @@ -79293,47 +79293,6 @@ function patch (fs) { } -/***/ }), - -/***/ 81680: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const errorEx = __nccwpck_require__(23505); -const fallback = __nccwpck_require__(55586); - -const JSONError = errorEx('JSONError', { - fileName: errorEx.append('in %s') -}); - -module.exports = (input, reviver, filename) => { - if (typeof reviver === 'string') { - filename = reviver; - reviver = null; - } - - try { - try { - return JSON.parse(input, reviver); - } catch (err) { - fallback(input, reviver); - - throw err; - } - } catch (err) { - err.message = err.message.replace(/\n/g, ''); - - const jsonErr = new JSONError(err); - if (filename) { - jsonErr.fileName = filename; - } - - throw jsonErr; - } -}; - - /***/ }), /***/ 11289: @@ -102807,6 +102766,47 @@ module.exports = pTry; module.exports["default"] = pTry; +/***/ }), + +/***/ 86615: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const errorEx = __nccwpck_require__(23505); +const fallback = __nccwpck_require__(55586); + +const JSONError = errorEx('JSONError', { + fileName: errorEx.append('in %s') +}); + +module.exports = (input, reviver, filename) => { + if (typeof reviver === 'string') { + filename = reviver; + reviver = null; + } + + try { + try { + return JSON.parse(input, reviver); + } catch (err) { + fallback(input, reviver); + + throw err; + } + } catch (err) { + err.message = err.message.replace(/\n/g, ''); + + const jsonErr = new JSONError(err); + if (filename) { + jsonErr.fileName = filename; + } + + throw jsonErr; + } +}; + + /***/ }), /***/ 89808: diff --git a/package.json b/package.json index 71f5ae91b..942456fc3 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "prettier": "prettier --write **/*.{js,md,json,yml,yaml}", "postversion": "npm run test && git push && git push --tags && npm publish && npm run deploy && npm run open-releases", "open-releases": "open \"$(node -e 'console.log(`${require(\"./package.json\").repository}/releases`)')\"", - "deploy": "git push -f heroku \"$(node -e 'console.log(`v${require(\"./package.json\").version}`)')\":master" + "deploy": "git push -f heroku \"$(node -e 'console.log(`v${require(\"./package.json\").version}`)')\":master", + "prepare": "husky install" }, "dependencies": { "@actions/core": "1.6.0", @@ -65,11 +66,6 @@ "lib/**" ] }, - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, "lint-staged": { "*.js": [ "eslint --fix"