diff --git a/.eslintrc.yml b/.eslintrc.yml index 00f9c74e..8f00a35f 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -19,6 +19,6 @@ plugins: - '@typescript-eslint' rules: { "no-empty": ["error", { "allowEmptyCatch": true }], - "no-unused-vars": ["error", { "args": "none" }] + "@typescript-eslint/no-unused-vars": ["error", { "args": "none" }] } diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 71c164ae..afc19a4a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,7 +46,7 @@ jobs: - name: preinstall run: | npm install -g node-gyp - npm install -g vsce + npm install -g vsce@"^1.0.0" npm install -g gulp - name: install run: npm install @@ -85,7 +85,7 @@ jobs: - name: preinstall run: | npm install -g node-gyp - npm install -g vsce + npm install -g vsce@"^1.0.0" npm install -g gulp - name: install run: npm install diff --git a/CHANGELOG.md b/CHANGELOG.md index 07fa4b9d..fb1413ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,18 @@ # Change Log All notable changes to this project will be documented in this file. +## Version 0.4.7 + +- Release date: ??? + +### Changed + +- Add support for ST-Link v3.0 [#1366](https://github.com/microsoft/vscode-arduino/pull/1366) +- Fix empty board and examples list [#1367](https://github.com/microsoft/vscode-arduino/pull/1367) +- Fix ESLint parsing for enums [#1368](https://github.com/microsoft/vscode-arduino/pull/1368) +- Fix build cwd [#1375](https://github.com/microsoft/vscode-arduino/pull/1375) +- Fix stack overflow in board configuration view [#1379](https://github.com/microsoft/vscode-arduino/pull/1379) + ## Version 0.4.6 - Release date: September 29, 2021 diff --git a/misc/debuggerUsbMapping.json b/misc/debuggerUsbMapping.json index 5394813e..fe3ad082 100644 --- a/misc/debuggerUsbMapping.json +++ b/misc/debuggerUsbMapping.json @@ -20,6 +20,17 @@ "short_name": "stlink-2.1", "config_file": "stlink-v2-1.cfg" }, + { + "vid": "0483", + "pid": [ + "374e", + "374f", + "3753" + ], + "name": "ST Link V3.0", + "short_name": "stlink-v3.0", + "config_file": "stlink-v3-0.cfg" + }, { "pid": [ "0101", diff --git a/package-lock.json b/package-lock.json index d7ae8e84..fcb08b2a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "vscode-arduino", - "version": "0.4.6", + "version": "0.4.7-rc2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 13573fc6..02d40fe4 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vscode-arduino", "displayName": "Arduino", "description": "Arduino for Visual Studio Code", - "version": "0.4.6", + "version": "0.4.7-rc2", "publisher": "vsciot-vscode", "aiKey": "83dd2c27-6594-41d3-85a9-bdb22070eb42", "preview": true, diff --git a/src/arduino/arduino.ts b/src/arduino/arduino.ts index 60bcecab..97112f2e 100644 --- a/src/arduino/arduino.ts +++ b/src/arduino/arduino.ts @@ -27,8 +27,6 @@ import { SerialMonitor } from "../serialmonitor/serialMonitor"; import { UsbDetector } from "../serialmonitor/usbDetector"; import { ProgrammerManager } from "./programmerManager"; -// Not sure why eslint fails to detect usage of this enum, so disable checking. -/* eslint-disable no-unused-vars */ /** * Supported build modes. For further explanation see the documentation * of ArduinoApp.build(). @@ -42,7 +40,6 @@ export enum BuildMode { UploadProgrammer = "Uploading (programmer)", CliUploadProgrammer = "Uploading (programmer) using Arduino CLI", } -/* eslint-enable no-unused-vars */ /** * Represent an Arduino application based on the official Arduino IDE. @@ -767,7 +764,7 @@ export class ArduinoApp { return await util.spawn( this._settings.commandPath, args, - undefined, + { cwd: ArduinoWorkspace.rootPath }, { /*channel: arduinoChannel.channel,*/ stdout: stdoutcb, stderr: stderrcb }, ).then(async () => { const ret = await cleanup("ok"); diff --git a/src/arduino/intellisense.ts b/src/arduino/intellisense.ts index 7866afe6..a279fd3f 100644 --- a/src/arduino/intellisense.ts +++ b/src/arduino/intellisense.ts @@ -146,7 +146,6 @@ function makeCompilerParserEngines(dc: DeviceContext) { } // Not sure why eslint fails to detect usage of these enums, so disable checking. -/* eslint-disable no-unused-vars */ /** * Possible states of AnalysisManager's state machine. */ @@ -189,7 +188,6 @@ enum AnalysisEvent { */ AnalysisBuildDone, } -/* eslint-enable no-unused-vars */ /** * This class manages analysis builds for the automatic IntelliSense diff --git a/src/arduino/package.ts b/src/arduino/package.ts index 231ca358..817def5a 100644 --- a/src/arduino/package.ts +++ b/src/arduino/package.ts @@ -152,8 +152,6 @@ export interface IBoardConfigItem { options: IBoardConfigOption[]; } -// Not sure why eslint fails to detect usage of this enum, so disable checking. -/* eslint-disable no-unused-vars */ /** * Return values of calls to IBoard.loadConfig() and IBoard.updateConfig(). */ @@ -182,7 +180,6 @@ export enum BoardConfigResult { */ InvalidFormat, } -/* eslint-enable no-unused-vars */ /** * Interface for classes that represent an Arduino supported board. diff --git a/src/common/constants.ts b/src/common/constants.ts index 9e2f26cf..2fcfde72 100644 --- a/src/common/constants.ts +++ b/src/common/constants.ts @@ -10,13 +10,10 @@ export const CPP_CONFIG_FILE = path.join(".vscode", "c_cpp_properties.json"); /** The name of the intellisense configuration managed by vscode-arduino. */ export const C_CPP_PROPERTIES_CONFIG_NAME = "Arduino"; -// Not sure why eslint fails to detect usage of this enum, so disable checking. -/* eslint-disable no-unused-vars */ export enum LogLevel { Info = "info", Verbose = "verbose", } -/* eslint-enable no-unused-vars */ export const ARDUINO_MODE: vscode.DocumentSelector = [ { language: "cpp", scheme: "file" }, diff --git a/src/logger/logger.ts b/src/logger/logger.ts index 87cff21f..cd72f838 100644 --- a/src/logger/logger.ts +++ b/src/logger/logger.ts @@ -6,14 +6,11 @@ import * as winston from "winston"; import TelemetryTransport from "./telemetry-transport"; import UserNotificationTransport from "./user-notification-transport"; -// Not sure why eslint fails to detect usage of this enum, so disable checking. -/* eslint-disable no-unused-vars */ export enum LogLevel { Info = "info", Warn = "warn", Error = "error", } -/* eslint-enable no-unused-vars */ function FilterErrorPath(line: string): string { if (line) { diff --git a/src/views/app/components/BoardConfig.tsx b/src/views/app/components/BoardConfig.tsx index 394a00f3..372102d3 100644 --- a/src/views/app/components/BoardConfig.tsx +++ b/src/views/app/components/BoardConfig.tsx @@ -35,7 +35,7 @@ class BoardConfig extends React.Component> { this.state = {}; } - public UNSAFE_componentWillMount() { + public componentWillMount() { this.props.loadInstalledBoards(); this.props.loadConfigItems(); } diff --git a/src/views/app/components/BoardManager.tsx b/src/views/app/components/BoardManager.tsx index 03e92650..152b2b7e 100644 --- a/src/views/app/components/BoardManager.tsx +++ b/src/views/app/components/BoardManager.tsx @@ -66,7 +66,7 @@ class BoardManager extends React.Component bd.isSelected), + selectedBoard: nextProps.installedBoards.find((bd) => bd.isSelected), }); } + } + + public render() { const options = this.props.installedBoards.map((b) => { return { value: b.key, diff --git a/src/views/app/components/ExampleTreeView.tsx b/src/views/app/components/ExampleTreeView.tsx index b7615eed..27daac18 100644 --- a/src/views/app/components/ExampleTreeView.tsx +++ b/src/views/app/components/ExampleTreeView.tsx @@ -39,7 +39,7 @@ class ExampleTreeView extends React.Component