-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include native support for Typescript (#87)
* Include native support for Typescript * Remove uneeded dependency * Fix typo * Add CHANGELOG entry * Add formatting for all files * Check formatting in CI * Minor change * Drop dependency * Node 18.x works? * Use ESM import in README example
- Loading branch information
Showing
26 changed files
with
8,472 additions
and
2,047 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,18 @@ | ||
{ | ||
"env": { | ||
"es6": true | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 2020, | ||
"sourceType": "module", | ||
"requireConfigFile": false | ||
}, | ||
"plugins": ["@typescript-eslint", "prettier"], | ||
"extends": [ | ||
"eslint:recommended", | ||
"prettier", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:prettier/recommended" | ||
] | ||
} |
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 |
---|---|---|
|
@@ -15,36 +15,42 @@ jobs: | |
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [14.x, 16.x] | ||
node-version: [14.x, 16.x, 18.x] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use NodeJS v${{ matrix.node-version }} | ||
uses: actions/[email protected] | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install | ||
run: npm ci | ||
- name: Test | ||
run: npm test | ||
- name: Coverage | ||
uses: coverallsapp/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: ./tests/coverage/lcov.info | ||
- uses: actions/checkout@v3 | ||
- name: Use NodeJS v${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install | ||
run: npm ci | ||
- name: Build | ||
run: npm run build | ||
- name: Run examples | ||
run: npm run examples | ||
- name: Test | ||
run: npm test | ||
- name: Coverage | ||
uses: coverallsapp/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: ./tests/coverage/lcov.info | ||
|
||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Use NodeJS v16 | ||
uses: actions/setup-node@v2.2.0 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
- name: Install | ||
run: npm ci | ||
- name: Lint | ||
run: npm run lint | ||
- name: Check format | ||
run: npm run format:check | ||
|
||
npm: | ||
if: startsWith(github.ref, 'refs/tags/') | ||
|
@@ -54,29 +60,27 @@ jobs: | |
name: NPM Package | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Use NodeJS v16 | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 16.x | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Sanity check | ||
run: | | ||
npm run lint | ||
npm test | ||
- name: Deploy to NPM | ||
uses: JS-DevTools/[email protected] | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Use NodeJS v16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Sanity check | ||
run: run-s build examples test | ||
- name: Deploy to NPM | ||
uses: JS-DevTools/[email protected] | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
|
||
release: | ||
name: Release | ||
needs: npm | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Get tag metadata | ||
id: tag | ||
run: | | ||
|
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname $0)/_/husky.sh" | ||
|
||
npm run lintfix | ||
npm test | ||
set -e | ||
|
||
run-s build examples test | ||
git add . |
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,6 +1,7 @@ | ||
* | ||
!LICENSE | ||
!src/ | ||
!dist/ | ||
!package.json | ||
!CHANGELOG.md | ||
!README.md |
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 @@ | ||
tests/coverage | ||
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
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
Oops, something went wrong.