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

Sync develop with master #1009

Merged
merged 20 commits into from
Mar 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
8755a36
move usb-native to node-usb-native
dilin-MS2 Mar 23, 2020
c770700
Merge pull request #1001 from microsoft/update-node-usb-native
dilin-MS2 Mar 23, 2020
9e8c9f5
fix serialport list on ubuntu
dilin-MS2 Mar 24, 2020
ba3ce3a
Merge branch 'master' into fix-serialport-ubuntu
dilin-MS2 Mar 24, 2020
ba9dd13
remove useless code
dilin-MS2 Mar 24, 2020
d273190
Merge pull request #1003 from microsoft/fix-serialport-ubuntu
dilin-MS2 Mar 24, 2020
6cb05b0
v0.3.0-rc4
hellyzh Mar 24, 2020
de6cd38
update node-usb-native@0.0.4: replace node with serialport official n…
dilin-MS2 Mar 24, 2020
1b27c58
Merge branch 'master' into fix-serialport-ubuntu
dilin-MS2 Mar 24, 2020
14ecf82
Merge pull request #1005 from microsoft/fix-serialport-ubuntu
dilin-MS2 Mar 24, 2020
50b6594
Merge branch 'master' into 0.3.0rc4
hellyzh Mar 24, 2020
4e89fc6
Merge pull request #1004 from microsoft/0.3.0rc4
hellyzh Mar 24, 2020
59180f3
update node-usb-native@0.0.7; rebuild serialport at postinstall time
dilin-MS2 Mar 25, 2020
7fa4572
Merge branch 'master' into fix-serialport-ubuntu
dilin-MS2 Mar 25, 2020
30bb8cc
update node-usb-native@0.0.8: rebuild serialport at postinstall time
dilin-MS2 Mar 25, 2020
b0fec01
Merge branch 'fix-serialport-ubuntu' of github.com:microsoft/vscode-a…
dilin-MS2 Mar 25, 2020
1584eb8
update node-usb-native@0.0.13
dilin-MS2 Mar 25, 2020
ffc761a
Merge pull request #1006 from microsoft/fix-serialport-ubuntu
dilin-MS2 Mar 25, 2020
c613bfe
v0.3.0
hellyzh Mar 26, 2020
c9f5d10
Merge pull request #1007 from microsoft/release0.3.0
hellyzh Mar 26, 2020
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: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ addons:
branches:
only:
- master
- develop
- /v?[0-9]+\.[0-9]+\.[0-9]+(.*)?/

env:
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
# Change Log
All notable changes to this project will be documented in this file.

## Version 0.3.0

- Release date: March 26, 2020

### Fixed

- 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)]
- Fix issue of "Fail to debug on Ubuntu". [[#933](https://github.com/microsoft/vscode-arduino/issues/933)]
- Remove line ending selection. Fix the issue of "Save the last used end of line". [[#952](https://github.com/microsoft/vscode-arduino/issues/952)]
- Fix the issue of "Can't install libraries from VS Code for ESP8266". [[#930](https://github.com/microsoft/vscode-arduino/issues/930)]
- Fix the issue of "Project path can not be changed". [[#978](https://github.com/microsoft/vscode-arduino/issues/978)]

Special thanks to [raomin](https://github.com/raomin), thanks for your contributions and feedbacks.

## Version 0.2.29

- Release date: January 2, 2020
Expand Down
337 changes: 171 additions & 166 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-arduino",
"displayName": "Arduino",
"description": "Arduino for Visual Studio Code",
"version": "0.3.0-rc3",
"version": "0.3.0",
"publisher": "vsciot-vscode",
"aiKey": "83dd2c27-6594-41d3-85a9-bdb22070eb42",
"preview": true,
Expand Down Expand Up @@ -537,7 +537,7 @@
},
"scripts": {
"vscode:prepublish": "gulp build --mode=production",
"postinstall": "node ./node_modules/vscode/bin/install && cd ./src/views && npm install",
"postinstall": "node ./node_modules/vscode/bin/install && cd ./src/views && npm install && node ../../node_modules/node-usb-native/scripts/rebuild-serialport.js",
"test": "gulp test"
},
"extensionDependencies": [
Expand Down Expand Up @@ -580,8 +580,8 @@
"glob": "^7.1.1",
"iconv-lite": "^0.4.18",
"impor": "^0.1.1",
"node-usb-native": "^0.0.13",
"properties": "^1.2.1",
"usb-native": "^5.0.12",
"uuid": "^3.0.1",
"vscode-extension-telemetry": "0.0.18",
"winreg": "^1.2.3",
Expand Down
2 changes: 1 addition & 1 deletion src/debug/debuggerManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class DebuggerManager {
}
}
}
this._usbDetector = require("usb-native").detector;
this._usbDetector = require("node-usb-native").detector;
this._debugServerPath = platform.findFile(platform.getExecutableFileName("openocd"),
path.join(this._arduinoSettings.packagePath, "packages"));
if (!util.fileExistsSync(this._debugServerPath)) {
Expand Down
17 changes: 8 additions & 9 deletions src/serialmonitor/serialportctrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,25 @@ interface ISerialPortDetail {
export class SerialPortCtrl {
public static get serialport(): any {
if (!SerialPortCtrl._serialport) {
SerialPortCtrl._serialport = require("usb-native").SerialPort;
SerialPortCtrl._serialport = require("node-usb-native").SerialPort;
}
return SerialPortCtrl._serialport;
}

public static list(): Promise<ISerialPortDetail[]> {
return new Promise((resolve, reject) => {
SerialPortCtrl.serialport.list().then(
(ports) => resolve(ports),
(err) => reject(err),
);
});
public static async list(): Promise<ISerialPortDetail[]> {
try {
const lists = SerialPortCtrl.serialport.list();
return lists;
} catch (err) {
throw err;
}
}

private static _serialport: any;

private _currentPort: string;
private _currentBaudRate: number;
private _currentSerialPort = null;
// private const ending = ;

public constructor(port: string, baudRate: number, private _outputChannel: OutputChannel) {
this._currentBaudRate = baudRate;
Expand Down
2 changes: 1 addition & 1 deletion src/serialmonitor/usbDetector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class UsbDetector {
if (os.platform() === "linux" || !enableUSBDetection) {
return;
}
this._usbDetector = require("usb-native").detector;
this._usbDetector = require("node-usb-native").detector;

if (!this._usbDetector) {
return;
Expand Down
2 changes: 1 addition & 1 deletion test/extension.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ suite("Arduino: Extension Tests", () => {
// When running test on osx, the vscode instance is hanging there after tests finished and cause mocha timeout.
// As a workaround, closing usb-detection process manually would make test window exit normally.
if (os.platform() !== "linux") {
const usbDector = require("usb-native").detector;
const usbDector = require("node-usb-native").detector;
usbDector.stopMonitoring();
}
});
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function getEntry() {
const mod = JSON.parse(npmListRes);
const unbundledModule = ['impor', 'uuid',
// usb-native modules can not be bundled
'usb-native', 'usb-detection', '@serialport/bindings', 'bindings', 'serialport'];
'node-usb-native', 'usb-detection', '@serialport/bindings', 'bindings', 'serialport'];

for (const mod of unbundledModule) {
const p = 'node_modules/' + mod;
Expand Down