Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing on keys that start with 'o' #38

Closed
jcdeoferio opened this issue Jun 24, 2020 · 3 comments · Fixed by #39
Closed

Failing on keys that start with 'o' #38

jcdeoferio opened this issue Jun 24, 2020 · 3 comments · Fixed by #39

Comments

@jcdeoferio
Copy link

How to reproduce

Test Data: { o: 1 }

Seems to fail with any key as long as it starts with the lower case o.

Using an array, object, string or boolean as the value doesn't seem to have any difference, it fails regardless of the value.

Stacktrace:

There's still an error!
Error encountered Error: Expected "}" or string but "o" found.
    at doubleCheck (\node_modules\json-fixer\index.js:31:11)
    at fixJson (\node_modules\json-fixer\index.js:99:10)
    at doubleCheck (\node_modules\json-fixer\index.js:29:44)
    at fixJson (\node_modules\json-fixer\index.js:99:10)
    at doubleCheck (\node_modules\json-fixer\index.js:29:44)
    at fixJson (\node_modules\json-fixer\index.js:99:10)
    at doubleCheck (\node_modules\json-fixer\index.js:29:44)
    at fixJson (\node_modules\json-fixer\index.js:99:10)
    at doubleCheck (\node_modules\json-fixer\index.js:29:44)
    at fixJson (\node_modules\json-fixer\index.js:99:10)

Environment

  • Version: 1.4.3
  • OS(s): Win10 x64 1903
  • Browser(s) (if applicable):
  • Node version: 12.18.0
  • NPM version: 6.14.4
@jcdeoferio jcdeoferio added Priority: Medium Type: Bug 🐛 Something isn't working labels Jun 24, 2020
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label Type: Bug :bug: to this issue, with a confidence of 0.96. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@Berkmann18
Copy link
Owner

Thanks for reporting this issue, I've taken note of it and will look into it when I can.
PRs are welcome!

Berkmann18 added a commit that referenced this issue Jun 27, 2020
It now correctly fixes issues on the LHS of ":" which were previously mis-considered as trailing
char issues

fix #38
github-actions bot pushed a commit that referenced this issue Jun 27, 2020
# [1.5.0](v1.4.1...v1.5.0) (2020-06-27)

### Bug Fixes

* **fixer:** fixing missing LHS quotes with 1-2 chars ([e2f8b9d](e2f8b9d))
* **fixer:** lint fix ([bbf3ed9](bbf3ed9))
* **fixer:** wrongly added missing quote ([2ee5e4f](2ee5e4f)), closes [#31](#31)
* **index:** not applying trailing-char fixes on LHS issues ([253ebfc](253ebfc)), closes [#38](#38)
* missing quote fixer failure ([60a5fff](60a5fff))
* security fix ([067bd46](067bd46))
* **lockfile:** security fix ([cade206](cade206))

### Features

* **fixer:** trailing char fixer simplification ([5899676](5899676))
@github-actions
Copy link

🎉 This issue has been resolved in version 1.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants