-
-
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.
feat: use of changeset + upgrade packages
- Loading branch information
1 parent
0bad04f
commit 5eccdfa
Showing
55 changed files
with
2,638 additions
and
3,312 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,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
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,19 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": [ | ||
"@changesets/changelog-github", | ||
{ | ||
"repo": "stijnvanhulle/template" | ||
} | ||
], | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "restricted", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": { | ||
"onlyUpdatePeerDependentsWhenOutOfRange": true | ||
}, | ||
"ignore": [] | ||
} |
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 @@ | ||
--- | ||
"@stijnvanhulle/template-core": minor | ||
"@stijnvanhulle/template-demo": minor | ||
--- | ||
|
||
use of changeset + upgrade packages |
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 |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
"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 |
---|---|---|
|
@@ -6,4 +6,4 @@ | |
"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 |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
"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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"lineWidth": 160, | ||
"indentWidth": 2, | ||
"newLineKind": "lf", | ||
"useTabs": false, | ||
"typescript": { | ||
"associations": [ | ||
"**/*.{js,mjs,cjs,ts,tsx}" | ||
], | ||
"quoteStyle": "preferSingle", | ||
"trailingCommas": "onlyMultiLine", | ||
"objectPattern.trailingCommas": "onlyMultiLine", | ||
"objectExpression.trailingCommas": "onlyMultiLine", | ||
"arrayPattern.trailingCommas": "onlyMultiLine", | ||
"parameters.trailingCommas": "onlyMultiLine", | ||
"arguments.trailingCommas": "onlyMultiLine", | ||
// [{},{},] | ||
"arrayExpression.trailingCommas": "onlyMultiLine", | ||
"typeParameters.trailingCommas": "onlyMultiLine", | ||
"semiColons": "asi", | ||
"binaryExpression.linePerExpression": true, | ||
"jsx.quoteStyle": "preferDouble", | ||
"preferSingleLine": false, | ||
// https://github.com/lydell/eslint-plugin-simple-import-sort/tree/main?tab=readme-ov-file#how-do-i-use-this-with-dprint | ||
"importDeclaration.sortNamedImports": "maintain", | ||
"module.sortImportDeclarations": "maintain", | ||
"module.sortExportDeclarations": "maintain" | ||
}, | ||
"json": { | ||
"trailingCommas": "never" | ||
}, | ||
"markdown": {}, | ||
"excludes": [ | ||
"**/node_modules", | ||
"**/*-lock.json", | ||
"**/*-lock.yaml", | ||
"**/.next", | ||
"**/dist", | ||
"**/coverage", | ||
"**/public", | ||
"**/__snapshots__", | ||
"CHANGELOG.md", | ||
"**/mocks/hellowWorld.js" | ||
], | ||
"plugins": [ | ||
// You may specify any urls or file paths here that you wish. | ||
"https://plugins.dprint.dev/typescript-0.88.2.wasm", | ||
"https://plugins.dprint.dev/json-0.18.0.wasm", | ||
"https://plugins.dprint.dev/markdown-0.16.2.wasm" | ||
] | ||
} |
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,7 +1,10 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = LF | ||
tab_width = 2 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
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 |
---|---|---|
|
@@ -7,3 +7,6 @@ mocks/** | |
**/mocks/** | ||
*.d.ts | ||
**.d.ts | ||
tsup.config.ts | ||
**/tsup.config.ts | ||
**/__snapshots__**/ |
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,31 +1,32 @@ | ||
name: ci | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: override release tag | ||
required: false | ||
push: | ||
branches: ['main', 'alpha', 'beta', 'rc'] | ||
paths: | ||
- 'packages/**' | ||
branches: | ||
- main | ||
- 'releases/**' | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build and Test | ||
timeout-minutes: 15 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- uses: pnpm/[email protected] | ||
with: | ||
version: 8 | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v3 | ||
with: | ||
|
@@ -35,15 +36,15 @@ jobs: | |
|
||
- 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_ | ||
cache-prefix: stijnvanhulle_ | ||
|
||
- name: Build | ||
run: bun run build --concurrency=1 | ||
|
||
|
@@ -58,22 +59,49 @@ jobs: | |
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: Release | ||
id: release | ||
- name: Publish | ||
uses: changesets/action@v1 | ||
id: publish | ||
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) }} | ||
if: ${{ success() && github.event.inputs.tag == '' && 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 | ||
with: | ||
publish: bun run release | ||
|
||
- name: Release canary | ||
- name: Publish ${{ inputs.tag || 'canary' }} | ||
continue-on-error: true | ||
if: steps.release.outcome == 'failure' | ||
# if: ${{ steps.publish.outcome == 'failure' || github.event.inputs.tag != '' }} | ||
if: ${{ github.event.inputs.tag != '' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: | | ||
bun run release:canary --concurrency=1 | ||
bun run release:canary --tag ${{ inputs.tag || 'canary' }} | ||
- name: Send a discord notification | ||
if: steps.publish.outputs.published == 'true' | ||
uses: actions/github-script@v6 | ||
env: | ||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
fetch(process.env.DISCORD_WEBHOOK_URL, { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json' | ||
}, | ||
body: JSON.stringify({ | ||
content: `New release available. [Read the changelog](https://github.com/kubb-project/kubb/releases)` | ||
}), | ||
}) | ||
.then((res) => { | ||
console.log('Sent discord notification', res) | ||
}) | ||
.catch((err) => { | ||
console.error('Error sending discord notification', err) | ||
}) |
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,17 +2,10 @@ name: pr | |
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
# inputs: | ||
# os: | ||
# description: Choose os | ||
# required: true | ||
# type: choice | ||
# options: | ||
# - ubuntu-latest | ||
# - macos-latest | ||
# - windows-latest | ||
|
||
paths-ignore: | ||
- "docs/**" | ||
- "**/*.md" | ||
|
||
jobs: | ||
build: | ||
name: Build and Test | ||
|
@@ -24,7 +17,7 @@ jobs: | |
node-version: [18] | ||
experimental: [false] | ||
## comment out for support of node 19,20 | ||
# include: | ||
# include: | ||
# - os: ubuntu-latest | ||
# node-version: 19 | ||
# experimental: true | ||
|
@@ -34,17 +27,17 @@ jobs: | |
|
||
runs-on: ${{ matrix.os || 'ubuntu-latest' }} | ||
continue-on-error: ${{ matrix.experimental || false }} | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
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: | ||
|
@@ -54,21 +47,21 @@ jobs: | |
|
||
- 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_ | ||
cache-prefix: stijnvanhulle_ | ||
|
||
- 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" | ||
|
@@ -80,13 +73,9 @@ jobs: | |
|
||
- 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 | ||
run: bun run test:bun --coverage | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
Oops, something went wrong.