diff --git a/.husky/pre-commit b/.husky/pre-commit index 41ae0d5..c3e7c0f 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,2 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" npx --no lint-staged diff --git a/package.json b/package.json index bb94da4..5ba1b43 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "pretest": "npm run prepare && npx tsc --noEmit odata-parser.d.ts", "test": "mocha", "posttest": "npm run lint", - "prepare": "node -e \"try { require('husky').install() } catch (e) {if (e.code !== 'MODULE_NOT_FOUND') throw e}\" && peggy --source-map --extra-options-file odata-parser.config.json --output odata-parser.js odata-parser.pegjs", + "prepare": "node -e \"try { (await import('husky')).default() } catch (e) { if (e.code !== 'ERR_MODULE_NOT_FOUND') throw e }\" --input-type module && peggy --source-map --extra-options-file odata-parser.config.json --output odata-parser.js odata-parser.pegjs", "prettify": "balena-lint -e ts -e js --typescript --fix odata-parser.d.ts test" }, "repository": "https://github.com/balena-io-modules/odata-parser.git", @@ -20,7 +20,7 @@ "@types/lodash": "^4.14.194", "@types/mocha": "^10.0.1", "chai": "^4.3.7", - "husky": "^8.0.3", + "husky": "^9.0.0", "lint-staged": "^15.0.0", "lodash": "^4.17.21", "mocha": "^10.2.0",