-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8def5c5
commit 90ea782
Showing
19 changed files
with
9,061 additions
and
2 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,17 @@ | ||
# Editor configuration, see https://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
end_of_line = lf | ||
|
||
[*.ts] | ||
quote_type = single | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
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,7 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
|
||
*.js text eol=lf | ||
*.ts text eol=lf | ||
*.html text eol=lf | ||
*.sh text eol=lf |
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,10 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: 'npm' | ||
directory: '/' | ||
schedule: | ||
interval: 'daily' | ||
commit-message: | ||
prefix: fix | ||
prefix-development: build | ||
include: scope |
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,35 @@ | ||
name: Pull Request | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 'lts/*' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies | ||
run: npm audit signatures | ||
|
||
- name: Lint code | ||
run: npm run lint | ||
|
||
- name: Test | ||
run: npm run coverage | ||
|
||
- name: Build | ||
run: npm run build |
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: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 'lts/*' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies | ||
run: npm audit signatures | ||
|
||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: npx semantic-release |
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 |
---|---|---|
|
@@ -127,4 +127,4 @@ dist | |
.yarn/unplugged | ||
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
.pnp.* |
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 @@ | ||
18 |
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 @@ | ||
{ | ||
"recommendations": [ | ||
"biomejs.biome", | ||
"davidanson.vscode-markdownlint", | ||
"vitest.explorer" | ||
], | ||
"unwantedRecommendations": [] | ||
} |
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,17 @@ | ||
{ | ||
"files.eol": "\n", | ||
"typescript.tsdk": "node_modules\\typescript\\lib", | ||
"[javascript]": { | ||
"editor.defaultFormatter": "biomejs.biome" | ||
}, | ||
"[json]": { | ||
"editor.defaultFormatter": "biomejs.biome" | ||
}, | ||
"[typescript]": { | ||
"editor.defaultFormatter": "biomejs.biome" | ||
}, | ||
"editor.codeActionsOnSave": { | ||
"quickfix.biome": "explicit", | ||
"source.organizeImports.biome": "explicit" | ||
} | ||
} |
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 +1,48 @@ | ||
# vite-tiny-reporter | ||
# vitest-tiny-reporter | ||
|
||
[![npm](https://img.shields.io/npm/v/vitest-tiny-reporter?style=flat-square)](https://www.npmjs.com/package/vitest-tiny-reporter?activeTab=versions) | ||
[![npm bundle size](https://img.shields.io/bundlephobia/minzip/vitest-tiny-reporter?style=flat-square)](https://bundlephobia.com/package/vitest-tiny-reporter) | ||
[![NPM](https://img.shields.io/npm/l/vitest-tiny-reporter?style=flat-square)](https://raw.githubusercontent.com/manbearwiz/vitest-tiny-reporter/master/LICENSE) | ||
[![npm](https://img.shields.io/npm/dt/vitest-tiny-reporter?style=flat-square)](https://www.npmjs.com/package/vitest-tiny-reporter) | ||
[![GitHub issues](https://img.shields.io/github/issues/manbearwiz/vitest-tiny-reporter?style=flat-square)](https://github.com/manbearwiz/vitest-tiny-reporter/issues) | ||
[![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release&style=flat-square)](https://github.com/semantic-release/semantic-release) | ||
|
||
`vitest-tiny-reporter` is a minimal reporter for [Vitest](https://github.com/vitest-dev/vitest) that provides the most essential information about the test run. This is very useful with tools like lefthook that run several checks in parallel, where you want to see the test results without scrolling through a lot of output. | ||
|
||
## Installation | ||
|
||
```sh | ||
npm install --save vitest-tiny-reporter | ||
``` | ||
|
||
## Usage | ||
|
||
You can specify the reporter in your `vitest.config.ts`: | ||
|
||
```ts | ||
import type { UserConfig } from 'vitest/config'; | ||
import TinyReporter from 'vite-tiny-reporter'; | ||
|
||
export default { | ||
test: { | ||
reporters: [new TinyReporter()], | ||
}, | ||
} satisfies UserConfig; | ||
``` | ||
|
||
Or you can use the reporter from the command line: | ||
|
||
```sh | ||
vitest --reporter vitest-tiny-reporter | ||
``` | ||
|
||
## Output | ||
|
||
The output will look like this: | ||
|
||
```sh | ||
$ vitest | ||
✖ FAIL 1 test failed | ||
Test Files 1 failed (1) | ||
Tests 1 failed | 10 passed (11) | ||
``` |
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,25 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json", | ||
"vcs": { | ||
"clientKind": "git", | ||
"enabled": true, | ||
"useIgnoreFile": true, | ||
"defaultBranch": "main" | ||
}, | ||
"formatter": { | ||
"enabled": true, | ||
"indentStyle": "space", | ||
"formatWithErrors": false | ||
}, | ||
"organizeImports": { | ||
"enabled": true | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true, | ||
"complexity": { "noExcessiveCognitiveComplexity": "error" } | ||
} | ||
}, | ||
"javascript": { "formatter": { "quoteStyle": "single" } } | ||
} |
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 @@ | ||
module.exports = { extends: ['@commitlint/config-angular'] }; |
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,25 @@ | ||
colors: false | ||
no_tty: true | ||
output: | ||
- failure | ||
|
||
pre-commit: | ||
parallel: true | ||
commands: | ||
format: | ||
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}" | ||
run: npx @biomejs/biome check --write --no-errors-on-unmatched --files-ignore-unknown=true {staged_files} | ||
stage_fixed: true | ||
test: | ||
glob: "*.ts" | ||
run: npx vitest related --silent --no-color --no-clearScreen --run {staged_files} | ||
fail_text: "Tests failed" | ||
|
||
pre-push: | ||
parallel: true | ||
commands: | ||
test: | ||
run: npx vitest --run --coverage --silent --no-color --no-clearScreen | ||
fail_text: "Tests failed" | ||
check-format: | ||
run: npx @biomejs/biome check --no-errors-on-unmatched --files-ignore-unknown=true . |
Oops, something went wrong.