-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update template based on @kubb changes
- Loading branch information
1 parent
77c84f1
commit 0fa37f3
Showing
52 changed files
with
3,461 additions
and
5,053 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"packages": ["packages/core", "packages/demo"], | ||
"sandboxes": [], | ||
"node": "18", | ||
"installCommand": "install:csb" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"$schema": "https://codesandbox.io/schemas/tasks.json", | ||
"setupTasks": [ | ||
{ | ||
"name": "Install Dependencies", | ||
"command": "corepack enable && pnpm install --frozen-lockfile" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"image": "mcr.microsoft.com/devcontainers/universal:2", | ||
"features": { | ||
"ghcr.io/devcontainers/features/github-cli:1": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = LF | ||
tab_width = 2 | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = LF | ||
tab_width = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
umd | ||
build | ||
config | ||
esnext | ||
es | ||
lib | ||
dist/** | ||
dist | ||
**/dist/** | ||
coverage/** | ||
**/coverage/** | ||
mocks/** | ||
**/mocks/** | ||
*.d.ts | ||
**.d.ts |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,21 +2,19 @@ name: ci | |
|
||
on: | ||
push: | ||
paths: | ||
- 'packages/**' | ||
branches: | ||
- main | ||
- 'releases/**' | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build and Test | ||
timeout-minutes: 15 | ||
runs-on: ubuntu-latest | ||
# To use Remote Caching, uncomment the next lines and follow the steps below. | ||
# env: | ||
# TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
# TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | ||
|
||
steps: | ||
- name: Check out code | ||
|
@@ -26,28 +24,56 @@ jobs: | |
|
||
- uses: pnpm/[email protected] | ||
with: | ||
version: 7.14.2 | ||
version: 8 | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
node-version: 18 | ||
cache: 'pnpm' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install bun | ||
uses: oven-sh/setup-bun@v1 | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
run: pnpm install --prefer-offline | ||
|
||
- uses: dtinth/setup-github-actions-caching-for-turbo@v1 | ||
with: | ||
# Set the prefix for the cache keys. | ||
cache-prefix: kubb_ | ||
|
||
- name: Build | ||
run: pnpm build | ||
|
||
run: bun run build --concurrency=1 | ||
|
||
- name: Typecheck | ||
run: bun run typecheck --concurrency=1 | ||
|
||
- name: Test | ||
run: pnpm test | ||
run: bun run test | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: Release | ||
if: ${{ success() && (github.event_name != 'pull_request' || github.event.action == 'closed' && github.event.pull_request.merged == true) }} | ||
id: release | ||
continue-on-error: true | ||
if: ${{ success() && github.ref == 'refs/heads/main' && (github.event_name != 'pull_request' || github.event.action == 'closed' && github.event.pull_request.merged == true) }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: bun run release | ||
|
||
- name: Release canary | ||
continue-on-error: true | ||
if: steps.release.outcome == 'failure' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: pnpm release --filter=[HEAD^1] | ||
run: | | ||
bun run release:canary --concurrency=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,92 @@ | ||
name: pr | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
# inputs: | ||
# os: | ||
# description: Choose os | ||
# required: true | ||
# type: choice | ||
# options: | ||
# - ubuntu-latest | ||
# - macos-latest | ||
# - windows-latest | ||
|
||
jobs: | ||
test: | ||
name: 'Test' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 7 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.14.2 | ||
registry-url: https://registry.npmjs.org | ||
cache: 'pnpm' | ||
- name: Install dependencies | ||
run: pnpm --prefer-offline install | ||
- run: pnpm run test | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v2 | ||
lint: | ||
name: 'Lint' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 7 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.14.2 | ||
registry-url: https://registry.npmjs.org | ||
cache: 'pnpm' | ||
- name: Install dependencies | ||
run: pnpm --prefer-offline install | ||
- run: pnpm run lint | ||
typecheck: | ||
name: 'Typecheck' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 7 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.14.2 | ||
registry-url: https://registry.npmjs.org | ||
cache: 'pnpm' | ||
- name: Install dependencies | ||
run: pnpm --prefer-offline install | ||
- run: pnpm run typecheck | ||
build: | ||
name: Build and Test | ||
timeout-minutes: 15 | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [ubuntu-latest] | ||
node-version: [18] | ||
experimental: [false] | ||
## comment out for support of node 19,20 | ||
# include: | ||
# - os: ubuntu-latest | ||
# node-version: 19 | ||
# experimental: true | ||
# - os: ubuntu-latest | ||
# node-version: 20 | ||
# experimental: true | ||
|
||
runs-on: ${{ matrix.os || 'ubuntu-latest' }} | ||
continue-on-error: ${{ matrix.experimental || false }} | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- uses: pnpm/[email protected] | ||
with: | ||
version: 8 | ||
|
||
- name: Setup Node.js(${{ matrix.node-version }}) environment | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'pnpm' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install bun | ||
uses: oven-sh/setup-bun@v1 | ||
|
||
- name: Install dependencies | ||
run: pnpm install --prefer-offline | ||
|
||
- uses: dtinth/setup-github-actions-caching-for-turbo@v1 | ||
with: | ||
# Set the prefix for the cache keys. | ||
cache-prefix: kubb_ | ||
|
||
- name: Build | ||
run: bun run build --concurrency=1 | ||
|
||
- name: Typecheck | ||
run: bun run typecheck --concurrency=1 | ||
|
||
- name: Linting | ||
env: | ||
NODE_OPTIONS: "--max_old_space_size=4096" | ||
continue-on-error: true | ||
run: bun run lint:ci | ||
|
||
- name: Test | ||
run: bun run test | ||
|
||
- name: Test with Bun | ||
continue-on-error: true | ||
run: bun run test:bun | ||
|
||
- name: Test with Jest | ||
continue-on-error: true | ||
run: bun run test:jest | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
Oops, something went wrong.