Skip to content

Commit

Permalink
Fix a bug where nested errors were ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
torifat committed Sep 10, 2019
1 parent e7b6d98 commit f2e0424
Show file tree
Hide file tree
Showing 14 changed files with 1,960 additions and 926 deletions.
4 changes: 4 additions & 0 deletions .changeset/mean-flies-attend/changes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"releases": [{ "name": "better-ajv-errors", "type": "patch" }],
"dependents": []
}
1 change: 1 addition & 0 deletions .changeset/mean-flies-attend/changes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug where nested errors were ignored when top level had enum errors
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: CI

on: push
on: [push, pull_request]

jobs:
test:
Expand Down Expand Up @@ -30,7 +30,7 @@ jobs:

- 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'
if: matrix.node-version == '12.x' && github.repository == 'torifat/better-ajv-errors'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
lint:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ jobs:
- name: Install Dependencies
run: yarn install --frozen-lockfile

- name: Build
run: yarn build

- name: Publish to npm
if: github.repository == 'atlassian/better-ajv-errors'
uses: changesets/action@master
with:
# The --otp=1 is to get around a bug in changesets
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@
"ajv": "4.11.8 - 6"
},
"scripts": {
"clean": "rm -rf lib",
"build": "yarn run clean && yarn build:modern && yarn build:legacy",
"prebuild": "rm -rf lib",
"build": "yarn build:modern && yarn build:legacy",
"build:modern": "BABEL_ENV=modern babel src -d lib/modern/",
"build:legacy": "BABEL_ENV=legacy babel src -d lib/legacy",
"prepublishOnly": "yarn build",
"prerelease": "yarn build",
"release": "changeset release",
"format": "prettier --write src/*.js src/**/*.js",
"test": "jest",
"test-ci": "jest --coverage --colors"
Expand Down
19 changes: 10 additions & 9 deletions src/__fixtures__/data.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"version": 1,
"type": "doc",
"content": [
{
"type": "paragarph",
"type": "table",
"content": [
{
"type": "media",
"attrs": {
"type": "file",
"id": "1234",
"collection": "SampleCollection"
}
"type": "tableRow",
"content": [
{
"type": "tableCell",
"content": []
}
]
}
]
}
]
],
"version": 1
}
Loading

0 comments on commit f2e0424

Please sign in to comment.