Skip to content

Commit

Permalink
[major] TypeScript rewrite, support ES Modules. (#706)
Browse files Browse the repository at this point in the history
  • Loading branch information
gamemaker1 committed Jul 12, 2022
1 parent 8949c70 commit d2a5187
Show file tree
Hide file tree
Showing 28 changed files with 6,121 additions and 2,170 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
@@ -0,0 +1,4 @@
# .gitattributes
# Makes sure all line endings are LF.

* text=auto eol=lf
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
@@ -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
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
@@ -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
56 changes: 56 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/default.md
@@ -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.
55 changes: 41 additions & 14 deletions .github/workflows/ci.yaml
@@ -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
15 changes: 13 additions & 2 deletions .gitignore
@@ -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
9 changes: 8 additions & 1 deletion .npmrc
@@ -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
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

87 changes: 0 additions & 87 deletions README.md

This file was deleted.

0 comments on commit d2a5187

Please sign in to comment.