-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into readme-update-config
- Loading branch information
Showing
13 changed files
with
4,862 additions
and
333 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,18 +1,21 @@ | ||
# http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = tab | ||
indent_size = 4 | ||
indent_style = tab | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[package.json] | ||
indent_style = spaces | ||
indent_size = 2 | ||
|
||
[*.md] | ||
indent_style = spaces | ||
indent_style = space | ||
trim_trailing_whitespace = false | ||
|
||
[*.yml] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[package.json] | ||
indent_style = space | ||
indent_size = 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,37 @@ | ||
on: | ||
release: | ||
types: [created, edited, published] | ||
workflow_dispatch: | ||
inputs: | ||
dryRun: | ||
description: Dry run only | ||
required: true | ||
default: true | ||
type: boolean | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
registry-url: https://registry.npmjs.org | ||
- run: npm ci | ||
|
||
- name: Publish package | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.REGISTRY_PUBLISH_TOKEN }} | ||
if: > | ||
(github.event_name == 'release' && github.event.action == 'published') || | ||
(github.event_name == 'workflow_dispatch' && !inputs.dryRun) | ||
run: npm publish | ||
|
||
- name: Publish package (dry run) | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.REGISTRY_PUBLISH_TOKEN }} | ||
if: > | ||
(github.event_name == 'release' && github.event.action != 'published') || | ||
(github.event_name == 'workflow_dispatch' && inputs.dryRun) | ||
run: npm publish --dry-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,37 @@ | ||
# This workflow will do a clean install of node dependencies, build the source code and run tests. | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: Build and lint | ||
|
||
on: | ||
push: | ||
branches: # Run actions when code is committed to these branches | ||
- master | ||
branches: | ||
- main | ||
pull_request: | ||
branches: # Run actions when a PR is pushed based on one of these branches | ||
- master | ||
|
||
jobs: | ||
checkout_and_test: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 12 | ||
- run: npm ci | ||
- run: npm run lint | ||
|
||
test: | ||
name: test on ${{ matrix.os }} with node ${{ matrix.node-version }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- node-version: 12.x | ||
lint: true # Linter is run only once to shorten the total build time | ||
- node-version: 14.x | ||
- node-version: 16.x | ||
|
||
os: [ubuntu-20.04, windows-latest, macos-latest] | ||
node-version: [12, 14, 16, 18, 20] | ||
steps: | ||
- name: Checkout code from ${{ github.repository }} | ||
uses: actions/checkout@v2 | ||
- name: Setup node | ||
uses: actions/setup-node@v2 | ||
- name: Normalise line-ending handling in Git | ||
shell: bash | ||
run: | | ||
git config --global core.autocrlf false | ||
if: runner.os == 'Windows' | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run linter | ||
if: ${{ matrix.lint }} | ||
run: npm run lint | ||
- name: Run tests | ||
run: npm test | ||
- run: npm ci | ||
- 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 @@ | ||
lockfile-version=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 @@ | ||
14 |
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.