Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update all NPM packages to latest #1076

Merged
merged 3 commits into from
Jan 16, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Package Binary
run: ./node_modules/vsce/vsce package -o cortex-debug.vsix
- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cortex-debug.vsix
path: ./cortex-debug.vsix
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"editor.tabSize": 4,
"editor.insertSpaces": true,
"editor.useTabStops": false,
"files.trimTrailingWhitespace": false,
"files.exclude": {
"out": false,
"dist": true,
Expand Down
2,164 changes: 1,482 additions & 682 deletions package-lock.json

Large diffs are not rendered by default.

52 changes: 26 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3020,45 +3020,45 @@
}
},
"dependencies": {
"@vscode/extension-telemetry": "^0.4.7",
"@vscode/webview-ui-toolkit": "^1.1.0",
"@vscode/extension-telemetry": "^0.9.8",
"@vscode/webview-ui-toolkit": "^1.4.0",
"binary-parser": "^2.2.1",
"bindings": "^1.5.0",
"command-exists": "^1.2.9",
"commander": "^2.20.3",
"d3": "^7.6.1",
"debug": "^4.3.1",
"commander": "^13.0.0",
"d3": "^7.9.0",
"debug": "^4.4.0",
"hasbin": "^1.2.3",
"json-stream-stringify": "^2.0.4",
"nan": "^2.14.2",
"node-interval-tree": "^1.3.3",
"prebuild-install": "^7.0.1",
"ringbufferjs": "^1.1.0",
"json-stream-stringify": "^3.1.6",
"nan": "^2.22.0",
"node-interval-tree": "^2.1.2",
"prebuild-install": "^7.1.2",
"ringbufferjs": "^2.0.0",
"safe-buffer": "^5.2.1",
"serialport": "^10.4.0",
"stream-json": "^1.7.3",
"tmp": "^0.2.1",
"serialport": "^13.0.0",
"stream-json": "^1.9.1",
"tmp": "^0.2.3",
"universal-analytics": "^0.5.3",
"usb": "^2.14.0",
"uuid": "^8.3.2",
"vscode-jsonrpc": "^6.0.0"
"uuid": "^11.0.5",
"vscode-jsonrpc": "^8.2.1"
},
"description": "ARM Cortex-M GDB Debugger support for VSCode",
"devDependencies": {
"@types/binary-parser": "^1.5.1",
"@types/mocha": "^5.2.7",
"@types/binary-parser": "^1.5.5",
"@types/mocha": "^10.0.10",
"@types/node": "16.x",
"@types/vscode": "^1.69.0",
"@vscode/debugadapter": "^1.59.0",
"@vscode/debugprotocol": "^1.59.0",
"@vscode/test-electron": "^2.1.3",
"mocha": "^9.1.3",
"ts-loader": "^9.2.6",
"tslint": "^5.12.1",
"typescript": "^4.7.4",
"@vscode/debugadapter": "^1.68.0",
"@vscode/debugprotocol": "^1.68.0",
"@vscode/test-electron": "^2.4.1",
"mocha": "^11.0.1",
"ts-loader": "^9.5.2",
"tslint": "^6.1.3",
"typescript": "^5.7.3",
"typescript-tslint-plugin": "^1.0.2",
"webpack": "^5.94.0",
"webpack-cli": "^4.9.1"
"webpack": "^5.97.1",
"webpack-cli": "^6.0.1"
},
"displayName": "Cortex-Debug",
"engines": {
Expand Down
12 changes: 6 additions & 6 deletions src/backend/mi_parse.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export interface MIInfo {
token: number;
outOfBandRecord: Array<{ isStream: boolean, type: string, asyncClass: string, output: Array<[string, any]>, content: string }>;
resultRecords: { resultClass: string, results: Array<[string, any]> };
outOfBandRecord: { isStream: boolean, type: string, asyncClass: string, output: [string, any][], content: string }[];
resultRecords: { resultClass: string, results: [string, any][] };
}

const octalMatch = /^[0-7]{3}/;
Expand Down Expand Up @@ -56,8 +56,8 @@ function parseString(str: string): string {

export class MINode implements MIInfo {
public token: number;
public outOfBandRecord: Array<{ isStream: boolean, type: string, asyncClass: string, output: Array<[string, any]>, content: string }>;
public resultRecords: { resultClass: string, results: Array<[string, any]> };
public outOfBandRecord: { isStream: boolean, type: string, asyncClass: string, output: [string, any][], content: string }[];
public resultRecords: { resultClass: string, results: [string, any][] };
public output: string = '';

public static valueOf(start: any, path: string): any {
Expand Down Expand Up @@ -123,8 +123,8 @@ export class MINode implements MIInfo {

constructor(
token: number,
info: Array<{ isStream: boolean, type: string, asyncClass: string, output: Array<[string, any]>, content: string }>,
result: { resultClass: string, results: Array<[string, any]> }
info: { isStream: boolean, type: string, asyncClass: string, output: [string, any][], content: string }[],
result: { resultClass: string, results: [string, any][] }
) {
this.token = token;
this.outOfBandRecord = info;
Expand Down
4 changes: 0 additions & 4 deletions src/backend/symbols.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import * as os from 'os';
import * as path from 'path';
import * as fs from 'fs';
import * as crypto from 'crypto';
import { SpawnLineReader, SymbolFile, validateELFHeader } from '../common';
import { IntervalTree, Interval } from 'node-interval-tree';
import JsonStreamStringify from 'json-stream-stringify';
const StreamArray = require('stream-json/streamers/StreamArray');
import * as zlib from 'zlib';

import { SymbolType, SymbolScope, SymbolInformation as SymbolInformation } from '../symbols';
import { GDBDebugSession } from '../gdb';
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/rtos/rtos-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ export abstract class RTOSBase {
// txt = `<vscode-link class="threads-link-${lKey}" href="#">${v.text}</vscode-link>`;
} else if ((RTOSDisplayColumn[key].colType & ColTypeEnum.colTypeCollapse) && (v.value)) {
const length = Object.values(v.value).reduce((acc: number, cur: string[]) => acc + cur.length, 0);
if (length > 1) {
if (typeof length === 'number' && length > 1) {
const descriptions = Object.keys(v.value).map((key) => `${key}: ${v.value[key].join(', ')}`).join('<br>');
txt = `<button class="collapse-button">${v.text}</button><div class="collapse">${descriptions}</div>`;
}
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/swo/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ export interface TimeseriesGraphConfiguration extends GraphConfiguration {
minimum: number;
maximum: number;
timespan: number;
plots: Array<{
plots: {
graphId: string,
label: string,
color: string
}>;
}[];
}

export interface XYGraphConfiguration extends GraphConfiguration {
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/swo/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ class SWOWebview {
return html;
}

private processors: Array<SWORTTGraphProcessor | SWORTTAdvancedProcessor> = [];
private processors: (SWORTTGraphProcessor | SWORTTAdvancedProcessor)[] = [];
public registerProcessors(processor: SWORTTGraphProcessor | SWORTTAdvancedProcessor): void {
processor.on('message', this.sendMessage.bind(this));
this.processors.push(processor);
Expand Down
8 changes: 4 additions & 4 deletions src/gdb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class VSCodeRequest<RespType, ArgsType> {
** and for others, use evaluateRequest as a template
*/
export class RequestQueue<RespType, ArgsType> {
private queue: Array<VSCodeRequest<RespType, ArgsType>> = [];
private queue: VSCodeRequest<RespType, ArgsType>[] = [];
private queueBusy = false;
public pendedContinue = new PendingContinue(false, this.haveMore.bind(this));
constructor(private alwaysResolve = true) {}
Expand Down Expand Up @@ -2115,7 +2115,7 @@ export class GDBDebugSession extends LoggingDebugSession {
}
this.breakpointMap.set(args.source.path, []);

const all: Array<Promise<OurSourceBreakpoint | MIError>> = [];
const all: Promise<OurSourceBreakpoint | MIError>[] = [];
const sourcepath = decodeURIComponent(args.source.path);

if (sourcepath.startsWith('disassembly:/')) {
Expand Down Expand Up @@ -2231,7 +2231,7 @@ export class GDBDebugSession extends LoggingDebugSession {

await this.miDebugger.removeBreakpoints(currentBreakpoints);

const all: Array<Promise<OurInstructionBreakpoint | MIError>> = [];
const all: Promise<OurInstructionBreakpoint | MIError>[] = [];
args.breakpoints.forEach((brk) => {
const addr = parseInt(brk.instructionReference) + brk.offset || 0;
const bpt: OurInstructionBreakpoint = { ...brk, number: -1, address: addr };
Expand Down Expand Up @@ -2339,7 +2339,7 @@ export class GDBDebugSession extends LoggingDebugSession {

await this.miDebugger.removeBreakpoints(currentBreakpoints);

const all: Array<Promise<OurDataBreakpoint | MIError>> = [];
const all: Promise<OurDataBreakpoint | MIError>[] = [];

args.breakpoints.forEach((brk) => {
const bkp: OurDataBreakpoint = { ...brk };
Expand Down
4 changes: 2 additions & 2 deletions src/grapher/timeseriesgraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ export class TimeseriesGraph implements Graph {
bottom: 60
};

private annotations: Array<{
private annotations: {
timestamp: number,
type: string
}> = [];
}[] = [];

private sg: any;
private sx: d3.ScaleTime<number, number>;
Expand Down
4 changes: 2 additions & 2 deletions src/grapher/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ export interface TimeseriesGraphConfiguration extends GraphConfiguration {
minimum: number;
maximum: number;
timespan: number;
plots: Array<{
plots: {
graphId: string,
label: string,
color: string
}>;
}[];
}

export interface XYGraphConfiguration extends GraphConfiguration {
Expand Down
40 changes: 18 additions & 22 deletions test/suite/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as path from 'path';
import * as Mocha from 'mocha';
import * as glob from 'glob';

export function run(): Promise<void> {
export async function run(): Promise<void> {
// Create the mocha test
const mocha = new Mocha({
ui: 'tdd'
Expand All @@ -12,28 +12,24 @@ export function run(): Promise<void> {

const testsRoot = path.resolve(__dirname, '..');

return new Promise((c, e) => {
glob('**/**.test.js', { cwd: testsRoot }, (err, files) => {
if (err) {
return e(err);
}
const files = await glob.glob('**/**.test.js', { cwd: testsRoot });

// Add files to the test suite
files.forEach((f) => mocha.addFile(path.resolve(testsRoot, f)));
// Add files to the test suite
files.forEach((f) => mocha.addFile(path.resolve(testsRoot, f)));

try {
// Run the mocha test
mocha.run((failures) => {
if (failures > 0) {
e(new Error(`${failures} tests failed.`));
} else {
c();
}
});
} catch (err) {
console.error(err);
e(err);
}
try {
// Run the mocha test
await new Promise<void>((c, e) => {
mocha.run((failures) => {
if (failures > 0) {
e(new Error(`${failures} tests failed.`));
} else {
c();
}
});
});
});
} catch (err) {
console.error(err);
throw err;
}
}
Loading