generated from tinyhttp/repo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
11b94a7
commit 7f2062e
Showing
18 changed files
with
1,517 additions
and
2,548 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,34 +1,29 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: CI | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "test" | ||
test: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2-beta | ||
- uses: actions/checkout@v4 | ||
- name: Enable corepack | ||
run: corepack enable pnpm | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '14.16.1' | ||
- name: install pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: 6.2.5 | ||
node-version: 18.x | ||
cache: 'pnpm' | ||
- run: pnpm install | ||
- name: Setup Biome | ||
uses: biomejs/setup-biome@v2 | ||
with: | ||
version: latest | ||
- name: Run Biome | ||
run: biome ci . | ||
- run: pnpm test:coverage | ||
- run: pnpm test:report | ||
- name: Coveralls | ||
|
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,3 +1,3 @@ | ||
node_modules | ||
dist | ||
coverage | ||
coverage* |
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,29 +0,0 @@ | ||
#!/bin/sh | ||
if [ -z "$husky_skip_init" ]; then | ||
debug () { | ||
[ "$HUSKY_DEBUG" = "1" ] && echo "husky (debug) - $1" | ||
} | ||
|
||
readonly hook_name="$(basename "$0")" | ||
debug "starting $hook_name..." | ||
|
||
if [ "$HUSKY" = "0" ]; then | ||
debug "HUSKY env variable is set to 0, skipping hook" | ||
exit 0 | ||
fi | ||
|
||
if [ -f ~/.huskyrc ]; then | ||
debug "sourcing ~/.huskyrc" | ||
. ~/.huskyrc | ||
fi | ||
|
||
export readonly husky_skip_init=1 | ||
sh -e "$0" "$@" | ||
exitCode="$?" | ||
|
||
if [ $exitCode != 0 ]; then | ||
echo "husky - $hook_name hook exited with code $exitCode (error)" | ||
fi | ||
|
||
exit $exitCode | ||
fi | ||
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,4 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx --no-install commitlint --config commitlint.config.cjs --edit "$1" | ||
npx --no-install commitlint --config commitlint.config.js --edit "$1" |
This file was deleted.
Oops, something went wrong.
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,14 @@ | ||
{ | ||
"npm.packageManager": "pnpm", | ||
"editor.formatOnSave": true, | ||
"biome.enabled": true, | ||
"eslint.enable": false, | ||
"editor.codeActionsOnSave": { | ||
"quickfix.biome": "explicit", | ||
"source.organizeImports.biome": "explicit" | ||
}, | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"[typescript]": { | ||
"editor.defaultFormatter": "biomejs.biome" | ||
} | ||
} |
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,30 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.8.2/schema.json", | ||
"files": { | ||
"ignore": ["node_modules", "dist", "coverage", ".pnpm-store"] | ||
}, | ||
"formatter": { | ||
"enabled": true, | ||
"formatWithErrors": false, | ||
"indentStyle": "space", | ||
"indentWidth": 2, | ||
"lineEnding": "lf", | ||
"lineWidth": 120 | ||
}, | ||
"organizeImports": { "enabled": true }, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true | ||
} | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"quoteProperties": "asNeeded", | ||
"trailingCommas": "none", | ||
"semicolons": "asNeeded", | ||
"arrowParentheses": "always", | ||
"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
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 |
---|---|---|
|
@@ -9,54 +9,37 @@ | |
"url": "https://github.com/tinyhttp/cors.git" | ||
}, | ||
"engines": { | ||
"node": ">=12.4 || 14.x || >=16" | ||
"node": ">=12.20 || 14.x || >=16" | ||
}, | ||
"types": "./dist/index.d.ts", | ||
"exports": "./dist/index.js", | ||
"keywords": [ | ||
"tinyhttp", | ||
"node.js", | ||
"web framework", | ||
"web", | ||
"backend" | ||
], | ||
"keywords": ["tinyhttp", "node.js", "web framework", "web", "backend"], | ||
"author": "v1rtl", | ||
"license": "MIT", | ||
"files": [ | ||
"dist" | ||
], | ||
"dependencies": { | ||
"es-vary": "^0.1.2" | ||
}, | ||
"files": ["dist"], | ||
"scripts": { | ||
"build": "rollup -c", | ||
"test": "tsm node_modules/uvu/bin.js tests", | ||
"build": "tsc -p tsconfig.build.json", | ||
"test": "tsx --test src/*.test.ts", | ||
"test:coverage": "c8 --include=src pnpm test", | ||
"test:report": "c8 report --reporter=text-lcov > coverage.lcov", | ||
"lint": "eslint . --ext=ts", | ||
"format": "prettier --check \"./**/*.{ts,md}\"", | ||
"format:fix": "prettier --write \"./**/*.{ts,md}\"", | ||
"prepare": "husky install" | ||
"lint": "biome lint .", | ||
"format": "biome format .", | ||
"check": "biome check ." | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "16.2.1", | ||
"@commitlint/config-conventional": "16.2.1", | ||
"@rollup/plugin-typescript": "^8.3.1", | ||
"@tinyhttp/app": "2.0.19", | ||
"@types/node": "^17.0.21", | ||
"@typescript-eslint/eslint-plugin": "^5.13.0", | ||
"@typescript-eslint/parser": "^5.13.0", | ||
"c8": "^7.11.0", | ||
"eslint": "^8.10.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"expect": "^27.5.1", | ||
"husky": "^7.0.4", | ||
"prettier": "^2.5.1", | ||
"rollup": "^2.69.1", | ||
"supertest-fetch": "^1.5.0", | ||
"tsm": "^2.2.1", | ||
"typescript": "~4.6.2", | ||
"uvu": "^0.5.3" | ||
"@biomejs/biome": "1.8.3", | ||
"@commitlint/cli": "19.3.0", | ||
"@commitlint/config-conventional": "19.2.2", | ||
"@tinyhttp/app": "2.2.4", | ||
"@types/node": "^20.14.10", | ||
"c8": "^10.1.2", | ||
"husky": "^9.0.11", | ||
"supertest-fetch": "^2.0.0", | ||
"tsx": "^4.16.2", | ||
"typescript": "~5.5.3" | ||
}, | ||
"packageManager": "[email protected]+sha512.f549b8a52c9d2b8536762f99c0722205efc5af913e77835dbccc3b0b0b2ca9e7dc8022b78062c17291c48e88749c70ce88eb5a74f1fa8c4bf5e18bb46c8bd83a", | ||
"dependencies": { | ||
"@tinyhttp/vary": "^0.1.3" | ||
} | ||
} |
Oops, something went wrong.