-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: rewrite whole project * fix: fix Bun version * ci: add the ability to manually run tests * feat: add lint-staged scripts (#1) * fix: fix husky prepare script * fix: fix pre-push * fix: fix pre-push * fix: update pre-push * feat: add file associations for `.snap` files * test: ⚡ optimize tests --------- Co-authored-by: Okinea Dev <[email protected]>
- Loading branch information
Showing
27 changed files
with
653 additions
and
231 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 @@ | ||
1.1.38 |
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: 🚀 Release + Publish | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
id-token: write | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
attestations: write | ||
|
||
steps: | ||
- name: 📥 Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
# Required for fetching tags and generating release notes | ||
fetch-depth: 0 | ||
|
||
- name: 🔧 Setup Bun | ||
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2 | ||
with: | ||
bun-version-file: ".bun-version" | ||
|
||
- name: 📦 Install dependencies | ||
run: bun install --frozen-lockfile | ||
|
||
- name: 🔧 Configure Git | ||
run: | | ||
git config user.name 'github-actions[bot]' | ||
git config user.email 'github-actions[bot]@users.noreply.github.com' | ||
git config --global push.followTags true | ||
- name: 🚀 Prepare release | ||
run: bun run preversion | ||
|
||
- name: 📜 Generate changelog and release notes | ||
run: | | ||
bunx changelogen --release --push | ||
bunx changelogen github release --token ${{ secrets.GITHUB_TOKEN }} | ||
- name: 🛠️ Build package | ||
run: bun run build | ||
|
||
- name: 📦 Publish to NPM Registry | ||
run: | | ||
bunx npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" | ||
bunx npm publish --provenance --access public |
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,32 @@ | ||
name: 🧪 Tests | ||
|
||
on: | ||
# https://blog.esciencecenter.nl/reduce-reuse-recycle-save-the-planet-one-github-action-at-a-time-4ab602255c3f | ||
push: | ||
paths: | ||
- src/* | ||
|
||
pull_request: | ||
paths: | ||
- src/* | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: 📥 Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- name: 🔧 Setup Bun | ||
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2 | ||
with: | ||
bun-version-file: ".bun-version" | ||
|
||
- name: 📦 Install dependencies | ||
run: bun install --frozen-lockfile | ||
|
||
- name: 🧪 Run tests | ||
run: bun test |
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,77 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
.pnpm-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Snowpack dependency directory (https://snowpack.dev/) | ||
web_modules/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional stylelint cache | ||
.stylelintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variable files | ||
.env | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
.env.local | ||
|
||
.cache | ||
out | ||
dist | ||
node_modules | ||
.DS_Store | ||
.npmignore | ||
yarn.lock | ||
|
||
# yarn v2 | ||
.yarn/cache | ||
.yarn/unplugged | ||
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
|
||
.DS_Store |
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 @@ | ||
bunx lint-staged |
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 @@ | ||
FORCE_COLOR=true bun run test |
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,2 @@ | ||
* | ||
!dist/* |
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 @@ | ||
{ | ||
"editor.defaultFormatter": "biomejs.biome", | ||
"files.associations": { | ||
"*.snap": "javascript" | ||
} | ||
} |
File renamed without changes.
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
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,29 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", | ||
"files": { | ||
"ignore": ["*.snap"] | ||
}, | ||
"formatter": { | ||
"enabled": true, | ||
"useEditorconfig": true, | ||
"formatWithErrors": false, | ||
"indentStyle": "tab", | ||
"indentWidth": 2, | ||
"lineEnding": "lf", | ||
"lineWidth": 80, | ||
"attributePosition": "auto", | ||
"bracketSpacing": true | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"jsxQuoteStyle": "single", | ||
"quoteProperties": "asNeeded", | ||
"trailingCommas": "es5", | ||
"semicolons": "asNeeded", | ||
"arrowParentheses": "always", | ||
"bracketSameLine": false, | ||
"quoteStyle": "single", | ||
"attributePosition": "auto" | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { render } from 'ink' | ||
import Divider from '../src' | ||
|
||
const Advanced = () => ( | ||
<Divider title='Title' dividerChar='!' dividerColor='red' /> | ||
) | ||
|
||
render(<Advanced />) |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { render } from 'ink' | ||
import Divider from '../src' | ||
|
||
const Basic = () => <Divider title='Title' /> | ||
|
||
render(<Basic />) |
Oops, something went wrong.