diff --git a/data.ts b/data.ts index 3e6bcfb..9c12d0c 100644 --- a/data.ts +++ b/data.ts @@ -6,12 +6,12 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { readFile } from 'fs/promises' -import { join } from 'path' -import { pathToFileURL } from 'url' +import { readFile } from 'node:fs/promises' +import { join } from 'node:path' +import { pathToFileURL } from 'node:url' import { Client } from '@opensearch-project/opensearch' import type { ClientOptions } from '@opensearch-project/opensearch' -import { exists } from './paths' +import { exists } from './paths.js' import chunk from 'lodash/chunk.js' const jsonFilename = 'sandbox-search.json' diff --git a/index.ts b/index.ts index 4442503..b737005 100644 --- a/index.ts +++ b/index.ts @@ -6,9 +6,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { exists } from './paths' -import { join } from 'path' -import { pathToFileURL } from 'url' +import { exists } from './paths.js' +import { join } from 'node:path' +import { pathToFileURL } from 'node:url' import { launch } from './run.js' import { populate } from './data.js' import { search as getSearchClient } from '@nasa-gcn/architect-functions-search' diff --git a/install.ts b/install.ts index 95327fb..ab4d610 100644 --- a/install.ts +++ b/install.ts @@ -6,9 +6,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import os from 'os' -import { pipeline } from 'stream/promises' -import { join, posix } from 'path' +import os from 'node:os' +import { pipeline } from 'node:stream/promises' +import { join, posix } from 'node:path' import fetch from 'make-fetch-happen' import { Extract as unzip } from 'unzip-stream' import { x as untar } from 'tar' diff --git a/paths.ts b/paths.ts index ceff635..4d2448d 100644 --- a/paths.ts +++ b/paths.ts @@ -6,10 +6,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { access, mkdir } from 'fs/promises' +import { access, mkdir } from 'node:fs/promises' import envPaths from 'env-paths' import { name } from './package.json' -import type { PathLike } from 'fs' +import type { PathLike } from 'node:fs' export const { cache, temp } = envPaths(name) diff --git a/processes.ts b/processes.ts index 818d6b6..6715254 100644 --- a/processes.ts +++ b/processes.ts @@ -6,8 +6,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { spawn as node_spawn } from 'child_process' -import type { ChildProcess } from 'child_process' +import { spawn as node_spawn } from 'node:child_process' +import type { ChildProcess } from 'node:child_process' export async function spawn(...args: Parameters) { const child = node_spawn(...args) diff --git a/run.ts b/run.ts index aa97ccb..ac84df5 100644 --- a/run.ts +++ b/run.ts @@ -6,10 +6,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { join } from 'path' +import { join } from 'node:path' import waitPort from 'wait-port' import { install } from './install.js' -import { mkdtemp } from 'fs/promises' +import { mkdtemp } from 'node:fs/promises' import { mkdirP, temp } from './paths.js' import rimraf from 'rimraf' import type { SandboxEngine } from './engines.js' diff --git a/runDocker.ts b/runDocker.ts index c2ffefb..c1e6989 100644 --- a/runDocker.ts +++ b/runDocker.ts @@ -7,7 +7,7 @@ */ import Dockerode from 'dockerode' -import { fork } from 'child_process' +import { fork } from 'node:child_process' import { type SearchEngineLauncherFunction } from './run.js' const [, , command, jsonifiedArgs] = process.argv