Skip to content

Commit da5c8fa

Browse files
authored
Merge pull request #55 from SSlinky/dev
Bundle Package
2 parents 93f384f + fa98db7 commit da5c8fa

30 files changed

+5433
-387
lines changed

.vscode-test.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { defineConfig } from '@vscode/test-cli';
33

44
export default defineConfig({
5-
files: 'client/out/test/**/*.test.js',
5+
files: 'dist/client/out/test/**/*.test.js',
66
mocha: {
77
ui: 'tdd',
88
timeout: 4000

.vscode/launch.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"outFiles": ["${workspaceRoot}/client/out/**/*.js"],
1515
"preLaunchTask": {
1616
"type": "npm",
17-
"script": "watch"
17+
"script": "compile"
1818
}
1919
},
2020
{
@@ -74,9 +74,9 @@
7474
"runtimeExecutable": "${execPath}",
7575
"args": [
7676
"--extensionDevelopmentPath=${workspaceFolder}",
77-
"--extensionTestsPath=${workspaceFolder}/client/out/test/index"
77+
"--extensionTestsPath=${workspaceFolder}/dist/client/out/test/index"
7878
],
79-
"outFiles": ["${workspaceFolder}/client/out/test/**/*.test.js"]
79+
"outFiles": ["${workspaceFolder}/dist/client/out/test/**/*.test.js"]
8080
}
8181
],
8282
"compounds": [

.vscode/tasks.json

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,42 @@
1414
]
1515
},
1616
{
17-
"type": "npm",
18-
"script": "watch",
19-
"isBackground": true,
17+
"label": "watch",
18+
"dependsOn": [
19+
"npm: watch:tsc",
20+
"npm: watch:esbuild"
21+
],
22+
"presentation": {
23+
"reveal": "never"
24+
},
2025
"group": {
2126
"kind": "build",
2227
"isDefault": true
23-
},
28+
}
29+
},
30+
{
31+
"type": "npm",
32+
"script": "watch:esbuild",
33+
"group": "build",
34+
"problemMatcher": "$esbuild-watch",
35+
"isBackground": true,
36+
"label": "npm: watch:esbuild",
2437
"presentation": {
25-
"panel": "dedicated",
38+
"group": "watch",
2639
"reveal": "never"
27-
},
28-
"problemMatcher": [
29-
"$tsc-watch"
30-
]
40+
}
41+
},
42+
{
43+
"type": "npm",
44+
"script": "watch:tsc",
45+
"group": "build",
46+
"problemMatcher": "$tsc-watch",
47+
"isBackground": true,
48+
"label": "npm: watch:tsc",
49+
"presentation": {
50+
"group": "watch",
51+
"reveal": "never"
52+
}
3153
}
3254
]
3355
}

.vscodeignore

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,13 @@ sample*/**
3333
**/testFixture/**
3434

3535
# Node modules
36-
node_modules/antlr4ng-cli/**
36+
node_modules/**
3737

3838
# Client node modules
3939
client/node_modules/**
40-
!client/node_modules/vscode-jsonrpc/**
41-
!client/node_modules/vscode-languageclient/**
42-
!client/node_modules/vscode-languageserver-protocol/**
43-
!client/node_modules/vscode-languageserver-types/**
44-
!client/node_modules/{minimatch,brace-expansion,concat-map,balanced-match}/**
45-
!client/node_modules/{semver,lru-cache,yallist}/**
4640

4741
# Server node modules
4842
server/node_modules/**
49-
!server/node_modules/vscode-jsonrpc/**
50-
!server/node_modules/vscode-languageserver/**
51-
!server/node_modules/vscode-languageserver-protocol/**
52-
!server/node_modules/vscode-languageserver-textdocument/**
53-
!server/node_modules/vscode-languageserver-types/**
43+
44+
# Extension bundle
45+
!dist/**

client/out/placeholder.tmp

Whitespace-only changes.

client/package-lock.json

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

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"vscode-languageclient": "^9.0.1"
1717
},
1818
"devDependencies": {
19-
"@types/vscode": "^1.96.0",
19+
"@types/vscode": "^1.99.0",
2020
"@vscode/test-electron": "^2.4.1"
2121
}
2222
}

client/src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ let client: LanguageClient;
1919
export function activate(context: ExtensionContext) {
2020
// The server is implemented in node
2121
const serverModule = context.asAbsolutePath(
22-
path.join('server', 'out', 'server.js')
22+
path.join('dist', 'server', 'out', 'server.js')
2323
);
2424
// The debug options for the server
2525
// --inspect=6009: runs the server in Node's Inspector mode so VS Code can attach to the server for debugging

client/src/logger.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,18 @@ export interface LogMessage {
1616

1717
export class VscodeLogger {
1818
private static _outputChannel: vscode.OutputChannel;
19-
static get outputChannel(): vscode.OutputChannel {
19+
private static get outputChannel(): vscode.OutputChannel {
2020
if (!VscodeLogger._outputChannel) {
2121
VscodeLogger._outputChannel = vscode.window.createOutputChannel('VBAPro Output');
2222
VscodeLogger._outputChannel.show();
2323
}
2424
return VscodeLogger._outputChannel;
2525
}
26+
private static get configuredLevel(): LogLevel {
27+
const config = vscode.workspace.getConfiguration('vbaLanguageServer');
28+
const levelString = config.get<string>('logLevel.outputChannel', 'warning');
29+
return LogLevel[levelString as keyof typeof LogLevel];
30+
}
2631

2732
static info = (msg: string, lvl?: number) => this.log(LogLevel.info, msg, lvl)
2833
static debug = (msg: string, lvl?: number) => this.log(LogLevel.debug, msg, lvl)
@@ -32,6 +37,8 @@ export class VscodeLogger {
3237
}
3338

3439
private static log(type: LogLevel, msg: string, lvl?: number): void {
40+
if (type > this.configuredLevel) return;
41+
3542
const i = '> '.repeat(lvl ?? 0);
3643
const t = `${this.getFormattedTimestamp()}`;
3744
VscodeLogger.outputChannel.appendLine(`${t} [${LogLevel[type]}] ${i}${msg}`);

client/src/test/foldingRanges.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as vscode from 'vscode';
22
import * as assert from 'assert';
33
import { getDocUri, activate } from './helper';
44

5-
suite('Should get text edits', () => {
5+
suite('Should get folding ranges', () => {
66
test('formatting.class.template', async () => {
77
const subFoo = {start: 23, end: 42};
88
const subBar = {start: 44, end: 58};

0 commit comments

Comments
 (0)