Skip to content

Commit

Permalink
chore: WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
kurone-kito committed Jan 12, 2025
1 parent fad0732 commit dec7465
Show file tree
Hide file tree
Showing 14 changed files with 3,695 additions and 299 deletions.
31 changes: 31 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name-template: v$RESOLVED_VERSION 🌈
tag-template: v$RESOLVED_VERSION
categories:
- title: 🚀 Features
labels:
- feature
- enhancement
- title: 🐛 Bug Fixes
labels:
- fix
- bugfix
- bug
- title: 🧰 Maintenance
label: chore
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&'
version-resolver:
major:
labels:
- major
minor:
labels:
- minor
patch:
labels:
- patch
default: patch
template: |
## Changes
$CHANGES
3 changes: 3 additions & 0 deletions .github/workflows/push-feature.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: The CI workflow on push
on:
push:
branches:
- '*'
- '!master'
permissions:
contents: read
jobs:
Expand Down
62 changes: 19 additions & 43 deletions .github/workflows/push-master.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,25 @@
name: CI/CD on master branch
name: The CI workflow on merge as a main branch
run-name: Merged the main branch by @${{ github.actor }}
on:
push:
branches:
- 'master'
- main
pull_request:
types:
- opened
- reopened
- synchronize
branches:
- main
permissions:
contents: write
jobs:
deploy:
name: Build and deploy
runs-on: ubuntu-20.04
strategy:
matrix:
node-version:
- '16.x'
cache-key:
- '19a27acd-b393-4a8a-a09f-276a4663454d'
update_release_draft:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: set npm config
run: npm config set unsafe-perm true
- name: Determine npm cache directory
id: npm-cache
run: echo "::set-output name=dir::$(npm config get cache)"
- name: Persist the cache of dependent packages.
uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ matrix.cache-key }}_${{ runner.os }}-node_v${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ matrix.cache-key }}_${{ runner.os }}-node_v${{ matrix.node-version }}-
${{ matrix.cache-key }}_${{ runner.os }}-node_v
${{ matrix.cache-key }}_${{ runner.os }}-node-
${{ matrix.cache-key }}_${{ runner.os }}-
- run: npm ci --legacy-peer-deps
- run: npm run prepack
- uses: release-drafter/release-drafter@v6
env:
CI: true
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_URL: ${{ secrets.SENTRY_URL }}
- name: Deploy the build result.
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./packages/dantalion-web-playground/dist
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish the packages
run-name: Publish by @${{ github.actor }}
on:
release:
types:
- published
permissions:
contents: read
jobs:
build:
name: The build process
runs-on: ubuntu-latest
steps:
- name: Stages the pushed branch
uses: actions/checkout@v4
- name: Pre-prepare the Node.js environment
uses: actions/setup-node@v4
with:
node-version-file: .node-version
- name: Enable the corepack
run: corepack enable
- name: Post-prepare the Node.js environment
uses: actions/setup-node@v4
with:
cache: ${{ !env.ACT && 'pnpm' || '' }}
node-version-file: .node-version
- env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
name: deploy the token
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
echo "@kurone-kito:registry=https://registry.npmjs.org/" >> ~/.npmrc
- env:
HUSKY: 0
name: Install the dependencies
run: pnpm install --prefer-frozen-lockfile
- name: Publish the packages
run: pnpm run publish
2 changes: 1 addition & 1 deletion .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ignores:
- '**/node_modules/**/*'
- .github/CODE_OF_CONDUCT*
- .yarn/**/*
- node_modules/**/*
- CHANGELOG.md
1 change: 1 addition & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ default: true
# these elements due to folding difficulties.
line-length:
code_blocks: false
headings: false
tables: false
# Allows the use of duplicate headings. The default is unconditional
# prohibition. Due to the `siblings_only` flag not working, it is necessary
Expand Down
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"explorer.fileNesting.expand": false,
"explorer.fileNesting.patterns": {
"*.md": "${capture}.*.md",
"*.mjs": "${capture}.*",
"*.mts": "${capture}.test.mts",
".gitattributes": ".gitignore",
".markdownlint.*": ".markdownlint-cli2.*",
".tool-versions": ".node-version, .nvmrc",
Expand All @@ -21,7 +23,7 @@
"**/.eslintcache": true,
"**/node_modules/**/*": true
},
"git.branchProtection": ["main"],
"git.branchProtection": ["master"],
"search.exclude": {
"**/node_modules/**/*": true
},
Expand Down
11 changes: 9 additions & 2 deletions cspell.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ cache:
useCache: true
import:
- '@kurone-kito/cspell-config'
ignorePaths:
- node_modules
version: '0.2'
words:
- bazi
- generical
- npmjs
- ziweidoushu
# TODO: Fix them
- dcoef
- febrary
- ommited
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"bugs": {
"url": "https://github.com/kurone-kito/dantalion/issues"
},
"repository": "github:kurone-kito/dantalion",
"license": "MIT",
"author": "kurone-kito <[email protected]> (https://kit.black/)",
"repository": "github:kurone-kito/dantalion",
"type": "module",
"files": [],
"scripts": {
Expand Down Expand Up @@ -55,7 +55,7 @@
"@kurone-kito/typescript-config": "^0.17.1-alpha.1",
"@typescript-eslint/parser": "^8.16.0",
"cspell": "^8.16.1",
"eslint": "^9.15.0",
"eslint": "^9.16.0",
"eslint-formatter-codeframe": "^7.32.1",
"husky": "^9.1.7",
"lint-staged": "^15.2.10",
Expand All @@ -67,9 +67,10 @@
"prettier-plugin-sort-json": "^4.0.0",
"rimraf": "^5.0.10",
"typescript": "~5.7.2",
"typescript-eslint-language-service": "^5.0.5"
"typescript-eslint-language-service": "^5.0.5",
"vitest": "^2.1.6"
},
"packageManager": "[email protected].3+sha512.c0f53ee99477ed969b82b289ad011a5d16bf1623c957e7f29eabe8d0c00b574c29b8c7f54f6c67ee710c73f285c8154d07ce44b46fe2c0eeb476a90441bac371",
"packageManager": "[email protected].4+sha512.c8180b3fbe4e4bca02c94234717896b5529740a6cbadf19fa78254270403ea2f27d4e1d46a08a0f56c89b63dc8ebfd3ee53326da720273794e6200fcf0d184ab",
"engines": {
"node": "^18.20 || ^20.10 || >=22"
},
Expand Down
46 changes: 25 additions & 21 deletions packages/dantalion-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,40 +30,44 @@
"directory": "packages/dantalion-cli"
},
"scripts": {
"build": "tsc --project tsconfig.build.json",
"dantalion": "node dist/src/index.js",
"lint": "eslint --cache --fix .",
"prepack": "tsc --project tsconfig.build.json",
"start": "tsc --project tsconfig.build.json --watch",
"test": "jest --coverage"
"test": "vitest run"
},
"dependencies": {
"@kurone-kito/dantalion-core": "^0.19.2",
"@kurone-kito/dantalion-i18n": "^0.19.2",
"commander": "^7.2.0",
"marked": "^2.1.2",
"marked-terminal": "^4.1.1"
"commander": "^12.1.0",
"marked": "^15.0.3",
"marked-terminal": "^7.2.1"
},
"devDependencies": {
"@types/jest": "^26.0.23",
"@types/marked": "^2.0.3",
"@types/marked-terminal": "^3.1.1",
"@typescript-eslint/eslint-plugin": "^4.28.0",
"@typescript-eslint/parser": "^4.28.0",
"eslint": "^7.29.0",
"eslint-config-airbnb-typescript": "^12.3.1",
"eslint-config-prettier": "^8.3.0",
"eslint-import-resolver-typescript": "^2.4.0",
"@types/jest": "^29.5.14",
"@types/marked": "^6.0.0",
"@types/marked-terminal": "^6.1.1",
"@typescript-eslint/eslint-plugin": "^8.16.0",
"@typescript-eslint/parser": "^8.16.0",
"eslint": "^9.16.0",
"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jest": "^24.3.6",
"eslint-plugin-prettier": "^3.4.0",
"jest": "^27.0.5",
"jest-cli": "^27.0.5",
"prettier": "^2.3.1",
"ts-jest": "^27.0.3",
"typescript": "^4.3.4"
"eslint-plugin-jest": "^28.9.0",
"eslint-plugin-prettier": "^5.2.1",
"jest": "^29.7.0",
"jest-cli": "^29.7.0",
"prettier": "^3.4.1",
"rimraf": "^5.0.10",
"ts-jest": "^29.2.5",
"typescript": "^5.7.2",
"vite": "^6.0.1",
"vitest": "^2.1.6"
},
"engines": {
"node": ">=12.1"
"node": "^18.20 || ^20.10 || >=22"
},
"publishConfig": {
"access": "public"
Expand Down
35 changes: 19 additions & 16 deletions packages/dantalion-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,30 @@
"lint": "eslint --cache --fix .",
"prepack": "tsc --project tsconfig.build.json",
"start": "tsc --project tsconfig.build.json --watch",
"test": "jest --coverage"
"test": "vitest run"
},
"devDependencies": {
"@types/jest": "^26.0.23",
"@typescript-eslint/eslint-plugin": "^4.28.0",
"@typescript-eslint/parser": "^4.28.0",
"eslint": "^7.29.0",
"eslint-config-airbnb-typescript": "^12.3.1",
"eslint-config-prettier": "^8.3.0",
"eslint-import-resolver-typescript": "^2.4.0",
"@types/jest": "^29.5.14",
"@typescript-eslint/eslint-plugin": "^8.16.0",
"@typescript-eslint/parser": "^8.16.0",
"eslint": "^9.16.0",
"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jest": "^24.3.6",
"eslint-plugin-prettier": "^3.4.0",
"jest": "^27.0.5",
"jest-cli": "^27.0.5",
"prettier": "^2.3.1",
"ts-jest": "^27.0.3",
"typescript": "^4.3.4"
"eslint-plugin-jest": "^28.9.0",
"eslint-plugin-prettier": "^5.2.1",
"jest": "^29.7.0",
"jest-cli": "^29.7.0",
"prettier": "^3.4.1",
"rimraf": "^5.0.10",
"ts-jest": "^29.2.5",
"typescript": "^5.7.2",
"vite": "^6.0.1",
"vitest": "^2.1.6"
},
"engines": {
"node": ">=12"
"node": "^18.20 || ^20.10 || >=22"
},
"publishConfig": {
"access": "public"
Expand Down
Loading

0 comments on commit dec7465

Please sign in to comment.