Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 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
12 changes: 12 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug current .ts file",
"runtimeArgs": [
"-r",
"ts-node/register"
],
"args": [
"${file}"
],
},
{
"name": "Run Extension",
"type": "extensionHost",
Expand Down
19,903 changes: 4,213 additions & 15,690 deletions package-lock.json

Large diffs are not rendered by default.

13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
"url": "https://github.com/microsoft/vscode-powerquery-sdk/issues"
},
"engines": {
"node": ">=16.13.2 <17",
"npm": ">=8.5.0",
"node": ">=18.0.0",
"vscode": "^1.62.0"
},
"capabilities": {
Expand Down Expand Up @@ -391,35 +390,35 @@
"@types/glob": "^8.0.0",
"@types/gulp": "^4.0.9",
"@types/mocha": "^9.1.1",
"@types/node": "^18.19.9",
"@types/sinon": "^10.0.13",
"@types/node": "^16.11.65",
"@types/vscode": "^1.62.0",
"@typescript-eslint/eslint-plugin": "^5.40.0",
"@typescript-eslint/parser": "^5.40.0",
"@vscode/debugadapter": "^1.57.0",
"@vscode/debugadapter-testsupport": "^1.57.0",
"@vscode/test-electron": "^1.6.2",
"@vscode/vsce": "^2.22.0",
"chai": "^4.3.6",
"sinon": "^14.0.0",
"eslint": "^8.25.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-license-header": "^0.4.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-security": "^1.5.0",
"glob": "^8.0.3",
"gulp": "^4.0.2",
"husky": "^8.0.1",
"lint-staged": "^13.2.1",
"mocha": "^9.2.2",
"prettier": "^2.7.1",
"rimraf": "^3.0.2",
"sinon": "^14.0.0",
"ts-loader": "^9.4.1",
"ts-node": "^10.9.1",
"tsconfig-paths-webpack-plugin": "^3.5.2",
"typescript": "^4.8.4",
"vsce": "^2.11.0",
"vinyl-fs": "^4.0.0",
"vscode-extension-tester": "^5.0.0",
"vscode-nls-dev": "^4.0.3",
"vscode-nls-dev": "^4.0.4",
"webpack": "^5.76.0",
"webpack-cli": "^4.10.0"
},
Expand Down
9 changes: 4 additions & 5 deletions scripts/addI18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
*/

import * as fs from "fs";
import * as gulp from "gulp";
// import * as gulp from "gulp";
import * as nls from "vscode-nls-dev";
import * as path from "path";
import * as process from "process";
import * as vfs from "vinyl-fs";

const projectDirectory: string = process.cwd();
const i18nDirectory: string = path.join(projectDirectory, "localize", "i18n");
Expand Down Expand Up @@ -65,8 +66,6 @@ for (const oneLangId of allLangDirectories) {

const supportedLanguages: nls.Language[] = allLangDirectories.map((id: string) => ({ id, folderName: id }));

gulp.src(["package.nls.json"], {
cwd: projectDirectory,
})
vfs.src(["package.nls.json"], { cwd: projectDirectory })
.pipe(nls.createAdditionalLanguageFiles(supportedLanguages, path.join("localize", "i18nDist"), "."))
.pipe(gulp.dest(".", { cwd: projectDirectory }));
.pipe(vfs.dest(".", { cwd: projectDirectory }))
2 changes: 1 addition & 1 deletion src/GlobalEventBus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class GlobalEventBus extends DisposableEventEmitter<GlobalEventTypes> imp

this.firstWorkspaceRootFilesWatcher = fs.watch(
firstWorkspace.uri.fsPath,
(_event: WatchEventType, _filename: string) => {
(_event: WatchEventType, _filename: string | null) => {
this.emit(GlobalEvents.workspaces.filesChangedAtWorkspace);
},
);
Expand Down
10 changes: 8 additions & 2 deletions src/common/promises/CancellationToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,20 @@ export class CancellationToken implements IVscCancellationToken {
);
}

static from(value: { [index: string | symbol]: unknown } | AbortSignal): CancellationToken {
// TODO: Review from and fromAbortSignal logic.

static from(value: { [index: string | symbol]: unknown } | CancellationToken): CancellationToken {
if (this.isCancellationToken(value as { [index: string | symbol]: unknown })) {
return value as CancellationToken;
}

return CancellationToken.none;
}

static fromAbortSignal(signal: AbortSignal): CancellationToken {
// todo what!!!, nodeJs.AbortSignal missed onabort ??!! add it to global.d.ts
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const abortSignal: any = value as any;
const abortSignal: any = signal as any;
// const abortSignal: AbortSignal = value as AbortSignal;

const token: CancellationToken = new CancellationToken(InternalActionGetter);
Expand Down
2 changes: 1 addition & 1 deletion src/pqTestConnector/PqServiceHostClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { ValueEventEmitter } from "../common/ValueEventEmitter";
export * from "./PqServiceHostClientLite";

export class PqServiceHostClient extends PqServiceHostClientLite implements IPQTestService, IDisposable {
private pingTimer: NodeJS.Timer | undefined = undefined;
private pingTimer: NodeJS.Timeout | undefined = undefined;

public override get pqServiceHostConnected(): boolean {
return Boolean(this.pingTimer);
Expand Down
2 changes: 1 addition & 1 deletion src/pqTestConnector/PqTestExecutableTaskQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ export class PqTestExecutableTaskQueue implements IPQTestService, IDisposable {
}
}

protected onPQTestExecutablePidChanged(event: WatchEventType, _filename: string): void {
protected onPQTestExecutablePidChanged(event: WatchEventType, _filename: string | Buffer | null): void {
if (event === "change") {
// it might be the pid changed
// if no running pid found, dequeue and execute one pending tasks if any
Expand Down
1 change: 0 additions & 1 deletion src/test/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ module.exports = {
"@typescript-eslint/prefer-namespace-keyword": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-namespace": "off",
"license-header/header": ["error", "../../resources/license-header.js"],
},
};
1 change: 0 additions & 1 deletion unit-tests/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"rules": {
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/typedef": 0,
"license-header/header": ["error", "../resources/license-header.js"],
"prefer-const": 0
}
}
2 changes: 1 addition & 1 deletion unit-tests/common/promises/cancellationToken.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe("Promises::CancellationTokenModule", () => {

it("return the abortController", () => {
const controller = new AbortController();
const token = CancellationToken.from(controller.signal);
const token = CancellationToken.fromAbortSignal(controller.signal);

expect(token).instanceof(CancellationToken);
expect(token.requested).false;
Expand Down
2 changes: 0 additions & 2 deletions webviews/pq-test-result-view/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"plugins": ["license-header"],
"extends": [
"react-app",
"react-app/jest"
],
"rules": {
"license-header/header": ["error", "../../resources/license-header.js"],
"no-console": "warn"
}
}
Loading