Skip to content

Commit c194f4d

Browse files
committed
Use explicit node internal modules import
1 parent 676db3e commit c194f4d

4 files changed

Lines changed: 13 additions & 13 deletions

File tree

src/scripts/builders/contribute.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { readdir, rm } from "fs/promises";
2-
import path from "path";
1+
import { readdir, rm } from "node:fs/promises";
2+
import path from "node:path";
33
import {
44
cloneLibraryRepo,
55
copyDirectory,
@@ -10,7 +10,7 @@ import {
1010
rewriteRelativeMdLinks,
1111
writeFile,
1212
} from "../utils";
13-
import type { Dirent } from "fs";
13+
import type { Dirent } from "node:fs";
1414
import { remark } from "remark";
1515
import remarkMDX from "remark-mdx";
1616
import remarkGfm from "remark-gfm";

src/scripts/builders/search.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { promises as fs } from "fs";
2-
import path from "path";
1+
import { promises as fs } from "node:fs";
2+
import path from "node:path";
33
import matter from "gray-matter";
44
import type {
55
ContentType,

src/scripts/parsers/reference.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { cloneLibraryRepo,cleanUpDirectory, p5RepoUrl, readFile } from "../utils";
2-
import fs from "fs/promises";
3-
import { exec, execSync } from "child_process";
4-
import path from "path";
5-
import { fileURLToPath } from "url";
2+
import fs from "node:fs/promises";
3+
import { exec, execSync } from "node:child_process";
4+
import path from "node:path";
5+
import { fileURLToPath } from "node:url";
66
import type { ParsedLibraryReference } from "../../../types/parsers.interface";
77
import { p5Version } from "@/src/globals/p5-version";
88

src/scripts/utils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import simpleGit from "simple-git";
2-
import fs, { cp, readdir } from "fs/promises";
3-
import path from "path";
4-
import type { CopyOptions, Dirent } from "fs";
5-
import { fileURLToPath } from "url";
2+
import fs, { cp, readdir } from "node:fs/promises";
3+
import path from "node:path";
4+
import type { CopyOptions, Dirent } from "node:fs";
5+
import { fileURLToPath } from "node:url";
66
import { rewriteRelativeLink } from "../pages/_utils-node";
77
import { p5Version } from "../globals/p5-version";
88

0 commit comments

Comments
 (0)