diff --git a/packages/core/package.json b/packages/core/package.json index 7ade0dd090a54..0d4da049f1e14 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -26,7 +26,7 @@ "file-icons-js": "^1.0.3", "font-awesome": "^4.7.0", "fuzzy": "^0.1.3", - "inversify": "^4.2.0", + "inversify": "^4.14.0", "lodash.debounce": "^4.0.8", "lodash.throttle": "^4.1.1", "perfect-scrollbar": "^1.3.0", diff --git a/packages/core/src/common/contribution-provider.ts b/packages/core/src/common/contribution-provider.ts index 4099666e6e332..23e7e9922d4cb 100644 --- a/packages/core/src/common/contribution-provider.ts +++ b/packages/core/src/common/contribution-provider.ts @@ -59,7 +59,10 @@ class ContainerBasedContributionProvider implements Contributi export type Bindable = interfaces.Bind | interfaces.Container; export namespace Bindable { export function isContainer(arg: Bindable): arg is interfaces.Container { - return 'guid' in arg; + return typeof arg !== 'function' + // https://github.com/theia-ide/theia/issues/3204#issue-371029654 + // In InversifyJS `4.14.0` containers no longer have a property `guid`. + && ('guid' in arg || 'parent' in arg); } } diff --git a/yarn.lock b/yarn.lock index 671f05501386d..75aa28cc3d483 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4977,9 +4977,10 @@ invariant@^2.2.2: dependencies: loose-envify "^1.0.0" -inversify@^4.2.0: - version "4.13.0" - resolved "https://registry.yarnpkg.com/inversify/-/inversify-4.13.0.tgz#0ab40570bfa4474b04d5b919bbab3a4f682a72f5" +inversify@^4.14.0: + version "4.14.0" + resolved "https://registry.yarnpkg.com/inversify/-/inversify-4.14.0.tgz#393c1f86ee92aef0592eb0e493623b9d88dfb376" + integrity sha512-DQLg2u2tWaiHo6V5lGr47a/M9YBX3g72c8Y58+JPH0Lx9fXugEsnXRc08mwsTvDg6gGWBKSkIgtBS/eJCQmDVg== invert-kv@^1.0.0: version "1.0.0"