diff --git a/Source/Function/Configuration.ts b/Source/Function/Configuration.ts index 98af916..1ecfc85 100644 --- a/Source/Function/Configuration.ts +++ b/Source/Function/Configuration.ts @@ -6,7 +6,7 @@ export default (async (...[File]: Parameters) => { try { return ( await readFile( - resolve(`${(await import("process")).cwd()}/${File}`), + resolve(`${(await import("node:process")).cwd()}/${File}`), "utf-8", ) ).toString(); @@ -15,9 +15,11 @@ export default (async (...[File]: Parameters) => { await readFile( resolve( `${( - await import("path") + await import("node:path") ).dirname( - (await import("url")).fileURLToPath(import.meta.url), + ( + await import("node:url") + ).fileURLToPath(import.meta.url), )}/../../${File}`, ), "utf-8", @@ -28,6 +30,6 @@ export default (async (...[File]: Parameters) => { import type Interface from "../Interface/Configuration.js"; -export const { readFile } = await import("fs/promises"); +export const { readFile } = await import("node:fs/promises"); -export const { resolve } = await import("path"); +export const { resolve } = await import("node:path"); diff --git a/Source/Function/Integration.ts b/Source/Function/Integration.ts index 5bdb18b..ccef83c 100644 --- a/Source/Function/Integration.ts +++ b/Source/Function/Integration.ts @@ -48,7 +48,7 @@ export default ((...[_Option = {}]: Parameters) => { Wrote: async (On) => { try { return _Biome.formatContent(On.Buffer.toString(), { - filePath: (await import("path")).resolve( + filePath: (await import("node:path")).resolve( On.Input, ), }).content; diff --git a/Source/Variable/Option.ts b/Source/Variable/Option.ts index ebaca75..394cc6b 100644 --- a/Source/Variable/Option.ts +++ b/Source/Variable/Option.ts @@ -2,20 +2,22 @@ * @module Option * */ -export default ( - await import("@Function/Merge.js") -).default((await import("@playform/pipe/Target/Variable/Option.js")).default, { - Biome: (await import("@Variable/Biome.js")).default, - Action: { - Failed: async (On) => `Error: Cannot format file ${On.Input}!`, - Accomplished: async (On) => `Formatted ${On.Input} in ${On.Output}.`, - Fulfilled: async ({ File }) => - File > 0 - ? `Successfully formatted a total of ${File} JavaScript and TypeScript ${ - File === 1 ? "file" : "files" - }.` - : false, - }, -} satisfies Interface); +export default (await import("@Function/Merge.js")).default( + (await import("@playform/pipe/Target/Variable/Option.js")).default, + { + Biome: (await import("@Variable/Biome.js")).default, + Action: { + Failed: async (On) => `Error: Cannot format file ${On.Input}!`, + Accomplished: async (On) => + `Formatted ${On.Input} in ${On.Output}.`, + Fulfilled: async ({ File }) => + File > 0 + ? `Successfully formatted a total of ${File} JavaScript and TypeScript ${ + File === 1 ? "file" : "files" + }.` + : false, + }, + } satisfies Interface, +); import type Interface from "../Interface/Option.js"; diff --git a/biome.json b/biome.json index 32f4e00..ff2674f 100644 --- a/biome.json +++ b/biome.json @@ -5,7 +5,8 @@ "**/Target/**/*", "**/Documentation/**/*", "**/dist/**/*", - "**/*.astro" + "**/*.astro", + "package.json" ], "maxSize": 10000000 }, @@ -62,7 +63,8 @@ }, "correctness": { "all": true, - "noUnusedVariables": "off" + "noUnusedVariables": "off", + "noNodejsModules": "off" }, "nursery": { "all": true,