microsoft / microsoft/node-jsonc-parser

breaking change missing 3.0.0: findNodeAtLocation() can return undefined; parseTree() can return undefined in more cases

Open
#105 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
759
Forks
66
Avg merge
5d 10h
Merged PRs (30d)
7

Description

Breaking change in 3.0.0 is not just "fixed API spec for parseTree. Can return undefine for empty input.".
But also findNodeAtLocation() type is fixed: it can return undefined.

"Can return undefine for empty input" is incomplete. It will return undefined in those cases and probably even more, too:

'' empty string
' ' blank
'   ' tab
'// test' comment only
'/* test */' comment only
'+'
'-'
'}'
'} {}'
']'
':'
','
"'foo'"
"abc"

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names parseTree() and findNodeAtLocation() but no file or test. Start by locating their TypeScript declarations and the 3.0.0 API or changelog entry; confirm the documented undefined cases, then update the relevant documentation and any existing coverage for these entry points.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.