From 908bec93c9ca06bab1fd755f82c08561ccb20fb7 Mon Sep 17 00:00:00 2001 From: Shivam Sharma Date: Mon, 17 Mar 2025 19:18:33 +0530 Subject: [PATCH] chore: use node protocol for node builtin module --- packages/tooling/openmrs/src/cli.ts | 2 +- packages/tooling/openmrs/src/commands/assemble.ts | 8 ++++---- packages/tooling/openmrs/src/commands/build.ts | 2 +- packages/tooling/openmrs/src/commands/start.ts | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/tooling/openmrs/src/cli.ts b/packages/tooling/openmrs/src/cli.ts index 931cb2e36..7a4688580 100644 --- a/packages/tooling/openmrs/src/cli.ts +++ b/packages/tooling/openmrs/src/cli.ts @@ -2,7 +2,7 @@ import yargs from 'yargs'; import { fork } from 'child_process'; -import { resolve } from 'path'; +import { resolve } from 'node:path'; import { getImportmapAndRoutes, mergeImportmapAndRoutes, proxyImportmapAndRoutes, runProject, trimEnd } from './utils'; import type * as commands from './commands'; diff --git a/packages/tooling/openmrs/src/commands/assemble.ts b/packages/tooling/openmrs/src/commands/assemble.ts index 116804c14..cc8576dda 100644 --- a/packages/tooling/openmrs/src/commands/assemble.ts +++ b/packages/tooling/openmrs/src/commands/assemble.ts @@ -1,7 +1,7 @@ -import { mkdir, readFile, writeFile } from 'fs/promises'; -import { existsSync } from 'fs'; -import { resolve, dirname, basename } from 'path'; -import { Readable } from 'stream'; +import { mkdir, readFile, writeFile } from 'node:fs/promises'; +import { existsSync } from 'node:fs'; +import { resolve, dirname, basename } from 'node:path'; +import { Readable } from 'node:stream'; import { prompt, type Question } from 'inquirer'; import rimraf from 'rimraf'; import axios from 'axios'; diff --git a/packages/tooling/openmrs/src/commands/build.ts b/packages/tooling/openmrs/src/commands/build.ts index 978668af9..1902ad35a 100644 --- a/packages/tooling/openmrs/src/commands/build.ts +++ b/packages/tooling/openmrs/src/commands/build.ts @@ -1,6 +1,6 @@ import { copyFileSync, existsSync, readdirSync, readFileSync, statSync } from 'fs'; import { checkImportmapJson, checkRoutesJson, getImportMap, getRoutes, loadWebpackConfig, logInfo } from '../utils'; -import { basename, join, parse, resolve } from 'path'; +import { basename, join, parse, resolve } from 'node:path'; import type { webpack } from 'webpack'; type WebpackExport = typeof webpack; diff --git a/packages/tooling/openmrs/src/commands/start.ts b/packages/tooling/openmrs/src/commands/start.ts index 3073bfdbb..0d3bc349d 100644 --- a/packages/tooling/openmrs/src/commands/start.ts +++ b/packages/tooling/openmrs/src/commands/start.ts @@ -1,6 +1,6 @@ import express from 'express'; import { createProxyMiddleware } from 'http-proxy-middleware'; -import { resolve } from 'path'; +import { resolve } from 'node:path'; import { logInfo, logWarn } from '../utils'; /* eslint-disable no-console */