-
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.
* back to npm * update to year only * bump dev node * switch to github actions * switch to ts and webpack * drop node8 for eslint and update docs * improve file structure and docs
- Loading branch information
1 parent
fe14a68
commit e8d0779
Showing
47 changed files
with
6,394 additions
and
3,866 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 |
---|---|---|
@@ -1,32 +1,24 @@ | ||
module.exports = { | ||
"env": { | ||
"es6": true, | ||
"node": true | ||
env: { | ||
node: true, | ||
es6: true, | ||
}, | ||
"extends": "eslint:recommended", | ||
"parserOptions": { | ||
"ecmaVersion": 8, | ||
"sourceType": "module" | ||
parser: '@typescript-eslint/parser', | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
], | ||
parserOptions: { | ||
ecmaVersion: 2018, | ||
sourceType: 'module', | ||
}, | ||
"rules": { | ||
"indent": [ | ||
"error", | ||
2 | ||
rules: { | ||
'@typescript-eslint/no-inferrable-types': 0, | ||
'@typescript-eslint/no-unused-vars': [ | ||
'warn', { | ||
vars: 'all', | ||
args: 'none', | ||
} | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"quotes": [ | ||
"error", | ||
"single" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
], | ||
"no-console": 0, | ||
"no-unused-vars": ["error", { "args": "none" }], | ||
"indent": ["error", 2, { "SwitchCase": 1 }], | ||
} | ||
'no-undef': 2, | ||
}, | ||
}; |
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: Publish | ||
|
||
env: | ||
NODE_VERSION: 12 | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
spec: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
registry-url: https://registry.npmjs.org/ | ||
# Log versions | ||
- run: npm --version; node --version | ||
- run: echo "PKG_VERSION=$(jq -r .version package.json)" >> $GITHUB_ENV | ||
# Assert release tag version matches the version we're publishing | ||
# NOTE: release tags **must** start with a lowercase "v" and then version | ||
- run: | | ||
if [ "v${{env.PKG_VERSION}}" != "${{ github.event.release.tag_name }}" ]; then | ||
echo 'Error! Package version "v${{env.PKG_VERSION}}" does not match tag version "${{ github.event.release.tag_name }}"' | ||
exit 1 | ||
fi | ||
- run: echo 'Publishing version - ${{env.PKG_VERSION}}' | ||
- run: npm ci | ||
- run: npm publish --dry-run | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_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,30 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
# all branches | ||
branches: | ||
- '**' | ||
# no tags | ||
tags-ignore: | ||
- '**' | ||
|
||
jobs: | ||
testlib: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [10.x, 12.x, 14.x, 15.x] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
# Log versions | ||
- run: npm --version; node --version | ||
- run: npm ci | ||
# make sure tests pass | ||
- run: npm test | ||
# make sure we can build successfully | ||
- run: npm run build |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = { | ||
ignore: [ | ||
'./test/__tests__/**/*', | ||
], | ||
require: [ | ||
'./test/__tests__/mocha.js', | ||
'ts-node/register', | ||
], | ||
extension: [ | ||
'ts', | ||
], | ||
} |
This file was deleted.
Oops, something went wrong.
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 | ||
12 |
This file was deleted.
Oops, something went wrong.
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.