Skip to content

Commit

Permalink
backend-common: clarify responsiblity of readTree directory deletion
Browse files Browse the repository at this point in the history
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
  • Loading branch information
Rugvip committed Dec 22, 2021
1 parent d4d5416 commit 2f6d8ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/hip-doors-joke.md
@@ -0,0 +1,5 @@
---
'@backstage/backend-common': patch
---

Updated the `ReadTreeResponse` documentation to clarify that the caller of `dir()` is responsible for removing the directory after use.
2 changes: 2 additions & 0 deletions packages/backend-common/src/reading/types.ts
Expand Up @@ -222,6 +222,8 @@ export type ReadTreeResponse = {
/**
* Extracts the tree response into a directory and returns the path of the
* directory.
*
* **NOTE**: It is the responsibility of the caller to remove the directory after use.
*/
dir(options?: ReadTreeResponseDirOptions): Promise<string>;

Expand Down

0 comments on commit 2f6d8ec

Please sign in to comment.