-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove the mkdirp
dependency in favor of the built-in Node.js fs.mkdirSync
#17935
Conversation
…kdirSync` In Node.js 10.12.0 the `recursive` option was added to `fs.mkdirSync`. This option allows us to create a directory and all its parent directories if they do not exist, making it a drop-in replacement for the `mkdirp` dependency we use. Given that PDF.js now requires Node.js 18+ we can be sure that this option is available, so we can safely remove `mkdirp` and reduce the number of project dependencies. Co-authored-by: Wojciech Maj <kontakt@wojtekmaj.pl>
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://54.241.84.105:8877/c5504af50342874/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/c5504af50342874/output.txt Total script time: 1.25 mins Published |
/botio integrationtest |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @timvandermeij received. Current queue size: 0 Live output at: http://54.193.163.58:8877/f423fd1265d6552/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @timvandermeij received. Current queue size: 0 Live output at: http://54.241.84.105:8877/1d596a03a562443/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/1d596a03a562443/output.txt Total script time: 7.38 mins
|
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/f423fd1265d6552/output.txt Total script time: 20.18 mins
|
@wojtekmaj I have added you as a co-author of the commit, but GitHub can only partially verify the commit because we both enabled commit signing and it doesn't seem possible to double-sign a commit. Is that OK with you, or do you prefer that I remove the co-author property and credit you as a co-author in text in the commit message instead, to avoid having a commit that was authored but not signed by you? |
@timvandermeij No problem for me! It'd only be a problem if the repository enforced some kind of signed commits policy. To me, absolutely fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me, thank you.
In Node.js 10.12.0 the
recursive
option was added tofs.mkdirSync
. This option allows us to create a directory and all its parent directories if they do not exist, making it a drop-in replacement for themkdirp
dependency we use.Given that PDF.js now requires Node.js 18+ we can be sure that this option is available, so we can safely remove
mkdirp
and reduce the number of project dependencies.Thanks to @wojtekmaj, obviously credited as co-author of the commit, for providing the original implementation in #17696! For this patch I have extracted the
mkdirp
-only parts of that PR, with some minor changes, and tested all affected Gulp targets (usingdiff -r
on the old/new build directories to recursively diff the contents of all directories and files) to make sure the output before/after this patch is identical.