jaywcjlove / jaywcjlove/markdown-to-html-cli
github-corners config priorty causes crash
- Dominant language
- TypeScript
- Stars
- 96
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
I dont have `"repository"` in my `package.json` and did **not** defined `github-corners` option. But the updated code expects one of them to be there:
```
npx -y markdown-to-html-cli -s CHANGELOG.md --output ./CHANGELOG.html ✔
/node_modules/markdown-to-html-cli/lib/utils.js:22
options['github-corners'] = opts['github-corners'] ?? options['github-corners'] ?? (typeof pgkData.repository === 'string' ? pgkData.repository : pgkData.repository.url);
^
TypeError: Cannot read properties of undefined (reading 'url')
```
This was introduced with https://github.com/jaywcjlove/markdown-to-html-cli/commit/63a9786d6b3baac9b8ee2e123319d6a8d12db517#diff-852d90245bbe147114049b7940720369a5dd1c564e5d1ab29b1bf8eae193cef3L28-R25
By there removal of `if(pgkData.repository &` so now it just expects repository to be there
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with lib/utils.js around line 22 and reproduce the failure using the npx markdown-to-html-cli command shown in the issue. Compare the current logic with commit 63a9786d6b3baac9b8ee2e123319d6a8d12db517. Done means the command works when package.json has no repository and no github-corners option.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100