Repository navigation
feat: add stop option to detect
#39
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
Changes from 5 commits
189ac6c
08f576e
b478b1d
8de5234
c6e4b90
b344b16
9202c11
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| export { COMMANDS, constructCommand, resolveCommand } from './commands' | ||
| export * from './constants' | ||
| export { detect, getUserAgent } from './detect' | ||
| export { detect, getUserAgent, getWorkspaceRoot } from './detect' | ||
| export * from './types' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,6 +57,10 @@ export interface DetectOptions { | |
| * @param packageManager - The `packageManager` value from package.json file. | ||
| */ | ||
| onUnknown?: (packageManager: string) => DetectResult | null | undefined | ||
| /** | ||
| * The path to stop traversing up the directory. | ||
| */ | ||
| stop?: string | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps a discussion point for others if we should consider
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would this be better as a function that takes each dir and call it
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe it should be safe since |
||
| } | ||
|
|
||
| export interface DetectResult { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.