mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-22 05:07:05 +00:00
Use node prefix for build-in modules (#3340)
It is basically a cosmetic thing, but has the following advantages: 1. Consistency with the official node documentation. The prefix is used there. 2. It is easier to recognize the build-in modules.
This commit is contained in:
committed by
GitHub
parent
407072d12d
commit
4bbd35fa6a
@@ -40,7 +40,7 @@
|
||||
// Return new pending promise
|
||||
return new Promise((resolve, reject) => {
|
||||
// Select http or https module, depending on requested url
|
||||
const lib = url.startsWith("https") ? require("https") : require("http");
|
||||
const lib = url.startsWith("https") ? require("node:https") : require("node:http");
|
||||
const request = lib.get(url, (response) => {
|
||||
let configData = "";
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
|
||||
// Spawn electron application
|
||||
const electron = require("electron");
|
||||
const child = require("child_process").spawn(electron, ["js/electron.js"], options);
|
||||
const child = require("node:child_process").spawn(electron, ["js/electron.js"], options);
|
||||
|
||||
// Pipe all child process output to current stdout
|
||||
child.stdout.on("data", function (buf) {
|
||||
|
Reference in New Issue
Block a user