diff --git a/src/ast.js b/src/ast.js index ea47803..8d483be 100644 --- a/src/ast.js +++ b/src/ast.js @@ -1,5 +1,5 @@ -import path from "path"; -import os from "os"; +import path from "node:path"; +import os from "node:os"; import { DepGraph } from "dependency-graph"; import { WebC } from "../webc.js"; diff --git a/src/componentManager.js b/src/componentManager.js index 9cf9689..7efda5f 100644 --- a/src/componentManager.js +++ b/src/componentManager.js @@ -1,4 +1,4 @@ -import { createHash } from "crypto"; +import { createHash } from "node:crypto"; import { WebC } from "../webc.js"; import { AstQuery } from "./astQuery.js"; @@ -252,4 +252,4 @@ class ComponentManager { } } -export { ComponentManager }; \ No newline at end of file +export { ComponentManager }; diff --git a/src/fasterVmContext.cjs b/src/fasterVmContext.cjs index 0678a35..472158b 100644 --- a/src/fasterVmContext.cjs +++ b/src/fasterVmContext.cjs @@ -1,4 +1,4 @@ -const vm = require("vm"); +const vm = require("node:vm"); class ContextInstance { constructor() { @@ -74,4 +74,4 @@ class FasterVmContext { } } -module.exports = { FasterVmContext }; \ No newline at end of file +module.exports = { FasterVmContext }; diff --git a/src/fsCache.js b/src/fsCache.js index 05cd681..495166b 100644 --- a/src/fsCache.js +++ b/src/fsCache.js @@ -1,5 +1,5 @@ -import fs from "fs"; -import path from "path"; +import fs from "node:fs"; +import path from "node:path"; class FileSystemCache { constructor() { diff --git a/src/moduleResolution.js b/src/moduleResolution.js index 3fcfc0c..9bc35c3 100644 --- a/src/moduleResolution.js +++ b/src/moduleResolution.js @@ -1,5 +1,5 @@ import { TemplatePath } from "@11ty/eleventy-utils"; -import path from "path"; +import path from "node:path"; import { Path } from "./path.js"; class ModuleResolution { diff --git a/src/moduleScript.cjs b/src/moduleScript.cjs index 9fd8ac2..dc4382d 100644 --- a/src/moduleScript.cjs +++ b/src/moduleScript.cjs @@ -1,5 +1,5 @@ -const { Module } = require("module"); -const vm = require("vm"); +const { Module } = require("node:module"); +const vm = require("node:vm"); const { RetrieveGlobals } = require("node-retrieve-globals"); const { ProxyData } = require("./proxyData.cjs"); diff --git a/src/path.js b/src/path.js index 800c95c..c1b78c1 100644 --- a/src/path.js +++ b/src/path.js @@ -1,4 +1,4 @@ -import path from "path"; +import path from "node:path"; import { TemplatePath } from "@11ty/eleventy-utils"; class Path { @@ -11,4 +11,4 @@ class Path { } } -export { Path }; \ No newline at end of file +export { Path }; diff --git a/src/streams.js b/src/streams.js index 24f78a4..ad044fa 100644 --- a/src/streams.js +++ b/src/streams.js @@ -1,4 +1,4 @@ -import Stream from "stream"; +import Stream from "node:stream"; class Streams { constructor(buckets = []) { @@ -55,4 +55,4 @@ class Streams { } } -export { Streams }; \ No newline at end of file +export { Streams }; diff --git a/src/util.js b/src/util.js index f52d6bf..2d5c0b9 100644 --- a/src/util.js +++ b/src/util.js @@ -1,4 +1,4 @@ -import util from "util"; +import util from "node:util"; import { AstQuery } from "./astQuery.js"; class Util { @@ -38,4 +38,4 @@ class Util { } } -export { Util }; \ No newline at end of file +export { Util }; diff --git a/webc.js b/webc.js index 74d9062..118f47b 100644 --- a/webc.js +++ b/webc.js @@ -1,7 +1,7 @@ -import fs from "fs"; +import fs from "node:fs"; import fastglob from "fast-glob"; import isGlob from "is-glob"; -import path from "path"; +import path from "node:path"; import { Path } from "./src/path.js"; import { AstSerializer } from "./src/ast.js"; @@ -82,7 +82,7 @@ class WebC { if(mode === "component" || !content.startsWith("${content}`; } - + return { content, mode, @@ -288,4 +288,4 @@ class WebC { } } -export { WebC, ModuleScript, ComponentManager }; \ No newline at end of file +export { WebC, ModuleScript, ComponentManager };