Skip to content

Commit

Permalink
rename deferred promise
Browse files Browse the repository at this point in the history
  • Loading branch information
mattseddon committed May 11, 2023
1 parent bc1c230 commit 5d3190b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions extension/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import { DvcViewer } from './cli/dvc/viewer'
import { registerSetupCommands } from './setup/register'
import { Status } from './status'
import { registerPersistenceCommands } from './persistence/register'
import { esmModulesImported } from './util/esm'
import { esmPackagesImported } from './util/esm'

class Extension extends Disposable {
protected readonly internalCommands: InternalCommands
Expand Down Expand Up @@ -305,7 +305,7 @@ class Extension extends Disposable {
let extension: undefined | Extension

export async function activate(context: ExtensionContext): Promise<void> {
await esmModulesImported
await esmPackagesImported
extension = new Extension(context)
context.subscriptions.push(extension)
}
Expand Down
4 changes: 2 additions & 2 deletions extension/src/python/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { getProcessPlatform } from '../env'
import { exists } from '../fileSystem'
import { Logger } from '../common/logger'
import { createProcess, executeProcess, Process } from '../process/execution'
import { esmModulesImported } from '../util/esm'
import { esmPackagesImported } from '../util/esm'

const sendOutput = (process: Process) => {
process.all?.on('data', chunk =>
Expand Down Expand Up @@ -35,7 +35,7 @@ export const setupTestVenv = async (
envDir: string,
...installArgs: string[]
) => {
await esmModulesImported
await esmPackagesImported
if (!exists(join(cwd, envDir))) {
const initVenv = createProcess({
args: ['-m', 'venv', envDir],
Expand Down
2 changes: 1 addition & 1 deletion extension/src/util/esm.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Deferred } from '@hediet/std/synchronization'

const deferred = new Deferred()
export const esmModulesImported = deferred.promise
export const esmPackagesImported = deferred.promise

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
Expand Down

0 comments on commit 5d3190b

Please sign in to comment.