diff --git a/package-lock.json b/package-lock.json index 0427aa6..5ea9c89 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,8 @@ "license-checker": "^25.0.1", "lint-staged": "^15.2.10", "mocha": "^10.7.3", - "pre-commit": "^1.2.2" + "pre-commit": "^1.2.2", + "yesno": "^0.4.0" } }, "node_modules/@babel/helper-string-parser": { @@ -5244,6 +5245,13 @@ "node": ">=8" } }, + "node_modules/yesno": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/yesno/-/yesno-0.4.0.tgz", + "integrity": "sha512-tdBxmHvbXPBKYIg81bMCB7bVeDmHkRzk5rVJyYYXurwKkHq/MCd8rz4HSJUP7hW0H2NlXiq8IFiWvYKEHhlotA==", + "dev": true, + "license": "BSD" + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 3febd83..0dfccc3 100644 --- a/package.json +++ b/package.json @@ -21,9 +21,10 @@ "lint": "eslint", "fix": "eslint --fix", "lint-staged": "lint-staged", - "build": "node --experimental-json-modules build.js", + "build": "node build.js", "docs": "jsdoc -c jsdoc.json", - "release": "npm run build && npm test && git checkout dev && git pull && npm version $SEMVER && git push && git checkout master && git merge dev && git push --follow-tags && git checkout dev", + "yesno": "node -e \"const yesno = require('yesno'); yesno({ question: 'Are you sure you want to continue?' }).then(ok => process.exit(ok ? 0 : 1));\"", + "release": "test $(git rev-parse --abbrev-ref HEAD) = dev && git pull && npm test && npm run build && npm version $SEMVER && npm run --silent yesno && (git push && git checkout master && git merge dev && git push --follow-tags && git checkout dev) || (git tag -d $(git describe --tags) && git reset --hard HEAD~1)", "release:patch": "SEMVER=patch npm run release", "release:minor": "SEMVER=minor npm run release", "release:major": "SEMVER=major npm run release", @@ -63,7 +64,8 @@ "license-checker": "^25.0.1", "lint-staged": "^15.2.10", "mocha": "^10.7.3", - "pre-commit": "^1.2.2" + "pre-commit": "^1.2.2", + "yesno": "^0.4.0" }, "dependencies": { "axios": "^1.7.7",