Skip to content

Commit b01100e

Browse files
authored
Merge pull request #709 from KxSystems/ee-grid
Replace grid
2 parents 36d7b05 + 5f334a8 commit b01100e

File tree

18 files changed

+430
-600
lines changed

18 files changed

+430
-600
lines changed

.vscode/extensions.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"dbaeumer.vscode-eslint",
44
"esbenp.prettier-vscode",
55
"runem.lit-plugin",
6-
"connor4312.esbuild-problem-matchers",
76
"ecmel.vscode-launcher"
87
]
98
}

.vscode/tasks.json

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,35 @@
55
"type": "npm",
66
"script": "watch",
77
"group": "build",
8-
"problemMatcher": "$esbuild-watch",
98
"isBackground": true,
10-
"label": "npm: watch"
9+
"label": "npm: watch",
10+
"problemMatcher": {
11+
"owner": "typescript",
12+
"source": "ts",
13+
"applyTo": "closedDocuments",
14+
"fileLocation": ["relative", "${cwd}"],
15+
"pattern": {
16+
"regexp": "^Error: Build failed[^:]*:([^:]*):([^:]*):([^:]*): (ERROR:.*)$",
17+
"file": 1,
18+
"line": 2,
19+
"column": 3,
20+
"message": 4
21+
},
22+
"background": {
23+
"activeOnStart": true,
24+
"beginsPattern": {
25+
"regexp": "^esbuild:started$"
26+
},
27+
"endsPattern": {
28+
"regexp": "^esbuild:watching$"
29+
}
30+
}
31+
}
1132
},
1233
{
1334
"type": "npm",
1435
"script": "build",
1536
"group": "build",
16-
"problemMatcher": "$esbuild",
1737
"label": "npm: build"
1838
}
1939
]

esbuild.js renamed to esbuild.mjs

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
const { build } = require("esbuild");
2-
const fs = require("fs");
3-
const path = require("path");
4-
const glob = require("glob");
1+
import { context, build } from "esbuild";
2+
import { copyFileSync, mkdirSync } from "fs";
3+
import { sync } from "glob";
4+
import { join, basename } from "path";
55

66
function copyFiles(srcPattern, destDir) {
7-
glob.sync(srcPattern).forEach((file) => {
8-
const destFile = path.join(destDir, path.basename(file));
9-
fs.copyFileSync(file, destFile);
7+
sync(srcPattern).forEach((file) => {
8+
const destFile = join(destDir, basename(file));
9+
copyFileSync(file, destFile);
1010
});
1111
}
1212

1313
const minify = process.argv.includes("--minify");
1414
const sourcemap = process.argv.includes("--sourcemap");
1515
const keepNames = process.argv.includes("--keep-names");
16+
const watch = process.argv.includes("--watch");
1617

1718
const baseConfig = {
1819
minify,
@@ -50,24 +51,26 @@ const webviewConfig = {
5051

5152
(async () => {
5253
try {
53-
await build(extensionConfig);
54-
console.log("extension build complete");
55-
await build(serverConfig);
56-
console.log("server build complete");
57-
await build(webviewConfig);
54+
mkdirSync("./out", { recursive: true });
5855
copyFiles("src/webview/styles/*.css", "./out");
59-
copyFiles("node_modules/ag-grid-community/styles/ag-grid.min.css", "./out");
60-
copyFiles(
61-
"node_modules/ag-grid-community/styles/ag-theme-alpine.min.css",
62-
"./out",
63-
);
64-
copyFiles(
65-
"node_modules/ag-grid-community/dist/ag-grid-community.min.js",
66-
"./out",
67-
);
68-
console.log("build complete");
56+
57+
if (watch) {
58+
console.log("esbuild:started");
59+
const contexts = await Promise.all([
60+
context(serverConfig),
61+
context(webviewConfig),
62+
context(extensionConfig),
63+
]);
64+
await Promise.all(contexts.map((ctx) => ctx.rebuild()));
65+
contexts.forEach((ctx) => ctx.watch({ delay: 500 }));
66+
console.log("esbuild:watching");
67+
} else {
68+
await build(serverConfig);
69+
await build(webviewConfig);
70+
await build(extensionConfig);
71+
}
6972
} catch (err) {
70-
process.stderr.write(err.stderr);
73+
console.error(err);
7174
process.exit(1);
7275
}
7376
})();

eslint.config.mjs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
/*
2-
* Copyright (c) 1998-2025 KX Systems Inc.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
5-
* License. You may obtain a copy of the License at
6-
*
7-
* http://www.apache.org/licenses/LICENSE-2.0
8-
*
9-
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
10-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11-
* specific language governing permissions and limitations under the License.
12-
*/
13-
141
import js from "@eslint/js";
152
import headerPlugin from "eslint-plugin-header";
163
import importPlugin from "eslint-plugin-import";
@@ -22,7 +9,7 @@ const currentYear = new Date().getFullYear();
229

2310
export default [
2411
{
25-
ignores: ["**/*.d.ts", "**/*.js", "src/ipc/**"],
12+
ignores: ["**/*.d.ts", "**/*.js", "**/*.mjs", "src/ipc/**"],
2613
},
2714
js.configs.recommended,
2815
...tseslint.configs.recommended,

package-lock.json

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

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,7 @@
11851185
"update-deps": "ncu --target patch -u",
11861186
"format": "prettier --write \"**/*.+(js|ts)\"",
11871187
"lint": "eslint $(git ls-files '*.ts') --fix --no-warn-ignored",
1188-
"esbuild-base": "rimraf out && node ./esbuild.js",
1188+
"esbuild-base": "rimraf out && node ./esbuild.mjs",
11891189
"watch": "npm run -S esbuild-base -- --sourcemap --watch",
11901190
"build": "npm run -S esbuild-base -- --sourcemap",
11911191
"vscode:prepublish": "npm run -S esbuild-base -- --minify --keep-names",
@@ -1216,7 +1216,6 @@
12161216
"@vscode/python-extension": "1.0.6",
12171217
"@vscode/test-electron": "2.5.2",
12181218
"@vscode/vsce": "3.7.1",
1219-
"ag-grid-community": "34.3.1",
12201219
"axios": "1.13.2",
12211220
"c8": "10.1.3",
12221221
"chevrotain": "10.5.0",

src/commands/serverCommand.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import {
2323
window,
2424
workspace,
2525
env,
26-
ProgressLocation,
2726
} from "vscode";
2827

2928
import { ext } from "../extensionVariables";
@@ -1152,9 +1151,6 @@ export async function runQuery(
11521151
);
11531152
});
11541153

1155-
if (isInsights) {
1156-
runner.location = ProgressLocation.Notification;
1157-
}
11581154
runner.title = `Executing ${executorName} on ${connLabel || "active connection"}.`;
11591155

11601156
return !isInsights || ((target || isSql) && !variable)

0 commit comments

Comments
 (0)