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 e77e6cd commit 46c139d
Show file tree
Hide file tree
Showing 13 changed files with 1,973 additions and 917 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: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
if: github.repository == 'atlassian/better-ajv-errors'
steps:
- uses: actions/checkout@master

Expand All @@ -25,9 +26,6 @@ jobs:
- name: Install Dependencies
run: yarn install --frozen-lockfile

- name: Build
run: yarn build

- name: Publish to npm
uses: changesets/action@master
with:
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 46c139d

Please sign in to comment.