Skip to content

Commit 901dc4b

Browse files
authored
Merge branch 'master' into all-contributors/add-GiraffeKey
2 parents 9fe3f88 + 1072c3b commit 901dc4b

File tree

14 files changed

+902
-1126
lines changed

14 files changed

+902
-1126
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,15 @@
9999
"code",
100100
"test"
101101
]
102+
},
103+
{
104+
"login": "jonasmaertens",
105+
"name": "jonasmaertens",
106+
"avatar_url": "https://avatars3.githubusercontent.com/u/71458938?v=4",
107+
"profile": "https://github.com/jonasmaertens",
108+
"contributions": [
109+
"bug"
110+
]
102111
}
103112
],
104113
"contributorsPerLine": 7,

.releaserc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
["@semantic-release/changelog", {
66
"changelogFile": "CHANGELOG.md"
77
}],
8+
"@semantic-release/npm",
89
"@semantic-release/github",
910
["@semantic-release/git", {
11+
"assets": ["src/*.{js,pjs}", "!src/test.utils.js", "index.js", "package.json", "package-lock.json", "LICENSE", "README.md", "CHANGELOG.md"],
1012
"message": "chore: release ${nextRelease.version} :tada: [skip ci]\n\n${nextRelease.notes}"
11-
}],
12-
"@semantic-release/npm"
13+
}]
1314
]
1415
}

CHANGELOG.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,48 @@
1+
## [1.6.5](https://github.com/Berkmann18/json-fixer/compare/v1.6.4...v1.6.5) (2020-10-08)
2+
3+
4+
### Bug Fixes
5+
6+
* **fixer:** addressed DeepScan's issue ([2c5868d](https://github.com/Berkmann18/json-fixer/commit/2c5868d3d89fcde097ddbe7a5be9410f551701ee))
7+
* **fixer:** removed futile LOC ([56f23a1](https://github.com/Berkmann18/json-fixer/commit/56f23a1cee0cfa6546dc212ee6b471b80a7e7529))
8+
* fixes special characters ([4e804e5](https://github.com/Berkmann18/json-fixer/commit/4e804e5e041fd7e75d2a6a95dcedca6011acefea))
9+
10+
## [1.6.4](https://github.com/Berkmann18/json-fixer/compare/v1.6.3...v1.6.4) (2020-10-08)
11+
12+
13+
### Bug Fixes
14+
15+
* upgrade @babel/runtime from 7.11.0 to 7.11.2 ([73e644e](https://github.com/Berkmann18/json-fixer/commit/73e644edde358afbd9a582cec5755a7797a64671))
16+
17+
## [1.6.3](https://github.com/Berkmann18/json-fixer/compare/v1.6.2...v1.6.3) (2020-08-26)
18+
19+
20+
### Bug Fixes
21+
22+
* upgrade @babel/runtime from 7.10.5 to 7.11.0 ([4cc9017](https://github.com/Berkmann18/json-fixer/commit/4cc90175f75b230d28bb737c9d0cb6384f0ed7b6))
23+
24+
## [1.6.2](https://github.com/Berkmann18/json-fixer/compare/v1.6.1...v1.6.2) (2020-08-26)
25+
26+
27+
### Bug Fixes
28+
29+
* **lockfile:** security update ([54c3bf0](https://github.com/Berkmann18/json-fixer/commit/54c3bf0532be98126e2f6b6b04707a7f5c2a8b73))
30+
* **lockfile:** vulnerability fix ([4b501a8](https://github.com/Berkmann18/json-fixer/commit/4b501a8ee6c9c3b015f43651b43bef4f6a08056d))
31+
32+
## [1.6.1](https://github.com/Berkmann18/json-fixer/compare/v1.6.0...v1.6.1) (2020-08-24)
33+
34+
35+
### Bug Fixes
36+
37+
* upgrade @babel/runtime from 7.10.4 to 7.10.5 ([cf9367b](https://github.com/Berkmann18/json-fixer/commit/cf9367b18e8551e47eee381b65103f920b81ed82))
38+
39+
# [1.6.0](https://github.com/Berkmann18/json-fixer/compare/v1.5.4...v1.6.0) (2020-08-24)
40+
41+
42+
### Features
43+
44+
* **extra-brackets:** fix extra brackets ([6958b4b](https://github.com/Berkmann18/json-fixer/commit/6958b4b7d209fd128c1241ab4868190195defaab))
45+
146
## [1.5.4](https://github.com/Berkmann18/json-fixer/compare/v1.5.3...v1.5.4) (2020-07-22)
247

348

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
8181
<tr>
8282
<td align="center"><a href="https://www.codacy.com/"><img src="https://avatars3.githubusercontent.com/u/23704769?v=4" width="100px;" alt=""/><br /><sub><b>Codacy Badger</b></sub></a><br /><a href="#infra-codacy-badger" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/Berkmann18/json-fixer/commits?author=codacy-badger" title="Documentation">📖</a></td>
8383
<td align="center"><a href="https://github.com/GiraffeKey"><img src="https://avatars2.githubusercontent.com/u/11844126?v=4" width="100px;" alt=""/><br /><sub><b>GiraffeKey</b></sub></a><br /><a href="https://github.com/Berkmann18/json-fixer/commits?author=GiraffeKey" title="Code">💻</a> <a href="https://github.com/Berkmann18/json-fixer/commits?author=GiraffeKey" title="Tests">⚠️</a></td>
84+
<td align="center"><a href="https://github.com/jonasmaertens"><img src="https://avatars3.githubusercontent.com/u/71458938?v=4" width="100px;" alt=""/><br /><sub><b>jonasmaertens</b></sub></a><br /><a href="https://github.com/Berkmann18/json-fixer/issues?q=author%3Ajonasmaertens" title="Bug reports">🐛</a></td>
8485
</tr>
8586
</table>
8687

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ const ops = (err) => ['+', '-', '*', '/', '>', '<', '~', '|', '&', '^'].includes
5757

5858
const extraBrackets = (err) => err.found === '}';
5959

60+
const specialChar = (err) => err.found === '"';
61+
6062
const runFixer = ({ verbose, lines, start, err }) => {
6163
/* eslint-disable security/detect-object-injection */
6264
let fixedData = [...lines];
@@ -84,6 +86,8 @@ const runFixer = ({ verbose, lines, start, err }) => {
8486
fixedData = fixer.fixOpConcat({ start, fixedData, verbose });
8587
} else if (extraBrackets(err)) {
8688
fixedData = fixer.fixExtraCurlyBrackets({ start, fixedData, verbose });
89+
} else if (specialChar(err)) {
90+
fixedData = fixer.fixSpecialChar({ start, fixedData, verbose });
8791
} else throw new Error(`Unsupported issue: ${err.message} (please open an issue at the repo)`);
8892
return fixedData;
8993
};

0 commit comments

Comments
 (0)