diff --git a/dev-packages/application-package/package.json b/dev-packages/application-package/package.json index 741f700bd0dc0..546f9c9fb86ed 100644 --- a/dev-packages/application-package/package.json +++ b/dev-packages/application-package/package.json @@ -33,7 +33,7 @@ "@types/semver": "^5.4.0", "@types/write-json-file": "^2.2.1", "changes-stream": "^2.2.0", - "deepmerge": "2.0.1", + "deepmerge": "^4.2.2", "fs-extra": "^4.0.2", "is-electron": "^2.1.0", "request": "^2.82.0", diff --git a/dev-packages/application-package/src/application-package.ts b/dev-packages/application-package/src/application-package.ts index 61aa70da034ac..a0fa5f8c3599f 100644 --- a/dev-packages/application-package/src/application-package.ts +++ b/dev-packages/application-package/src/application-package.ts @@ -20,7 +20,7 @@ import { NpmRegistry, NodePackage, PublishedNodePackage, sortByKey } from './npm import { Extension, ExtensionPackage, ExtensionPackageOptions, RawExtensionPackage } from './extension-package'; import { ExtensionPackageCollector } from './extension-package-collector'; import { ApplicationProps } from './application-props'; -const merge = require('deepmerge/dist/cjs'); +import deepmerge = require('deepmerge'); // eslint-disable-next-line @typescript-eslint/no-explicit-any export type ApplicationLog = (message?: any, ...optionalParams: any[]) => void; @@ -86,7 +86,7 @@ export class ApplicationPackage { theia.target = defaultTarget; } - return this._props = merge(ApplicationProps.DEFAULT, theia); + return this._props = deepmerge(ApplicationProps.DEFAULT, theia); } protected _pck: NodePackage | undefined; diff --git a/dev-packages/application-package/src/application-props.ts b/dev-packages/application-package/src/application-props.ts index c2806105060c5..d03b3774d3dba 100644 --- a/dev-packages/application-package/src/application-props.ts +++ b/dev-packages/application-package/src/application-props.ts @@ -15,9 +15,7 @@ ********************************************************************************/ import type { BrowserWindowConstructorOptions } from 'electron'; - -/** `deepmerge/dist/cjs` */ -export const merge = require('deepmerge/dist/cjs'); +export import deepmerge = require('deepmerge'); export type RequiredRecursive = { [K in keyof T]-?: T[K] extends object ? RequiredRecursive : T[K] diff --git a/packages/core/src/browser/frontend-application-config-provider.ts b/packages/core/src/browser/frontend-application-config-provider.ts index 381da426dfce3..312427d75e0a1 100644 --- a/packages/core/src/browser/frontend-application-config-provider.ts +++ b/packages/core/src/browser/frontend-application-config-provider.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { FrontendApplicationConfig, merge } from '@theia/application-package/lib/application-props'; +import { FrontendApplicationConfig, deepmerge } from '@theia/application-package/lib/application-props'; export class FrontendApplicationConfigProvider { @@ -35,7 +35,7 @@ export class FrontendApplicationConfigProvider { // eslint-disable-next-line @typescript-eslint/no-explicit-any const globalObject = window as any; const key = FrontendApplicationConfigProvider.KEY; - globalObject[key] = merge(FrontendApplicationConfig.DEFAULT, config); + globalObject[key] = deepmerge(FrontendApplicationConfig.DEFAULT, config); } private static doGet(): FrontendApplicationConfig | undefined { diff --git a/packages/core/src/node/backend-application-config-provider.ts b/packages/core/src/node/backend-application-config-provider.ts index 2d0446b711866..8e83318c34086 100644 --- a/packages/core/src/node/backend-application-config-provider.ts +++ b/packages/core/src/node/backend-application-config-provider.ts @@ -14,7 +14,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ -import { BackendApplicationConfig, merge } from '@theia/application-package/lib/application-props'; +import { BackendApplicationConfig, deepmerge } from '@theia/application-package/lib/application-props'; export class BackendApplicationConfigProvider { @@ -35,7 +35,7 @@ export class BackendApplicationConfigProvider { // eslint-disable-next-line @typescript-eslint/no-explicit-any const globalObject = global as any; const key = BackendApplicationConfigProvider.KEY; - globalObject[key] = merge(BackendApplicationConfig.DEFAULT, config); + globalObject[key] = deepmerge(BackendApplicationConfig.DEFAULT, config); } private static doGet(): BackendApplicationConfig | undefined { diff --git a/packages/monaco/package.json b/packages/monaco/package.json index 27844ab70435b..4dd361aac34f4 100644 --- a/packages/monaco/package.json +++ b/packages/monaco/package.json @@ -10,7 +10,6 @@ "@theia/monaco-editor-core": "0.23.0", "@theia/outline-view": "1.16.0", "@theia/workspace": "1.16.0", - "deepmerge": "2.0.1", "fast-plist": "^0.1.2", "idb": "^4.0.5", "jsonc-parser": "^2.2.0", diff --git a/yarn.lock b/yarn.lock index a25ddaf64764e..612c3ecb17a3c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3832,11 +3832,6 @@ deep-is@^0.1.3, deep-is@~0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= -deepmerge@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-2.0.1.tgz#25c1c24f110fb914f80001b925264dd77f3f4312" - integrity sha512-VIPwiMJqJ13ZQfaCsIFnp5Me9tnjURiaIFxfz7EH0Ci0dTSQpZtSLrqOicXqEd/z2r+z+Klk9GzmnRsgpgbOsQ== - deepmerge@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955"