Skip to content

Commit 0eee58b

Browse files
committed
feat: initial commit
0 parents  commit 0eee58b

File tree

286 files changed

+20391
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

286 files changed

+20391
-0
lines changed

.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: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
3+
"changelog": ["@changesets/changelog-github", { "repo": "junwen-k/use-ask" }],
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
max_line_length = 80

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: junwen-k

.github/changeset-version.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// ORIGINALLY FROM CLOUDFLARE WRANGLER:
2+
// https://github.com/cloudflare/wrangler2/blob/main/.github/changeset-version.js
3+
4+
import { exec } from 'child_process'
5+
// This script is used by the `release.yml` workflow to update the version of the packages being released.
6+
// The standard step is only to run `changeset version` but this does not update the package-lock.json file.
7+
// So we also run `npm install`, which does this update.
8+
// This is a workaround until this is handled automatically by `changeset version`.
9+
// See https://github.com/changesets/changesets/issues/421.
10+
exec('npx changeset version')
11+
exec('npm install')

.github/dependabot.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: 'npm'
4+
directory: '/'
5+
schedule:
6+
interval: 'weekly'
7+
groups:
8+
all:
9+
patterns:
10+
- '*'

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
node-version: [20.13.1]
19+
pnpm-version: [9.1.1]
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Install pnpm ${{ matrix.pnpm-version }}
26+
uses: pnpm/action-setup@v4
27+
with:
28+
version: ${{ matrix.pnpm-version }}
29+
30+
- name: Install Node.js ${{ matrix.node-version }}
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: ${{ matrix.node-version }}
34+
cache: 'pnpm'
35+
36+
- name: Install dependencies
37+
run: pnpm install
38+
39+
- name: Build
40+
run: pnpm build
41+
42+
- name: Test
43+
run: pnpm test

.github/workflows/release.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Originally inspired by Cloudflare Wrangler
2+
# https://github.com/cloudflare/wrangler2/blob/main/.github/workflows/release.yml
3+
4+
name: Release
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
release:
13+
if: ${{ github.repository_owner == 'junwen-k' }}
14+
runs-on: ubuntu-latest
15+
16+
permissions:
17+
contents: write
18+
pull-requests: write
19+
20+
strategy:
21+
matrix:
22+
node-version: [20.13.1]
23+
pnpm-version: [9.1.1]
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0
30+
31+
- name: Install pnpm ${{ matrix.pnpm-version }}
32+
uses: pnpm/action-setup@v4
33+
with:
34+
version: ${{ matrix.pnpm-version }}
35+
36+
- name: Install Node.js ${{ matrix.node-version }}
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: ${{ matrix.node-version }}
40+
41+
- name: Install dependencies
42+
run: pnpm install
43+
44+
- name: Build
45+
run: pnpm build
46+
47+
- name: Create Version PR or Publish to NPM
48+
id: changesets
49+
uses: changesets/action@v1.4.7
50+
with:
51+
commit: 'chore(release): version packages'
52+
title: 'chore(release): version packages'
53+
version: node .github/changeset-version.js
54+
publish: pnpm publish-packages
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
NPM_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
58+
NODE_ENV: 'production'

.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# Dependencies
4+
node_modules
5+
.pnp
6+
.pnp.js
7+
8+
# Local env files
9+
.env
10+
.env.local
11+
.env.development.local
12+
.env.test.local
13+
.env.production.local
14+
15+
# Testing
16+
coverage
17+
18+
# Turbo
19+
.turbo
20+
21+
# Vercel
22+
.vercel
23+
24+
# Build Outputs
25+
build
26+
dist
27+
28+
# Debug
29+
npm-debug.log*
30+
yarn-debug.log*
31+
yarn-error.log*
32+
33+
# Misc
34+
.DS_Store
35+
*.pem

.husky/commit-msg

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

0 commit comments

Comments
 (0)