-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
159 additions
and
120 deletions.
There are no files selected for viewing
11 changes: 6 additions & 5 deletions
11
cli/tools-cli/test/versioning/fixtures/case-4/expected-spec/old-spec/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
import { createVersionedSpec } from "@fig/autocomplete-helpers"; | ||
const versionFiles = ["1.0.0", "2.0.0"]; | ||
export const getVersionCommand: Fig.GetVersionCommand = async ( | ||
executeShellCommand | ||
) => { | ||
const out = await executeShellCommand("fig --version"); | ||
return out.slice(out.indexOf(" ") + 1); | ||
export const getVersionCommand: Fig.GetVersionCommand = async (executeCommand) => { | ||
const { stdout } = await executeCommand({ | ||
command: "fig", | ||
args: ["--version"], | ||
}); | ||
return stdout.slice(stdout.indexOf(" ") + 1); | ||
}; | ||
export default createVersionedSpec("fig", versionFiles); |
11 changes: 6 additions & 5 deletions
11
cli/tools-cli/test/versioning/fixtures/case-4/old-spec/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
import { createVersionedSpec } from "@fig/autocomplete-helpers"; | ||
const versionFiles = ["1.0.0", "2.0.0"]; | ||
export const getVersionCommand: Fig.GetVersionCommand = async ( | ||
executeShellCommand | ||
) => { | ||
const out = await executeShellCommand("fig --version"); | ||
return out.slice(out.indexOf(" ") + 1); | ||
export const getVersionCommand: Fig.GetVersionCommand = async (executeCommand) => { | ||
const { stdout } = await executeCommand({ | ||
command: "fig", | ||
args: ["--version"], | ||
}); | ||
return stdout.slice(stdout.indexOf(" ") + 1); | ||
}; | ||
export default createVersionedSpec("fig", versionFiles); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.