Skip to content

Commit

Permalink
Use default import of fix-path package (#14812)
Browse files Browse the repository at this point in the history
  • Loading branch information
msujew authored Feb 3, 2025
1 parent 17d4667 commit 424c048
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 176 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ export class BackendGenerator extends AbstractGenerator {
protected compileElectronMain(electronMainModules?: Map<string, string>): string {
return `// @ts-check
require('reflect-metadata');
require('@theia/core/shared/reflect-metadata');
// Useful for Electron/NW.js apps as GUI apps on macOS doesn't inherit the \`$PATH\` define
// in your dotfiles (.bashrc/.bash_profile/.zshrc/etc).
// https://github.com/electron/electron/issues/550#issuecomment-162037357
// https://github.com/eclipse-theia/theia/pull/3534#issuecomment-439689082
require('fix-path')();
require('@theia/core/electron-shared/fix-path').default();
// Workaround for https://github.com/electron/electron/issues/9225. Chrome has an issue where
// in certain locales (e.g. PL), image metrics are wrongly computed. We explicitly set the
Expand All @@ -57,7 +57,7 @@ const theiaAppProjectPath = resolve(__dirname, '..', '..');
process.env.THEIA_APP_PROJECT_PATH = theiaAppProjectPath;
const { default: electronMainApplicationModule } = require('@theia/core/lib/electron-main/electron-main-application-module');
const { ElectronMainApplication, ElectronMainApplicationGlobals } = require('@theia/core/lib/electron-main/electron-main-application');
const { Container } = require('inversify');
const { Container } = require('@theia/core/shared/inversify');
const { app } = require('electron');
const config = ${this.prettyStringify(this.pck.props.frontend.config)};
Expand Down Expand Up @@ -186,7 +186,7 @@ const main = require('@theia/core/lib/node/main');
BackendApplicationConfigProvider.set(${this.prettyStringify(this.pck.props.backend.config)});
globalThis.extensionInfo = ${this.prettyStringify(this.pck.extensionPackages.map(({ name, version }) => ({ name, version }))) };
globalThis.extensionInfo = ${this.prettyStringify(this.pck.extensionPackages.map(({ name, version }) => ({ name, version })))};
const serverModule = require('./server');
const serverAddress = main.start(serverModule());
Expand Down
172 changes: 0 additions & 172 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 424c048

Please sign in to comment.