Skip to content

Commit 1c63ac2

Browse files
authored
0.32.1: stop creating temp files in workspace (#687)
Signed-off-by: Yan Zhang <yanzh@microsoft.com>
1 parent 48e0075 commit 1c63ac2

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Change Log
22
All notable changes to the "vscode-maven" extension will be documented in this file.
33

4+
## 0.32.1
5+
### Fixed
6+
- A text file was wrongly created in workspace when calculating depenencies.
7+
48
## 0.32.0
59
### Added
610
- [Preview] Improve dependency management experience. [#261](https://github.com/microsoft/vscode-maven/issues/261)

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-maven",
33
"displayName": "Maven for Java",
44
"description": "%description%",
5-
"version": "0.32.0",
5+
"version": "0.32.1",
66
"icon": "resources/logo.png",
77
"publisher": "vscjava",
88
"preview": true,

src/utils/mavenUtils.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ export async function rawEffectivePom(pomPath: string, options?: {cacheOnly?: bo
4040
}
4141

4242
export async function rawDependencyTree(pomPath: string): Promise<any> {
43-
const outputDirectory: string = path.dirname(pomPath);
44-
const outputFileName: string = "dependency-graph.txt";
43+
const outputPath: string = getTempFolder(pomPath);
44+
const dependencyGraphPath: string = `${outputPath}.deps.txt`;
45+
const outputDirectory: string = path.dirname(dependencyGraphPath);
46+
const outputFileName: string = path.basename(dependencyGraphPath);
4547
await executeInBackground(`com.github.ferstl:depgraph-maven-plugin:graph -DgraphFormat=text -DshowDuplicates -DshowConflicts -DshowVersions -DshowGroupIds -DoutputDirectory="${outputDirectory}" -DoutputFileName="${outputFileName}"`, pomPath);
4648
return await readFileIfExists(path.join(outputDirectory, outputFileName));
4749
}

0 commit comments

Comments
 (0)