diff options
author | Kristóf Marussy <kristof@marussy.com> | 2022-05-25 18:40:23 +0200 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2022-05-26 15:49:18 +0200 |
commit | 8484d3262dfb4fedd8b83f65d053bc21e455008d (patch) | |
tree | 9020f95a13ddf11863b0541619dd57ca3f511104 /packages/main/src/stores | |
parent | chore(deps): bump dependencies (diff) | |
download | sophie-8484d3262dfb4fedd8b83f65d053bc21e455008d.tar.gz sophie-8484d3262dfb4fedd8b83f65d053bc21e455008d.tar.zst sophie-8484d3262dfb4fedd8b83f65d053bc21e455008d.zip |
chore: use node16 moduleResolution where possible
We can't do this in the renderer package, because we need to import MUI
files that are not exported (MUI v6 is not ESM yet).
Signed-off-by: Kristóf Marussy <kristof@marussy.com>
Diffstat (limited to 'packages/main/src/stores')
-rw-r--r-- | packages/main/src/stores/GlobalSettings.ts | 4 | ||||
-rw-r--r-- | packages/main/src/stores/MainStore.ts | 18 | ||||
-rw-r--r-- | packages/main/src/stores/Profile.ts | 2 | ||||
-rw-r--r-- | packages/main/src/stores/Service.ts | 10 | ||||
-rw-r--r-- | packages/main/src/stores/ServiceSettings.ts | 2 | ||||
-rw-r--r-- | packages/main/src/stores/SharedStore.ts | 12 | ||||
-rw-r--r-- | packages/main/src/stores/__tests__/SharedStore.test.ts | 8 | ||||
-rw-r--r-- | packages/main/src/stores/config/Config.ts | 6 | ||||
-rw-r--r-- | packages/main/src/stores/config/loadConfig.ts | 14 |
9 files changed, 38 insertions, 38 deletions
diff --git a/packages/main/src/stores/GlobalSettings.ts b/packages/main/src/stores/GlobalSettings.ts index 84248ea..9ebc1b1 100644 --- a/packages/main/src/stores/GlobalSettings.ts +++ b/packages/main/src/stores/GlobalSettings.ts | |||
@@ -21,9 +21,9 @@ | |||
21 | import { defineGlobalSettingsModel, ThemeSource } from '@sophie/shared'; | 21 | import { defineGlobalSettingsModel, ThemeSource } from '@sophie/shared'; |
22 | import { Instance, resolveIdentifier } from 'mobx-state-tree'; | 22 | import { Instance, resolveIdentifier } from 'mobx-state-tree'; |
23 | 23 | ||
24 | import getLogger from '../utils/getLogger'; | 24 | import getLogger from '../utils/getLogger.js'; |
25 | 25 | ||
26 | import Service from './Service'; | 26 | import Service from './Service.js'; |
27 | 27 | ||
28 | const log = getLogger('sharedStore'); | 28 | const log = getLogger('sharedStore'); |
29 | 29 | ||
diff --git a/packages/main/src/stores/MainStore.ts b/packages/main/src/stores/MainStore.ts index b3e2830..1abd20c 100644 --- a/packages/main/src/stores/MainStore.ts +++ b/packages/main/src/stores/MainStore.ts | |||
@@ -22,16 +22,16 @@ import type { Action } from '@sophie/shared'; | |||
22 | import type { ResourceKey } from 'i18next'; | 22 | import type { ResourceKey } from 'i18next'; |
23 | import { flow, Instance, types } from 'mobx-state-tree'; | 23 | import { flow, Instance, types } from 'mobx-state-tree'; |
24 | 24 | ||
25 | import type I18nStore from '../i18n/I18nStore'; | 25 | import type I18nStore from '../i18n/I18nStore.js'; |
26 | import type { UseTranslationResult } from '../i18n/I18nStore'; | 26 | import type { UseTranslationResult } from '../i18n/I18nStore.js'; |
27 | import type { MainWindow } from '../infrastructure/electron/types'; | 27 | import type { MainWindow } from '../infrastructure/electron/types.js'; |
28 | import getLogger from '../utils/getLogger'; | 28 | import getLogger from '../utils/getLogger.js'; |
29 | 29 | ||
30 | import GlobalSettings from './GlobalSettings'; | 30 | import GlobalSettings from './GlobalSettings.js'; |
31 | import { getEnv } from './MainEnv'; | 31 | import { getEnv } from './MainEnv.js'; |
32 | import Profile from './Profile'; | 32 | import Profile from './Profile.js'; |
33 | import Service from './Service'; | 33 | import Service from './Service.js'; |
34 | import SharedStore from './SharedStore'; | 34 | import SharedStore from './SharedStore.js'; |
35 | 35 | ||
36 | const log = getLogger('MainStore'); | 36 | const log = getLogger('MainStore'); |
37 | 37 | ||
diff --git a/packages/main/src/stores/Profile.ts b/packages/main/src/stores/Profile.ts index 405a5d4..b4343a0 100644 --- a/packages/main/src/stores/Profile.ts +++ b/packages/main/src/stores/Profile.ts | |||
@@ -21,7 +21,7 @@ | |||
21 | import { Certificate, Profile as ProfileBase } from '@sophie/shared'; | 21 | import { Certificate, Profile as ProfileBase } from '@sophie/shared'; |
22 | import { clone, getSnapshot, Instance } from 'mobx-state-tree'; | 22 | import { clone, getSnapshot, Instance } from 'mobx-state-tree'; |
23 | 23 | ||
24 | import type ProfileConfig from './config/ProfileConfig'; | 24 | import type ProfileConfig from './config/ProfileConfig.js'; |
25 | 25 | ||
26 | const Profile = ProfileBase.views((self) => ({ | 26 | const Profile = ProfileBase.views((self) => ({ |
27 | get config(): ProfileConfig { | 27 | get config(): ProfileConfig { |
diff --git a/packages/main/src/stores/Service.ts b/packages/main/src/stores/Service.ts index 9256f65..3b7d0b2 100644 --- a/packages/main/src/stores/Service.ts +++ b/packages/main/src/stores/Service.ts | |||
@@ -29,12 +29,12 @@ import { | |||
29 | } from '@sophie/shared'; | 29 | } from '@sophie/shared'; |
30 | import { type Instance, getSnapshot, cast, flow } from 'mobx-state-tree'; | 30 | import { type Instance, getSnapshot, cast, flow } from 'mobx-state-tree'; |
31 | 31 | ||
32 | import type { ServiceView } from '../infrastructure/electron/types'; | 32 | import type { ServiceView } from '../infrastructure/electron/types.js'; |
33 | import getLogger from '../utils/getLogger'; | 33 | import getLogger from '../utils/getLogger.js'; |
34 | 34 | ||
35 | import { getEnv } from './MainEnv'; | 35 | import { getEnv } from './MainEnv.js'; |
36 | import ServiceSettings from './ServiceSettings'; | 36 | import ServiceSettings from './ServiceSettings.js'; |
37 | import type ServiceConfig from './config/ServiceConfig'; | 37 | import type ServiceConfig from './config/ServiceConfig.js'; |
38 | 38 | ||
39 | const log = getLogger('Service'); | 39 | const log = getLogger('Service'); |
40 | 40 | ||
diff --git a/packages/main/src/stores/ServiceSettings.ts b/packages/main/src/stores/ServiceSettings.ts index 5d37347..d5c2843 100644 --- a/packages/main/src/stores/ServiceSettings.ts +++ b/packages/main/src/stores/ServiceSettings.ts | |||
@@ -21,7 +21,7 @@ | |||
21 | import { defineServiceSettingsModel } from '@sophie/shared'; | 21 | import { defineServiceSettingsModel } from '@sophie/shared'; |
22 | import { Instance } from 'mobx-state-tree'; | 22 | import { Instance } from 'mobx-state-tree'; |
23 | 23 | ||
24 | import Profile from './Profile'; | 24 | import Profile from './Profile.js'; |
25 | 25 | ||
26 | const ServiceSettings = defineServiceSettingsModel(Profile); | 26 | const ServiceSettings = defineServiceSettingsModel(Profile); |
27 | 27 | ||
diff --git a/packages/main/src/stores/SharedStore.ts b/packages/main/src/stores/SharedStore.ts index f93c3d4..e1c2d3c 100644 --- a/packages/main/src/stores/SharedStore.ts +++ b/packages/main/src/stores/SharedStore.ts | |||
@@ -21,13 +21,13 @@ | |||
21 | import { defineSharedStoreModel, WritingDirection } from '@sophie/shared'; | 21 | import { defineSharedStoreModel, WritingDirection } from '@sophie/shared'; |
22 | import { getSnapshot, Instance } from 'mobx-state-tree'; | 22 | import { getSnapshot, Instance } from 'mobx-state-tree'; |
23 | 23 | ||
24 | import getLogger from '../utils/getLogger'; | 24 | import getLogger from '../utils/getLogger.js'; |
25 | 25 | ||
26 | import GlobalSettings from './GlobalSettings'; | 26 | import GlobalSettings from './GlobalSettings.js'; |
27 | import Profile from './Profile'; | 27 | import Profile from './Profile.js'; |
28 | import Service from './Service'; | 28 | import Service from './Service.js'; |
29 | import type Config from './config/Config'; | 29 | import type Config from './config/Config.js'; |
30 | import loadConfig from './config/loadConfig'; | 30 | import loadConfig from './config/loadConfig.js'; |
31 | 31 | ||
32 | const log = getLogger('SharedStore'); | 32 | const log = getLogger('SharedStore'); |
33 | 33 | ||
diff --git a/packages/main/src/stores/__tests__/SharedStore.test.ts b/packages/main/src/stores/__tests__/SharedStore.test.ts index 0ed63e3..78396da 100644 --- a/packages/main/src/stores/__tests__/SharedStore.test.ts +++ b/packages/main/src/stores/__tests__/SharedStore.test.ts | |||
@@ -18,10 +18,10 @@ | |||
18 | * SPDX-License-Identifier: AGPL-3.0-only | 18 | * SPDX-License-Identifier: AGPL-3.0-only |
19 | */ | 19 | */ |
20 | 20 | ||
21 | import SharedStore from '../SharedStore'; | 21 | import SharedStore from '../SharedStore.js'; |
22 | import type Config from '../config/Config'; | 22 | import type Config from '../config/Config.js'; |
23 | import type ProfileConfig from '../config/ProfileConfig'; | 23 | import type ProfileConfig from '../config/ProfileConfig.js'; |
24 | import type ServiceConfig from '../config/ServiceConfig'; | 24 | import type ServiceConfig from '../config/ServiceConfig.js'; |
25 | 25 | ||
26 | const profileProps: ProfileConfig = { | 26 | const profileProps: ProfileConfig = { |
27 | name: 'Test profile', | 27 | name: 'Test profile', |
diff --git a/packages/main/src/stores/config/Config.ts b/packages/main/src/stores/config/Config.ts index c38e3c5..adb10a6 100644 --- a/packages/main/src/stores/config/Config.ts +++ b/packages/main/src/stores/config/Config.ts | |||
@@ -18,10 +18,10 @@ | |||
18 | * SPDX-License-Identifier: AGPL-3.0-only | 18 | * SPDX-License-Identifier: AGPL-3.0-only |
19 | */ | 19 | */ |
20 | 20 | ||
21 | import type { GlobalSettingsSnapshotIn } from '../GlobalSettings'; | 21 | import type { GlobalSettingsSnapshotIn } from '../GlobalSettings.js'; |
22 | 22 | ||
23 | import type ProfileConfig from './ProfileConfig'; | 23 | import type ProfileConfig from './ProfileConfig.js'; |
24 | import type ServiceConfig from './ServiceConfig'; | 24 | import type ServiceConfig from './ServiceConfig.js'; |
25 | 25 | ||
26 | export default interface Config extends GlobalSettingsSnapshotIn { | 26 | export default interface Config extends GlobalSettingsSnapshotIn { |
27 | profiles?: ProfileConfig[] | undefined; | 27 | profiles?: ProfileConfig[] | undefined; |
diff --git a/packages/main/src/stores/config/loadConfig.ts b/packages/main/src/stores/config/loadConfig.ts index 2463084..8a1adcb 100644 --- a/packages/main/src/stores/config/loadConfig.ts +++ b/packages/main/src/stores/config/loadConfig.ts | |||
@@ -30,14 +30,14 @@ import { | |||
30 | import { nanoid } from 'nanoid'; | 30 | import { nanoid } from 'nanoid'; |
31 | import slug from 'slug'; | 31 | import slug from 'slug'; |
32 | 32 | ||
33 | import GlobalSettings from '../GlobalSettings'; | 33 | import GlobalSettings from '../GlobalSettings.js'; |
34 | import type Profile from '../Profile'; | 34 | import type Profile from '../Profile.js'; |
35 | import type Service from '../Service'; | 35 | import type Service from '../Service.js'; |
36 | import type { ServiceSettingsSnapshotIn } from '../ServiceSettings'; | 36 | import type { ServiceSettingsSnapshotIn } from '../ServiceSettings.js'; |
37 | 37 | ||
38 | import type Config from './Config'; | 38 | import type Config from './Config.js'; |
39 | import type ProfileConfig from './ProfileConfig'; | 39 | import type ProfileConfig from './ProfileConfig.js'; |
40 | import type ServiceConfig from './ServiceConfig'; | 40 | import type ServiceConfig from './ServiceConfig.js'; |
41 | 41 | ||
42 | function generateId(name?: string | undefined): string { | 42 | function generateId(name?: string | undefined): string { |
43 | const nameSlug = typeof name === 'undefined' ? '' : slug(name); | 43 | const nameSlug = typeof name === 'undefined' ? '' : slug(name); |