From 0356fc0504641adddf00664f63c06409866ade15 Mon Sep 17 00:00:00 2001
From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
Date: Sat, 2 Feb 2019 16:03:44 +0900
Subject: [PATCH] fix(standard-version): revert "simplify settings" (#343)
Revert almost commit: bd0ff2b9e5b18a47908a05ce46cbd4e79840ad5c
---
CHANGELOG.md | 12 +++++-------
lib/init.js | 2 +-
package.json | 5 +++++
test/fixtures/package-empty_expected.json | 5 +++++
test/fixtures/package-normal_expected.json | 5 +++++
5 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 01671a82..d0f3c16a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,17 +3,15 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
-# [7.1.0](https://github.com/ybiquitous/ybiq/compare/v7.0.0...v7.1.0) (2019-02-01)
+# [7.1.0](https://github.com/ybiquitous/ybiq/compare/v7.0.0...v7.1.0) (2019-02-01)
### Features
-* **editorconfig:** increase `max_line_length` ([#335](https://github.com/ybiquitous/ybiq/issues/335)) ([df7e35f](https://github.com/ybiquitous/ybiq/commit/df7e35f))
-* **prettier:** add settings to `package.json` ([#337](https://github.com/ybiquitous/ybiq/issues/337)) ([761c33e](https://github.com/ybiquitous/ybiq/commit/761c33e))
-* **remark:** add settings to `package.json` ([#336](https://github.com/ybiquitous/ybiq/issues/336)) ([a536e25](https://github.com/ybiquitous/ybiq/commit/a536e25))
-* **standard-version:** simplify settings ([#334](https://github.com/ybiquitous/ybiq/issues/334)) ([bd0ff2b](https://github.com/ybiquitous/ybiq/commit/bd0ff2b))
-
-
+- **editorconfig:** increase `max_line_length` ([#335](https://github.com/ybiquitous/ybiq/issues/335)) ([df7e35f](https://github.com/ybiquitous/ybiq/commit/df7e35f))
+- **prettier:** add settings to `package.json` ([#337](https://github.com/ybiquitous/ybiq/issues/337)) ([761c33e](https://github.com/ybiquitous/ybiq/commit/761c33e))
+- **remark:** add settings to `package.json` ([#336](https://github.com/ybiquitous/ybiq/issues/336)) ([a536e25](https://github.com/ybiquitous/ybiq/commit/a536e25))
+- **standard-version:** simplify settings ([#334](https://github.com/ybiquitous/ybiq/issues/334)) ([bd0ff2b](https://github.com/ybiquitous/ybiq/commit/bd0ff2b))
diff --git a/lib/init.js b/lib/init.js
index 43f049e6..df08eac9 100644
--- a/lib/init.js
+++ b/lib/init.js
@@ -49,7 +49,7 @@ const initCommand = (baseDir, logger) => {
});
// update other keys
- const keys = ["husky", "lint-staged", "prettier", "remarkConfig"];
+ const keys = ["husky", "lint-staged", "standard-version", "prettier", "remarkConfig"];
keys.forEach(key => {
if (!(key in packageInfo)) {
packageInfo[key] = {};
diff --git a/package.json b/package.json
index 9551ccc8..c56869cf 100644
--- a/package.json
+++ b/package.json
@@ -91,6 +91,11 @@
"prettier": {
"trailingComma": "es5"
},
+ "standard-version": {
+ "scripts": {
+ "postchangelog": "prettier --write CHANGELOG.md"
+ }
+ },
"remarkConfig": {
"plugins": [
"remark-preset-lint-markdown-style-guide",
diff --git a/test/fixtures/package-empty_expected.json b/test/fixtures/package-empty_expected.json
index f01ae76a..1352f13f 100644
--- a/test/fixtures/package-empty_expected.json
+++ b/test/fixtures/package-empty_expected.json
@@ -29,6 +29,11 @@
},
"ignore": ["CHANGELOG.md"]
},
+ "standard-version": {
+ "scripts": {
+ "postchangelog": "prettier --write CHANGELOG.md"
+ }
+ },
"prettier": {
"trailingComma": "es5"
},
diff --git a/test/fixtures/package-normal_expected.json b/test/fixtures/package-normal_expected.json
index be88faad..266937a9 100644
--- a/test/fixtures/package-normal_expected.json
+++ b/test/fixtures/package-normal_expected.json
@@ -30,6 +30,11 @@
},
"ignore": ["CHANGELOG.md"]
},
+ "standard-version": {
+ "scripts": {
+ "postchangelog": "prettier --write CHANGELOG.md"
+ }
+ },
"prettier": {
"trailingComma": "es5"
},