Skip to content

Commit 1617a35

Browse files
authored
Merge branch 'master' into programmers_improvement
2 parents fe5826c + c9f5d10 commit 1617a35

File tree

84 files changed

+5546
-10898
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+5546
-10898
lines changed

.github/stale.yml

-23
This file was deleted.

.github/workflows/stale-issues.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Mark stale issues and close them
2+
3+
on:
4+
schedule:
5+
- cron: "0 * * * *"
6+
7+
jobs:
8+
stale:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: blackchoey/stale@releases/v1.2
14+
with:
15+
repo-token: ${{ secrets.GITHUB_TOKEN }}
16+
stale-issue-message: 'This issue has been automatically marked as stale because it has no recent activities. It will be closed if no further activity occurs within 3 days. Thank you for your contributions.'
17+
stale-issue-label: 'stale'
18+
days-before-stale: 7
19+
only-labels: 'need more info'
20+
last-updated-user-type: 'collaborator'
21+
days-before-close: 3
22+
operations-per-run: 150

.travis.yml

+9-3
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:
@@ -35,6 +36,10 @@ before_install:
3536
wget https://downloads.arduino.cc/arduino-1.8.2-linux64.tar.xz -P /home/$USER;
3637
tar -xvf /home/$USER/arduino-1.8.2-linux64.tar.xz -C /home/$USER/;
3738
sudo ln -s /home/$USER/arduino-1.8.2/arduino /usr/bin/arduino;
39+
sudo apt-get update;
40+
sudo apt-get install g++-multilib;
41+
sudo apt-get install -y build-essential;
42+
sudo apt-get install libudev-dev;
3843
fi
3944
# Arduino 1.8.7 has breaking change, Install board package and library will fail
4045
# https://github.com/arduino/Arduino/issues/8034
@@ -43,11 +48,12 @@ before_install:
4348
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)";
4449
brew cask install arduino;
4550
fi
46-
47-
install:
51+
- npm install -g node-gyp
4852
- npm install -g vsce
49-
- npm install -g typescript
5053
- npm install -g gulp
54+
- npm install -g typescript
55+
56+
install:
5157
- npm install
5258
# https://github.com/travis-ci/travis-ci/issues/8813
5359
- rm -f ./node_modules/.bin/which

.vscode/tasks.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,26 @@
77
// ${cwd}: the current working directory of the spawned process
88
// A task runner that calls a custom npm script that compiles the extension.
99
{
10-
"version": "0.1.0",
10+
"version": "2.0.0",
1111
"command": "gulp",
12-
"isShellCommand": true,
1312
"args": [
1413
"--no-color"
1514
],
1615
"tasks": [
1716
{
18-
"taskName": "build",
17+
"label": "build",
1918
"args": [],
20-
"isBuildCommand": true,
19+
"type": "shell",
20+
"group": "build",
2121
"isBackground": false,
2222
"problemMatcher": [
2323
"$tsc"
2424
]
2525
},
2626
{
27-
"taskName": "build_without_view",
27+
"label": "build_without_view",
2828
"args": [],
29-
"isBuildCommand": true,
29+
"group": "build",
3030
"isBackground": false,
3131
"problemMatcher": [
3232
"$tsc"

CHANGELOG.md

+38
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,44 @@
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+
18+
## Version 0.2.29
19+
20+
- Release date: January 2, 2020
21+
22+
### Changed
23+
- Dependency upgrade
24+
25+
## Version 0.2.28
26+
27+
- Release data: November 15, 2019
28+
29+
### Fixed
30+
31+
- Optimize activation time of Arduino Extension.
32+
- Bump mixin-deep from 1.3.1 to 1.3.2.
33+
- Remove Processing Filetype (.PDE extension).
34+
- Fix the issue of "Unable to select serial port" [[#918]](https://github.com/microsoft/vscode-arduino/issues/918)
35+
- Fix Travis CI build failure [[#900]](https://github.com/microsoft/vscode-arduino/issues/900)
36+
- Fix issue of "Exit with code=undefined" [[#869]](https://github.com/microsoft/vscode-arduino/issues/869)
37+
- Fix issue of "spawn: Use explicit chcp.com" [[#910]](https://github.com/microsoft/vscode-arduino/pull/910)
38+
- Fix wording & typos.
39+
40+
Special thanks to [Peter Wone](https://github.com/PeterWone), [Dre West](https://github.com/Dotrar),[Lucas Schneider](https://github.com/schneider8357) for your contributions and feedbacks.
41+
442
## Version 0.2.27
543

644
- Release date: July 8, 2019

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Welcome to the Visual Studio Code extension for **Arduino** <sup>preview</sup> !
1818
## Prerequisites
1919
The Arduino IDE is required. Please install it from the [download page](https://www.arduino.cc/en/main/software#download).
2020
- *Note:* Arduino IDE `1.8.7` has some breaking changes, causing board package and library installation failures. It is recommended to that you install version `1.8.6` or `1.8.8`
21-
- The supported Arduino IDE versions are `1.6.x` and later are supported.
21+
- The supported Arduino IDE versions are `1.6.x` and later.
2222
- The Windows Store's version of the Arduino IDE is not supported because of the sandbox environment that the application runs in.
2323

2424
## Installation

gulpfile.js

+21-29
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
11
const gulp = require("gulp");
22
const eslint = require('gulp-eslint');
33
const tslint = require("gulp-tslint");
4-
const gutil = require("gulp-util");
4+
const PluginError = require('plugin-error');
5+
const log = require('fancy-log');
56
const ts = require("gulp-typescript");
67
const sourcemaps = require("gulp-sourcemaps");
78
const webpack = require("webpack");
8-
const runSequence = require('run-sequence');
99
const del = require('del');
10-
1110
const fs = require("fs");
12-
const fsp = require('fs-plus');
1311
const path = require("path");
1412
const childProcess = require("child_process");
13+
const argv = require('minimist')(process.argv.slice(2));
1514

16-
//...
1715
gulp.task("tslint", () => {
18-
return gulp.src(["**/*.ts", "**/*.tsx", "!**/*.d.ts", "!node_modules/**", "!./src/views/node_modules/**"])
16+
return gulp.src(["**/*.ts", "**/*.tsx", "!**/*.d.ts", "!./vendor/**", "!node_modules/**", "!./src/views/node_modules/**", "!out/**"])
1917
.pipe(tslint())
2018
.pipe(tslint.report());
2119
});
2220

2321
gulp.task("eslint", () => {
24-
return gulp.src(["./vendor/**/*.js", "!**/node_modules/**"])
22+
return gulp.src(["!**/node_modules/**"])
2523
.pipe(eslint())
2624
.pipe(eslint.format())
2725
.pipe(eslint.failAfterError());
@@ -30,33 +28,35 @@ gulp.task("eslint", () => {
3028
gulp.task("html-webpack", (done) => {
3129
const config = require("./src/views/webpack.config.js");
3230
config.context = `${__dirname}/src/views`;
31+
config.mode = argv.mode ? argv.mode : 'production';
3332
return webpack(config, (err, stats) => {
3433
const statsJson = stats.toJson();
3534
if (err || (statsJson.errors && statsJson.errors.length)) {
3635
statsJson.errors.forEach(webpackError => {
37-
gutil.log(gutil.colors.red(`Error (webpack): ${webpackError}`));
36+
log.error(`Error (webpack): ${webpackError}`);
3837
});
3938

40-
throw new gutil.PluginError('webpack', JSON.stringify(err || statsJson.errors));
39+
throw new PluginError('webpack', JSON.stringify(err || statsJson.errors));
4140
}
42-
gutil.log('[webpack]', stats.toString());
41+
log('[webpack]', stats.toString());
4342
done();
4443
});
4544
});
4645

4746
gulp.task("node_modules-webpack", (done) => {
4847
const config = require("./webpack.config.js");
4948
config.context = `${__dirname}`;
49+
config.mode = argv.mode ? argv.mode : 'production';
5050
return webpack(config, (err, stats) => {
5151
const statsJson = stats.toJson();
5252
if (err || (statsJson.errors && statsJson.errors.length)) {
5353
statsJson.errors.forEach(webpackError => {
54-
gutil.log(gutil.colors.red(`Error (webpack): ${webpackError}`));
54+
log.error(`Error (webpack): ${webpackError}`);
5555
});
5656

57-
throw new gutil.PluginError('webpack', JSON.stringify(err || statsJson.errors));
57+
throw new PluginError('webpack', JSON.stringify(err || statsJson.errors));
5858
}
59-
gutil.log('[webpack]', stats.toString());
59+
log('[webpack]', stats.toString());
6060
done();
6161
});
6262
});
@@ -92,15 +92,11 @@ gulp.task("genAikey", (done) => {
9292
fs.writeFileSync("package.json", JSON.stringify(packageJson, null, 2) + "\n");
9393
done();
9494
} else {
95-
gutil.log("Skipping genAiKey");
95+
log("Skipping genAiKey");
96+
done();
9697
}
9798
});
9899

99-
gulp.task("copyVendor", (done) => {
100-
fsp.copySync('vendor', 'out/vendor');
101-
done();
102-
});
103-
104100
gulp.task("test", (done) => {
105101
function removeExtensionDependencies() {
106102
const packageJson = JSON.parse(fs.readFileSync("package.json"));
@@ -124,35 +120,31 @@ gulp.task("test", (done) => {
124120
});
125121

126122
child.stdout.on("data", (data) => {
127-
gutil.log(data.toString().trim());
123+
log(data.toString().trim());
128124
});
129125

130126
child.stderr.on("data", (data) => {
131-
gutil.log(gutil.colors.red(data.toString().trim()));
127+
log.error(data.toString().trim());
132128
});
133129

134130
child.on("error", (error) => {
135-
gutil.log(gutil.colors.red(error));
131+
log.error(error);
136132
});
137133

138134
child.on("exit", (code) => {
139135
restoreExtensionDependencies();
140136
if (code === 0) {
141137
done();
142138
} else {
143-
gutil.log("exit code: " + code);
139+
log.error("exit code: " + code);
144140
done(code);
145141
}
146142
});
147143
});
148144

149-
gulp.task("build", (done) => {
150-
return runSequence("clean", "ts-compile", "html-webpack", "node_modules-webpack", "copyVendor", done);
151-
});
145+
gulp.task("build", gulp.series("clean", "ts-compile", "html-webpack", "node_modules-webpack"));
152146

153-
gulp.task("build_without_view", (done) => {
154-
return runSequence("clean", "ts-compile", done);
155-
});
147+
gulp.task("build_without_view", gulp.series("clean", "ts-compile"));
156148

157149
gulp.task("watch", () => {
158150
gulp.watch(["./src/**/*", "./test/**/*", "!./src/views/**/*"], ["ts-compile"]);

0 commit comments

Comments
 (0)