Skip to content

Commit

Permalink
Add node: prefix and .js suffix to imports
Browse files Browse the repository at this point in the history
  • Loading branch information
lpsinger committed Jul 19, 2024
1 parent de28ea1 commit 4a3e427
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 3 additions & 3 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 3 additions & 3 deletions install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions processes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof node_spawn>) {
const child = node_spawn(...args)
Expand Down
4 changes: 2 additions & 2 deletions run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion runDocker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4a3e427

Please sign in to comment.