Skip to content

Commit

Permalink
Merge branch 'main' into revert_resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethTrecy committed Mar 4, 2023
2 parents 805d93d + a14d749 commit 09f30cc
Show file tree
Hide file tree
Showing 18 changed files with 1,488 additions and 437 deletions.
7 changes: 3 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"extends": [
"eslint-config-unjs"
],
"extends": ["eslint-config-unjs"],
"rules": {
"unicorn/no-null": 0,
"unicorn/prefer-top-level-await": 0,
"unicorn/template-indent": 0
"unicorn/template-indent": 0,
"unicorn/no-process-exit": 0
}
}
56 changes: 56 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,62 @@

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.

## v0.5.1

[compare changes](https://github.com/unjs/changelogen/compare/v0.5.0...v0.5.1)


### 🩹 Fixes

- Allow providing no versions ([ac84c39](https://github.com/unjs/changelogen/commit/ac84c39))
- Use parsed release body ([aec2341](https://github.com/unjs/changelogen/commit/aec2341))
- Strip title line from release ([319f7ce](https://github.com/unjs/changelogen/commit/319f7ce))

### 🏡 Chore

- Simplify release command ([225fa64](https://github.com/unjs/changelogen/commit/225fa64))

### ❤️ Contributors

- Pooya Parsa ([@pi0](https://github.com/pi0))

## v0.5.0

[compare changes](https://github.com/unjs/changelogen/compare/v0.4.1...v0.5.0)


### 🚀 Enhancements

- Update execa to v7 ([e61e2f6](https://github.com/unjs/changelogen/commit/e61e2f6))
- ⚠️ Support different repository providers ([#55](https://github.com/unjs/changelogen/pull/55))
- Github release integration ([#67](https://github.com/unjs/changelogen/pull/67))
- Support explicit bumping as major, minor, or patch via cli ([c8afa86](https://github.com/unjs/changelogen/commit/c8afa86))
- Automatically resolve github token from gh cli ([231a3ec](https://github.com/unjs/changelogen/commit/231a3ec))
- Default `gh release` to latest version ([44788f5](https://github.com/unjs/changelogen/commit/44788f5))

### 🩹 Fixes

- Stage `CHANGELOG.md` and `package.json` when releasing ([69d375c](https://github.com/unjs/changelogen/commit/69d375c))
- Add correct output file to git ([#64](https://github.com/unjs/changelogen/pull/64))
- Update ungh link ([a5ab510](https://github.com/unjs/changelogen/commit/a5ab510))
- Only access latest tag accessible from current branch ([#69](https://github.com/unjs/changelogen/pull/69))
- **cli:** Don't eat up first `-*` arg ([77b483b](https://github.com/unjs/changelogen/commit/77b483b))

### 🏡 Chore

- Fix lint issue and update snapshots ([e162ab8](https://github.com/unjs/changelogen/commit/e162ab8))
- Mention gh cli login ([7f4a05f](https://github.com/unjs/changelogen/commit/7f4a05f))

#### ⚠️ Breaking Changes

- ⚠️ Support different repository providers ([#55](https://github.com/unjs/changelogen/pull/55))

### ❤️ Contributors

- Pooya Parsa ([@pi0](https://github.com/pi0))
- Daniel Roe <[email protected]>
- Donald Shtjefni ([@dnldsht](https://github.com/dnldsht))

## v0.4.1

[compare changes](https://github.com/unjs/changelogen/compare/v0.4.0...v0.4.1)
Expand Down
35 changes: 28 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,49 @@ npx changelogen@latest --release
## CLI Usage

```sh
npx changelogen@latest [...args] [<rootDir>]
npx changelogen@latest [...args] [--dir <dir>]
```

**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.
- `--output`: Changelog file name to create or update. Defaults to `CHANGELOG.md` and resolved relative to rootDir. Use `--no-output` to write to console only.
- `--dir`: Path to git repository. When not provided, **current working directory** will be used as as default.
- `--output`: Changelog file name to create or update. Defaults to `CHANGELOG.md` and resolved relative to dir. Use `--no-output` to write to console only.
- `--bump`: Determine semver change and update version in `package.json`.
- `--release`. Bumps version in `package.json` and creates commit and git tags using local `git`. You can disable commit using `--no-commit` and tag using `--no-tag`.
- `-r`: Release as specific version.
- `--major`: Bump as a semver-major version
- `--minor`: Bump as a semver-minor version
- `--patch`: Bump as a semver-patch version

### `changelogen gh release`

Changelogen has built-in functionality to sync with with Github releases!

In order to manually sync a release, you can use `changelogen gh release`. It will parse current `CHANGELOG.md` from current repository (local, then remote) and create or update releases.

Usage:

```sh
npx changelogen@latest gh release [all|versions...] [--dir] [--token]
```

To enable this integration, make sure there is a valid `repository` field in `package.json` or `repo` is set in `.changelogenrc`.

By default in unauthenticated mode, changelogen will open a browser link to make manual release. By providing github token, it can be automated.

- Using environment variables or `.env`, use `CHANGELOGEN_TOKENS_GITHUB` or `GITHUB_TOKEN` or `GH_TOKEN`
- Using CLI args, use `--token <token>`
- Using global configuration, put `tokens.github=<token>` inside `~/.changlogenrc`
- Using [GitHub CLI](https://cli.github.com/) token when authenticated with `gh auth login`

## 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}`, `.changelogrc` or use the `changelog` field in `package.json`.

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


## 💻 Development

- Clone this repository
Expand All @@ -64,14 +87,12 @@ 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
36 changes: 21 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "changelogen",
"version": "0.4.1",
"version": "0.5.1",
"description": "Generate Beautiful Changelogs using Conventional Commits",
"repository": "unjs/changelogen",
"license": "MIT",
Expand All @@ -26,33 +26,39 @@
"changelogen": "jiti ./src/cli.ts",
"dev": "vitest dev",
"lint": "eslint --ext .ts,.js,.mjs,.cjs . && prettier -c src test",
"lint:fix": "eslint --fix --ext .ts,.js,.mjs,.cjs . && prettier -w src test",
"prepack": "unbuild",
"release": "pnpm test && pnpm changelogen --release && git push --follow-tags && pnpm publish",
"release": "pnpm test && pnpm changelogen --release --push && pnpm publish",
"test": "pnpm lint && vitest run --coverage"
},
"dependencies": {
"c12": "^1.1.0",
"c12": "^1.1.2",
"colorette": "^2.0.19",
"consola": "^2.15.3",
"convert-gitmoji": "^0.1.3",
"execa": "^6.1.0",
"execa": "^7.0.0",
"mri": "^1.2.0",
"node-fetch-native": "^1.0.1",
"pkg-types": "^1.0.1",
"node-fetch-native": "^1.0.2",
"ofetch": "^1.0.1",
"open": "^8.4.2",
"pathe": "^1.1.0",
"pkg-types": "^1.0.2",
"scule": "^1.0.0",
"semver": "^7.3.8"
"semver": "^7.3.8",
"yaml": "^2.2.1"
},
"devDependencies": {
"@types/node": "^18.11.18",
"@types/node": "^18.14.2",
"@types/semver": "^7.3.13",
"@vitest/coverage-c8": "^0.28.3",
"eslint": "^8.33.0",
"@vitest/coverage-c8": "^0.29.2",
"eslint": "^8.35.0",
"eslint-config-unjs": "^0.1.0",
"jiti": "^1.16.2",
"prettier": "^2.8.3",
"jiti": "^1.17.1",
"prettier": "^2.8.4",
"standard-version": "^9.5.0",
"typescript": "^4.9.5",
"unbuild": "^1.1.1",
"vitest": "^0.28.3"
"unbuild": "^1.1.2",
"vitest": "^0.29.2"
},
"packageManager": "pnpm@7.26.3"
"packageManager": "pnpm@7.28.0"
}
Loading

0 comments on commit 09f30cc

Please sign in to comment.