Skip to content

Commit 08140da

Browse files
authored
Initial commit
0 parents  commit 08140da

34 files changed

Lines changed: 9951 additions & 0 deletions

.changeset/README.md

Lines changed: 8 additions & 0 deletions
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
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [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)

.changeset/config.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{
6+
"repo": "alanlu-dev/monorepo"
7+
}
8+
],
9+
"commit": false,
10+
"fixed": [],
11+
"linked": [],
12+
"access": "public",
13+
"baseBranch": "main",
14+
"updateInternalDependencies": "patch",
15+
"ignore": []
16+
}

.commitlintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('@alanlu-dev/commitlint-config')

.editorconfig

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Matches all files
7+
[*]
8+
# Non-configurable Prettier behaviors
9+
charset = utf-8
10+
insert_final_newline = true
11+
# Caveat: Prettier won’t trim trailing whitespace inside template strings, but your editor might.
12+
trim_trailing_whitespace = true
13+
14+
# Configurable Prettier behaviors
15+
# (change these if your Prettier config differs)
16+
end_of_line = lf
17+
indent_style = space
18+
indent_size = 2
19+
max_line_length = 200
20+
21+
[*.{md,mdx}]
22+
indent_style = tab
23+
max_line_length = off
24+
25+
[*.{yaml,yml,conf}]
26+
indent_size = 2
27+
28+
# Shell scripts
29+
[*.sh]
30+
end_of_line = lf
31+
[*.{cmd,bat}]
32+
end_of_line = crlf

.eslintrc.cjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
root: true,
3+
extends: ['@alanlu-dev/base'],
4+
}

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/workflows/ci.yml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'docs/**'
7+
- '*.md'
8+
branches:
9+
- main
10+
- release/*
11+
- feat/*
12+
- fix/*
13+
- perf/*
14+
pull_request:
15+
workflow_dispatch:
16+
17+
env:
18+
# 7 GiB by default on GitHub, setting to 6 GiB
19+
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
20+
NODE_OPTIONS: --max-old-space-size=6144
21+
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
24+
cancel-in-progress: true
25+
26+
jobs:
27+
lint:
28+
timeout-minutes: 10
29+
name: 'Lint'
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
35+
- name: Install pnpm
36+
uses: pnpm/action-setup@v3
37+
38+
- name: Use Node.js 20
39+
uses: actions/setup-node@v4
40+
with:
41+
node-version: 20
42+
cache: 'pnpm'
43+
44+
- name: Install deps
45+
run: pnpm install
46+
47+
- name: Build
48+
run: pnpm run build
49+
50+
- name: Lint
51+
run: pnpm run lint
52+
53+
- name: TypeCheck
54+
run: pnpm run typecheck
55+
56+
- name: CSpell
57+
uses: streetsidesoftware/cspell-action@v6
58+
59+
# From https://github.com/rhysd/actionlint/blob/main/docs/usage.md#use-actionlint-on-github-actions
60+
- name: Check workflow files
61+
run: |
62+
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
63+
./actionlint -color -shellcheck=""
64+
65+
test:
66+
timeout-minutes: 20
67+
runs-on: ${{ matrix.os }}
68+
strategy:
69+
matrix:
70+
os: [ubuntu-latest]
71+
node_version: [18, 20]
72+
include:
73+
# Active LTS + other OS
74+
- os: macos-latest
75+
node_version: 20
76+
- os: windows-latest
77+
node_version: 20
78+
fail-fast: false
79+
80+
name: "Build & Test: node-${{ matrix.node_version }}, ${{ matrix.os }}"
81+
steps:
82+
- name: Checkout
83+
uses: actions/checkout@v4
84+
with:
85+
# Assume PRs are less than 50 commits
86+
fetch-depth: 50
87+
88+
- name: Get changed files
89+
id: changed-files
90+
uses: tj-actions/changed-files@20576b4b9ed46d41e2d45a2256e5e2316dde6834 # v43.0.1
91+
with:
92+
files: |
93+
docs/**
94+
.github/**
95+
!.github/workflows/ci.yml
96+
**.md
97+
98+
- name: Install pnpm
99+
if: steps.changed-files.outputs.only_changed != 'true'
100+
uses: pnpm/action-setup@v3
101+
102+
- name: Set node version to ${{ matrix.node_version }}
103+
if: steps.changed-files.outputs.only_changed != 'true'
104+
uses: actions/setup-node@v4
105+
with:
106+
node-version: ${{ matrix.node_version }}
107+
cache: "pnpm"
108+
109+
- name: Install deps
110+
if: steps.changed-files.outputs.only_changed != 'true'
111+
run: pnpm install
112+
113+
- name: Build
114+
if: steps.changed-files.outputs.only_changed != 'true'
115+
run: pnpm run build
116+
117+
- name: Test unit
118+
if: steps.changed-files.outputs.only_changed != 'true'
119+
run: pnpm run test

.github/workflows/release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
permissions: {}
11+
jobs:
12+
release:
13+
name: Release
14+
permissions:
15+
contents: write # to create release (changesets/action)
16+
issues: write # to post issue comments (changesets/action)
17+
pull-requests: write # to create pull request (changesets/action)
18+
timeout-minutes: 20
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Install pnpm
26+
uses: pnpm/action-setup@v3
27+
28+
- name: Use Node.js 20
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 20
32+
cache: 'pnpm'
33+
34+
- name: Install deps
35+
run: pnpm install
36+
37+
- name: Build
38+
run: pnpm run build
39+
40+
- name: Create Release Pull Request or Publish to npm
41+
uses: changesets/action@v1
42+
with:
43+
version: pnpm run update:version
44+
publish: pnpm run publish
45+
commit: "chore(release): version update"
46+
title: "chore(release): version update"
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Dependencies
2+
node_modules
3+
4+
# Build files
5+
.output
6+
.nuxt
7+
.nitro
8+
.cache
9+
.virtual
10+
.turbo
11+
dist
12+
build
13+
tsx-0
14+
node-jiti
15+
16+
# Logs
17+
logs
18+
*.log
19+
20+
# Miscellaneous
21+
.DS_Store
22+
.fleet
23+
.idea
24+
25+
# Local environment files
26+
.env
27+
.env.*
28+
!.env.example

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm commitlint --edit $1

0 commit comments

Comments
 (0)