File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
packages/compass/src/main Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,12 @@ async function main(): Promise<void> {
8787 trackingProps : { context : 'CLI' } ,
8888 } ;
8989
90+ // @ts -expect-error typescript is correctly highlighting that this esm import
91+ // is missing a path, but we're passing this through bundler, so that's kinda
92+ // expected. In theory we should switch tsconfing to moduleResolution: bundler
93+ // to fix this, on practice switching to anything that prefers esm over cjs
94+ // causes a lot of code to stop compiling because types are not being resolved
95+ // correctly, so we're just ignoring this error for now
9096 const { CompassApplication } = await import ( './application' ) ;
9197
9298 const doImportExport =
Original file line number Diff line number Diff line change @@ -8,8 +8,9 @@ import type { PreferencesAccess } from 'compass-preferences-model';
88const { log, mongoLogId } = createLogger ( 'COMPASS-MAIN' ) ;
99
1010type ProtocolsList = { name : string ; schemes : string [ ] } [ ] ;
11+
1112async function appProtocolsConfig ( ) : Promise < ProtocolsList > {
12- return ( await import ( '../../package.json' ) ) . config . hadron . protocols ;
13+ return ( await import ( '../../package.json' ) ) . default . config . hadron . protocols ;
1314}
1415
1516const commandArgv = process . defaultApp
Original file line number Diff line number Diff line change @@ -220,6 +220,13 @@ async function onAppReady() {
220220 'electron-devtools-installer'
221221 ) ;
222222 try {
223+ // @ts -expect-error typescript is right and default export from
224+ // electron-devtools-installer is not a function, but because we're
225+ // passing this code through the bundler it all works fine. In theory we
226+ // should switch tsconfing to moduleResolution: bundler to fix this, on
227+ // practice switching to anything that prefers esm over cjs causes a lot
228+ // of code to stop compiling because types are not being resolved
229+ // correctly, so we're just ignoring this error for now
223230 await installDevtools ( REACT_DEVELOPER_TOOLS ) ;
224231 } catch {
225232 // noop
You can’t perform that action at this time.
0 commit comments