Should fix #5969
The cause was the switch to `* as moduleName` namespace imports - `process.on` is missing from the namespace import, causing an error.
This commit is contained in:
somebody1234 2023-03-16 23:09:31 +10:00 committed by GitHub
parent 5f1539d531
commit 27639233c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 5 deletions

View File

@ -21,9 +21,10 @@ const NAME = 'enso'
* and conversely type errors may not mean they don't support ESM -
* but we add those to the whitelist anyway otherwise we get type errors.
* In particular, `string-length` supports ESM but its type definitions don't.
* `yargs` and `react-hot-toast` are modules we explicitly want the default imports of. */
* `yargs` and `react-hot-toast` are modules we explicitly want the default imports of.
* `node:process` is here because `process.on` does not exist on the namespace import. */
const DEFAULT_IMPORT_ONLY_MODULES =
'chalk|string-length|yargs|yargs\\u002Fyargs|sharp|to-ico|connect|morgan|serve-static|create-servers|electron-is-dev|fast-glob|esbuild-plugin-alias|esbuild-plugin-time|esbuild-plugin-yaml|opener'
'node:process|chalk|string-length|yargs|yargs\\u002Fyargs|sharp|to-ico|connect|morgan|serve-static|create-servers|electron-is-dev|fast-glob|esbuild-plugin-alias|esbuild-plugin-time|esbuild-plugin-yaml|opener'
const ALLOWED_DEFAULT_IMPORT_MODULES = `${DEFAULT_IMPORT_ONLY_MODULES}|react-hot-toast`
const OUR_MODULES = 'enso-content-config|enso-common'
const RELATIVE_MODULES =

View File

@ -8,7 +8,7 @@
import * as fs from 'node:fs/promises'
import * as fsSync from 'node:fs'
import * as pathModule from 'node:path'
import * as process from 'node:process'
import process from 'node:process'
import * as electron from 'electron'

View File

@ -12,7 +12,7 @@
import * as childProcess from 'node:child_process'
import * as fs from 'node:fs/promises'
import * as path from 'node:path'
import * as process from 'node:process'
import process from 'node:process'
import * as esbuild from 'esbuild'

View File

@ -1,7 +1,7 @@
/** @file Shared utility functions. */
import * as fs from 'node:fs'
import * as path from 'node:path'
import * as process from 'node:process'
import process from 'node:process'
/**
* Get the environment variable value.