-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
feat(typeorm): make spec diff-versioned #1559
base: master
Are you sure you want to change the base?
Conversation
Overviewsrc/typeorm/0.2.0.ts:Info:src/typeorm/index.ts:Info:src/typeorm/0.3.0.ts:Info: |
Hello @fedeci,
Please add a 👍 as a reaction to this comment to show that you read this. |
This makes it really verbose by duplicating the spec, but at the same time we should start to expand and to try to make as many open source projects as possible to be directly integrated with autocomplete! |
Closes #1158 |
I agree with you, I thought of this when I added autocomplete to I have an idea, maybe we should add a dependsOnVersion for interface Subcommand {
dependsOnVersion: (string | (executeShellCommand) => boolean)[]
} When it's a string, you can refer directly to the
When it's a function, we need to take into account that some commands depend not only on their own version but also on the version of the external environment, e.g. eg: {
// pnpm v7
// pnpm patch
const completionSpec: Fig.Spec = {
name: "pnpm",
description: "Fast, disk space efficient package manager",
args: {
name: "Scripts",
filterStrategy: "fuzzy",
generators: npmScriptsGenerator,
isVariadic: true,
},
dependsOnVersion: [async ( executeShellCommand ){
const nodeVersion = await executeShellCommand('node -v');
return compareVersions(nodeVersion,'>=14')
}], // Maybe there are multiple environmental dependencies?
subcommand:[
{
name: "patch",
description: `This command will cause a package to be extracted in a temporary directory intended to be editable at will`,
dependsOnVersion: '\>=7.14.0',
args: {
name: "package",
},
options: [
{
name: "--edit-dir",
description: `The package that needs to be patched will be extracted to this directory`,
},
],
},
}
]
}
|
Hey @loosheng, we already have something like for subcommands this and it is called |
No description provided.