deno fmt
This commit is contained in:
@@ -82,7 +82,7 @@ export async function bundle(
|
||||
}
|
||||
// Resolve path
|
||||
filePath = path.join(rootPath, filePath);
|
||||
|
||||
|
||||
def.code = await compile(
|
||||
filePath,
|
||||
jsFunctionName,
|
||||
|
||||
+4
-2
@@ -51,8 +51,10 @@ export async function compile(
|
||||
inFile,
|
||||
`import {${functionName}} from "file://${
|
||||
// Replacaing \ with / for Windows
|
||||
path.resolve(filePath).replaceAll("\\", "\\\\")
|
||||
}";export default ${functionName};`,
|
||||
path.resolve(filePath).replaceAll(
|
||||
"\\",
|
||||
"\\\\",
|
||||
)}";export default ${functionName};`,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -135,7 +135,6 @@ import { urlToPathname } from "./util.ts";
|
||||
const __dirname = urlToPathname(new URL(".", import.meta.url));
|
||||
|
||||
Deno.test("Preload dependencies", async () => {
|
||||
|
||||
const globalModules = await plugOsBundle(
|
||||
`${__dirname}../plugs/global.plug.yaml`,
|
||||
);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -7,7 +7,9 @@ import { urlToPathname } from "../util.ts";
|
||||
const fakeCtx = {} as any;
|
||||
|
||||
Deno.test("Test FS operations", async () => {
|
||||
const thisFolder = path.resolve(path.dirname(urlToPathname(new URL(import.meta.url))));
|
||||
const thisFolder = path.resolve(
|
||||
path.dirname(urlToPathname(new URL(import.meta.url))),
|
||||
);
|
||||
const syscalls = fileSystemSyscalls(thisFolder);
|
||||
const allFiles: FileMeta[] = await syscalls["fs.listFiles"](
|
||||
fakeCtx,
|
||||
|
||||
+1
-1
@@ -9,4 +9,4 @@ export function safeRun(fn: () => Promise<void>) {
|
||||
export function urlToPathname(url: URL) {
|
||||
// For Windows, remove prefix /
|
||||
return url.pathname.replace(/^\/(\w:)/, "$1");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user