Skip to content

Commit

Permalink
fix constructor args for newer node versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschlinkert committed Oct 17, 2024
1 parent 3aa38b6 commit d49d6e3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,4 @@ temp/
vendor/
.DS_Store
*.sublime-*
*lock.*
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ const {

const create = clonableStream => {
class Dirent extends fs.Dirent {
constructor(dirent = {}, type) {
super(null, type);
constructor(dirent = {}, type = '') {
super(null, type, '');

if (typeof dirent === 'string') {
dirent = { path: dirent };
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dirent",
"version": "2.0.1",
"version": "2.0.2",
"description": "Virtual file class. Extends the native fs.Dirent class with methods to simplify path handling. Similar to Vinyl, but lightweight.",
"license": "MIT",
"repository": "folder/dirent",
Expand Down Expand Up @@ -66,4 +66,4 @@
"reflinks": true
}
}
}
}

0 comments on commit d49d6e3

Please sign in to comment.