Skip to content

Commit

Permalink
feat(deps): upgrade temp-dir to new major which is now ESM (#863)
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed May 10, 2024
1 parent 413f75c commit 2a93250
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/version/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"graceful-fs": "^4.2.11",
"is-stream": "^4.0.1",
"load-json-file": "^7.0.1",
"make-dir": "^4.0.0",
"make-dir": "^5.0.0",
"minimatch": "^9.0.4",
"new-github-release-url": "^2.0.0",
"node-fetch": "^3.3.2",
Expand Down
6 changes: 3 additions & 3 deletions packages/version/src/utils/temp-write.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import fs from 'graceful-fs';
import { isStream } from 'is-stream';
import makeDir from 'make-dir';
import { makeDirectory, makeDirectorySync } from 'make-dir';
import tempDir from 'temp-dir';
import { dirname, join } from 'node:path';
import { Readable } from 'node:stream';
Expand Down Expand Up @@ -38,7 +38,7 @@ export async function tempWrite(fileContent: Readable | fs.PathOrFileDescriptor,
const tempPath = tempfile(filePath);
const write = isStream(fileContent) ? writeStream : writeFileP;

await makeDir(dirname(tempPath));
await makeDirectory(dirname(tempPath));
await write(tempPath, fileContent as DataView & Readable);

return tempPath;
Expand All @@ -47,7 +47,7 @@ export async function tempWrite(fileContent: Readable | fs.PathOrFileDescriptor,
tempWrite.sync = (fileContent: (DataView & Readable) | string, filePath?: string) => {
const tempPath = tempfile(filePath);

makeDir.sync(dirname(tempPath));
makeDirectorySync(dirname(tempPath));
fs.writeFileSync(tempPath, fileContent);

return tempPath;
Expand Down
10 changes: 8 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2a93250

Please sign in to comment.