generated from ericvera/ts-lib-template
-
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
0 parents
commit 76bc3c7
Showing
37 changed files
with
4,744 additions
and
0 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,24 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: 'npm' # See documentation for possible values | ||
directory: '/' # Location of package manifests | ||
schedule: | ||
interval: 'weekly' | ||
groups: | ||
dev-non-major: | ||
applies-to: version-updates | ||
dependency-type: development | ||
update-types: | ||
- 'minor' | ||
- 'patch' | ||
prod-non-major: | ||
applies-to: version-updates | ||
dependency-type: production | ||
update-types: | ||
- 'minor' | ||
- 'patch' |
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,57 @@ | ||
name: Dependabot auto-merge | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
# Cancel if there is a build for the same branch running | ||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build_and_test: | ||
runs-on: ubuntu-latest | ||
|
||
if: github.actor == 'dependabot[bot]' | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set Node version | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install Dependencies | ||
run: yarn | ||
|
||
- name: Lint | ||
run: yarn lint | ||
|
||
- name: Run tests | ||
run: yarn test | ||
|
||
- name: Build | ||
run: yarn build | ||
|
||
# You can remove the next 2 steps to disable auto-merge. | ||
# These will fail if auto-merge is not enabled for the account repo. | ||
- name: Dependabot metadata | ||
id: metadata | ||
uses: dependabot/fetch-metadata@v2 | ||
with: | ||
github-token: '${{ secrets.GITHUB_TOKEN }}' | ||
|
||
- name: Enable auto-merge for Dependabot PRs | ||
if: startsWith(steps.metadata.outputs.update-type, 'version-update:semver') | ||
run: gh pr merge --auto --merge "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GH_TOKEN: ${{secrets.GITHUB_TOKEN}} |
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,60 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
# Give the default GITHUB_TOKEN write permission to commit and push the | ||
# added or changed files to the repository. | ||
contents: write | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set Node version | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install Dependencies | ||
run: yarn | ||
|
||
- name: Lint | ||
run: yarn lint | ||
|
||
- name: Run tests | ||
run: yarn test | ||
|
||
- name: Build | ||
run: yarn build | ||
|
||
- name: Conventional Changelog Action | ||
id: changelog | ||
uses: TriPSs/conventional-changelog-action@v5 | ||
with: | ||
# Do not generate the CHANGELOG.md. Changelog details will be included | ||
# in the release notes. | ||
output-file: 'false' | ||
github-token: ${{ github.token }} | ||
|
||
- name: Publish to NPM | ||
uses: JS-DevTools/npm-publish@v3 | ||
if: ${{ steps.changelog.outputs.skipped == 'false' }} | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Create Release | ||
uses: ncipollo/release-action@v1 | ||
if: ${{ steps.changelog.outputs.skipped == 'false' }} | ||
with: | ||
allowUpdates: true | ||
draft: false | ||
name: ${{ steps.changelog.outputs.tag }} | ||
tag: ${{ steps.changelog.outputs.tag }} | ||
body: ${{ steps.changelog.outputs.clean_changelog }} | ||
token: ${{ github.token }} |
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,138 @@ | ||
# Created by https://www.toptal.com/developers/gitignore/api/macos,node,yarn,visualstudiocode | ||
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,node,yarn,visualstudiocode | ||
|
||
### macOS ### | ||
# General | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
# Icon must end with two \r | ||
Icon | ||
|
||
|
||
# Thumbnails | ||
._* | ||
|
||
# Files that might appear in the root of a volume | ||
.DocumentRevisions-V100 | ||
.fseventsd | ||
.Spotlight-V100 | ||
.TemporaryItems | ||
.Trashes | ||
.VolumeIcon.icns | ||
.com.apple.timemachine.donotpresent | ||
|
||
# Directories potentially created on remote AFP share | ||
.AppleDB | ||
.AppleDesktop | ||
Network Trash Folder | ||
Temporary Items | ||
.apdisk | ||
|
||
### macOS Patch ### | ||
# iCloud generated files | ||
*.icloud | ||
|
||
### Node ### | ||
# Logs | ||
logs | ||
*.log | ||
yarn-debug.log* | ||
yarn-error.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 | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# Dependency directories | ||
node_modules/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# TypeScript output | ||
dist | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional stylelint cache | ||
.stylelintcache | ||
|
||
# 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 | ||
|
||
# yarn v2 | ||
.yarn/cache | ||
.yarn/unplugged | ||
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
|
||
### Node Patch ### | ||
|
||
### VisualStudioCode ### | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
!.vscode/*.code-snippets | ||
|
||
# Local History for Visual Studio Code | ||
.history/ | ||
|
||
# Built Visual Studio Code Extensions | ||
*.vsix | ||
|
||
### VisualStudioCode Patch ### | ||
# Ignore all local history of files | ||
.history | ||
.ionide | ||
|
||
### yarn ### | ||
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored | ||
|
||
.yarn/* | ||
!.yarn/releases | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/sdks | ||
!.yarn/versions | ||
|
||
# if you are NOT using Zero-installs, then: | ||
# comment the following lines | ||
!.yarn/cache | ||
|
||
# End of https://www.toptal.com/developers/gitignore/api/macos,node,yarn,visualstudiocode | ||
|
||
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,2 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
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 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
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,20 @@ | ||
#!/usr/bin/env sh | ||
[ "$HUSKY" = "2" ] && set -x | ||
h="${0##*/}" | ||
s="${0%/*/*}/$h" | ||
|
||
[ ! -f "$s" ] && exit 0 | ||
|
||
for f in "${XDG_CONFIG_HOME:-$HOME/.config}/husky/init.sh" "$HOME/.huskyrc"; do | ||
# shellcheck disable=SC1090 | ||
[ -f "$f" ] && . "$f" | ||
done | ||
|
||
[ "${HUSKY-}" = "0" ] && exit 0 | ||
|
||
sh -e "$s" "$@" | ||
c=$? | ||
|
||
[ $c != 0 ] && echo "husky - $h script failed (code $c)" | ||
[ $c = 127 ] && echo "husky - command not found in PATH=$PATH" | ||
exit $c |
Empty file.
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 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
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 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
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 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
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 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
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 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
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 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
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 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
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 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
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 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
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 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
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 @@ | ||
#!/usr/bin/env sh | ||
. "${0%/*}/h" |
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 @@ | ||
#!/usr/bin/env sh | ||
|
||
# Do not run docs on CI | ||
yarn is-ci || yarn docs | ||
|
||
yarn lint-staged | ||
|
||
# Check if there are unstaged changes to README.md | ||
DOCS_ADDED=$(git ls-files --others --exclude-standard docs) | ||
DOCS_MODIFIED=$(git ls-files --modified docs) | ||
DOCS_DELETED=$(git ls-files --deleted docs) | ||
|
||
if [ "$DOCS_ADDED" != "" ] || [ "$DOCS_MODIFIED" != "" ] || [ "$DOCS_DELETED" != "" ]; then | ||
echo "---------------------------------------------------------------------" | ||
echo "Commit blocked by pre-commit hook." | ||
echo "---------------------------------------------------------------------" | ||
echo "WHY?" | ||
echo "There are unstaged changes in the /docs directory which means that" | ||
echo "those changes won't be committed. In order to ensure that the " | ||
echo "documentation stays up to date with the code documentation is" | ||
echo "generated using tsdoc as a precommit hook." | ||
echo "" | ||
echo "FIX" | ||
echo " 1. Review the changes to files in the docs directory" | ||
echo " 2. Stage the changes" | ||
echo " 3. Commit the changes" | ||
echo "---------------------------------------------------------------------" | ||
exit 1 | ||
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
.yarn |
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 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"vitest.explorer" | ||
] | ||
} |
Oops, something went wrong.