Skip to content

Commit 3fa22f1

Browse files
committedNov 16, 2017
fix bug and release 0.13.0
1 parent cda897e commit 3fa22f1

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed
 

‎CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## [0.13.0] - 2017-10-11
4+
- fix bug: findFiles bug in vscode 1.18.0
5+
- feature: add config for semicolon #7
6+
37
## [0.12.1] - 2017-10-11
48
- fix bug: bug about '$$' #5
59

‎README.md

+3
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ We will watch the change of package.json, and auto add and remove module.
147147
//max-line length like eslint rule max-line, the -1 will disable the rule,
148148
//if import statement exceed maxLen, the statement will be split into multiple lines.
149149
"js-import.maxLen": 100
150+
151+
//whether to add semicolon after import statement
152+
"js-import.semicolon": true
150153
```
151154

152155
# TODO

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-js-import",
33
"displayName": "vscode-js-import",
44
"description": "Intelligent and fast import extension for js in vscode, support import position option and adding import to existing import statement.",
5-
"version": "0.12.1",
5+
"version": "0.13.0",
66
"publisher": "wangtao0101",
77
"repository": {
88
"type": "git",

‎src/scanner.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default class Scanner {
3737

3838
public scanAllImport() {
3939
const filesToScan = vscode.workspace.getConfiguration('js-import').get<string>('filesToScan');
40-
vscode.workspace.findFiles(filesToScan, '{**node_modules**}', 99999)
40+
vscode.workspace.findFiles(filesToScan, '{**/node_modules/**}', 99999)
4141
.then((files) => this.processFiles(files));
4242
this.findModulesInPackageJson();
4343
this.processPlainFiles();
@@ -97,10 +97,7 @@ export default class Scanner {
9797
}
9898

9999
private processFiles(files: vscode.Uri[]) {
100-
let pruned = files.filter((f) => {
101-
return f.fsPath.indexOf('node_modules') === -1
102-
});
103-
pruned.forEach(file => {
100+
files.forEach(file => {
104101
this.processFile(file);
105102
});
106103
return;
Binary file not shown.

0 commit comments

Comments
 (0)
Please sign in to comment.