Skip to content

Commit 714be66

Browse files
authored
fix(read): remove fs-extra usage and use fs/promises (#3803)
removes fs-extra usage and the dependency on fs-extra and uses the node.js fs/promises module
1 parent 92f2237 commit 714be66

File tree

4 files changed

+3
-5
lines changed

4 files changed

+3
-5
lines changed

@commitlint/read/package.json

-2
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,13 @@
3737
"devDependencies": {
3838
"@commitlint/test": "^18.0.0",
3939
"@commitlint/utils": "^18.4.3",
40-
"@types/fs-extra": "^11.0.3",
4140
"@types/git-raw-commits": "^2.0.3",
4241
"@types/minimist": "^1.2.4",
4342
"execa": "^5.0.0"
4443
},
4544
"dependencies": {
4645
"@commitlint/top-level": "^18.4.3",
4746
"@commitlint/types": "^18.4.3",
48-
"fs-extra": "^11.0.0",
4947
"git-raw-commits": "^2.0.11",
5048
"minimist": "^1.2.6"
5149
},

@commitlint/read/src/get-edit-commit.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import toplevel from '@commitlint/top-level';
2-
import fs from 'fs-extra';
2+
import fs from 'fs/promises';
33
import {getEditFilePath} from './get-edit-file-path';
44

55
// Get recently edited commit message

@commitlint/read/src/get-edit-file-path.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import path from 'path';
22
import {Stats} from 'fs';
3-
import fs from 'fs-extra';
3+
import fs from 'fs/promises';
44

55
// Get path to recently edited commit message file
66
export async function getEditFilePath(

@commitlint/read/src/read.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import path from 'path';
22
import {git} from '@commitlint/test';
33
import execa from 'execa';
4-
import fs from 'fs-extra';
4+
import fs from 'fs/promises';
55

66
import read from './read';
77

0 commit comments

Comments
 (0)