-
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 9f86e15
Showing
51 changed files
with
24,626 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,35 @@ | ||
# Editor configuration, see http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = tab | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false | ||
indent_style = space | ||
indent_size = 2 | ||
tab_width = 2 | ||
|
||
[*.yml] | ||
max_line_length = off | ||
trim_trailing_whitespace = false | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.diff] | ||
charset = unset | ||
end_of_line = unset | ||
insert_final_newline = unset | ||
trim_trailing_whitespace = unset | ||
indent_style = unset | ||
indent_size = unset | ||
|
||
[package.json,package-lock.json] | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Local env vars for debugging | ||
TS_NODE_IGNORE="false" | ||
TS_NODE_FILES="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 |
---|---|---|
@@ -0,0 +1 @@ | ||
!.eslintrc.js |
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,50 @@ | ||
module.exports = { | ||
root: true, | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint'], | ||
parserOptions: { | ||
tsconfigRootDir: __dirname, | ||
project: ['./tsconfig.lint.json'], | ||
}, | ||
'env': { | ||
'node': true | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:@typescript-eslint/recommended-requiring-type-checking', | ||
], | ||
rules: { | ||
quotes: ['warn', 'single', { avoidEscape: true }], | ||
'@typescript-eslint/no-use-before-define': ['warn', { functions: false }], | ||
'@typescript-eslint/indent': [ | ||
'error', | ||
'tab', | ||
{ | ||
'ignoredNodes': [ | ||
'PropertyDefinition[decorators]', | ||
'TSUnionType', | ||
'TSTypeParameterInstantiation', | ||
'TSIntersectionType' | ||
], | ||
'SwitchCase': 1 | ||
} | ||
], | ||
}, | ||
'overrides': [ | ||
{ | ||
'files': ['*.spec.ts'], | ||
rules: { | ||
'@typescript-eslint/no-unsafe-assignment': 'off', | ||
'@typescript-eslint/no-var-requires': 'off', | ||
}, | ||
}, | ||
{ | ||
'files': ['./example/**/*'], | ||
parserOptions: { | ||
project: ['./example/tsconfig.json'], | ||
}, | ||
} | ||
], | ||
}; |
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 @@ | ||
# Set the repository to show as TypeScript rather than JS in GitHub | ||
*.js linguist-detectable=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,20 @@ | ||
--- | ||
name: "🐛 Bug Report" | ||
about: Report a reproducible bug or regression. | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Current Behavior | ||
|
||
<!-- Describe how the issue manifests. --> | ||
|
||
## Expected Behavior | ||
|
||
<!-- Describe what the desired behavior would be. --> | ||
|
||
## Debug log | ||
|
||
<!-- Re-run the command with the --debug flag enabled and paste the output here --> |
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,34 @@ | ||
--- | ||
name: 🌈 Feature request | ||
about: Suggest an amazing new idea for this project | ||
title: '' | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Feature Request | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
<!-- A clear and concise description of what the problem is. Ex. I have an issue when [...] --> | ||
|
||
**Describe the solution you'd like** | ||
<!-- A clear and concise description of what you want to happen. Add any considered drawbacks. --> | ||
|
||
**Describe alternatives you've considered** | ||
<!-- A clear and concise description of any alternative solutions or features you've considered. --> | ||
|
||
## Are you willing to resolve this issue by submitting a Pull Request? | ||
|
||
<!-- | ||
Remember that first-time contributors are welcome! 🙌 | ||
--> | ||
|
||
- [ ] Yes, I have the time, and I know how to start. | ||
- [ ] Yes, I have the time, but I don't know how to start. I would need guidance. | ||
- [ ] No, I don't have the time, although I believe I could do it if I had the time... | ||
- [ ] No, I don't have the time and I wouldn't even know how to start. | ||
|
||
<!-- | ||
👋 Have a great day and thank you for the feature request! | ||
--> |
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,42 @@ | ||
<!-- | ||
😀 Wonderful! Thank you for opening a pull request. | ||
Please fill in the information below to expedite the review | ||
and (hopefully) merge of your change. | ||
--> | ||
|
||
### Description of change | ||
|
||
<!-- | ||
Please be clear and concise what the change is intended to do, | ||
why this change is needed, and how you've verified that it | ||
corrects what you intended. | ||
In some cases it may be helpful to include the current behavior | ||
and the new behavior. | ||
If the change is related to an open issue, you can link it here. | ||
If you include `Fixes #0000` (replacing `0000` with the issue number) | ||
when this is merged it will automatically mark the issue as fixed and | ||
close it. | ||
--> | ||
|
||
### Pull-Request Checklist | ||
|
||
<!-- | ||
Please make sure to review and check all of the following. | ||
If an item is not applicable, you can add "N/A" to the end. | ||
--> | ||
|
||
- [ ] Code is up-to-date with the `main` branch | ||
- [ ] `npm run lint` passes with this change | ||
- [ ] `npm run test` passes with this change | ||
- [ ] This pull request links relevant issues as `Fixes #0000` | ||
- [ ] There are new or updated unit tests validating the change | ||
- [ ] Documentation has been updated to reflect this change | ||
- [ ] The new commits follow conventions outlined in the [conventional commit spec](https://www.conventionalcommits.org/en/v1.0.0/) | ||
|
||
<!-- | ||
🎉 Thank you for contributing! | ||
--> |
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,21 @@ | ||
name: Pull Request | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [18.x, 20.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm ci | ||
- run: npm run build --if-present | ||
- run: npm 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,33 @@ | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: lts/* | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Build | ||
run: npm run build | ||
- name: Test | ||
run: npm test | ||
- 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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-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 | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Compiled code | ||
dist | ||
/lib | ||
src/__tests__/__fixtures__/output.ts |
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 @@ | ||
_ |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx 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 @@ | ||
18.18.0 |
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,52 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Current TS File", | ||
"type": "node", | ||
"request": "launch", | ||
"runtimeExecutable": "node", | ||
"args": ["${relativeFile}"], | ||
"runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"], | ||
"envFile": "${workspaceFolder}/.env", | ||
"cwd": "${workspaceRoot}", | ||
"internalConsoleOptions": "openOnSessionStart", | ||
"skipFiles": ["<node_internals>/**", "node_modules/**"] | ||
}, | ||
{ | ||
"name": "Debug Jest Tests", | ||
"type": "node", | ||
"request": "launch", | ||
"runtimeArgs": [ | ||
"--inspect-brk", | ||
"${workspaceRoot}/node_modules/.bin/jest", | ||
"--runInBand" | ||
], | ||
"envFile": "${workspaceFolder}/.env", | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen", | ||
"port": 9229, | ||
"disableOptimisticBPs": true, | ||
"windows": { | ||
"program": "${workspaceFolder}/node_modules/jest/bin/jest" | ||
} | ||
}, | ||
{ | ||
"name": "Debug Jest Current File", | ||
"type": "node", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/node_modules/.bin/jest", | ||
"args": ["${relativeFile}", "--config", "jest.config.js"], | ||
"console": "integratedTerminal", | ||
"internalConsoleOptions": "neverOpen", | ||
"port": 9229, | ||
"disableOptimisticBPs": true, | ||
"windows": { | ||
"program": "${workspaceFolder}/node_modules/jest/bin/jest" | ||
} | ||
} | ||
] | ||
} |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Joshua D. P. Nielsen | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.