generated from tjx666/awesome-vscode-extension-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from Gehbt/patch-1
feat: fix action add lock installed version and upgrade single package
- Loading branch information
Showing
6 changed files
with
145 additions
and
24 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import vscode from 'vscode'; | ||
|
||
interface Args { | ||
versionRange: vscode.Range; | ||
installedVersion: string; | ||
} | ||
|
||
export async function keepInstalledVersion(arg: Args) { | ||
const editor = vscode.window.activeTextEditor; | ||
|
||
return editor?.edit((editBuilder) => { | ||
editBuilder.replace(arg.versionRange, arg.installedVersion); | ||
}); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
declare module '@npmcli/config/lib/definitions' { | ||
export const definitions: Record<string, any>; | ||
} | ||
|
||
import * as vscode from 'vscode'; | ||
|
||
declare module 'vscode' { | ||
export interface Diagnostic { | ||
data?: { | ||
depName?: string; | ||
depDeclaredVersion?: string; | ||
depInstalledVersion?: string; | ||
}; | ||
} | ||
} |
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