bengreenier / bengreenier/vscode-node-readme

`package` package opened when input box canceled

Open
#41 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
20
Forks
3
PR merge metrics
No merged PRs in 30d

Description

The following line doesn't account for cancellation:

https://github.com/bengreenier/vscode-node-readme/blob/89b2d6fdb324e55870fd15eee599dabc80136ad2/src/commands/showReadme.ts#L21

In theory that should pass `findReadme(undefined)` then attempt to open `https://npmjs.org/package/undefined` (I guess) but instead opens `https://npmjs.org/package/` which npm interprets as the `package` package.

A related issue is the key binding should only be triggered when `"editorLangId == 'javascript' || ..."`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with src/commands/showReadme.ts at the linked line and trace what happens when the input box is canceled. Also inspect the extension's keybinding configuration for the editorLangId condition. Done means cancellation no longer opens the npm package URL without a name, and the key binding is limited to the intended languages.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, typescript, vscode
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.