Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 0f50093

Browse files
authored
Merge pull request #1009 from microsoft/sync-develop-with-master
Sync develop with master
2 parents f175e41 + c9f5d10 commit 0f50093

File tree

9 files changed

+201
-182
lines changed

9 files changed

+201
-182
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ addons:
2121
branches:
2222
only:
2323
- master
24+
- develop
2425
- /v?[0-9]+\.[0-9]+\.[0-9]+(.*)?/
2526

2627
env:

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
## Version 0.3.0
5+
6+
- Release date: March 26, 2020
7+
8+
### Fixed
9+
10+
- Support Electron v7. Fix issue of "Unable to use serial port in VS Code Version 1.43.0". [[#980](https://github.com/microsoft/vscode-arduino/issues/980)]
11+
- Fix issue of "Fail to debug on Ubuntu". [[#933](https://github.com/microsoft/vscode-arduino/issues/933)]
12+
- Remove line ending selection. Fix the issue of "Save the last used end of line". [[#952](https://github.com/microsoft/vscode-arduino/issues/952)]
13+
- Fix the issue of "Can't install libraries from VS Code for ESP8266". [[#930](https://github.com/microsoft/vscode-arduino/issues/930)]
14+
- Fix the issue of "Project path can not be changed". [[#978](https://github.com/microsoft/vscode-arduino/issues/978)]
15+
16+
Special thanks to [raomin](https://github.com/raomin), thanks for your contributions and feedbacks.
17+
418
## Version 0.2.29
519

620
- Release date: January 2, 2020

package-lock.json

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

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-arduino",
33
"displayName": "Arduino",
44
"description": "Arduino for Visual Studio Code",
5-
"version": "0.3.0-rc3",
5+
"version": "0.3.0",
66
"publisher": "vsciot-vscode",
77
"aiKey": "83dd2c27-6594-41d3-85a9-bdb22070eb42",
88
"preview": true,
@@ -537,7 +537,7 @@
537537
},
538538
"scripts": {
539539
"vscode:prepublish": "gulp build --mode=production",
540-
"postinstall": "node ./node_modules/vscode/bin/install && cd ./src/views && npm install",
540+
"postinstall": "node ./node_modules/vscode/bin/install && cd ./src/views && npm install && node ../../node_modules/node-usb-native/scripts/rebuild-serialport.js",
541541
"test": "gulp test"
542542
},
543543
"extensionDependencies": [
@@ -580,8 +580,8 @@
580580
"glob": "^7.1.1",
581581
"iconv-lite": "^0.4.18",
582582
"impor": "^0.1.1",
583+
"node-usb-native": "^0.0.13",
583584
"properties": "^1.2.1",
584-
"usb-native": "^5.0.12",
585585
"uuid": "^3.0.1",
586586
"vscode-extension-telemetry": "0.0.18",
587587
"winreg": "^1.2.3",

src/debug/debuggerManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export class DebuggerManager {
4343
}
4444
}
4545
}
46-
this._usbDetector = require("usb-native").detector;
46+
this._usbDetector = require("node-usb-native").detector;
4747
this._debugServerPath = platform.findFile(platform.getExecutableFileName("openocd"),
4848
path.join(this._arduinoSettings.packagePath, "packages"));
4949
if (!util.fileExistsSync(this._debugServerPath)) {

src/serialmonitor/serialportctrl.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,25 @@ interface ISerialPortDetail {
1515
export class SerialPortCtrl {
1616
public static get serialport(): any {
1717
if (!SerialPortCtrl._serialport) {
18-
SerialPortCtrl._serialport = require("usb-native").SerialPort;
18+
SerialPortCtrl._serialport = require("node-usb-native").SerialPort;
1919
}
2020
return SerialPortCtrl._serialport;
2121
}
2222

23-
public static list(): Promise<ISerialPortDetail[]> {
24-
return new Promise((resolve, reject) => {
25-
SerialPortCtrl.serialport.list().then(
26-
(ports) => resolve(ports),
27-
(err) => reject(err),
28-
);
29-
});
23+
public static async list(): Promise<ISerialPortDetail[]> {
24+
try {
25+
const lists = SerialPortCtrl.serialport.list();
26+
return lists;
27+
} catch (err) {
28+
throw err;
29+
}
3030
}
3131

3232
private static _serialport: any;
3333

3434
private _currentPort: string;
3535
private _currentBaudRate: number;
3636
private _currentSerialPort = null;
37-
// private const ending = ;
3837

3938
public constructor(port: string, baudRate: number, private _outputChannel: OutputChannel) {
4039
this._currentBaudRate = baudRate;

src/serialmonitor/usbDetector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export class UsbDetector {
4545
if (os.platform() === "linux" || !enableUSBDetection) {
4646
return;
4747
}
48-
this._usbDetector = require("usb-native").detector;
48+
this._usbDetector = require("node-usb-native").detector;
4949

5050
if (!this._usbDetector) {
5151
return;

test/extension.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ suite("Arduino: Extension Tests", () => {
6868
// When running test on osx, the vscode instance is hanging there after tests finished and cause mocha timeout.
6969
// As a workaround, closing usb-detection process manually would make test window exit normally.
7070
if (os.platform() !== "linux") {
71-
const usbDector = require("usb-native").detector;
71+
const usbDector = require("node-usb-native").detector;
7272
usbDector.stopMonitoring();
7373
}
7474
});

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function getEntry() {
1212
const mod = JSON.parse(npmListRes);
1313
const unbundledModule = ['impor', 'uuid',
1414
// usb-native modules can not be bundled
15-
'usb-native', 'usb-detection', '@serialport/bindings', 'bindings', 'serialport'];
15+
'node-usb-native', 'usb-detection', '@serialport/bindings', 'bindings', 'serialport'];
1616

1717
for (const mod of unbundledModule) {
1818
const p = 'node_modules/' + mod;

0 commit comments

Comments
 (0)