Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Bug Template
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---

## 어떤 버그인가요?

<!-- 어떤 버그인지 간결하게 설명해주세요 -->

## 어떤 상황에서 발생한 버그인가요?

<!-- (가능하면) Given-When-Then 형식으로 서술해주세요 -->

## 예상 결과

<!-- 예상했던 정상적인 결과가 어떤 것이었는지 설명해주세요 -->

## 참고할만한 자료(선택)
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature Template
about: Describe this issue template's purpose here.
title: ''
labels: ''
assignees: ''
---

## 이슈에 대해 설명해 주세요.

<!-- 추가하려는 기능에 대해 간결하게 설명해주세요 -->

## 작업 상세 내용

- [ ] TODO

## 참고할만한 자료(선택)
14 changes: 14 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## #️⃣연관된 이슈

<!-- resolves: #이슈번호, #이슈번호 -->

## 📝작업 내용

<!-- 이번 PR에서 작업한 내용을 간략히 설명해주세요(이미지 첨부 가능) -->

### 스크린샷 (선택)

## 💬리뷰 요구사항(선택)

<!-- 리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요
ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요? -->
61 changes: 61 additions & 0 deletions .github/workflows/auto-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Auto Changelog

on:
pull_request:
types: [closed]
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
changelog:
if: 'github.event.pull_request.merged == true && !startsWith(github.event.pull_request.title, "release: v")'
runs-on: ubuntu-latest
steps:
- name: ✅ Checkout
uses: actions/checkout@v3

- name: Enable Corepack and Set Pnpm Version
run: |
npm install -g corepack@latest
corepack enable

- name: Setup Node.js 20.x for pnpm
uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Configure Git
run: |
git config --global user.name "GitHub Actions Bot"
git config --global user.email "github-actions[bot]@users.noreply.github.com"

- name: Generate changelog and bump version
run: pnpm release --skip.commit --skip.tag

- name: Get new version
id: get-version
run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "release: v${{ steps.get-version.outputs.VERSION }}"
title: "release: v${{ steps.get-version.outputs.VERSION }}"
body: |
이 PR은 자동으로 생성되었습니다.

## 변경 사항
- package.json 버전 업데이트 (${{ steps.get-version.outputs.VERSION }})
- CHANGELOG.md 갱신
branch: auto-changelog-update
base: main
delete-branch: true
60 changes: 60 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Create Release & Publish Package

on:
pull_request:
types: [closed]
branches:
- main

permissions:
contents: write

jobs:
create-release:
if: 'github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, "release: v")'
runs-on: ubuntu-latest
steps:
- name: ✅ Checkout
uses: actions/checkout@v3

- name: Extract version from PR title
id: extract-version
run: |
PR_TITLE="${{ github.event.pull_request.title }}"
VERSION=$(echo $PR_TITLE | sed -n 's/release: v\(.*\)/\1/p')
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "Extracted version: $VERSION"

- name: Create and push tag
run: |
git config --global user.name "GitHub Actions Bot"
git config --global user.email "github-actions[bot]@users.noreply.github.com"

TAG_NAME="v${{ steps.extract-version.outputs.VERSION }}"
echo "Creating tag: $TAG_NAME"

git tag -a $TAG_NAME -m "Release $TAG_NAME"
git push origin $TAG_NAME

- name: Read CHANGELOG
id: changelog
run: |
# CHANGELOG.md에서 현재 버전의 변경 사항을 추출
VERSION="${{ steps.extract-version.outputs.VERSION }}"
CHANGELOG_CONTENT=$(sed -n "/## \[${VERSION}\]/,/## \[/p" CHANGELOG.md | sed '$d')

echo "CHANGELOG_CONTENT<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG_CONTENT" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.extract-version.outputs.VERSION }}
release_name: v${{ steps.extract-version.outputs.VERSION }}
body: |
${{ steps.changelog.outputs.CHANGELOG_CONTENT }}
draft: false
prerelease: false
3 changes: 3 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh

npx --no -- commitlint --edit ${1}
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm test
18 changes: 18 additions & 0 deletions .versionrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"types": [
{"type": "feat", "section": "Features"},
{"type": "fix", "section": "Bug Fixes"},
{"type": "docs", "section": "Documentation"},
{"type": "style", "section": "Styles"},
{"type": "refactor", "section": "Code Refactoring"},
{"type": "perf", "section": "Performance Improvements"},
{"type": "test", "section": "Tests"},
{"type": "build", "section": "Build System"},
{"type": "ci", "section": "Continuous Integration"},
{"type": "chore", "section": "Chores"},
{"type": "revert", "section": "Reverts"}
],
"commitUrlFormat": "https://github.com/99mini/fx/commit/{{hash}}",
"compareUrlFormat": "https://github.com/99mini/fx/compare/{{previousTag}}...{{currentTag}}",
"releaseCommitMessageFormat": "chore(release): {{currentTag}}"
}
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Changelog

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.

## 1.0.0 (2025-06-02)


### Features

* advanced array fn ([#5](https://github.com/99mini/fx/issues/5)) ([adf6734](https://github.com/99mini/fx/commit/adf6734573110582da43d095dc59a03021eee81a))
* **array:** implement filter, map, take, and toArray functions with tests ([c484c7e](https://github.com/99mini/fx/commit/c484c7e87df26a13f95b94bd3d9e6ec6a2d2efbb))
* **coverage:** enhance coverage badge generation with detailed metrics and new SVG outputs ([7e685c4](https://github.com/99mini/fx/commit/7e685c4fff45be9056a2e08b4e4b1982be4b1a0c))
* group함수 구현, Fx class 분리한다 ([#1](https://github.com/99mini/fx/issues/1)) ([c6fdfd8](https://github.com/99mini/fx/commit/c6fdfd80c5061b9efca39a21db11a8dfa682682c))
* implement array function ([#2](https://github.com/99mini/fx/issues/2)) ([b098d8f](https://github.com/99mini/fx/commit/b098d8fa7a2e6939fcf9d6d52e4392b29c89adeb))
* **iter:** range fn ([900b78d](https://github.com/99mini/fx/commit/900b78d80903c581bda7c713c6aef8d12d7c23fd))


### Bug Fixes

* change new keyword to of method ([#3](https://github.com/99mini/fx/issues/3)) ([fc11ac7](https://github.com/99mini/fx/commit/fc11ac7a3472f245a9aaff0df7b3fa694b613d03))


### Code Refactoring

* change params order ([#9](https://github.com/99mini/fx/issues/9)) ([3411919](https://github.com/99mini/fx/commit/3411919644cc1e8e03968b5efaea0146639ea8c3))


### Chores

* build & delpoy with rollup ([#8](https://github.com/99mini/fx/issues/8)) ([d4d8b6f](https://github.com/99mini/fx/commit/d4d8b6f4e015abcc06527a5c66e02fd1d175d19e))
* ci targe branch ([877cdfd](https://github.com/99mini/fx/commit/877cdfdc160298da4ee49a45a2bf7bf1efbaf813))
* **ci:** add CI workflow with test coverage reporting ([4b32033](https://github.com/99mini/fx/commit/4b32033e9a508d900b6e0c6f416a6d6a6b5b1561))
* **ci:** update Node.js version to 20.x and streamline setup steps ([2ccea9b](https://github.com/99mini/fx/commit/2ccea9b25e188dd822d6332e7690534ca3d6617f))
* **coverage:** add coverage badge generation script and SVG output ([29b47a4](https://github.com/99mini/fx/commit/29b47a47af20deb642b318a347b7e00682f8967f))
* git add coverage-final.json ([cd7d541](https://github.com/99mini/fx/commit/cd7d5413f4f6460fb25fc01e693df969c801b7e4))
* init changelog ([7c26541](https://github.com/99mini/fx/commit/7c26541812cbabfcff4d38eb1b7d0cc0aa559310))
* install standard-version ([2f1e0d2](https://github.com/99mini/fx/commit/2f1e0d29d416353603b2a71096347664ba607358))

# Changelog

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.
37 changes: 37 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
export default {
extends: ['@commitlint/config-conventional'],
rules: {
'body-leading-blank': [1, 'always'],
'body-max-line-length': [2, 'always', 100],
'footer-leading-blank': [1, 'always'],
'footer-max-line-length': [2, 'always', 100],
'header-max-length': [2, 'always', 100],
'scope-case': [2, 'always', 'lower-case'],
'subject-case': [
2,
'never',
['sentence-case', 'start-case', 'pascal-case', 'upper-case'],
],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [
2,
'always',
[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test',
],
],
},
};
18 changes: 17 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,19 @@
"build:types": "tsc --project tsconfig.build.json",
"build": "pnpm clean && pnpm build:types && pnpm build:rollup",
"ci": "pnpm run test:coverage && pnpm run badge",
"prepublish": "pnpm run build"
"prepublish": "pnpm run build",
"release": "standard-version",
"release:minor": "standard-version --release-as minor",
"release:patch": "standard-version --release-as patch",
"release:major": "standard-version --release-as major",
"release:first": "standard-version --first-release",
"prepare": "husky"
},
"husky": {
"hooks": {
"pre-commit": "pnpm test:watch",
"pre-push": "pnpm test:coverage"
}
},
"keywords": [
"javascript",
Expand All @@ -35,13 +47,17 @@
"author": "99mini",
"license": "MIT",
"devDependencies": {
"@commitlint/cli": "^19.8.1",
"@commitlint/config-conventional": "^19.8.1",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^28.0.3",
"@rollup/plugin-node-resolve": "^16.0.1",
"@rollup/plugin-typescript": "^12.1.2",
"@types/jest": "^29.5.14",
"husky": "^9.1.7",
"jest": "^29.7.0",
"rollup": "^4.40.0",
"standard-version": "^9.5.0",
"ts-jest": "^29.3.2",
"ts-node": "^10.9.2",
"tslib": "^2.8.1",
Expand Down
Loading