From 9258362815faba40218abaf12fd91506fed800a6 Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Sat, 14 Sep 2019 02:44:37 +0900 Subject: [PATCH] feat(standard-version): add `prerelease` hook (#480) --- package.json | 6 ++++-- test/fixtures/package-empty_expected.json | 6 ++++-- test/fixtures/package-normal_expected.json | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index d3f8e6a1..03b19d47 100644 --- a/package.json +++ b/package.json @@ -58,8 +58,9 @@ "prettier:check": "npm run prettier -- --check", "prettier:write": "npm run prettier -- --write", "format": "npm-run-all --print-label --parallel lint:*:fix prettier:write", - "release": "standard-version --sign", - "release:dry-run": "npm run release -- --dry-run" + "prerelease": "git checkout master && git pull origin master && npm ci && npm test", + "release": "standard-version", + "release:dry-run": "standard-version --dry-run" }, "husky": { "hooks": { @@ -84,6 +85,7 @@ "trailingComma": "es5" }, "standard-version": { + "sign": true, "scripts": { "postchangelog": "prettier --write CHANGELOG.md" } diff --git a/test/fixtures/package-empty_expected.json b/test/fixtures/package-empty_expected.json index 19d3aff7..07caa4b6 100644 --- a/test/fixtures/package-empty_expected.json +++ b/test/fixtures/package-empty_expected.json @@ -12,8 +12,9 @@ "prettier:check": "npm run prettier -- --check", "prettier:write": "npm run prettier -- --write", "format": "npm-run-all --print-label --parallel lint:*:fix prettier:write", - "release": "standard-version --sign", - "release:dry-run": "npm run release -- --dry-run" + "prerelease": "git checkout master && git pull origin master && npm ci && npm test", + "release": "standard-version", + "release:dry-run": "standard-version --dry-run" }, "husky": { "hooks": { @@ -27,6 +28,7 @@ "*.{css,html,js,json,jsx,md,mdx,mjs,scss,ts,tsx,yaml,yml}": ["prettier --write", "git add"] }, "standard-version": { + "sign": true, "scripts": { "postchangelog": "prettier --write CHANGELOG.md" } diff --git a/test/fixtures/package-normal_expected.json b/test/fixtures/package-normal_expected.json index 59e7bde9..5ff95415 100644 --- a/test/fixtures/package-normal_expected.json +++ b/test/fixtures/package-normal_expected.json @@ -12,8 +12,9 @@ "prettier:check": "npm run prettier -- --check", "prettier:write": "npm run prettier -- --write", "format": "npm-run-all --print-label --parallel lint:*:fix prettier:write", - "release": "standard-version --sign", - "release:dry-run": "npm run release -- --dry-run" + "prerelease": "git checkout master && git pull origin master && npm ci && npm test", + "release": "standard-version", + "release:dry-run": "standard-version --dry-run" }, "husky": { "hooks": { @@ -28,6 +29,7 @@ "*.{css,html,js,json,jsx,md,mdx,mjs,scss,ts,tsx,yaml,yml}": ["prettier --write", "git add"] }, "standard-version": { + "sign": true, "scripts": { "postchangelog": "prettier --write CHANGELOG.md" }