diff --git a/.bithoundrc b/.bithoundrc deleted file mode 100644 index 169cf095..00000000 --- a/.bithoundrc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "ignore": [ - "typings.d.ts" - ], - "dependencies": { - "mute": [ "ajv" ] - } -} diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 612cf8ab..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,37 +0,0 @@ -# Javascript Node CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-javascript/ for more details -# -version: 2 -jobs: - build: - docker: - # specify the version you desire here - - image: circleci/node:8.11 - - # Specify service dependencies here if necessary - # CircleCI maintains a library of pre-built images - # documented at https://circleci.com/docs/2.0/circleci-images/ - # - image: circleci/mongo:3.4.4 - - working_directory: ~/repo - - steps: - - checkout - - # Download and cache dependencies - - restore_cache: - keys: - - v1-dependencies-{{ checksum "package.json" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - - - run: yarn install - - - save_cache: - paths: - - node_modules - key: v1-dependencies-{{ checksum "package.json" }} - - # run tests! - - run: yarn test-ci diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..56ac5f71 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,35 @@ +name: CI + +on: [push] + +jobs: + test: + name: Test + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [8.x, 10.x, 12.x] + + steps: + - uses: actions/checkout@v1 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - name: Install Yarn + run: curl -o- -L https://yarnpkg.com/install.sh | bash + + - name: Install Dependencies + run: yarn install --frozen-lockfile + + - name: Run Tests + run: yarn test-ci + + - name: Upload coverage to Codecov + run: bash <(curl -s https://codecov.io/bash) -C $GITHUB_SHA -B ${GITHUB_REF#refs/heads/} -Z + if: matrix.node-version == '12.x' + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.nvmrc b/.nvmrc index 45a4fb75..48082f72 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -8 +12 diff --git a/README.md b/README.md index 8fb81fcf..f305f157 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,6 @@ # better-ajv-errors -> JSON Schema validation for Human - -[![npm](https://img.shields.io/npm/v/better-ajv-errors.svg?style=flat-square)](https://www.npmjs.com/package/better-ajv-errors) -[![CircleCI](https://img.shields.io/circleci/project/github/torifat/better-ajv-errors.svg?style=flat-square)](https://circleci.com/gh/torifat/better-ajv-errors) -[![Codecov](https://img.shields.io/codecov/c/github/torifat/better-ajv-errors.svg?style=flat-square)](https://codecov.io/gh/torifat/better-ajv-errors) -[![bitHound](https://img.shields.io/bithound/dependencies/github/torifat/better-ajv-errors.svg?style=flat-square)](https://www.bithound.io/github/torifat/better-ajv-errors) +> JSON Schema validation for Human 👨‍🎤 Main goal of this library is to provide relevant error messages like the following: @@ -93,8 +88,8 @@ Or, use `js` if you are planning to use this with some API. Your output will loo end: { line: 6, column: 26, offset: 81 }, error: '/content/0/type should be equal to one of the allowed values: panel, paragraph, ...', - suggestion: 'Did you mean paragraph?' - } + suggestion: 'Did you mean paragraph?', + }, ]; ``` diff --git a/package.json b/package.json index 6752ad3d..fec96323 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,6 @@ "babel-core": "^7.0.0-bridge.0", "babel-jest": "^23.6.0", "babel-plugin-add-module-exports": "^1.0.0", - "codecov": "^3.1.0", "eslint": "^5.5.0", "eslint-config-prettier": "^3.0.1", "eslint-plugin-jest": "^21.22.0", @@ -63,7 +62,7 @@ "prepare": "yarn build", "format": "prettier --write src/*.js src/**/*.js", "test": "jest", - "test-ci": "jest --coverage && codecov", + "test-ci": "jest --coverage --colors", "precommit": "pretty-quick --staged" }, "jest": { diff --git a/yarn.lock b/yarn.lock index 9a8b8599..a29601bb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -750,10 +750,6 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" -argv@^0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/argv/-/argv-0.0.2.tgz#ecbd16f8949b157183711b1bda334f37840185ab" - arr-diff@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" @@ -1223,16 +1219,6 @@ code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" -codecov@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/codecov/-/codecov-3.1.0.tgz#340bd968d361f256976b5af782dd8ba9f82bc849" - dependencies: - argv "^0.0.2" - ignore-walk "^3.0.1" - js-yaml "^3.12.0" - request "^2.87.0" - urlgrey "^0.4.4" - collection-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" @@ -4280,10 +4266,6 @@ urix@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" -urlgrey@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/urlgrey/-/urlgrey-0.4.4.tgz#892fe95960805e85519f1cd4389f2cb4cbb7652f" - use@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"