Skip to content
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

perf: remove mkdirp dependency #1549

Merged
merged 1 commit into from
Aug 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"dependencies": {
"fast-glob": "^3.3.2",
"minimatch": "^9.0.4",
"mkdirp": "^3.0.1",
"path-browserify": "^1.0.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/common/scripts/buildDeno.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ commonFile.getFunctionOrThrow("isNodeJs").remove();
commonFile.getImportDeclarationOrThrow("path").remove();
commonFile.getImportDeclarationOrThrow("minimatch").remove();
commonFile.getImportDeclarationOrThrow("fast-glob").remove();
commonFile.getImportDeclarationOrThrow("mkdirp").remove();
commonFile.getImportDeclarationOrThrow("os").remove();
commonFile.getImportDeclarationOrThrow("fs").remove();
commonFile.getImportDeclarationOrThrow("fs/promises").remove();
commonFile.getVariableDeclarationOrThrow("path$1").remove();

const runtimeFileDestinationPath = `${folderPath}/DenoRuntime.ts`;
Expand Down
332 changes: 166 additions & 166 deletions packages/common/src/data/libFiles.ts

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions packages/common/src/runtimes/NodeRuntime.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fastGlob from "fast-glob";
import * as fs from "fs";
import * as fsp from "fs/promises";
import * as minimatch from "minimatch";
import * as mkdirp from "mkdirp";
import * as os from "os";
import * as path from "path";
import { Runtime, RuntimeFileInfo, RuntimeFileSystem, RuntimePath } from "./Runtime";
Expand Down Expand Up @@ -97,11 +97,11 @@ class NodeRuntimeFileSystem implements RuntimeFileSystem {
}

async mkdir(dirPath: string) {
await mkdirp.mkdirp(dirPath);
await fsp.mkdir(dirPath, { recursive: true });
}

mkdirSync(dirPath: string) {
mkdirp.sync(dirPath);
fs.mkdirSync(dirPath, { recursive: true });
}

move(srcPath: string, destPath: string) {
Expand Down