From 530293678730e2aec6960dea722aef2278d853fb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 28 Mar 2026 18:17:18 +0000 Subject: [PATCH] Update from template: S5043-useNodePrefix --- detection/detect.js | 2 +- install/installTypings.js | 2 +- src-editor/updateBlockly.js | 4 ++-- src/lib/debugger.ts | 2 +- src/lib/inspect.ts | 2 +- src/lib/nodeModulesManagement.ts | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/detection/detect.js b/detection/detect.js index 03a89e0e6..767d3bb63 100644 --- a/detection/detect.js +++ b/detection/detect.js @@ -1,5 +1,5 @@ const AWS = require('aws-sdk'); -const fs = require('fs'); +const fs = require('node:fs'); const sharp = require('sharp'); sharp(__dirname + '/Codeimage.jpg') diff --git a/install/installTypings.js b/install/installTypings.js index 691e07dbd..2b34025ef 100644 --- a/install/installTypings.js +++ b/install/installTypings.js @@ -53,7 +53,7 @@ function npmCommand(command, npmArgs, options) { if (npmArgs == null) npmArgs = []; const npmBinary = /^win/.test(process.platform) ? 'npm.cmd' : 'npm'; - /** @type {import("child_process").SpawnOptions} */ + /** @type {import("node:child_process").SpawnOptions} */ const spawnOptions = { stdio: [options.stdin || process.stdin, options.stdout || process.stdout, options.stderr || process.stderr], // @ts-ignore This option exists starting with NodeJS 8 diff --git a/src-editor/updateBlockly.js b/src-editor/updateBlockly.js index c5fa23907..a19fd237e 100644 --- a/src-editor/updateBlockly.js +++ b/src-editor/updateBlockly.js @@ -1,7 +1,7 @@ // this script updates blockly -const cp = require('child_process'); -const fs = require('fs'); +const cp = require('node:child_process'); +const fs = require('node:fs'); function copyFile(fileName, newName) { if (fileName.endsWith('/')) { diff --git a/src/lib/debugger.ts b/src/lib/debugger.ts index 24f93b0a6..2d364719b 100644 --- a/src/lib/debugger.ts +++ b/src/lib/debugger.ts @@ -20,7 +20,7 @@ * IN THE SOFTWARE. */ import { join, resolve } from 'node:path'; -import { type ReplOptions, type REPLServer, start } from 'repl'; +import { type ReplOptions, type REPLServer, start } from 'node:repl'; import { debuglog as debuglogUtil, inspect as inspectUtil, diff --git a/src/lib/inspect.ts b/src/lib/inspect.ts index 6d78c6285..4547b9832 100644 --- a/src/lib/inspect.ts +++ b/src/lib/inspect.ts @@ -30,7 +30,7 @@ import type { WriteStream, ReadStream } from 'node:tty'; // @ts-expect-error no types available import InspectClient from 'node-inspect/lib/internal/inspect_client'; import type { Debugger, Runtime } from 'node:inspector'; -import type { REPLServer } from 'repl'; +import type { REPLServer } from 'node:repl'; import createRepl from './debugger'; // const runAsStandalone = typeof __dirname !== 'undefined'; diff --git a/src/lib/nodeModulesManagement.ts b/src/lib/nodeModulesManagement.ts index 9b8813477..cce8a2731 100644 --- a/src/lib/nodeModulesManagement.ts +++ b/src/lib/nodeModulesManagement.ts @@ -1,4 +1,4 @@ -import { execFile, type ExecFileException } from 'child_process'; +import { execFile, type ExecFileException } from 'node:child_process'; /** * Request a module name by given url using `npm view`