Skip to content

Commit cc3580f

Browse files
Fix support for Node.js 4 (#2414)
As the code is transpiled to ES6, spread operator from TypeScript is transpiled to spread operator in JavaScript. However this usage is not available in Node.js 4: ```TypeScript let { normalizedPropertyName, projectConfigurations } = this.validateUpdatePropertyInfo(propertyName, propertyValues, configurations); // Replaced with: let data = this.validateUpdatePropertyInfo(propertyName, propertyValues, configurations), normalizedPropertyName = data.normalizedPropertyName, projectConfigurations = data.projectConfigurations; ``` This is limitation of Node.js 4 itself. Spread operator is not available there (it's available only for arrays, i.e. ```JavaScript const arr = [ 1, 2, 3 ] console.log([ 0, ...arr ]); [ 0, 1, 2, 3 ] ```
1 parent 3280a4f commit cc3580f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/services/ios-provision-service.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ export class IOSProvisionService {
1717

1818
public pick(uuidOrName: string): IFuture<mobileprovision.provision.MobileProvision> {
1919
return (() => {
20-
const { match } = this.queryProvisioningProfilesAndDevices().wait();
20+
const match = this.queryProvisioningProfilesAndDevices().wait().match;
21+
2122
return match.eligable.find(prov => prov.UUID === uuidOrName)
2223
|| match.eligable.find(prov => prov.Name === uuidOrName)
2324
|| match.nonEligable.find(prov => prov.UUID === uuidOrName)
@@ -27,7 +28,9 @@ export class IOSProvisionService {
2728

2829
public list(): IFuture<void> {
2930
return (() => {
30-
const { devices, match } = this.queryProvisioningProfilesAndDevices().wait();
31+
const data = this.queryProvisioningProfilesAndDevices().wait(),
32+
devices = data.devices,
33+
match = data.match;
3134

3235
function formatSupportedDeviceCount(prov: mobileprovision.provision.MobileProvision) {
3336
if (devices.length > 0 && prov.Type === "Development") {

0 commit comments

Comments
 (0)