You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expose loadExtension to fix double loading of packages (#2868)
* Expose loadExtension to fix double loading of packages
In case you install extension, the method automatically loads it. However calling `loadExtensions` after that loads it again, so our `$injector` fails.
In order to fix this, remove the loading from the `installExtension` method and expose `loadExtension(name)` method.
So in the future in case someone wants to load a new an extension after calling `loadExtensions`, they'll be able to use the new method.
* Update ios-device-lib
Update `ios-device-lib` to 0.4.3. The new version includes a fix for long living processes where detaching iOS device causes a huge memory consuption and core dump.
Copy file name to clipboardExpand all lines: PublicAPI.md
+27-2
Original file line number
Diff line number
Diff line change
@@ -94,12 +94,12 @@ interface IExtensionData {
94
94
```
95
95
96
96
### installExtension
97
-
Installs specified extension and loads it in the current process, so the functionality that it adds can be used immediately.
97
+
Installs specified extension.
98
98
99
99
* Definition:
100
100
```TypeScript
101
101
/**
102
-
* Installs and loads specified extension.
102
+
* Installs a specified extension.
103
103
* @param{string}extensionName Name of the extension to be installed. It may contain version as well, i.e. myPackage, myPackage@1.0.0, myPackage.tgz, https://github.com/myOrganization/myPackage/tarball/master, https://github.com/myOrganization/myPackage etc.
104
104
* @returns{Promise<IExtensionData>} Information about installed extensions.
105
105
*/
@@ -180,6 +180,31 @@ for (let promise of loadExtensionsPromises) {
180
180
}
181
181
```
182
182
183
+
### loadExtension
184
+
Loads a specified extension.
185
+
186
+
* Definition
187
+
```TypeScript
188
+
/**
189
+
* Loads a single extension, so its methods and commands can be used from CLI.
190
+
* @param{string}extensionName Name of the extension to be installed. It may contain version as well, i.e. myPackage, myPackage@1.0.0
191
+
* A Promise is returned. It will be rejected in case the extension cannot be loaded.
192
+
* @returns{Promise<IExtensionData>} Promise, resolved with IExtensionData.
allowedParameters: ICommandParameter[]=[this.$stringParameterBuilder.createMandatoryParameter("You have to provide a valid name for extension that you want to install.")];
0 commit comments