Skip to content

Commit

Permalink
Fix a bug where nested errors were ignored
Browse files Browse the repository at this point in the history
This closes atlassian#24
  • Loading branch information
torifat committed Sep 10, 2019
1 parent e7b6d98 commit f95b8f3
Show file tree
Hide file tree
Showing 14 changed files with 1,974 additions and 918 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
2 changes: 1 addition & 1 deletion .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
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
29 changes: 26 additions & 3 deletions src/__fixtures__/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,40 @@
"type": "doc",
"content": [
{
"type": "paragarph",
"type": "paragraph",
"content": [
{
"type": "text",
"text": "test"
}
]
},
{
"type": "mediaSingle",
"attrs": {
"layout": "wide"
},
"content": [
{
"type": "media",
"attrs": {
"id": "cfb55f7b-68be-42ac-9930-216f754805a1",
"type": "file",
"id": "1234",
"collection": "SampleCollection"
"collection": "",
"occurrenceKey": null,
"width": null
}
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": " "
}
]
}
]
}
Loading

0 comments on commit f95b8f3

Please sign in to comment.