Skip to content

Commit

Permalink
Replace tmp package with Node.js internal in test helper
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Apr 10, 2022
1 parent 900c1a2 commit 717fab3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/util/helpers.js
@@ -1,14 +1,14 @@
import { promises as fs } from 'fs';
import fs from 'fs';
import os from 'os';
import path from 'path';
import sh from 'shelljs';
import tmp from 'tmp';

const mkTmpDir = () => {
const dir = tmp.dirSync({ prefix: 'release-it-' });
return dir.name;
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'release-it-'));
return dir;
};

const readFile = file => fs.readFile(path.resolve(file), 'utf8');
const readFile = file => fs.promises.readFile(path.resolve(file), 'utf8');

const gitAdd = (content, file, message) => {
sh.ShellString(content).toEnd(file);
Expand Down

0 comments on commit 717fab3

Please sign in to comment.