diff --git a/.codeclimate.yml b/.codeclimate.yml
index e7fbbb97..982bc473 100644
--- a/.codeclimate.yml
+++ b/.codeclimate.yml
@@ -1,5 +1,5 @@
---
-version: '2'
+version: "2"
checks:
argument-count:
enabled: false
@@ -26,7 +26,7 @@ plugins:
enabled: true
config:
config: .eslintrc.json
- channel: 'eslint-7'
+ channel: "eslint-7"
# git-legal:
# enabled: true
duplication:
@@ -40,7 +40,7 @@ plugins:
# enabled: true
exclude_patterns:
- dist/
- - '**/node_modules/'
+ - "**/node_modules/"
- coverage/
- test-results/
- scripts/
diff --git a/.eslintignore b/.eslintignore
index 6785831a..b6b209ec 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -1,3 +1,4 @@
+.nyc_output/**/*
node_modules/**/*
target/**/*
coverage/**
@@ -5,4 +6,5 @@ test-results/**
lib/**/*
dist/**
.env
-out
\ No newline at end of file
+out
+report/**/*
\ No newline at end of file
diff --git a/.eslintrc b/.eslintrc
new file mode 100755
index 00000000..983a05ef
--- /dev/null
+++ b/.eslintrc
@@ -0,0 +1,81 @@
+{
+ "parser": "babel-eslint",
+ "parserOptions": {
+ "sourceType": "module"
+ },
+ "plugins": [
+ "security",
+ "unicorn",
+ "promise",
+ "istanbul",
+ "jsdoc",
+ "markdown"
+ ],
+ "extends": [
+ "standard",
+ "plugin:security/recommended",
+ "plugin:unicorn/recommended",
+ "plugin:jsdoc/recommended",
+ "plugin:md/recommended",
+ "plugin:json/recommended"
+ ],
+ "env": {
+ "browser": false,
+ "node": true
+ },
+ "globals": {
+ "Promise": true
+ },
+ "rules": {
+ "node/shebang": [
+ "error",
+ {
+ "convertPath": {
+ "bin/**/*.js": ["^bin/(.+?)\\.js$", "lib/bin/$1.js"]
+ }
+ }
+ ],
+ "node/no-unsupported-features/es-syntax": [
+ "error",
+ {
+ "ignores": ["modules"]
+ }
+ ],
+ "istanbul/no-ignore-file": "error",
+ "istanbul/prefer-ignore-reason": "error",
+ "promise/no-callback-in-promise": "off",
+ "security/detect-object-injection": "off"
+ },
+ "overrides": [
+ {
+ "files": ["src/test/**", "cucumber.js"],
+ "plugins": ["chai-friendly"],
+ "extends": ["plugin:chai-friendly/recommended"],
+ "globals": {
+ "expect": true,
+ "PendingError": true
+ },
+ "rules": {
+ "security/detect-non-literal-fs-filename": "off",
+ "jsdoc/require-jsdoc": "off"
+ }
+ },
+ {
+ "files": ["scripts/**"],
+ "parserOptions": {
+ "sourceType": "module",
+ "allowImportExportEverywhere": true
+ },
+ "rules": {
+ "node/shebang": "off"
+ }
+ },
+ {
+ "files": ["*.md"],
+ "parser": "markdown-eslint-parser",
+ "rules": {
+ "unicorn/filename-case": "off"
+ }
+ }
+ ]
+}
diff --git a/.eslintrc.yaml b/.eslintrc.yaml
deleted file mode 100755
index 18059da6..00000000
--- a/.eslintrc.yaml
+++ /dev/null
@@ -1,72 +0,0 @@
----
-parser: babel-eslint
-parserOptions:
- sourceType: module
-plugins:
-- prettier
-- security
-- unicorn
-- promise
-- istanbul
-- jsdoc
-- markdown
-extends:
-- eslint:recommended
-- plugin:security/recommended
-- plugin:eslint-comments/recommended
-- plugin:unicorn/recommended
-- plugin:node/recommended
-- plugin:import/errors
-- plugin:import/warnings
-- plugin:jsdoc/recommended
-- plugin:md/recommended
-- plugin:json/recommended
-- standard
-- prettier-standard/prettier-file
-env:
- browser: false
- node: true
-globals:
- Promise: true
-rules:
- prettier/prettier: error
- node/shebang:
- - error
- - convertPath:
- bin/**/*.js:
- - "^bin/(.+?)\\.js$"
- - lib/bin/$1.js
- node/no-unsupported-features/es-syntax:
- - error
- - ignores:
- - modules
- istanbul/no-ignore-file: error
- istanbul/prefer-ignore-reason: error
- promise/no-callback-in-promise: 'off'
- security/detect-object-injection: 'off'
-overrides:
-- files:
- - src/test/**
- - cucumber.js
- plugins:
- - chai-friendly
- extends:
- - plugin:chai-friendly/recommended
- globals:
- expect: true
- PendingError: true
- rules:
- security/detect-non-literal-fs-filename: 'off'
- jsdoc/require-jsdoc: 'off'
-- files:
- - scripts/**
- parserOptions:
- sourceType: module
- allowImportExportEverywhere: true
- rules:
- node/shebang: 'off'
-- files:
- - "*.md"
- parser: markdown-eslint-parser
- rules:
- unicorn/filename-case: 'off'
diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml
index 419a5012..e916faab 100644
--- a/.github/workflows/build-and-publish.yml
+++ b/.github/workflows/build-and-publish.yml
@@ -9,7 +9,7 @@ on:
- main
pull_request:
branches:
- - '**'
+ - "**"
jobs:
checksecret:
@@ -21,8 +21,8 @@ jobs:
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
run: |
- echo "SECRETS_SET: ${{ env.BROWSERSTACK_USERNAME != '' }}"
- echo "::set-output name=SECRETS_SET::${{ env.BROWSERSTACK_USERNAME != '' }}"
+ echo "SECRETS_SET: ${{ env.BROWSERSTACK_USERNAME != '' }}"
+ echo "::set-output name=SECRETS_SET::${{ env.BROWSERSTACK_USERNAME != '' }}"
lint:
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
@@ -34,25 +34,25 @@ jobs:
shell: bash
steps:
- - uses: actions/checkout@v2
-
- - name: Cache NPM dependencies
- uses: actions/cache@v1
- with:
- path: |
- ~/.npm
- node_modules
- key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
- restore-keys: |
- ${{ runner.OS }}-npm-cache-
-
- - name: Use Node.js 12.x
- uses: actions/setup-node@v1
- with:
- node-version: 12.x
- - run: npm config set script-shell $(which bash)
- - run: npm ci
- - run: npm run lint
+ - uses: actions/checkout@v2
+
+ - name: Cache NPM dependencies
+ uses: actions/cache@v1
+ with:
+ path: |
+ ~/.npm
+ node_modules
+ key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
+ restore-keys: |
+ ${{ runner.OS }}-npm-cache-
+
+ - name: Use Node.js 12.x
+ uses: actions/setup-node@v1
+ with:
+ node-version: 12.x
+ - run: npm config set script-shell $(which bash)
+ - run: npm ci
+ - run: npm run lint
duplication:
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
@@ -66,31 +66,29 @@ jobs:
shell: bash
steps:
- - uses: actions/checkout@v2
-
-
- - name: Cache NPM dependencies
- uses: actions/cache@v1
- with:
- path: |
- ~/.npm
- node_modules
- key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
- restore-keys: |
- ${{ runner.OS }}-npm-cache-
-
- - name: Use Node.js 12.x
- uses: actions/setup-node@v1
- with:
- node-version: 12.x
- - run: npm config set script-shell $(which bash)
- - run: npm ci
- - run: npm run duplication
- - uses: actions/upload-artifact@v2
- with:
- name: duplication-report
- path: report
-
+ - uses: actions/checkout@v2
+
+ - name: Cache NPM dependencies
+ uses: actions/cache@v1
+ with:
+ path: |
+ ~/.npm
+ node_modules
+ key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
+ restore-keys: |
+ ${{ runner.OS }}-npm-cache-
+
+ - name: Use Node.js 12.x
+ uses: actions/setup-node@v1
+ with:
+ node-version: 12.x
+ - run: npm config set script-shell $(which bash)
+ - run: npm ci
+ - run: npm run duplication
+ - uses: actions/upload-artifact@v2
+ with:
+ name: duplication-report
+ path: report
audit:
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
@@ -102,23 +100,23 @@ jobs:
shell: bash
steps:
- - uses: actions/checkout@v2
-
- - name: Cache NPM dependencies
- uses: actions/cache@v1
- with:
- path: |
- ~/.npm
- node_modules
- key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
- restore-keys: |
- ${{ runner.OS }}-npm-cache-
-
- - name: Use Node.js 12.x
- uses: actions/setup-node@v1
- with:
- node-version: 12.x
- - run: npm audit
+ - uses: actions/checkout@v2
+
+ - name: Cache NPM dependencies
+ uses: actions/cache@v1
+ with:
+ path: |
+ ~/.npm
+ node_modules
+ key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
+ restore-keys: |
+ ${{ runner.OS }}-npm-cache-
+
+ - name: Use Node.js 12.x
+ uses: actions/setup-node@v1
+ with:
+ node-version: 12.x
+ - run: npm audit
security:
needs:
@@ -133,25 +131,25 @@ jobs:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
steps:
- - uses: actions/checkout@v2
-
- - name: Cache NPM dependencies
- uses: actions/cache@v1
- with:
- path: |
- ~/.npm
- node_modules
- key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
- restore-keys: |
- ${{ runner.OS }}-npm-cache-
-
- - name: Use Node.js 12.x
- uses: actions/setup-node@v1
- with:
- node-version: 12.x
- - run: npm config set script-shell $(which bash)
- - run: npm ci
- - run: npm run security
+ - uses: actions/checkout@v2
+
+ - name: Cache NPM dependencies
+ uses: actions/cache@v1
+ with:
+ path: |
+ ~/.npm
+ node_modules
+ key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
+ restore-keys: |
+ ${{ runner.OS }}-npm-cache-
+
+ - name: Use Node.js 12.x
+ uses: actions/setup-node@v1
+ with:
+ node-version: 12.x
+ - run: npm config set script-shell $(which bash)
+ - run: npm ci
+ - run: npm run security
build:
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
@@ -163,28 +161,28 @@ jobs:
shell: bash
steps:
- - uses: actions/checkout@v2
-
- - name: Cache NPM dependencies
- uses: actions/cache@v1
- with:
- path: |
- ~/.npm
- node_modules
- key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
- restore-keys: |
- ${{ runner.OS }}-npm-cache-
-
- - name: Use Node.js 12.x
- uses: actions/setup-node@v1
- with:
- node-version: 12.x
- - run: npm config set script-shell $(which bash)
- - run: npm ci
- - run: npm run build
+ - uses: actions/checkout@v2
+
+ - name: Cache NPM dependencies
+ uses: actions/cache@v1
+ with:
+ path: |
+ ~/.npm
+ node_modules
+ key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
+ restore-keys: |
+ ${{ runner.OS }}-npm-cache-
+
+ - name: Use Node.js 12.x
+ uses: actions/setup-node@v1
+ with:
+ node-version: 12.x
+ - run: npm config set script-shell $(which bash)
+ - run: npm ci
+ - run: npm run build
test-node-api:
- if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
+ if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
runs-on: ubuntu-latest
@@ -197,35 +195,35 @@ jobs:
shell: bash
steps:
- - uses: actions/checkout@v2
-
- - name: Cache NPM dependencies
- uses: actions/cache@v1
- with:
- path: |
- ~/.npm
- node_modules
- key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
- restore-keys: |
- ${{ runner.OS }}-npm-cache-
-
- - name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v1
- with:
- node-version: ${{ matrix.node-version }}
- - run: npm config set script-shell $(which bash)
- - run: npm ci
- - run: npm run lint
- - run: npm run build
- - run: npm run cover:node-api
- - uses: actions/upload-artifact@v2
- with:
- name: code-coverage-report-node-${{ matrix.node-version }}
- path: coverage/node-api
- - uses: actions/upload-artifact@v2
- with:
- name: test-report-node-${{ matrix.node-version }}
- path: test-results/node-api
+ - uses: actions/checkout@v2
+
+ - name: Cache NPM dependencies
+ uses: actions/cache@v1
+ with:
+ path: |
+ ~/.npm
+ node_modules
+ key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
+ restore-keys: |
+ ${{ runner.OS }}-npm-cache-
+
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node-version }}
+ - run: npm config set script-shell $(which bash)
+ - run: npm ci
+ - run: npm run lint
+ - run: npm run build
+ - run: npm run cover:node-api
+ - uses: actions/upload-artifact@v2
+ with:
+ name: code-coverage-report-node-${{ matrix.node-version }}
+ path: coverage/node-api
+ - uses: actions/upload-artifact@v2
+ with:
+ name: test-report-node-${{ matrix.node-version }}
+ path: test-results/node-api
get-browser-list:
needs:
@@ -245,40 +243,40 @@ jobs:
shell: bash
steps:
- # wait here so we don't overload our browserstack quota
- - uses: softprops/turnstyle@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
- - uses: actions/checkout@v2
-
- - name: Cache NPM dependencies
- uses: actions/cache@v1
- with:
- path: |
- ~/.npm
- node_modules
- key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
- restore-keys: |
- ${{ runner.OS }}-npm-cache-
-
- - name: Use Node.js 12.x
- uses: actions/setup-node@v1
- with:
- node-version: 12.x
-
- - run: npm config set script-shell $(which bash)
- - run: npm ci
- - run: npm run --silent json:list-github-actions-browser-matrix:1 > browser-matrix-1.json
- - id: set-matrix-1
- run: echo "::set-output name=matrix-1::$(cat browser-matrix-1.json)"
- - run: npm run --silent json:list-github-actions-browser-matrix:2 > browser-matrix-2.json
- - id: set-matrix-2
- run: echo "::set-output name=matrix-2::$(cat browser-matrix-2.json)"
+ # wait here so we don't overload our browserstack quota
+ - uses: softprops/turnstyle@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - uses: actions/checkout@v2
+
+ - name: Cache NPM dependencies
+ uses: actions/cache@v1
+ with:
+ path: |
+ ~/.npm
+ node_modules
+ key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
+ restore-keys: |
+ ${{ runner.OS }}-npm-cache-
+
+ - name: Use Node.js 12.x
+ uses: actions/setup-node@v1
+ with:
+ node-version: 12.x
+
+ - run: npm config set script-shell $(which bash)
+ - run: npm ci
+ - run: npm run --silent json:list-github-actions-browser-matrix:1 > browser-matrix-1.json
+ - id: set-matrix-1
+ run: echo "::set-output name=matrix-1::$(cat browser-matrix-1.json)"
+ - run: npm run --silent json:list-github-actions-browser-matrix:2 > browser-matrix-2.json
+ - id: set-matrix-2
+ run: echo "::set-output name=matrix-2::$(cat browser-matrix-2.json)"
test-browser-api-local:
if: |
- ! contains(toJSON(github.event.commits.*.message), '[skip-ci]')
+ ! contains(toJSON(github.event.commits.*.message), '[skip-ci]')
runs-on: ubuntu-latest
@@ -289,34 +287,34 @@ jobs:
shell: bash
steps:
- - uses: actions/checkout@v2
-
- - name: Cache NPM dependencies
- uses: actions/cache@v1
- with:
- path: |
- ~/.npm
- node_modules
- key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
- restore-keys: |
- ${{ runner.OS }}-npm-cache-
-
- - name: Use Node.js 12.x
- uses: actions/setup-node@v1
- with:
- node-version: 12.x
-
- - run: npm config set script-shell $(which bash)
- - run: npm ci
- - run: npm run cover:browser-api:chrome:local
- - uses: actions/upload-artifact@v2
- with:
- name: code-coverage-report-chrome-local
- path: coverage/browser-api-chrome-local
- - uses: actions/upload-artifact@v2
- with:
- name: test-report-chrome-local
- path: test-results/browser-api-chrome-local
+ - uses: actions/checkout@v2
+
+ - name: Cache NPM dependencies
+ uses: actions/cache@v1
+ with:
+ path: |
+ ~/.npm
+ node_modules
+ key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
+ restore-keys: |
+ ${{ runner.OS }}-npm-cache-
+
+ - name: Use Node.js 12.x
+ uses: actions/setup-node@v1
+ with:
+ node-version: 12.x
+
+ - run: npm config set script-shell $(which bash)
+ - run: npm ci
+ - run: npm run cover:browser-api:chrome:local
+ - uses: actions/upload-artifact@v2
+ with:
+ name: code-coverage-report-chrome-local
+ path: coverage/browser-api-chrome-local
+ - uses: actions/upload-artifact@v2
+ with:
+ name: test-report-chrome-local
+ path: test-results/browser-api-chrome-local
test-browser-api-1:
needs:
@@ -338,52 +336,52 @@ jobs:
shell: bash
steps:
- - uses: actions/checkout@v2
-
- - name: Cache NPM dependencies
- uses: actions/cache@v1
- with:
- path: |
- ~/.npm
- node_modules
- key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
- restore-keys: |
- ${{ runner.OS }}-npm-cache-
-
- - name: Use Node.js 12.x
- uses: actions/setup-node@v1
- with:
- node-version: 12.x
-
- - run: npm config set script-shell $(which bash)
- - run: npm ci
- - uses: 'browserstack/github-actions/setup-env@v1.0.1'
- with:
- username: ${{ secrets.BROWSERSTACK_USERNAME }}
- access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
- - uses: 'browserstack/github-actions/setup-local@v1.0.1'
- with:
- local-testing: start
- local-identifier: random
- # browserstack can be moody at times, so let
- # the pipeline have a few cracks at it
- - uses: nick-invision/retry@v2
- with:
- timeout_seconds: 600
- max_attempts: 3
- retry_wait_seconds: 30
- command: npm run cover:browser-api:${{ matrix.browser }}:remote
- - uses: 'browserstack/github-actions/setup-local@v1.0.1'
- with:
- local-testing: stop
- - uses: actions/upload-artifact@v2
- with:
- name: code-coverage-report-${{ matrix.browser }}
- path: coverage/browser-api-${{ matrix.browser }}-remote
- - uses: actions/upload-artifact@v2
- with:
- name: test-report-${{ matrix.browser }}
- path: test-results/browser-api-${{ matrix.browser }}-remote
+ - uses: actions/checkout@v2
+
+ - name: Cache NPM dependencies
+ uses: actions/cache@v1
+ with:
+ path: |
+ ~/.npm
+ node_modules
+ key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
+ restore-keys: |
+ ${{ runner.OS }}-npm-cache-
+
+ - name: Use Node.js 12.x
+ uses: actions/setup-node@v1
+ with:
+ node-version: 12.x
+
+ - run: npm config set script-shell $(which bash)
+ - run: npm ci
+ - uses: "browserstack/github-actions/setup-env@v1.0.1"
+ with:
+ username: ${{ secrets.BROWSERSTACK_USERNAME }}
+ access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
+ - uses: "browserstack/github-actions/setup-local@v1.0.1"
+ with:
+ local-testing: start
+ local-identifier: random
+ # browserstack can be moody at times, so let
+ # the pipeline have a few cracks at it
+ - uses: nick-invision/retry@v2
+ with:
+ timeout_seconds: 600
+ max_attempts: 3
+ retry_wait_seconds: 30
+ command: npm run cover:browser-api:${{ matrix.browser }}:remote
+ - uses: "browserstack/github-actions/setup-local@v1.0.1"
+ with:
+ local-testing: stop
+ - uses: actions/upload-artifact@v2
+ with:
+ name: code-coverage-report-${{ matrix.browser }}
+ path: coverage/browser-api-${{ matrix.browser }}-remote
+ - uses: actions/upload-artifact@v2
+ with:
+ name: test-report-${{ matrix.browser }}
+ path: test-results/browser-api-${{ matrix.browser }}-remote
test-browser-api-2:
needs:
@@ -405,53 +403,52 @@ jobs:
shell: bash
steps:
- - uses: actions/checkout@v2
-
- - name: Cache NPM dependencies
- uses: actions/cache@v1
- with:
- path: |
- ~/.npm
- node_modules
- key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
- restore-keys: |
- ${{ runner.OS }}-npm-cache-
-
- - name: Use Node.js 12.x
- uses: actions/setup-node@v1
- with:
- node-version: 12.x
-
- - run: npm config set script-shell $(which bash)
- - run: npm ci
- - uses: 'browserstack/github-actions/setup-env@v1.0.1'
- with:
- username: ${{ secrets.BROWSERSTACK_USERNAME }}
- access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
- - uses: 'browserstack/github-actions/setup-local@v1.0.1'
- with:
- local-testing: start
- local-identifier: random
- # browserstack can be moody at times, so let
- # the pipeline have a few cracks at it
- - uses: nick-invision/retry@v2
- with:
- timeout_seconds: 300
- max_attempts: 3
- retry_wait_seconds: 30
- command: npm run cover:browser-api:${{ matrix.browser }}:remote
- - uses: 'browserstack/github-actions/setup-local@v1.0.1'
- with:
- local-testing: stop
- - uses: actions/upload-artifact@v2
- with:
- name: code-coverage-report-${{ matrix.browser }}
- path: coverage/browser-api-${{ matrix.browser }}-remote
- - uses: actions/upload-artifact@v2
- with:
- name: test-report-${{ matrix.browser }}
- path: test-results/browser-api-${{ matrix.browser }}-remote
-
+ - uses: actions/checkout@v2
+
+ - name: Cache NPM dependencies
+ uses: actions/cache@v1
+ with:
+ path: |
+ ~/.npm
+ node_modules
+ key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
+ restore-keys: |
+ ${{ runner.OS }}-npm-cache-
+
+ - name: Use Node.js 12.x
+ uses: actions/setup-node@v1
+ with:
+ node-version: 12.x
+
+ - run: npm config set script-shell $(which bash)
+ - run: npm ci
+ - uses: "browserstack/github-actions/setup-env@v1.0.1"
+ with:
+ username: ${{ secrets.BROWSERSTACK_USERNAME }}
+ access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
+ - uses: "browserstack/github-actions/setup-local@v1.0.1"
+ with:
+ local-testing: start
+ local-identifier: random
+ # browserstack can be moody at times, so let
+ # the pipeline have a few cracks at it
+ - uses: nick-invision/retry@v2
+ with:
+ timeout_seconds: 300
+ max_attempts: 3
+ retry_wait_seconds: 30
+ command: npm run cover:browser-api:${{ matrix.browser }}:remote
+ - uses: "browserstack/github-actions/setup-local@v1.0.1"
+ with:
+ local-testing: stop
+ - uses: actions/upload-artifact@v2
+ with:
+ name: code-coverage-report-${{ matrix.browser }}
+ path: coverage/browser-api-${{ matrix.browser }}-remote
+ - uses: actions/upload-artifact@v2
+ with:
+ name: test-report-${{ matrix.browser }}
+ path: test-results/browser-api-${{ matrix.browser }}-remote
check-coverage-local:
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
@@ -467,34 +464,33 @@ jobs:
shell: bash
steps:
- - uses: actions/checkout@v2
-
- - name: Cache NPM dependencies
- uses: actions/cache@v1
- with:
- path: |
- ~/.npm
- node_modules
- key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
- restore-keys: |
- ${{ runner.OS }}-npm-cache-
-
- - name: Use Node.js 12.x
- uses: actions/setup-node@v1
- with:
- node-version: 12.x
-
- - run: npm config set script-shell $(which bash)
- - run: npm ci
- - uses: actions/download-artifact@v2
- - run: mkdir -p coverage
- - run: |
- for directory in $(ls -d code-coverage-report-*); do
- mv "${directory}" "coverage/."
- done
- ls -l coverage
- - run: npm run report:cover
-
+ - uses: actions/checkout@v2
+
+ - name: Cache NPM dependencies
+ uses: actions/cache@v1
+ with:
+ path: |
+ ~/.npm
+ node_modules
+ key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
+ restore-keys: |
+ ${{ runner.OS }}-npm-cache-
+
+ - name: Use Node.js 12.x
+ uses: actions/setup-node@v1
+ with:
+ node-version: 12.x
+
+ - run: npm config set script-shell $(which bash)
+ - run: npm ci
+ - uses: actions/download-artifact@v2
+ - run: mkdir -p coverage
+ - run: |
+ for directory in $(ls -d code-coverage-report-*); do
+ mv "${directory}" "coverage/."
+ done
+ ls -l coverage
+ - run: npm run report:cover
check-coverage:
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
@@ -511,34 +507,33 @@ jobs:
shell: bash
steps:
- - uses: actions/checkout@v2
-
- - name: Cache NPM dependencies
- uses: actions/cache@v1
- with:
- path: |
- ~/.npm
- node_modules
- key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
- restore-keys: |
- ${{ runner.OS }}-npm-cache-
-
- - name: Use Node.js 12.x
- uses: actions/setup-node@v1
- with:
- node-version: 12.x
-
- - run: npm config set script-shell $(which bash)
- - run: npm ci
- - uses: actions/download-artifact@v2
- - run: mkdir -p coverage
- - run: |
- for directory in $(ls -d code-coverage-report-*); do
- mv "${directory}" "coverage/."
- done
- ls -l coverage
- - run: npm run report:cover
-
+ - uses: actions/checkout@v2
+
+ - name: Cache NPM dependencies
+ uses: actions/cache@v1
+ with:
+ path: |
+ ~/.npm
+ node_modules
+ key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
+ restore-keys: |
+ ${{ runner.OS }}-npm-cache-
+
+ - name: Use Node.js 12.x
+ uses: actions/setup-node@v1
+ with:
+ node-version: 12.x
+
+ - run: npm config set script-shell $(which bash)
+ - run: npm ci
+ - uses: actions/download-artifact@v2
+ - run: mkdir -p coverage
+ - run: |
+ for directory in $(ls -d code-coverage-report-*); do
+ mv "${directory}" "coverage/."
+ done
+ ls -l coverage
+ - run: npm run report:cover
report-cover-to-codeclimate:
needs:
@@ -559,23 +554,23 @@ jobs:
shell: bash
steps:
- - uses: actions/checkout@v2
- - uses: actions/download-artifact@v2
- - run: ls code-coverage-report-chrome
- - run: curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- - run: chmod +x ./cc-test-reporter
- - run: |
- for directory in $(ls -d code-coverage-report-*); do
- ./cc-test-reporter format-coverage -t lcov -o ${directory}-codeclimate.json ${directory}/lcov.info
- done
- - run: ./cc-test-reporter sum-coverage *-codeclimate.json -o code-coverage-report-full-codeclimate.json
- - run: ./cc-test-reporter upload-coverage -i code-coverage-report-full-codeclimate.json
- env:
- CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
+ - uses: actions/checkout@v2
+ - uses: actions/download-artifact@v2
+ - run: ls code-coverage-report-chrome
+ - run: curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
+ - run: chmod +x ./cc-test-reporter
+ - run: |
+ for directory in $(ls -d code-coverage-report-*); do
+ ./cc-test-reporter format-coverage -t lcov -o ${directory}-codeclimate.json ${directory}/lcov.info
+ done
+ - run: ./cc-test-reporter sum-coverage *-codeclimate.json -o code-coverage-report-full-codeclimate.json
+ - run: ./cc-test-reporter upload-coverage -i code-coverage-report-full-codeclimate.json
+ env:
+ CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
publish-reports:
if: "false"
-
+
continue-on-error: true
needs:
@@ -588,25 +583,23 @@ jobs:
shell: bash
steps:
-
- - name: Publish Cover Report
- uses: JamesIves/github-pages-deploy-action@3.7.1
- with:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- BRANCH: gh-pages # The branch the action should deploy to.
- FOLDER: coverage/full # The folder the action should deploy.
- TARGET_FOLDER: /builds/${GITHUB_RUN_ID}-${GITHUB_RUN_NUMBER}/coverage
- CLEAN: true # Automatically remove deleted files from the deploy branch
-
- - name: Publish Test Results
- uses: JamesIves/github-pages-deploy-action@3.7.1
- with:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- BRANCH: gh-pages # The branch the action should deploy to.
- FOLDER: test-results/full # The folder the action should deploy.
- TARGET_FOLDER: /builds/${GITHUB_RUN_ID}-${GITHUB_RUN_NUMBER}/test-results
- CLEAN: true # Automatically remove deleted files from the deploy branch
-
+ - name: Publish Cover Report
+ uses: JamesIves/github-pages-deploy-action@3.7.1
+ with:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ BRANCH: gh-pages # The branch the action should deploy to.
+ FOLDER: coverage/full # The folder the action should deploy.
+ TARGET_FOLDER: /builds/${GITHUB_RUN_ID}-${GITHUB_RUN_NUMBER}/coverage
+ CLEAN: true # Automatically remove deleted files from the deploy branch
+
+ - name: Publish Test Results
+ uses: JamesIves/github-pages-deploy-action@3.7.1
+ with:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ BRANCH: gh-pages # The branch the action should deploy to.
+ FOLDER: test-results/full # The folder the action should deploy.
+ TARGET_FOLDER: /builds/${GITHUB_RUN_ID}-${GITHUB_RUN_NUMBER}/test-results
+ CLEAN: true # Automatically remove deleted files from the deploy branch
publish:
needs:
@@ -629,94 +622,93 @@ jobs:
shell: bash
steps:
- - uses: actions/checkout@v2
-
- - name: Cache NPM dependencies
- uses: actions/cache@v1
- with:
- path: |
- ~/.npm
- node_modules
- key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
- restore-keys: |
- ${{ runner.OS }}-npm-cache-
-
- - uses: actions/setup-node@v1
- with:
- node-version: 12.x
- registry-url: https://registry.npmjs.org/
- - name: Publish and Tag
- run: |
- npm config set script-shell $(which bash)
- PACKAGE_NAME=$(node -p "require('./package.json').name")
- CURRENT_VERSION=$(npm --unsafe-perm show "${PACKAGE_NAME}" version)
- PACKAGE_VERSION=$(node -p "require('./package.json').version")
- echo "CURRENT_VERSION=${CURRENT_VERSION}"
- echo "PACKAGE_VERSION=${PACKAGE_VERSION}"
- if [ "$CURRENT_VERSION" = "$PACKAGE_VERSION" ]; then
- echo "Version ${PACKAGE_VERSION} has already been published"
- echo "PACKAGE_VERSION=" >> $GITHUB_ENV
- else
- npm ci
- # need to bump version in README.md to PACKAGE_VERSION
- # so that the correct version appears on npmjs.com
- npm run sync-readme-version
- git config user.name github-actions
- git config user.email github-actions@github.com
- git add README.md
- git commit -m "Updated version in README.md to $PACKAGE_VERSION. [skip-ci]"
- npm pack
- npm run dopublish
+ - uses: actions/checkout@v2
+
+ - name: Cache NPM dependencies
+ uses: actions/cache@v1
+ with:
+ path: |
+ ~/.npm
+ node_modules
+ key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
+ restore-keys: |
+ ${{ runner.OS }}-npm-cache-
+
+ - uses: actions/setup-node@v1
+ with:
+ node-version: 12.x
+ registry-url: https://registry.npmjs.org/
+ - name: Publish and Tag
+ run: |
+ npm config set script-shell $(which bash)
+ PACKAGE_NAME=$(node -p "require('./package.json').name")
+ CURRENT_VERSION=$(npm --unsafe-perm show "${PACKAGE_NAME}" version)
+ PACKAGE_VERSION=$(node -p "require('./package.json').version")
+ echo "CURRENT_VERSION=${CURRENT_VERSION}"
+ echo "PACKAGE_VERSION=${PACKAGE_VERSION}"
+ if [ "$CURRENT_VERSION" = "$PACKAGE_VERSION" ]; then
+ echo "Version ${PACKAGE_VERSION} has already been published"
+ echo "PACKAGE_VERSION=" >> $GITHUB_ENV
+ else
+ npm ci
+ # need to bump version in README.md to PACKAGE_VERSION
+ # so that the correct version appears on npmjs.com
+ npm run sync-readme-version
+ git config user.name github-actions
+ git config user.email github-actions@github.com
+ git add README.md
+ git commit -m "Updated version in README.md to $PACKAGE_VERSION. [skip-ci]"
+ npm pack
+ npm run dopublish
+ git config user.name github-actions
+ git config user.email github-actions@github.com
+ git tag "v${PACKAGE_VERSION}"
+ git pull --rebase
+ git push --tags
+ echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
+ fi
+ PACKAGE_NAME_WITHOUT_AT="${PACKAGE_NAME#@}"
+ echo "TGZ_NAME=${PACKAGE_NAME_WITHOUT_AT//\//-}" >> $GITHUB_ENV
+ env:
+ NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
+
+ - name: Create Release
+ if: ${{ env.PACKAGE_VERSION != '' }}
+ id: create_release
+ uses: actions/create-release@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
+ with:
+ tag_name: v${{ env.PACKAGE_VERSION }}
+ release_name: Release v${{ env.PACKAGE_VERSION }}
+ draft: false
+ prerelease: false
+
+ - name: Upload Release Asset
+ if: ${{ env.PACKAGE_VERSION != '' }}
+ id: upload-release-asset
+ uses: actions/upload-release-asset@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
+ asset_path: ./${{ env.TGZ_NAME }}-${{ env.PACKAGE_VERSION }}.tgz
+ asset_name: ${{ env.TGZ_NAME }}-${{ env.PACKAGE_VERSION }}.tgz
+ asset_content_type: application/gzip
+
+ - name: Bump Version
+ run: |
git config user.name github-actions
git config user.email github-actions@github.com
- git tag "v${PACKAGE_VERSION}"
+ npm --unsafe-perm --no-git-tag-version version minor -m "Version minor to %s."
+ npm ci
+ git add package.json
+ git add package-lock.json
+ # We don't want to bump the version in the README.md
+ # otherwise people reading on github will try to
+ # use the unreleased version.
+ # instead, we need to update it, just before we pack and tag
+ NEXT_VERSION=$(node -p "require('./package.json').version")
+ git commit -m "Version bump to $NEXT_VERSION. [skip-ci]"
git pull --rebase
- git push --tags
- echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
- fi
- PACKAGE_NAME_WITHOUT_AT="${PACKAGE_NAME#@}"
- echo "TGZ_NAME=${PACKAGE_NAME_WITHOUT_AT//\//-}" >> $GITHUB_ENV
- env:
- NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
-
- - name: Create Release
- if: ${{ env.PACKAGE_VERSION != '' }}
- id: create_release
- uses: actions/create-release@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
- with:
- tag_name: v${{ env.PACKAGE_VERSION }}
- release_name: Release v${{ env.PACKAGE_VERSION }}
- draft: false
- prerelease: false
-
- - name: Upload Release Asset
- if: ${{ env.PACKAGE_VERSION != '' }}
- id: upload-release-asset
- uses: actions/upload-release-asset@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
- asset_path: ./${{ env.TGZ_NAME }}-${{ env.PACKAGE_VERSION }}.tgz
- asset_name: ${{ env.TGZ_NAME }}-${{ env.PACKAGE_VERSION }}.tgz
- asset_content_type: application/gzip
-
- - name: Bump Version
- run: |
- git config user.name github-actions
- git config user.email github-actions@github.com
- npm --unsafe-perm --no-git-tag-version version minor -m "Version minor to %s."
- npm ci
- git add package.json
- git add package-lock.json
- # We don't want to bump the version in the README.md
- # otherwise people reading on github will try to
- # use the unreleased version.
- # instead, we need to update it, just before we pack and tag
- NEXT_VERSION=$(node -p "require('./package.json').version")
- git commit -m "Version bump to $NEXT_VERSION. [skip-ci]"
- git pull --rebase
- git push origin HEAD:main
-
+ git push origin HEAD:main
diff --git a/.nycrc-browser-api-local.yml b/.nycrc-browser-api-local.yml
index a6c8b31e..20228c5f 100644
--- a/.nycrc-browser-api-local.yml
+++ b/.nycrc-browser-api-local.yml
@@ -1,15 +1,15 @@
-extends: '@istanbuljs/nyc-config-babel'
+extends: "@istanbuljs/nyc-config-babel"
all: true
skip-full: false
exclude:
- - 'lib/**/*.js'
- - 'dist/**/*.js'
- - 'scripts/**/*.js'
- - 'coverage/**/*.js'
- - 'src/test/clients/waychaser-direct.js'
- - 'src/test/clients/webdriver-manager-remote.js'
- - 'src/test/clients/remote-tunneler.js'
- - 'src/util/abstract.js'
+ - "lib/**/*.js"
+ - "dist/**/*.js"
+ - "scripts/**/*.js"
+ - "coverage/**/*.js"
+ - "src/test/clients/waychaser-direct.js"
+ - "src/test/clients/webdriver-manager-remote.js"
+ - "src/test/clients/remote-tunneler.js"
+ - "src/util/abstract.js"
check-coverage: false
reporter:
diff --git a/.nycrc-browser-api-remote.yml b/.nycrc-browser-api-remote.yml
index 11563953..c1ceb22f 100644
--- a/.nycrc-browser-api-remote.yml
+++ b/.nycrc-browser-api-remote.yml
@@ -1,14 +1,14 @@
-extends: '@istanbuljs/nyc-config-babel'
+extends: "@istanbuljs/nyc-config-babel"
all: true
skip-full: false
exclude:
- - 'lib/**/*.js'
- - 'dist/**/*.js'
- - 'scripts/**/*.js'
- - 'coverage/**/*.js'
- - 'src/test/clients/waychaser-direct.js'
- - 'src/test/clients/webdriver-manager-local.js'
- - 'src/util/abstract.js'
+ - "lib/**/*.js"
+ - "dist/**/*.js"
+ - "scripts/**/*.js"
+ - "coverage/**/*.js"
+ - "src/test/clients/waychaser-direct.js"
+ - "src/test/clients/webdriver-manager-local.js"
+ - "src/util/abstract.js"
check-coverage: false
reporter:
diff --git a/.nycrc-node-api.yml b/.nycrc-node-api.yml
index ddceac51..1e6e59a8 100644
--- a/.nycrc-node-api.yml
+++ b/.nycrc-node-api.yml
@@ -1,15 +1,15 @@
-extends: '@istanbuljs/nyc-config-babel'
+extends: "@istanbuljs/nyc-config-babel"
all: true
skip-full: false
exclude:
- - 'lib/**/*.js'
- - 'dist/**/*.js'
- - 'scripts/**/*.js'
- - 'coverage/**/*.js'
- - 'src/test/clients/remote-tunneler.js'
- - 'src/test/clients/waychaser-via-webdriver.js'
- - 'src/test/clients/webdriver-*.js'
- - 'src/util/abstract.js'
+ - "lib/**/*.js"
+ - "dist/**/*.js"
+ - "scripts/**/*.js"
+ - "coverage/**/*.js"
+ - "src/test/clients/remote-tunneler.js"
+ - "src/test/clients/waychaser-via-webdriver.js"
+ - "src/test/clients/webdriver-*.js"
+ - "src/util/abstract.js"
check-coverage: false
reporter:
- text-summary
diff --git a/.nycrc.yml b/.nycrc.yml
index 1a3d0d70..9409ce26 100644
--- a/.nycrc.yml
+++ b/.nycrc.yml
@@ -1,11 +1,11 @@
-extends: '@istanbuljs/nyc-config-babel'
+extends: "@istanbuljs/nyc-config-babel"
all: true
skip-full: false
exclude:
- - 'lib/**/*.js'
- - 'dist/**/*.js'
- - 'scripts/**/*.js'
- - 'coverage/**/*.js'
+ - "lib/**/*.js"
+ - "dist/**/*.js"
+ - "scripts/**/*.js"
+ - "coverage/**/*.js"
check-coverage: true
statements: 100
lines: 100
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 00000000..ddd8f03e
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,12 @@
+.nyc_output
+node_modules
+target
+coverage
+test-results
+lib
+dist
+.env
+out
+report
+.vscode
+*.js
\ No newline at end of file
diff --git a/.prettierrc.json b/.prettierrc.json
deleted file mode 100644
index fdc60e2d..00000000
--- a/.prettierrc.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "prettier-config-standard": true
-}
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 55f1f3b1..df6c2f34 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -13,5 +13,10 @@
"**/dist": true,
"**/lib": true,
"**/test-results": true
- }
+ },
+ "standard.engine": "standardx",
+ "standard.usePackageJson": true,
+ "standard.workingDirectories": [
+
+ ]
}
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 5ee37143..6ae57669 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:
-* Using welcoming and inclusive language
-* Being respectful of differing viewpoints and experiences
-* Gracefully accepting constructive criticism
-* Focusing on what is best for the community
-* Showing empathy towards other community members
+- Using welcoming and inclusive language
+- Being respectful of differing viewpoints and experiences
+- Gracefully accepting constructive criticism
+- Focusing on what is best for the community
+- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
-* The use of sexualized language or imagery and unwelcome sexual attention or
- advances
-* Trolling, insulting/derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or electronic
- address, without explicit permission
-* Other conduct which could reasonably be considered inappropriate in a
- professional setting
+- The use of sexualized language or imagery and unwelcome sexual attention or
+ advances
+- Trolling, insulting/derogatory comments, and personal or political attacks
+- Public or private harassment
+- Publishing others' private information, such as a physical or electronic
+ address, without explicit permission
+- Other conduct which could reasonably be considered inappropriate in a
+ professional setting
## Our Responsibilities
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 1d43dc98..ede42acd 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,4 +1,3 @@
-
# Contributing
waychaser is released under the non-restrictive Apache 2.0 licenses and follows a very standard Github development process, using Github tracker for issues and merging pull requests into master. Contributions of all form to this repository is acceptable, as long as it follows the prescribed community guidelines enumerated below.
@@ -49,11 +48,11 @@ The normal development cycle against a new backend API is:
2. run `npm run watch:test:node-api`
3. write code until the scenario passes
4. commit
-5. run `npm run watch:test:browser-api`
-6. write code until the scenario passes
-7. commit
-8. run `npm run test` to make you didn't break anything else along the way
-9. run `npm run cover` and remove dead code
+5. run `npm run watch:test:browser-api`
+6. write code until the scenario passes
+7. commit
+8. run `npm run test` to make you didn't break anything else along the way
+9. run `npm run cover` and remove dead code
10. commit and push
### 🚫💩
@@ -103,18 +102,20 @@ Babel requires plugins to do the transformation. Presets are the set of plugins
1. Install [VSCode](https://code.visualstudio.com/)
2. Install [ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
-3. Install [Prettier extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
-4. Install [Cover extension](https://marketplace.visualstudio.com/items?itemName=hindlemail.cover)
+3. Install [StandardJS extension](https://marketplace.visualstudio.com/items?itemName=chenxsan.vscode-standardjs)
+4. Install [Prettier extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
+5. Install [Cover extension](https://marketplace.visualstudio.com/items?itemName=hindlemail.cover)
### Contribution flow
A rough outline of an ideal contributors' workflow is as follows:
-* Fork the current repository
-* Create a topic branch from where to base the contribution. Mostly, it's the main branch.
-* Make commits of logical units.
-* Push changes in a topic branch to your forked repository.
-* Before sending out the pull request, please sync your forked repository with the remote repository to ensure that your PR is elegant, concise. Reference the guide below:
+- Fork the current repository
+- Create a topic branch from where to base the contribution. Mostly, it's the main branch.
+- Make commits of logical units.
+- Push changes in a topic branch to your forked repository.
+- Before sending out the pull request, please sync your forked repository with the remote repository to ensure that your PR is elegant, concise. Reference the guide below:
+
```
git remote add upstream git@github.com:mountain-pass/waychaser.git
git fetch upstream
@@ -123,13 +124,15 @@ git checkout -b your_awesome_patch
... add some work
git push origin your_awesome_patch
```
-* Submit a pull request to mountain-pass/waychaser and wait for the reply.
+
+- Submit a pull request to mountain-pass/waychaser and wait for the reply.
Thanks for contributing!
## Contributor agreement
By submitting changes to this repository, you are accepting:
+
1. To adhear to our [code of conduct](./CODE_OF_CONDUCT.md), and
2. You are transfering copyright of your change to the waychaser project.
diff --git a/README.md b/README.md
index 4f35c476..8366bfdf 100644
--- a/README.md
+++ b/README.md
@@ -18,9 +18,9 @@ This isomorphic library is compatible with Node.js 10.x, 12.x and 14.x, Chrome,
[](https://github.com/standard/standard)
- |
Node.js | [
Chrome](https://automate.browserstack.com/dashboard/v2/public-build/M2lUc2Q3VFJicFR2c0N6Y0JvZE5oSXAvYlpUQ1ZPMXgxalpUK2ZtNTdPcz0tLVR3QzU5TXllbEZnemhqK2Z5VEpVQ2c9PQ==--8a61c301655735baed333d4f305980a13ef32c25?browsers=[{%22browser%22:%22chrome%22}]) | [
Firefox](https://automate.browserstack.com/dashboard/v2/public-build/M2lUc2Q3VFJicFR2c0N6Y0JvZE5oSXAvYlpUQ1ZPMXgxalpUK2ZtNTdPcz0tLVR3QzU5TXllbEZnemhqK2Z5VEpVQ2c9PQ==--8a61c301655735baed333d4f305980a13ef32c25?browsers=[{%22browser%22:%22firefox%22}]) | [
Safari](https://automate.browserstack.com/dashboard/v2/public-build/M2lUc2Q3VFJicFR2c0N6Y0JvZE5oSXAvYlpUQ1ZPMXgxalpUK2ZtNTdPcz0tLVR3QzU5TXllbEZnemhqK2Z5VEpVQ2c9PQ==--8a61c301655735baed333d4f305980a13ef32c25?browsers=[{%22browser%22:%22safari%22}]) | [
Edge](https://automate.browserstack.com/dashboard/v2/public-build/M2lUc2Q3VFJicFR2c0N6Y0JvZE5oSXAvYlpUQ1ZPMXgxalpUK2ZtNTdPcz0tLVR3QzU5TXllbEZnemhqK2Z5VEpVQ2c9PQ==--8a61c301655735baed333d4f305980a13ef32c25?browsers=[{%22browser%22:%22edge%22}]) | [
iOS](https://automate.browserstack.com/dashboard/v2/public-build/M2lUc2Q3VFJicFR2c0N6Y0JvZE5oSXAvYlpUQ1ZPMXgxalpUK2ZtNTdPcz0tLVR3QzU5TXllbEZnemhqK2Z5VEpVQ2c9PQ==--8a61c301655735baed333d4f305980a13ef32c25?oses=[{%22os%22:%22ios%22}]) | [
Android](https://automate.browserstack.com/dashboard/v2/public-build/M2lUc2Q3VFJicFR2c0N6Y0JvZE5oSXAvYlpUQ1ZPMXgxalpUK2ZtNTdPcz0tLVR3QzU5TXllbEZnemhqK2Z5VEpVQ2c9PQ==--8a61c301655735baed333d4f305980a13ef32c25?oses=[{%22os%22:%22android%22}]) | [
IE](https://automate.browserstack.com/dashboard/v2/public-build/M2lUc2Q3VFJicFR2c0N6Y0JvZE5oSXAvYlpUQ1ZPMXgxalpUK2ZtNTdPcz0tLVR3QzU5TXllbEZnemhqK2Z5VEpVQ2c9PQ==--8a61c301655735baed333d4f305980a13ef32c25?browsers=[{%22browser%22:%22ie%22}]) |
-| --------- | --------- | --------- | --------- | --------- | --------- | --------- | --------- |
-| 10.x, 12.x, 14.x | latest version | latest version| latest version| latest version | latest version | latest version | 11 |
+|
Node.js | [
Chrome](https://automate.browserstack.com/dashboard/v2/public-build/M2lUc2Q3VFJicFR2c0N6Y0JvZE5oSXAvYlpUQ1ZPMXgxalpUK2ZtNTdPcz0tLVR3QzU5TXllbEZnemhqK2Z5VEpVQ2c9PQ==--8a61c301655735baed333d4f305980a13ef32c25?browsers=[{%22browser%22:%22chrome%22}]) | [
Firefox](https://automate.browserstack.com/dashboard/v2/public-build/M2lUc2Q3VFJicFR2c0N6Y0JvZE5oSXAvYlpUQ1ZPMXgxalpUK2ZtNTdPcz0tLVR3QzU5TXllbEZnemhqK2Z5VEpVQ2c9PQ==--8a61c301655735baed333d4f305980a13ef32c25?browsers=[{%22browser%22:%22firefox%22}]) | [
Safari](https://automate.browserstack.com/dashboard/v2/public-build/M2lUc2Q3VFJicFR2c0N6Y0JvZE5oSXAvYlpUQ1ZPMXgxalpUK2ZtNTdPcz0tLVR3QzU5TXllbEZnemhqK2Z5VEpVQ2c9PQ==--8a61c301655735baed333d4f305980a13ef32c25?browsers=[{%22browser%22:%22safari%22}]) | [
Edge](https://automate.browserstack.com/dashboard/v2/public-build/M2lUc2Q3VFJicFR2c0N6Y0JvZE5oSXAvYlpUQ1ZPMXgxalpUK2ZtNTdPcz0tLVR3QzU5TXllbEZnemhqK2Z5VEpVQ2c9PQ==--8a61c301655735baed333d4f305980a13ef32c25?browsers=[{%22browser%22:%22edge%22}]) | [
iOS](https://automate.browserstack.com/dashboard/v2/public-build/M2lUc2Q3VFJicFR2c0N6Y0JvZE5oSXAvYlpUQ1ZPMXgxalpUK2ZtNTdPcz0tLVR3QzU5TXllbEZnemhqK2Z5VEpVQ2c9PQ==--8a61c301655735baed333d4f305980a13ef32c25?oses=[{%22os%22:%22ios%22}]) | [
Android](https://automate.browserstack.com/dashboard/v2/public-build/M2lUc2Q3VFJicFR2c0N6Y0JvZE5oSXAvYlpUQ1ZPMXgxalpUK2ZtNTdPcz0tLVR3QzU5TXllbEZnemhqK2Z5VEpVQ2c9PQ==--8a61c301655735baed333d4f305980a13ef32c25?oses=[{%22os%22:%22android%22}]) | [
IE](https://automate.browserstack.com/dashboard/v2/public-build/M2lUc2Q3VFJicFR2c0N6Y0JvZE5oSXAvYlpUQ1ZPMXgxalpUK2ZtNTdPcz0tLVR3QzU5TXllbEZnemhqK2Z5VEpVQ2c9PQ==--8a61c301655735baed333d4f305980a13ef32c25?browsers=[{%22browser%22:%22ie%22}]) |
+| -------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| 10.x, 12.x, 14.x | latest version | latest version | latest version | latest version | latest version | latest version | 11 |
# ToC
@@ -98,30 +98,35 @@ try {
} catch (error) {
// do something with `error`
}
-
```
## Browser
```html
-
+
...
```
-## Requesting linked resources
+## Requesting linked resources
Level 3 REST APIs are expected to return links to related resources. Waychaser expects to find these links via [RFC 8288](https://tools.ietf.org/html/rfc8288) `link` headers. Waychaser provides methods to simplify requesting these linked resources.
For instance, if the `apiResource` loaded above has a `link` with a relationship (`rel`) of `describedby`, then that resource can be retrieve using the following code
+
```js
const describedByResource = await apiResource.invoke("describedby");
```
@@ -147,7 +152,7 @@ const describedByResource = await apiResource.invoke("describedby");
- [x] api docs
- [x] tags in npm
- [x] markdown lint
-- [x] switched to JS Standard format
+- [x] switched to JS Standard format
- [x] split webdriver from waychaser-via
- [x] split browser stack tunnel into seperate class
- [x] reduce webpacking of node_modules
@@ -155,8 +160,11 @@ const describedByResource = await apiResource.invoke("describedby");
- [x] add code duplication checks
- [x] clean up logging
- [x] add tests for follow to different resource
+- [x] fix linting
+- [ ] fix husky & lint-staged
- [ ] add tests for multiple follows
- [ ] add tests for authenticated requests
+- [ ] switch to github's builtin dependabot
- [ ] upgrade webpack
- [ ] investigate mega-lint
- [ ] fix struture of package so we get better jsdoc linting
@@ -174,7 +182,7 @@ const describedByResource = await apiResource.invoke("describedby");
- [ ] integrate API docs
- [ ] lots more 😂
- [ ] help [
-eslint-plugin-security](https://github.com/nodesecurity/eslint-plugin-security) and get better version of `security/detect-object-injectionn` that doesn't flag `for (const index in object) { object[index] = 0; }`
+ eslint-plugin-security](https://github.com/nodesecurity/eslint-plugin-security) and get better version of `security/detect-object-injectionn` that doesn't flag `for (const index in object) { object[index] = 0; }`
- [ ] have a look at using https://github.com/gkouziik/eslint-plugin-security-node
- [ ] try to use umd for both node and browser. https://github.com/webpack/webpack/pull/8625
- [ ] investigate using https://rollupjs.org/guide/en/
diff --git a/babel.config.js b/babel.config.js
index 0a321c62..28bcb52a 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -1,48 +1,48 @@
module.exports = {
presets: [
[
- "@babel/preset-env",
+ '@babel/preset-env',
{
corejs: {
- version: "3",
- proposals: true,
+ version: '3',
+ proposals: true
},
- useBuiltIns: "entry",
+ useBuiltIns: 'entry',
targets: {
- ie: "11",
+ ie: '11',
browsers: [
- "ie >= 11",
- "last 2 versions",
- "> 0.2%",
- "maintained node versions",
- ],
- },
- },
- ],
+ 'ie >= 11',
+ 'last 2 versions',
+ '> 0.2%',
+ 'maintained node versions'
+ ]
+ }
+ }
+ ]
],
plugins: [
- "add-module-exports",
- "@babel/plugin-transform-arrow-functions",
- "@babel/plugin-proposal-class-properties",
+ 'add-module-exports',
+ '@babel/plugin-transform-arrow-functions',
+ '@babel/plugin-proposal-class-properties',
[
- "@babel/transform-runtime",
+ '@babel/transform-runtime',
{
- regenerator: true,
- },
+ regenerator: true
+ }
],
- "dynamic-import-webpack",
+ 'dynamic-import-webpack',
[
- "@babel/plugin-transform-modules-commonjs",
+ '@babel/plugin-transform-modules-commonjs',
{
- allowTopLevelThis: true,
- },
- ],
+ allowTopLevelThis: true
+ }
+ ]
],
env: {
test: {
- plugins: ["istanbul"],
- sourceMaps: "inline",
- retainLines: true,
- },
- },
-};
+ plugins: ['istanbul'],
+ sourceMaps: 'inline',
+ retainLines: true
+ }
+ }
+}
diff --git a/cucumber.js b/cucumber.js
index 971c21a4..fc80bf9d 100644
--- a/cucumber.js
+++ b/cucumber.js
@@ -1,47 +1,46 @@
-// eslint-disable-next-line eslint-comments/disable-enable-pair
/* eslint-disable security/detect-non-literal-fs-filename */
-const fs = require("fs");
+const fs = require('fs')
-const FAIL_FAST = process.env.FAIL_FAST || "--fail-fast";
-const NO_STRICT = process.env.NO_STRICT || "";
+const FAIL_FAST = process.env.FAIL_FAST || '--fail-fast'
+const NO_STRICT = process.env.NO_STRICT || ''
-const outputDirectory = "test-results";
-fs.mkdirSync(outputDirectory, { recursive: true });
+const outputDirectory = 'test-results'
+fs.mkdirSync(outputDirectory, { recursive: true })
-function getFeatureGlob(RERUN, profile) {
+function getFeatureGlob (RERUN, profile) {
/* istanbul ignore next: RERUN is not set for full test runs */
return fs.existsSync(RERUN) && fs.statSync(RERUN).size !== 0
? RERUN
- : `src/test/**/*.feature --tags 'not(@not-${profile})'`;
+ : `src/test/**/*.feature --tags 'not(@not-${profile})'`
}
-function generateConfig() {
+function generateConfig () {
const profile = process.env.npm_lifecycle_event
- .replace("test:", "")
- .replace(/:/g, "-");
+ .replace('test:', '')
+ .replace(/:/g, '-')
- const resultsDirectory = `${outputDirectory}/${profile}`;
- fs.mkdirSync(resultsDirectory, { recursive: true });
+ const resultsDirectory = `${outputDirectory}/${profile}`
+ fs.mkdirSync(resultsDirectory, { recursive: true })
- const RERUN = `${outputDirectory}/@cucumber-${profile}.rerun`;
- const FEATURE_GLOB = getFeatureGlob(RERUN, profile);
+ const RERUN = `${outputDirectory}/@cucumber-${profile}.rerun`
+ const FEATURE_GLOB = getFeatureGlob(RERUN, profile)
const FORMAT_OPTIONS = {
- snippetInterface: "async-await",
+ snippetInterface: 'async-await',
snippetSyntax:
- "./node_modules/@windyroad/cucumber-js-throwables/lib/custom-cucumber-syntax.js",
- };
+ './node_modules/@windyroad/cucumber-js-throwables/lib/custom-cucumber-syntax.js'
+ }
const MODULES =
- "--require-module @babel/register --require-module @babel/polyfill";
- const REQUIRE_GLOB = "src/test/**/*.js";
+ '--require-module @babel/register --require-module @babel/polyfill'
+ const REQUIRE_GLOB = 'src/test/**/*.js'
const CONFIG = `${FEATURE_GLOB} --format-options '${JSON.stringify(
FORMAT_OPTIONS
- )}' ${MODULES} --require ${REQUIRE_GLOB} ${NO_STRICT} --format rerun:${RERUN} --format json:${resultsDirectory}/results.cucumber -f node_modules/cucumber-junit-formatter:${resultsDirectory}/results.xml ${FAIL_FAST}`;
+ )}' ${MODULES} --require ${REQUIRE_GLOB} ${NO_STRICT} --format rerun:${RERUN} --format json:${resultsDirectory}/results.cucumber -f node_modules/cucumber-junit-formatter:${resultsDirectory}/results.xml ${FAIL_FAST}`
- return CONFIG;
+ return CONFIG
}
module.exports = {
- default: generateConfig(),
+ default: generateConfig()
// 'browser-api-chrome-local': generateConfig('browser-api-chrome-local'),
// 'browser-api-chrome-remote': generateConfig(
// 'browser-api-chrome-remote',
@@ -70,4 +69,4 @@ module.exports = {
// 'browser-api-remote',
// 'internet explorer'
// ),
-};
+}
diff --git a/package-lock.json b/package-lock.json
index 54a7d03b..473227c3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -2435,14 +2435,38 @@
"dev": true
},
"array-includes": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz",
- "integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==",
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.2.tgz",
+ "integrity": "sha512-w2GspexNQpx+PutG3QpT437/BenZBj0M/MZGn5mzv/MofYqo0xmRHzn4lFsoDlWJ+THYsGJmFlW68WlDFx7VRw==",
"dev": true,
"requires": {
+ "call-bind": "^1.0.0",
"define-properties": "^1.1.3",
- "es-abstract": "^1.17.0",
+ "es-abstract": "^1.18.0-next.1",
+ "get-intrinsic": "^1.0.1",
"is-string": "^1.0.5"
+ },
+ "dependencies": {
+ "es-abstract": {
+ "version": "1.18.0-next.1",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
+ "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
+ "dev": true,
+ "requires": {
+ "es-to-primitive": "^1.2.1",
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.1",
+ "is-callable": "^1.2.2",
+ "is-negative-zero": "^2.0.0",
+ "is-regex": "^1.1.1",
+ "object-inspect": "^1.8.0",
+ "object-keys": "^1.1.1",
+ "object.assign": "^4.1.1",
+ "string.prototype.trimend": "^1.0.1",
+ "string.prototype.trimstart": "^1.0.1"
+ }
+ }
}
},
"array-union": {
@@ -2467,13 +2491,36 @@
"dev": true
},
"array.prototype.flat": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz",
- "integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==",
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz",
+ "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==",
"dev": true,
"requires": {
+ "call-bind": "^1.0.0",
"define-properties": "^1.1.3",
- "es-abstract": "^1.17.0-next.1"
+ "es-abstract": "^1.18.0-next.1"
+ },
+ "dependencies": {
+ "es-abstract": {
+ "version": "1.18.0-next.1",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
+ "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
+ "dev": true,
+ "requires": {
+ "es-to-primitive": "^1.2.1",
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.1",
+ "is-callable": "^1.2.2",
+ "is-negative-zero": "^2.0.0",
+ "is-regex": "^1.1.1",
+ "object-inspect": "^1.8.0",
+ "object-keys": "^1.1.1",
+ "object.assign": "^4.1.1",
+ "string.prototype.trimend": "^1.0.1",
+ "string.prototype.trimstart": "^1.0.1"
+ }
+ }
}
},
"arrify": {
@@ -4496,6 +4543,16 @@
}
}
},
+ "call-bind": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz",
+ "integrity": "sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==",
+ "dev": true,
+ "requires": {
+ "function-bind": "^1.1.1",
+ "get-intrinsic": "^1.0.0"
+ }
+ },
"callsite": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz",
@@ -7420,25 +7477,10 @@
"lodash.zip": "^4.2.0"
}
},
- "eslint-config-prettier": {
- "version": "6.15.0",
- "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz",
- "integrity": "sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw==",
- "dev": true,
- "requires": {
- "get-stdin": "^6.0.0"
- }
- },
- "eslint-config-prettier-standard": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/eslint-config-prettier-standard/-/eslint-config-prettier-standard-3.0.1.tgz",
- "integrity": "sha512-myiM0WllCOBNYi1gI4AuI128eb7QVOE74H4bUVqS7oChRzbTIyHPwJwvrt/7QF++2NDNiDHAjsDVhdXtOrJyag==",
- "dev": true
- },
"eslint-config-standard": {
- "version": "16.0.1",
- "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-16.0.1.tgz",
- "integrity": "sha512-WBBiQQZdaPyL+4sPkGWhWrHCDtvJoU195B9j8yXE9uFQnX34gMXI5CeBRm95gx3PMEZPM5OpwET10hH4F4SxCA==",
+ "version": "16.0.2",
+ "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-16.0.2.tgz",
+ "integrity": "sha512-fx3f1rJDsl9bY7qzyX8SAtP8GBSk6MfXFaTfaGgk12aAYW4gJSyRm7dM790L6cbXv63fvjY4XeSzXnb4WM+SKw==",
"dev": true
},
"eslint-import-resolver-node": {
@@ -7722,15 +7764,6 @@
}
}
},
- "eslint-plugin-prettier": {
- "version": "3.1.4",
- "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.4.tgz",
- "integrity": "sha512-jZDa8z76klRqo+TdGDTFJSavwbnWK2ZpqGKNZ+VvweMW516pDUMmQ2koXvxEE4JhzNvTv+radye/bWGBmA6jmg==",
- "dev": true,
- "requires": {
- "prettier-linter-helpers": "^1.0.0"
- }
- },
"eslint-plugin-promise": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz",
@@ -7746,6 +7779,12 @@
"safe-regex": "^1.1.0"
}
},
+ "eslint-plugin-standard": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-5.0.0.tgz",
+ "integrity": "sha512-eSIXPc9wBM4BrniMzJRBm2uoVuXz2EPa+NXPk2+itrVt+r5SbKFERx/IgrK/HmfjddyKVz2f+j+7gBRvu19xLg==",
+ "dev": true
+ },
"eslint-plugin-unicorn": {
"version": "23.0.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-23.0.0.tgz",
@@ -9069,6 +9108,17 @@
"integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=",
"dev": true
},
+ "get-intrinsic": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.1.tgz",
+ "integrity": "sha512-ZnWP+AmS1VUaLgTRy47+zKtjTxz+0xMpx3I52i+aalBK1QP19ggLF3Db89KJX7kjfOfP2eoa01qc++GwPgufPg==",
+ "dev": true,
+ "requires": {
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.1"
+ }
+ },
"get-own-enumerable-property-symbols": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz",
@@ -9090,12 +9140,6 @@
"npm-conf": "^1.1.0"
}
},
- "get-stdin": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
- "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==",
- "dev": true
- },
"get-stream": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
@@ -15777,12 +15821,6 @@
"integrity": "sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg==",
"dev": true
},
- "prettier-config-standard": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/prettier-config-standard/-/prettier-config-standard-1.0.1.tgz",
- "integrity": "sha512-S0zuixvAFlc0zruhYEDMsjt2VG/e5S5hSbqGuxTMWA0ygjII8EP9U7c/wsCQyjjAoaYG82bUsVmaSQ6veQ+u6g==",
- "dev": true
- },
"prettier-linter-helpers": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz",
diff --git a/package.json b/package.json
index bfd57134..8ca1e023 100644
--- a/package.json
+++ b/package.json
@@ -54,6 +54,8 @@
"lint:sh": "shellcheck **/*.sh",
"lint:js": "eslint .",
"lint:js:fix": "npm run ${npm_lifecycle_event%:fix} -- --fix",
+ "lint:json+": "prettier --check .",
+ "lint:json+:fix": "npm run ${npm_lifecycle_event%:fix} -- --write",
"lint": "npm-run-all --sequential ${npm_lifecycle_event}:*",
"test:node-api": "scripts/test-node.sh",
"headless:test:browser-api:chrome:local": "CI=1 npm run ${npm_lifecycle_event#headless:}",
@@ -93,8 +95,7 @@
"json:list-github-actions-browser-matrix:1": "scripts/list-cover-browsers.js",
"json:list-github-actions-browser-matrix:2": "scripts/list-cover-browsers.js",
"sync-readme-version": "scripts/sync-readme-version.sh",
- "eslint-check": "eslint --print-config src/server/index.js | eslint-config-prettier-check",
- "precommit": "lint-staged && npm run test:node-api && npm run duplication",
+ "pre-push": "lint-staged && npm run test:node-api && npm run duplication",
"npm-check-unused": "depcheck",
"dopublish": "npm publish mountainpass-waychaser-${npm_package_version}.tgz --access public",
"duplication": "jscpd",
@@ -146,9 +147,7 @@
"dateformat": "^3.0.3",
"depcheck": "^1.2.0",
"eslint": "^7.13.0",
- "eslint-config-prettier": "^6.5.0",
- "eslint-config-prettier-standard": "^3.0.1",
- "eslint-config-standard": "^16.0.1",
+ "eslint-config-standard": "^16.0.2",
"eslint-plugin-chai-friendly": "^0.6.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.22.1",
@@ -158,16 +157,16 @@
"eslint-plugin-markdown": "^1.0.2",
"eslint-plugin-md": "^1.0.19",
"eslint-plugin-node": "^11.1.0",
- "eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-security": "^1.4.0",
+ "eslint-plugin-standard": "^5.0.0",
"eslint-plugin-unicorn": "^23.0.0",
"express": "^4.16.3",
"fs-extra": "^9.0.1",
"geckodriver": "^1.20.0",
"html-webpack-plugin": "^4.5.0",
"humanize-duration": "^3.24.0",
- "husky": "^4.2.5",
+ "husky": "^4.3.0",
"imagemin-lint-staged": "^0.4.0",
"istanbul": "^0.4.5",
"jscpd": "^3.3.21",
@@ -181,7 +180,6 @@
"npm-run-all": "^4.1.5",
"nyc": "^15.1.0",
"prettier": "^2.1.0",
- "prettier-config-standard": "^1.0.1",
"selenium-webdriver": "^4.0.0-alpha.5",
"shellcheck": "^0.4.4",
"snyk": "^1.431.1",
@@ -202,7 +200,7 @@
"shellcheck",
"git add"
],
- "*.{json,css,md}": [
+ "*.{json,css,md,yaml,yml,html,less,scss}": [
"prettier --write",
"git add"
],
@@ -213,7 +211,7 @@
},
"husky": {
"hooks": {
- "pre-commit": "npm run precommit"
+ "pre-push": "npm run pre-push"
}
}
}
diff --git a/public/index.html b/public/index.html
index bb829a15..a333b863 100755
--- a/public/index.html
+++ b/public/index.html
@@ -5,9 +5,12 @@