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

move usb-native to node-usb-native #1001

Merged
merged 1 commit into from
Mar 23, 2020
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
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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# Change Log
All notable changes to this project will be documented in this file.

## Version 0.3.0

### 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)]

## Version 0.2.29

- Release date: January 2, 2020
Expand Down
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,8 @@
"glob": "^7.1.1",
"iconv-lite": "^0.4.18",
"impor": "^0.1.1",
"node-usb-native": "^0.0.2",
"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
2 changes: 1 addition & 1 deletion src/serialmonitor/serialportctrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ 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;
}
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