Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed May 2, 2022
0 parents commit 4554fc4
Show file tree
Hide file tree
Showing 17 changed files with 4,517 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

[*.js]
indent_style = space
indent_size = 2

[{package.json,*.yml,*.cjson}]
indent_style = space
indent_size = 2
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
node_modules
5 changes: 5 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": [
"@nuxtjs/eslint-config-typescript"
]
}
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: ci

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version: 16
cache: "pnpm"
- run: pnpm install
- run: pnpm lint
- run: pnpm build
- run: pnpm vitest --coverage
- uses: codecov/codecov-action@v3
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.vscode
node_modules
*.log*
.DS_Store
coverage
dist
types
.conf*
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 - UnJS

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
65 changes: 65 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# changelogen

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![Github Actions][github-actions-src]][github-actions-href]
[![Codecov][codecov-src]][codecov-href]

> Generate Beautiful Changelogs using [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
## Quick Start

Generate changelog in markdown format to the console output:

```sh
npx changelogen
```


## CLI Usage

```sh
npx changelogen [--from=] [--to=...] [<rootDir>]
```

**Arguments:**

- `from`: Start commit reference. When not provided, **latest git tag** will be used as default.
- `to`: End commit reference. When not provided, **latest commit in HEAD** will be used as default.
- `rootDir`: Path to git repository. When not provided, **current working directory** will be used as as default.




## Configuration

Configuration is loaded by [unjs/c12](https://github.com/unjs/c12) from cwd. You can use either `changelog.json`, `changelog.{ts,js,mjs,cjs}` or `.changelogrc` or `changelog` field in package.json.

See [./src/config.ts](./src/config.ts) for available options and defaults.


## 💻 Development

- Clone this repository
- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable` (use `npm i -g corepack` for Node.js < 16.10)
- Install dependencies using `pnpm install`
- Run interactive tests using `pnpm dev`

## License

Made with 💛

Published under [MIT License](./LICENSE).

<!-- Badges -->
[npm-version-src]: https://img.shields.io/npm/v/changelogen?style=flat-square
[npm-version-href]: https://npmjs.com/package/changelogen

[npm-downloads-src]: https://img.shields.io/npm/dm/changelogen?style=flat-square
[npm-downloads-href]: https://npmjs.com/package/changelogen

[github-actions-src]: https://img.shields.io/github/workflow/status/unjs/changelogen/ci/main?style=flat-square
[github-actions-href]: https://github.com/unjs/changelogen/actions?query=workflow%3Aci

[codecov-src]: https://img.shields.io/codecov/c/gh/unjs/changelogen/main?style=flat-square
[codecov-href]: https://codecov.io/gh/unjs/changelogen
52 changes: 52 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"name": "changelogen",
"version": "0.0.1",
"description": "Generate Beautiful Changelogs using Conventional Commits",
"repository": "unjs/changelogen",
"license": "MIT",
"sideEffects": false,
"type": "module",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"bin": {
"changelogen": "./dist/cli.mjs"
},
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "unbuild",
"changelogen": "jiti ./src/cli.ts",
"dev": "vitest dev",
"lint": "eslint --ext .ts,.js,.mjs,.cjs .",
"prepack": "unbuild",
"release": "pnpm test && standard-version && git push --follow-tags && pnpm publish",
"test": "pnpm lint && vitest run"
},
"dependencies": {
"c12": "^0.2.7",
"consola": "^2.15.3",
"execa": "^6.1.0",
"mri": "^1.2.0",
"scule": "^0.2.1"
},
"devDependencies": {
"@nuxtjs/eslint-config-typescript": "latest",
"@types/node": "^17.0.31",
"c8": "latest",
"eslint": "latest",
"jiti": "^1.13.0",
"standard-version": "latest",
"typescript": "latest",
"unbuild": "latest",
"vitest": "latest"
},
"packageManager": "pnpm@7.0.0"
}
Loading

0 comments on commit 4554fc4

Please sign in to comment.