Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[major] TypeScript rewrite, support ES Modules. (#706)
- Loading branch information
1 parent
8949c70
commit d2a5187
Showing
28 changed files
with
6,121 additions
and
2,170 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,4 @@ | ||
# .gitattributes | ||
# Makes sure all line endings are LF. | ||
|
||
* text=auto 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,31 @@ | ||
name: Report a bug | ||
description: ——— | ||
labels: [bug] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
# Thanks for reporting this bug! | ||
Help us replicate and find a fix for the issue by filling in this form. | ||
- type: textarea | ||
attributes: | ||
label: Description | ||
description: | | ||
Describe the issue and how to replicate it. If possible, please include | ||
a minimal example to reproduce the issue. | ||
validations: | ||
required: true | ||
- type: input | ||
attributes: | ||
label: Library version | ||
description: | | ||
Output of the `serve --version` command | ||
validations: | ||
required: true | ||
- type: input | ||
attributes: | ||
label: Node version | ||
description: Output of the `node --version` command | ||
validations: | ||
required: 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,28 @@ | ||
name: Suggest an improvement or new feature | ||
description: ——— | ||
labels: [enhancement] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
# Thanks for filing this feature request! | ||
Help us understanding this feature and the need for it better by filling in this form. | ||
- type: textarea | ||
attributes: | ||
label: Description | ||
description: Describe the feature in detail | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Why | ||
description: Why should we add this feature? What are potential use cases for it? | ||
validations: | ||
required: true | ||
- type: textarea | ||
attributes: | ||
label: Alternatives | ||
description: Describe the alternatives you have considered, or existing workarounds | ||
validations: | ||
required: 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,56 @@ | ||
<!-- | ||
Hi there! Thanks for contributing! Please fill in this template to help us | ||
review and merge the PR as quickly and easily as possible! | ||
--> | ||
|
||
## Related Issues | ||
|
||
<!-- | ||
If this is a bug fix, or adds a feature mentioned in another issue, mention | ||
it as follows: | ||
- Closes #10 | ||
- Fixes #15 | ||
--> | ||
|
||
## Description | ||
|
||
<!-- | ||
Explain what has been added/changed/removed, in | ||
[keepachangelog.com](https://keepachangelog.com) style. | ||
--> | ||
|
||
### Added | ||
|
||
<!-- | ||
- Added a new method on the limiter object to reset the count for a certain IP [#10] | ||
--> | ||
|
||
### Changed | ||
|
||
<!-- | ||
- Deprecated `global` option | ||
- Fixed test for deprecated options [#15] | ||
--> | ||
|
||
### Removed | ||
|
||
<!-- | ||
- Removed deprecated `headers` option | ||
--> | ||
|
||
## Caveats/Problems/Issues | ||
|
||
<!-- | ||
Any weird code/problems you faced while making this PR. Feel free to ask for | ||
help with anything, especially if it's your first time contributing! | ||
--> | ||
|
||
## Checklist | ||
|
||
- [ ] The issues that this PR fixes/closes have been mentioned above. | ||
- [ ] What this PR adds/changes/removes has been explained. | ||
- [ ] All tests (`pnpm test`) pass. | ||
- [ ] The linter (`pnpm lint`) does not throw an errors. | ||
- [ ] All added/modified code has been commented, and | ||
methods/classes/constants/types have been annotated with TSDoc comments. |
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,20 +1,47 @@ | ||
# .github/workflows/ci.yaml | ||
# Lints and tests the server every time a commit is pushed to the remote | ||
# repository. | ||
|
||
name: CI | ||
on: | ||
- push | ||
- pull_request | ||
on: [push, pull_request] | ||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v2 | ||
- name: Setup PNPM 7 | ||
uses: pnpm/action-setup@v2.0.1 | ||
with: | ||
version: latest | ||
- name: Setup Node 18 | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18 | ||
registry-url: 'https://registry.npmjs.org/' | ||
cache: 'pnpm' | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Check for errors in code/formatting | ||
run: pnpm lint | ||
test: | ||
name: Node.js ${{ matrix.node-version }} | ||
name: Test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: | ||
- 16 | ||
- 14 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
- name: Checkout the repository | ||
uses: actions/checkout@v2 | ||
- name: Setup PNPM 7 | ||
uses: pnpm/action-setup@v2.0.1 | ||
with: | ||
version: latest | ||
- name: Setup Node 18 | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm install | ||
- run: npm test | ||
node-version: 18 | ||
registry-url: 'https://registry.npmjs.org/' | ||
cache: 'pnpm' | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Run all tests | ||
run: pnpm 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,3 +1,14 @@ | ||
node_modules | ||
# .gitignore | ||
# A list of files and folders that should not be tracked by Git. | ||
|
||
node_modules/ | ||
coverage/ | ||
build/ | ||
.cache/ | ||
.idea/ | ||
.vscode/ | ||
|
||
*.log | ||
.nyc_output | ||
*.tgz | ||
*.bak | ||
*.tmp |
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,8 @@ | ||
save-exact = true | ||
# .npmrc | ||
# Configuration for pnpm. | ||
|
||
# Uses the exact version instead of any within-patch-range version of an | ||
# installed package. | ||
save-exact=true | ||
# Do not error out on missing peer dependencies. | ||
strict-peer-dependencies=false |
Oops, something went wrong.