Skip to content

Commit 1b8e0bf

Browse files
authored
Finalize outputChannelLanguage API (#910)
1 parent 08df6c3 commit 1b8e0bf

File tree

3 files changed

+14
-21
lines changed

3 files changed

+14
-21
lines changed

package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,11 @@
4747
}
4848
],
4949
"engines": {
50-
"vscode": "^1.43.0"
50+
"vscode": "^1.66.0"
5151
},
52-
"enableProposedApi": true,
5352
"enabledApiProposals": [
5453
"fileSearchProvider",
55-
"textSearchProvider",
56-
"outputChannelLanguage"
54+
"textSearchProvider"
5755
],
5856
"activationEvents": [
5957
"onDebug",
@@ -1208,14 +1206,14 @@
12081206
"test": "node ./out/test/runTest.js",
12091207
"lint": "eslint src/**",
12101208
"lint-fix": "eslint --fix src/**",
1211-
"download-api": "vscode-dts dev 1.65.0",
1209+
"download-api": "vscode-dts dev 1.66.0",
12121210
"postinstall": "npm run download-api"
12131211
},
12141212
"devDependencies": {
12151213
"@types/glob": "^7.1.2",
12161214
"@types/mocha": "^7.0.2",
12171215
"@types/node": "^14.0.14",
1218-
"@types/vscode": "^1.43.0",
1216+
"@types/vscode": "^1.66.0",
12191217
"@types/ws": "^7.2.5",
12201218
"@types/xmldom": "^0.1.29",
12211219
"@typescript-eslint/eslint-plugin": "^4.32.0",

src/utils/index.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,14 @@ import { R_OK } from "constants";
44
import * as url from "url";
55
import { exec } from "child_process";
66
import * as vscode from "vscode";
7-
import { config, schemas, workspaceState, terminals, extensionId, extensionContext } from "../extension";
7+
import { config, schemas, workspaceState, terminals, extensionContext } from "../extension";
88
import { getCategory } from "../commands/export";
9-
const packageJson = vscode.extensions.getExtension(extensionId).packageJSON;
109

1110
let latestErrorMessage = "";
1211
export const outputChannel: {
1312
resetError?(): void;
1413
appendError?(value: string, show?: boolean): void;
15-
} & vscode.OutputChannel =
16-
typeof packageJson.enabledApiProposals === "object" &&
17-
packageJson.enabledApiProposals.includes("outputChannelLanguage")
18-
? vscode.window.createOutputChannel("ObjectScript", "vscode-objectscript-output")
19-
: vscode.window.createOutputChannel("ObjectScript");
14+
} & vscode.OutputChannel = vscode.window.createOutputChannel("ObjectScript", "vscode-objectscript-output");
2015

2116
/// Append Error if no duplicates previous one
2217
outputChannel.appendError = (value: string, show = true): void => {

0 commit comments

Comments
 (0)