conventional-release-setup
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -5,2 +5,18 @@ # Changelog | ||
## [1.1.0](https://github.com/remarkablemark/conventional-release-setup/compare/v1.0.1...v1.1.0) (2020-06-05) | ||
### Features | ||
* **cli:** add files to git and commit changes with message ([c878c3d](https://github.com/remarkablemark/conventional-release-setup/commit/c878c3d918d47b3e3f33b4eb9886d54d269754ed)) | ||
* **cli:** log exit status code and when script is done ([a887f17](https://github.com/remarkablemark/conventional-release-setup/commit/a887f1728430e0e6effc45eed0204910ea1cbc11)) | ||
* **cli:** set version to 1.0.0-alpha if new package.json initialized ([4fb2c10](https://github.com/remarkablemark/conventional-release-setup/commit/4fb2c108253cb5cfa07a34f68b82fcc634b5d4e9)) | ||
* **index:** run git commands if working directory is a git repo ([14a61d8](https://github.com/remarkablemark/conventional-release-setup/commit/14a61d89615dbf6da17d42ff88592e0d45af61d2)) | ||
* **index:** update package.json version and scripts.release ([f51e1ae](https://github.com/remarkablemark/conventional-release-setup/commit/f51e1ae9b11066def68c2c90a1800351c4c5b261)) | ||
### Bug Fixes | ||
* **index:** remove backticks in git commit command and tidy logs ([040c3c4](https://github.com/remarkablemark/conventional-release-setup/commit/040c3c4588e8cbdabffb31240629dc4540848eef)) | ||
### [1.0.1](https://github.com/remarkablemark/conventional-release-setup/compare/v1.0.0...v1.0.1) (2020-03-24) | ||
@@ -7,0 +23,0 @@ |
{ | ||
"name": "conventional-release-setup", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Sets up package for committing/releasing with conventional commits.", | ||
"author": "Mark <mark@remarkablemark.org>", | ||
"bin": "cli.js", | ||
"bin": "index.js", | ||
"scripts": { | ||
@@ -27,14 +27,14 @@ "lint": "eslint --ignore-path .gitignore .", | ||
"@commitlint/config-conventional": "^8.3.4", | ||
"eslint": "^6.8.0", | ||
"eslint": "^7.1.0", | ||
"eslint-plugin-prettier": "^3.1.2", | ||
"husky": "^4.2.3", | ||
"lint-staged": "^10.0.7", | ||
"prettier": "^1.19.1", | ||
"standard-version": "^7.1.0" | ||
"prettier": "^2.0.5", | ||
"standard-version": "^8.0.0" | ||
}, | ||
"files": [ | ||
"/cli.js", | ||
"/files" | ||
"/files", | ||
"/index.js" | ||
], | ||
"license": "MIT" | ||
} |
@@ -7,3 +7,6 @@ # conventional-release-setup | ||
[![Build Status](https://travis-ci.org/remarkablemark/conventional-release-setup.svg?branch=master)](https://travis-ci.org/remarkablemark/conventional-release-setup) | ||
<!-- | ||
[![Coverage Status](https://coveralls.io/repos/github/remarkablemark/conventional-release-setup/badge.svg?branch=master)](https://coveralls.io/github/remarkablemark/conventional-release-setup?branch=master) | ||
--> | ||
@@ -13,3 +16,3 @@ A command-line tool for setting up a package for committing and releasing with [conventional commits](https://www.conventionalcommits.org/): | ||
```sh | ||
$ npx conventional-release-setup | ||
npx conventional-release-setup | ||
``` | ||
@@ -23,6 +26,6 @@ | ||
# with npm | ||
$ npm install --global conventional-release-setup | ||
npm install --global conventional-release-setup | ||
# with yarn | ||
$ yarn global add conventional-release-setup | ||
yarn global add conventional-release-setup | ||
``` | ||
@@ -35,3 +38,3 @@ | ||
```sh | ||
$ conventional-release-setup | ||
conventional-release-setup | ||
``` | ||
@@ -42,32 +45,54 @@ | ||
```sh | ||
$ npx conventional-release-setup | ||
npx conventional-release-setup | ||
``` | ||
What does this script do? | ||
### Script | ||
It installs the devDependencies: | ||
What does the script do? | ||
It updates `package.json`: | ||
- appends `-alpha` to version | ||
- adds script `release` | ||
Installs devDependencies: | ||
- [@commitlint/cli](https://www.npmjs.com/package/@commitlint/cli) - lints commit messages | ||
- [@commitlint/config-conventional](https://www.npmjs.com/package/@commitlint/config-conventional) - config with [conventional commits](https://conventionalcommits.org/) rules | ||
- [husky](https://www.npmjs.com/package/husky) - sets up Git hooks | ||
- [standard-version](https://www.npmjs.com/package/standard-version) - generates changelog and bumps version | ||
- [standard-version](https://www.npmjs.com/package/standard-version) - generates changelog, bumps version, creates Git commit and tag | ||
And copies the configs to your project root: | ||
Copies configs to your project: | ||
- [.commitlintrc.json](https://github.com/remarkablemark/conventional-release-setup/blob/master/files/.commitlintrc.json) | ||
- [.huskyrc](https://github.com/remarkablemark/conventional-release-setup/blob/master/files/.huskyrc) | ||
- [.huskyrc.json](https://github.com/remarkablemark/conventional-release-setup/blob/master/files/.huskyrc.json) | ||
For your first release, it's recommended to do the following: | ||
### Release | ||
If `-alpha` is appended to your `package.json` version: | ||
```json | ||
{ | ||
"version": "1.0.0-alpha" | ||
} | ||
``` | ||
Then you can run a release like so: | ||
```sh | ||
# git stash | ||
$ npm version 1.0.0 | ||
$ git add package.json | ||
$ git commit -m 'chore(package): bump version to 1.0.0' | ||
$ npx standard-version --first-release | ||
# git stash pop | ||
npm run release # npx standard-version --no-verify | ||
``` | ||
See [standard-version > First Release](https://github.com/conventional-changelog/standard-version#first-release) for more details. | ||
Otherwise, you can [release as a target type imperatively](https://github.com/conventional-changelog/standard-version#release-as-a-target-type-imperatively-npm-version-like): | ||
```sh | ||
npx standard-version --release-as 1.0.0 | ||
``` | ||
Or if you want to use the current version as your [first release](https://github.com/conventional-changelog/standard-version#first-release): | ||
```sh | ||
npx standard-version --first-release | ||
``` | ||
## Release | ||
@@ -78,4 +103,4 @@ | ||
```sh | ||
$ npm run release | ||
$ git push --follow-tags && npm publish | ||
npm run release | ||
git push --follow-tags && npm publish | ||
``` | ||
@@ -82,0 +107,0 @@ |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
9711
106
105
2