Skip to content

Commit

Permalink
upgrade vscode engine
Browse files Browse the repository at this point in the history
  • Loading branch information
Almenon committed Nov 15, 2024
1 parent ef365df commit 5c606ec
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 13 deletions.
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"version": "3.0.0",
"publisher": "almenon",
"engines": {
"vscode": "^1.36.0"
"vscode": "^1.40.0"
},
"categories": [
"Other",
Expand Down Expand Up @@ -281,7 +281,7 @@
"devDependencies": {
"@types/mocha": "^10.0.9",
"@types/node": "^20.17.6",
"@types/vscode": "^1.36.0",
"@types/vscode": "^1.40.0",
"@vscode/test-cli": "^0.0.10",
"@vscode/test-electron": "^2.4.1",
"mocha": "^10.8.2",
Expand Down
2 changes: 1 addition & 1 deletion src/env/application/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface IWorkspaceService {
*
* @readonly
*/
readonly workspaceFolders: WorkspaceFolder[] | undefined;
readonly workspaceFolders: readonly WorkspaceFolder[] | undefined;

/**
* An event that is emitted when a workspace folder is added or removed.
Expand Down
2 changes: 1 addition & 1 deletion src/env/application/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class WorkspaceService implements IWorkspaceService {
public get rootPath(): string | undefined {
return Array.isArray(workspace.workspaceFolders) ? workspace.workspaceFolders[0].uri.fsPath : undefined;
}
public get workspaceFolders(): WorkspaceFolder[] | undefined {
public get workspaceFolders(): readonly WorkspaceFolder[] | undefined {
return workspace.workspaceFolders;
}
public get onDidChangeWorkspaceFolders(): Event<WorkspaceFoldersChangeEvent> {
Expand Down
8 changes: 7 additions & 1 deletion test/mockVscode.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { EOL } from "os";
import {} from "vscode"
import { ThemeColor } from "vscode"
import type { TextDocument, WorkspaceFolder, TextLine, Position, Range, StatusBarItem, Extension, TreeDataProvider, Command, TreeItemCollapsibleState } from "vscode"
import { URI } from 'vscode-uri'

Expand Down Expand Up @@ -35,6 +35,8 @@ export let vscodeMock = {
* The absolute file path of the directory containing this extension.
*/
extensionPath: "",

extensionUri: null,

/**
* `true` if the extension has been activated.
Expand Down Expand Up @@ -155,6 +157,10 @@ export let vscodeMock = {
},
createStatusBarItem: function(alignment?: number, priority?: number):StatusBarItem{
return {
id: "",
name: "",
accessibilityInformation: null,
backgroundColor: new ThemeColor("#00AA00"),
alignment: 1,
priority: 0,
text: "",
Expand Down

0 comments on commit 5c606ec

Please sign in to comment.