Skip to content

Commit 57d3b5c

Browse files
authored
feat!: initial creation of the package (#1)
Just the initial Version of the package.
1 parent 38f35f8 commit 57d3b5c

31 files changed

+5746
-3
lines changed

Diff for: .changeset/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works with multi-package
4+
repos, or single-package repos to help you version and publish your code. You can find the full documentation for it
5+
[in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

Diff for: .changeset/config.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"access": "public",
4+
"baseBranch": "main",
5+
"changelog": ["@mheob/changeset-changelog", { "repo": "mheob/changeset-changelog" }],
6+
"commit": false,
7+
"fixed": [],
8+
"ignore": [],
9+
"linked": [],
10+
"updateInternalDependencies": "patch"
11+
}

Diff for: .changeset/sixty-insects-brush.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@mheob/changeset-changelog': major
3+
---
4+
5+
Initial creation of the package

Diff for: .editorconfig

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
indent_style = tab
8+
indent_size = 2
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[*.md]
13+
indent_style = space
14+
max_line_length = off
15+
trim_trailing_whitespace = false
16+
17+
[*.{yml,yaml}]
18+
max_line_length = off
19+
indent_style = space

Diff for: .eslintrc.cjs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/** @type {import('eslint').ESLint.ConfigData} */
2+
module.exports = {
3+
root: true,
4+
extends: ['@mheob/eslint-config'],
5+
rules: {
6+
'unicorn/no-null': 'off',
7+
},
8+
};

Diff for: .github/CODEOWNERS

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Learn how to add code owners here:
2+
# https://help.github.com/en/articles/about-code-owners
3+
4+
* @mheob

Diff for: .github/dependabot.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "friday"
8+
time: "00:23"

Diff for: .github/renovate.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": ["local>mheob/.github:renovate-config"],
4+
"schedule": ["before 4am on Wednesday"]
5+
}

Diff for: .github/workflows/check.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Check
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
check:
13+
name: Check
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout Repo
17+
uses: actions/checkout@v3
18+
19+
- name: Setup PNPM
20+
uses: pnpm/action-setup@v2
21+
with:
22+
version: 7
23+
24+
- name: Setup Node
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version-file: ".nvmrc"
28+
cache: "pnpm"
29+
30+
- name: Install Dependencies
31+
run: pnpm install --frozen-lockfile
32+
33+
- name: Build files
34+
run: pnpm run build
35+
36+
- name: Lint files
37+
run: pnpm run lint
38+
39+
- name: Test files
40+
run: pnpm run test:run

Diff for: .github/workflows/release.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
paths:
6+
- ".changeset/**"
7+
- "src/**"
8+
- "package.json"
9+
branches:
10+
- main
11+
12+
concurrency: ${{ github.workflow }}-${{ github.ref }}
13+
14+
jobs:
15+
release:
16+
name: Release
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout Repo
20+
uses: actions/checkout@v3
21+
with:
22+
token: ${{ secrets.MACHINE_USER_TOKEN }}
23+
24+
- name: Setup PNPM
25+
uses: pnpm/action-setup@v2
26+
with:
27+
version: 7
28+
29+
- name: Setup Node
30+
uses: actions/setup-node@v3
31+
with:
32+
node-version-file: ".nvmrc"
33+
cache: "pnpm"
34+
35+
- name: Install Dependencies
36+
run: pnpm install --frozen-lockfile
37+
38+
- name: Build files
39+
run: pnpm run build
40+
41+
- name: Create Release Pull Request or Publish to npm
42+
id: changesets
43+
uses: changesets/action@v1
44+
with:
45+
commit: "chore(release): bump version and deploy"
46+
title: "chore(release): bump version and deploy"
47+
publish: pnpm run release
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.MACHINE_USER_TOKEN }}
50+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

Diff for: .gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# build
2+
dist
3+
4+
# test
5+
coverage
6+
7+
# dependencies
8+
node_modules
9+
.pnpm-debug.log*

Diff for: .husky/commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
pnpm exec commitlint --edit "$1"

Diff for: .husky/post-merge

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
[ -n "$CI" ] && exit 0
5+
6+
changedFiles="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
7+
8+
hasChanged() {
9+
echo "$changedFiles" | grep -q "$1"
10+
}
11+
12+
if hasChanged 'pnpm-lock.yaml'; then
13+
pnpm install
14+
fi

Diff for: .husky/pre-commit

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
[ -n "$CI" ] && exit 0
5+
6+
pnpm exec lint-staged

Diff for: .husky/pre-push

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
[ -n "$CI" ] && exit 0
5+
6+
pnpm dlx @mheob/check-package-manager

Diff for: .nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node

Diff for: .prettierignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# build
2+
dist
3+
4+
# dependencies
5+
node_modules
6+
pnpm-lock.yaml
7+
8+
# changelog
9+
CHANGELOG.md

Diff for: .prettierrc.cjs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
...require('@mheob/prettier-config'),
3+
};

Diff for: .vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"typescript.tsdk": "node_modules/typescript/lib"
3+
}

Diff for: LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License Copyright (c) 2022 Alexander Böhm
2+
3+
Permission is hereby granted, free
4+
of charge, to any person obtaining a copy of this software and associated
5+
documentation files (the "Software"), to deal in the Software without
6+
restriction, including without limitation the rights to use, copy, modify, merge,
7+
publish, distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so, subject to the
9+
following conditions:
10+
11+
The above copyright notice and this permission notice
12+
(including the next paragraph) shall be included in all copies or substantial
13+
portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
16+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
18+
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
19+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

Diff for: README.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# `@mheob/changeset-changelog` - My changelog for `changesets`
2+
3+
Add my own style for the changelogs generated by the awesome [changesets](https://github.com/changesets/changesets) library. The
4+
style was inspired by the original
5+
[@changesets/changelog-github](https://github.com/changesets/changesets/tree/main/packages/changelog-github) package.
6+
7+
## Install
8+
9+
### With NPM
10+
11+
```sh
12+
npm install -D @mheob/changeset-changelog
13+
```
14+
15+
### With YARN
16+
17+
```sh
18+
yarn add -D @mheob/changeset-changelog
19+
```
20+
21+
### With PNPM
22+
23+
```sh
24+
pnpm add -D @mheob/changeset-changelog
25+
```
26+
27+
## Usage
28+
29+
Add in your `.changeset/config.json` file the following snippet:
30+
31+
```jsonc
32+
{
33+
// ...
34+
"changelog": ["@mheob/changeset-changelog", { "repo": "YOUR_USER/YOUR_REPO" }]
35+
// ...
36+
}
37+
```

Diff for: REDME.md

-3
This file was deleted.

Diff for: package.json

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{
2+
"name": "@mheob/changeset-changelog",
3+
"version": "0.0.0",
4+
"description": "My personal changeset changelog configuration.",
5+
"keywords": [
6+
"changelog",
7+
"changeset",
8+
"config"
9+
],
10+
"homepage": "https://github.com/mheob/changeset-changelog",
11+
"bugs": "https://github.com/mheob/changeset-changelog/issues",
12+
"repository": {
13+
"type": "git",
14+
"url": "https://github.com/mheob/changeset-changelog"
15+
},
16+
"license": "MIT",
17+
"author": "Alexander Böhm <[email protected]>",
18+
"main": "dist/index.js",
19+
"types": "dist/index.d.ts",
20+
"files": [
21+
"dist"
22+
],
23+
"scripts": {
24+
"build": "tsup",
25+
"changeset": "changeset",
26+
"dev": "tsup --watch",
27+
"format": "prettier --write \"**/*.{cjs,js,mjs,ts,json,md,mdx,yaml,yml}\"",
28+
"lint": "eslint . --ext .cjs,.js,.mjs,.ts --fix --ignore-path .gitignore",
29+
"prepare": "ts-node ./scripts/prepare.ts",
30+
"release": "changeset publish",
31+
"test": "vitest",
32+
"test:cov": "vitest run --coverage",
33+
"test:run": "vitest run",
34+
"test:ui": "vitest --ui"
35+
},
36+
"commitlint": {
37+
"extends": [
38+
"@commitlint/config-conventional"
39+
]
40+
},
41+
"lint-staged": {
42+
"*.{cjs,js,mjs,ts}": "eslint --fix",
43+
"!(pnpm-)*.{cjs,js,mjs,ts,json,md,mdx,yaml,yml}": "pnpm exec prettier --write",
44+
"package.json": "pnpm dlx sort-package-json"
45+
},
46+
"dependencies": {
47+
"@changesets/get-github-info": "^0.5.1",
48+
"@changesets/types": "^5.2.0"
49+
},
50+
"devDependencies": {
51+
"@changesets/cli": "^2.25.0",
52+
"@changesets/parse": "^0.3.15",
53+
"@commitlint/cli": "^17.1.2",
54+
"@commitlint/config-conventional": "^17.1.0",
55+
"@mheob/eslint-config": "^3.0.0",
56+
"@mheob/prettier-config": "^2.0.2",
57+
"@mheob/tsconfig": "^1.0.1",
58+
"@types/node": "^18.11.0",
59+
"@vitest/coverage-c8": "^0.24.3",
60+
"husky": "^8.0.1",
61+
"lint-staged": "^13.0.3",
62+
"ts-node": "^10.9.1",
63+
"tsup": "^6.3.0",
64+
"typescript": "^4.8.4",
65+
"vite": "^3.1.8",
66+
"vitest": "^0.24.3"
67+
},
68+
"tsup": {
69+
"clean": true,
70+
"entry": [
71+
"src/index.ts"
72+
],
73+
"dts": true
74+
}
75+
}

0 commit comments

Comments
 (0)