mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-23 11:55:41 +03:00
Use node prefix for node core imports.
This commit is contained in:
parent
70816b8877
commit
75ed9c50e7
@ -1,6 +1,6 @@
|
||||
import kleur from "kleur";
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
|
||||
kleur.enabled = true;
|
||||
|
||||
|
@ -5,8 +5,8 @@ import * as build from "./build.js";
|
||||
import * as dev from "./dev-server.js";
|
||||
import * as init from "./init.js";
|
||||
import * as codegen from "./codegen.js";
|
||||
import * as fs from "fs";
|
||||
import * as path from "path";
|
||||
import * as fs from "node:fs";
|
||||
import * as path from "node:path";
|
||||
import { restoreColorSafe } from "./error-formatter.js";
|
||||
import * as renderer from "./render.js";
|
||||
import { globbySync } from "globby";
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as fs from "fs";
|
||||
import * as fs from "node:fs";
|
||||
import * as fsExtra from "fs-extra/esm";
|
||||
import { rewriteElmJson } from "./rewrite-elm-json.js";
|
||||
import { rewriteClientElmJson } from "./rewrite-client-elm-json.js";
|
||||
|
@ -1,5 +1,5 @@
|
||||
const util = require("util");
|
||||
const fsSync = require("fs");
|
||||
const util = require("node:util");
|
||||
const fsSync = require("node:fs");
|
||||
const fs = {
|
||||
writeFile: util.promisify(fsSync.writeFile),
|
||||
mkdir: util.promisify(fsSync.mkdir),
|
||||
|
@ -1,6 +1,6 @@
|
||||
import * as util from "util";
|
||||
import * as fsSync from "fs";
|
||||
import * as path from "path";
|
||||
import * as util from "node:util";
|
||||
import * as fsSync from "node:fs";
|
||||
import * as path from "node:path";
|
||||
|
||||
const fs = {
|
||||
writeFile: util.promisify(fsSync.writeFile),
|
||||
@ -75,4 +75,3 @@ export async function copyDirNested(src, dest) {
|
||||
fs.copyFile(src, dest);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as fs from "fs";
|
||||
import * as fs from "node:fs";
|
||||
|
||||
export function ensureDirSync(dirpath) {
|
||||
try {
|
||||
|
@ -1,9 +1,9 @@
|
||||
import * as renderer from "../../generator/src/render.js";
|
||||
import * as path from "path";
|
||||
import * as path from "node:path";
|
||||
import * as fs from "./dir-helpers.js";
|
||||
import { readFileSync, writeFileSync } from "fs";
|
||||
import { readFileSync, writeFileSync } from "node:fs";
|
||||
import { stat } from "fs/promises";
|
||||
import { parentPort, threadId, workerData } from "worker_threads";
|
||||
import { parentPort, threadId, workerData } from "node:worker_threads";
|
||||
import * as url from "url";
|
||||
|
||||
async function run({ mode, pathname, serverRequest, portsFilePath }) {
|
||||
|
@ -1,16 +1,16 @@
|
||||
// @ts-check
|
||||
|
||||
import * as path from "path";
|
||||
import * as path from "node:path";
|
||||
import { default as mm } from "micromatch";
|
||||
import { default as matter } from "gray-matter";
|
||||
import * as fsPromises from "fs/promises";
|
||||
import * as globby from "globby";
|
||||
import * as fsPromises from "node:fs/promises";
|
||||
import * as preRenderHtml from "./pre-render-html.js";
|
||||
import { lookupOrPerform } from "./request-cache.js";
|
||||
import * as kleur from "kleur/colors";
|
||||
import * as cookie from "cookie-signature";
|
||||
import { compatibilityKey } from "./compatibility-key.js";
|
||||
import * as fs from "fs";
|
||||
import * as fs from "node:fs";
|
||||
import * as crypto from "node:crypto";
|
||||
|
||||
process.on("unhandledRejection", (error) => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as fs from "fs";
|
||||
import * as fs from "node:fs";
|
||||
|
||||
export async function rewriteClientElmJson() {
|
||||
var elmJson = JSON.parse(
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as fs from "fs";
|
||||
import * as fs from "node:fs";
|
||||
|
||||
export async function rewriteElmJson(sourceElmJsonPath, targetElmJsonPath) {
|
||||
var elmJson = JSON.parse(
|
||||
|
Loading…
Reference in New Issue
Block a user