Skip to content

Commit

Permalink
fix(read): remove fs-extra usage and use fs/promises (#3803)
Browse files Browse the repository at this point in the history
removes fs-extra usage and the dependency on fs-extra and uses the node.js fs/promises module
  • Loading branch information
Phillip9587 authored Dec 1, 2023
1 parent 92f2237 commit 714be66
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions @commitlint/read/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,13 @@
"devDependencies": {
"@commitlint/test": "^18.0.0",
"@commitlint/utils": "^18.4.3",
"@types/fs-extra": "^11.0.3",
"@types/git-raw-commits": "^2.0.3",
"@types/minimist": "^1.2.4",
"execa": "^5.0.0"
},
"dependencies": {
"@commitlint/top-level": "^18.4.3",
"@commitlint/types": "^18.4.3",
"fs-extra": "^11.0.0",
"git-raw-commits": "^2.0.11",
"minimist": "^1.2.6"
},
Expand Down
2 changes: 1 addition & 1 deletion @commitlint/read/src/get-edit-commit.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import toplevel from '@commitlint/top-level';
import fs from 'fs-extra';
import fs from 'fs/promises';
import {getEditFilePath} from './get-edit-file-path';

// Get recently edited commit message
Expand Down
2 changes: 1 addition & 1 deletion @commitlint/read/src/get-edit-file-path.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from 'path';
import {Stats} from 'fs';
import fs from 'fs-extra';
import fs from 'fs/promises';

// Get path to recently edited commit message file
export async function getEditFilePath(
Expand Down
2 changes: 1 addition & 1 deletion @commitlint/read/src/read.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import path from 'path';
import {git} from '@commitlint/test';
import execa from 'execa';
import fs from 'fs-extra';
import fs from 'fs/promises';

import read from './read';

Expand Down

0 comments on commit 714be66

Please sign in to comment.