Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"runem.lit-plugin",
"connor4312.esbuild-problem-matchers",
"ecmel.vscode-launcher"
]
}
26 changes: 23 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,35 @@
"type": "npm",
"script": "watch",
"group": "build",
"problemMatcher": "$esbuild-watch",
"isBackground": true,
"label": "npm: watch"
"label": "npm: watch",
"problemMatcher": {
"owner": "typescript",
"source": "ts",
"applyTo": "closedDocuments",
"fileLocation": ["relative", "${cwd}"],
"pattern": {
"regexp": "^Error: Build failed[^:]*:([^:]*):([^:]*):([^:]*): (ERROR:.*)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4
},
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "^esbuild:started$"
},
"endsPattern": {
"regexp": "^esbuild:watching$"
}
}
}
},
{
"type": "npm",
"script": "build",
"group": "build",
"problemMatcher": "$esbuild",
"label": "npm: build"
}
]
Expand Down
49 changes: 26 additions & 23 deletions esbuild.js → esbuild.mjs
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
const { build } = require("esbuild");
const fs = require("fs");
const path = require("path");
const glob = require("glob");
import { context, build } from "esbuild";
import { copyFileSync, mkdirSync } from "fs";
import { sync } from "glob";
import { join, basename } from "path";

function copyFiles(srcPattern, destDir) {
glob.sync(srcPattern).forEach((file) => {
const destFile = path.join(destDir, path.basename(file));
fs.copyFileSync(file, destFile);
sync(srcPattern).forEach((file) => {
const destFile = join(destDir, basename(file));
copyFileSync(file, destFile);
});
}

const minify = process.argv.includes("--minify");
const sourcemap = process.argv.includes("--sourcemap");
const keepNames = process.argv.includes("--keep-names");
const watch = process.argv.includes("--watch");

const baseConfig = {
minify,
Expand Down Expand Up @@ -50,24 +51,26 @@ const webviewConfig = {

(async () => {
try {
await build(extensionConfig);
console.log("extension build complete");
await build(serverConfig);
console.log("server build complete");
await build(webviewConfig);
mkdirSync("./out", { recursive: true });
copyFiles("src/webview/styles/*.css", "./out");
copyFiles("node_modules/ag-grid-community/styles/ag-grid.min.css", "./out");
copyFiles(
"node_modules/ag-grid-community/styles/ag-theme-alpine.min.css",
"./out",
);
copyFiles(
"node_modules/ag-grid-community/dist/ag-grid-community.min.js",
"./out",
);
console.log("build complete");

if (watch) {
console.log("esbuild:started");
const contexts = await Promise.all([
context(serverConfig),
context(webviewConfig),
context(extensionConfig),
]);
await Promise.all(contexts.map((ctx) => ctx.rebuild()));
contexts.forEach((ctx) => ctx.watch({ delay: 500 }));
console.log("esbuild:watching");
} else {
await build(serverConfig);
await build(webviewConfig);
await build(extensionConfig);
}
} catch (err) {
process.stderr.write(err.stderr);
console.error(err);
process.exit(1);
}
})();
15 changes: 1 addition & 14 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
/*
* Copyright (c) 1998-2025 KX Systems Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

import js from "@eslint/js";
import headerPlugin from "eslint-plugin-header";
import importPlugin from "eslint-plugin-import";
Expand All @@ -22,7 +9,7 @@ const currentYear = new Date().getFullYear();

export default [
{
ignores: ["**/*.d.ts", "**/*.js", "src/ipc/**"],
ignores: ["**/*.d.ts", "**/*.js", "**/*.mjs", "src/ipc/**"],
},
js.configs.recommended,
...tseslint.configs.recommended,
Expand Down
18 changes: 0 additions & 18 deletions package-lock.json

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

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@
"update-deps": "ncu --target patch -u",
"format": "prettier --write \"**/*.+(js|ts)\"",
"lint": "eslint $(git ls-files '*.ts') --fix --no-warn-ignored",
"esbuild-base": "rimraf out && node ./esbuild.js",
"esbuild-base": "rimraf out && node ./esbuild.mjs",
"watch": "npm run -S esbuild-base -- --sourcemap --watch",
"build": "npm run -S esbuild-base -- --sourcemap",
"vscode:prepublish": "npm run -S esbuild-base -- --minify --keep-names",
Expand Down Expand Up @@ -1216,7 +1216,6 @@
"@vscode/python-extension": "1.0.6",
"@vscode/test-electron": "2.5.2",
"@vscode/vsce": "3.7.1",
"ag-grid-community": "34.3.1",
"axios": "1.13.2",
"c8": "10.1.3",
"chevrotain": "10.5.0",
Expand Down
4 changes: 0 additions & 4 deletions src/commands/serverCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import {
window,
workspace,
env,
ProgressLocation,
} from "vscode";

import { ext } from "../extensionVariables";
Expand Down Expand Up @@ -1152,9 +1151,6 @@ export async function runQuery(
);
});

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

return !isInsights || ((target || isSql) && !variable)
Expand Down
Loading