feat: add npm handler#49
Conversation
|
commit: |
| (v) => | ||
| ( | ||
| ({ | ||
| hoisted: 'Hoist all dependencies to top level', |
There was a problem hiding this comment.
we should never hardcode descriptions when we parse outputs. it should be either loaded from the help or it should not be there.
| const lines = toLines(helpText); | ||
|
|
||
| // edge case: reporter often appears as multiple lines | ||
| if (optionName === 'reporter') { |
There was a problem hiding this comment.
we should never create edge cases that can be broken at any point. the algorithm here should be more general
imagine if somehow another option appeared like reporter, or reporter itself changed its structure. then this would break.
| complete('apps/*', 'All apps in apps directory'); | ||
| }, | ||
|
|
||
| registry(complete) { |
There was a problem hiding this comment.
i don't think we should autocomplete values for this.
| const patterns = getWorkspacePatterns(); | ||
| patterns.forEach((p) => { | ||
| complete(p, `Workspace pattern: ${p}`); | ||
| complete(`${p}...`, `Include dependencies of ${p}`); |
| const patterns = getWorkspacePatterns(); | ||
| patterns.forEach((p) => complete(p, `Workspace pattern: ${p}`)); | ||
| complete('packages/*', 'All packages in packages directory'); | ||
| complete('apps/*', 'All apps in apps directory'); |
No description provided.