-
Notifications
You must be signed in to change notification settings - Fork 343
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
chore(deps): drop fs-extras and mkdirp dependencies #3230
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,9 @@ | |
* in a Chromium-based browser instance. | ||
*/ | ||
|
||
import fs from 'fs/promises'; | ||
import path from 'path'; | ||
|
||
import fs from 'fs-extra'; | ||
import { mkdirp as asyncMkdirp } from 'mkdirp'; | ||
import { | ||
Launcher as ChromeLauncher, | ||
launch as defaultChromiumLaunch, | ||
|
@@ -179,12 +178,13 @@ export class ChromiumExtensionRunner { | |
|
||
if (userDataDir && profileDirName) { | ||
// copy profile dir to this temp user data dir. | ||
await fs.copy( | ||
await fs.cp( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added to Node 16.7 exactly 3 years ago |
||
path.join(userDataDir, profileDirName), | ||
path.join(tmpDirPath, profileDirName), | ||
{ recursive: true }, | ||
); | ||
} else if (userDataDir) { | ||
await fs.copy(userDataDir, tmpDirPath); | ||
await fs.cp(userDataDir, tmpDirPath, { recursive: true }); | ||
} | ||
userDataDir = tmpDirPath; | ||
} | ||
|
@@ -273,7 +273,7 @@ export class ChromiumExtensionRunner { | |
|
||
log.debug(`Creating reload-manager-extension in ${extPath}`); | ||
|
||
await asyncMkdirp(extPath); | ||
await fs.mkdir(extPath, { recursive: true }); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added to Node 10 (as promised) |
||
|
||
await fs.writeFile( | ||
path.join(extPath, 'manifest.json'), | ||
|
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.
It's still used in tests, I didn't want to rewrite all of them. It's fine as a dev dependency
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.
that's fair, it seems to be used only in the test.chromium.js unit test, but it is not a big deal if we keep it as a dev dependency in the meantime. Let's keep that test as is 👍