Skip to content

Commit

Permalink
Merge pull request #7 from gnosisguild/fix-deprecated-api
Browse files Browse the repository at this point in the history
fix: no longer use rmdirSync API, which is deprecated on latest node v21
  • Loading branch information
jfschwarz authored Aug 29, 2024
2 parents 0cf16d6 + 9be0980 commit 4fd895f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/perfect-dryers-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@gnosis-guild/eth-sdk": patch
---

fix: no longer use rmdirSync API, which is deprecated on latest node v21
2 changes: 1 addition & 1 deletion packages/eth-sdk/src/peripherals/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ export const realFs: Fs = {
readDir: (path) => fsExtra.readdir(path),
glob: promisify(glob),
rmDir: (path) => {
fs.rmdirSync(path, { recursive: true })
fs.rmSync(path, { recursive: true })
},
}
3 changes: 0 additions & 3 deletions packages/eth-sdk/test/filesystemMock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ export function mockFilesystem(files: Record<FilePath, FileContents | DirectoryM
return Object.keys(files).filter(minimatch.filter(pattern, options))
},
rmDir(path) {
if (files[normalize(path)] !== DirectoryMarker) {
throw new Error('Not a directory')
}
delete files[normalize(path)]
},
}
Expand Down

0 comments on commit 4fd895f

Please sign in to comment.