diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 3f226b9..0000000 --- a/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "@ahmadnassri/eslint-config" -} diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..dbad046 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,14 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + open-pull-requests-limit: 10 + directory: "/" + schedule: + interval: "daily" + + - package-ecosystem: "npm" + open-pull-requests-limit: 10 + directory: "/" + schedule: + interval: "daily" + diff --git a/.github/linters/.markdown-lint.yml b/.github/linters/.markdown-lint.yml new file mode 100644 index 0000000..f637ef2 --- /dev/null +++ b/.github/linters/.markdown-lint.yml @@ -0,0 +1,154 @@ +# Heading levels should only increment by one level at a time +MD001: false + +# Heading style +MD003: + style: atx + +# Unordered list style +MD004: + style: dash + +# Inconsistent indentation for list items at the same level +MD005: true + +# Unordered list indentation +MD007: + indent: 2 + start_indented: false + +# Trailing spaces +MD009: + br_spaces: 2 + list_item_empty_lines: false + strict: false + +# Hard tabs +MD010: + code_blocks: false + +# Reversed link syntax +MD011: true + +# Multiple consecutive blank lines +MD012: + maximum: 1 + +# Line length +MD013: + line_length: 180 + strict: true + stern: true + +# Dollar signs used before commands without showing output +MD014: false + +# No space after hash on atx style heading +MD018: true + +# Multiple spaces after hash on atx style heading +MD019: true + +# No space inside hashes on closed atx style heading +MD020: true + +# Multiple spaces inside hashes on closed atx style heading +MD021: true + +# Headings should be surrounded by blank lines +MD022: + lines_above: 1 + lines_below: 1 + + +# Headings must start at the beginning of the line +MD023: true + +# Multiple headings with the same content +MD024: + allow_different_nesting: true + +# Multiple top level headings in the same document +MD025: true + +# Trailing punctuation in heading +MD026: + punctuation: ".,;:!?。,;:!?" + +# Multiple spaces after blockquote symbol +MD027: true + +# Blank line inside blockquote +MD028: true + +# Ordered list item prefix +MD029: + style: one_or_ordered + +# Spaces after list markers +MD030: + ul_single: 1 + ol_single: 1 + ul_multi: 1 + ol_multi: 1 + +# Fenced code blocks should be surrounded by blank lines +MD031: + list_items: true + +# Lists should be surrounded by blank lines +MD032: true + +# inline HTML +MD033: + allowed_elements: [] + +# Bare URL used +MD034: true + +# Horizontal rule style +MD035: + style: "---" + + +# Emphasis used instead of a heading +MD036: + punctuation: ".,;:!?。,;:!?" + +# Spaces inside emphasis markers +MD037: true + +# Spaces inside code span elements +MD038: true + +# Spaces inside link text +MD039: true + +# Fenced code blocks should have a language specified +MD040: true + +# First line in file should be a top level heading +MD041: true + +# No empty links +MD042: true + +# Required heading structure +MD043: false + +# Proper names should have the correct capitalization +MD044: false + +# Images should have alternate text (alt text) +MD045: false + +# Code block style +MD046: + style: fenced + +# Files should end with a single newline character +MD047: true + +# Code fence style +MD048: + style: backtick diff --git a/.github/settings.yml b/.github/settings.yml deleted file mode 100644 index 018b85b..0000000 --- a/.github/settings.yml +++ /dev/null @@ -1,16 +0,0 @@ -_extends: .github - -repository: - name: node-har-validator - description: Extremely fast HTTP Archive (HAR) validator using JSON Schema - topics: har,cli,ajv,http,archive,validate,validator - homepage: https://github.com/ahmadnassri/node-har-validator - private: false - has_issues: true - has_wiki: false - has_downloads: false - has_projects: false - default_branch: master - allow_squash_merge: true - allow_merge_commit: false - allow_rebase_merge: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e97bd0f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,59 @@ +name: release + +on: + push: + branches: + - master + +jobs: + dependencies: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2.1.1 + + # run checks + - run: npm audit --audit-level=moderate + - run: npx updated + + test: + needs: dependencies + + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + node-version: [10, 12, 13, 14] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + + - uses: actions/cache@v2 + with: + path: ~/.npm + key: client-${{ hashFiles('**/package-lock.json') }} + + - uses: actions/setup-node@v2.1.1 + with: + node-version: ${{ matrix.node-version }} + + # run test + - run: npm ci + - run: npm run test + + release: + needs: test + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2.1.1 + + # release + - run: npx semantic-release + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml new file mode 100644 index 0000000..5cdb351 --- /dev/null +++ b/.github/workflows/super-linter.yml @@ -0,0 +1,14 @@ +name: super-linter + +on: + push: + branches-ignore: + - master + +jobs: + super-linter: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: docker://github/super-linter:v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..ebea51d --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,44 @@ +name: test + +on: + push: + branches-ignore: + - master + +jobs: + dependencies: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2.1.1 + + # run checks + - run: npm audit --audit-level=moderate + - run: npx updated + + test: + needs: dependencies + + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + node-version: [10, 12, 13, 14] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + + - uses: actions/cache@v2 + with: + path: ~/.npm + key: client-${{ hashFiles('**/package-lock.json') }} + + - uses: actions/setup-node@v2.1.1 + with: + node-version: ${{ matrix.node-version }} + + # run test + - run: npm ci + - run: npm run test diff --git a/.releaserc copy b/.releaserc copy new file mode 100644 index 0000000..0f88ad3 --- /dev/null +++ b/.releaserc copy @@ -0,0 +1,18 @@ +{ + "plugins": [ + ["@semantic-release/commit-analyzer", { + "releaseRules": [ + {"breaking": true, "release": "major"}, + {"revert": true, "release": "patch"}, + {"type": "build", "release": "patch"}, + {"type": "feat", "release": "minor"}, + {"type": "fix", "release": "patch"}, + {"type": "perf", "release": "patch"}, + {"type": "refactor", "release": "patch"} + ] + }], + "@semantic-release/release-notes-generator", + "@semantic-release/github", + "@semantic-release/npm" + ] +} diff --git a/.remarkrc b/.remarkrc deleted file mode 100644 index 80d5404..0000000 --- a/.remarkrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "plugins": [ - "@ahmadnassri/remark-config" - ] -} diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 0ec4b94..0000000 --- a/circle.yml +++ /dev/null @@ -1,99 +0,0 @@ -version: 2.1 - -executors: - builder: - docker: - - image: ahmadnassri/build-essential - - node-6: - docker: - - image: node:6-slim - - node-8: - docker: - - image: node:8-slim - - node-10: - docker: - - image: node:10-slim - -commands: - persist: - steps: - - persist_to_workspace: - root: . - paths: . - - attach: - steps: - - attach_workspace: - at: . - - install: - steps: - - run: - name: Install dependencies - command: npm ci - -jobs: - build: - executor: builder - steps: - - checkout - - install - - persist - - lint: - executor: builder - steps: - - attach - - run: npm run lint - - test-node-6: - executor: node-6 - steps: - - attach - - run: npm run test - - test-node-8: - executor: node-8 - steps: - - attach - - run: npm run test - - test-node-10: - executor: node-10 - steps: - - attach - - run: npm run test - - release: - executor: builder - steps: - - attach - - run: npx semantic-release - -workflows: - version: 2 - main: - jobs: - - build - - - lint: - requires: [ build ] - - - test-node-6: - requires: [ build ] - - - test-node-8: - requires: [ build ] - - - test-node-10: - requires: [ build ] - - - release: - context: semantic-release - requires: [ build, lint, test-node-6, test-node-8, test-node-10 ] - filters: - branches: - only: master diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..807400d --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +version: '3.8' + +services: + lint: + image: github/super-linter:v3 + volumes: + - ./:/tmp/lint + environment: + - RUN_LOCAL=true + diff --git a/renovate.json b/renovate.json deleted file mode 100644 index 3c09e9d..0000000 --- a/renovate.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": [ - "@ahmadnassri" - ] -}