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
#### Summary of Changes
For native components read the C api version information from
the bundle similarly to what we do for "platform" information.
The C api version is specific to each bundle.
If the bundle doesn't contain a C api version, then return "N/A"
and skip this information in the manifest file. Otherwise use
the C api version to populate the manifest inside appPackageManifest.
#### Description of testing
Checked the changes are backwards compatible by generating a manifest
for a native component without C api version.
Checked that the manifest contains the C api version information
if it is present in the native component.
Signed-off-by: Catalina Mocanu <catalinamocanu@google.com>
exports[`builds a package manifest with a companion 1`] =`
37
88
Object {
38
89
"appId": "b4ae822e-eca9-4fcb-8747-217f2a1f53a1",
@@ -256,6 +307,8 @@ Object {
256
307
}
257
308
`;
258
309
310
+
exports[`doesn't include platform C api version for non native apps 1`] =`"Unknown bundle component tag: Invalid value undefined supplied to : (({type: \\"device\\", family: string, platform: Array<string> } & ({isNative: true, platformCApiVersion: string} | Partial<{isNative: (true|undefined), platformCApiVersion: undefined}>)) | {type: \\"companion\\"})/0: ({type: \\"device\\", family: string, platform: Array<string> } & ({isNative: true, platformCApiVersion: string} | Partial<{isNative: (true|undefined), platformCApiVersion: undefined}>))/0: {type: \\"device\\", family: string, platform: Array<string> }/platform: Array<string>"`;
311
+
259
312
exports[`doesn't include tile data if app type is not APP 1`] = `
260
313
Object {
261
314
"appId": "b4ae822e-eca9-4fcb-8747-217f2a1f53a1",
@@ -276,13 +329,13 @@ Object {
276
329
}
277
330
`;
278
331
279
-
exports[`emits an error if a component bundle tag has a device type but invalid platform 1`] =`"Unknown bundle component tag: Invalid value \\"1.1.1+\\" supplied to : (({type: \\"device\\", family: string, platform: Array<string> } & Partial<{isNative: true}>) | {type: \\"companion\\"})/0: ({type: \\"device\\", family: string, platform: Array<string> } & Partial<{isNative: true}>)/0: {type: \\"device\\", family: string, platform: Array<string> }/platform: Array<string>"`;
332
+
exports[`emits an error if a component bundle tag has a device type but invalid platform 1`] = `"Unknown bundle component tag: Invalid value \\"1.1.1+\\" supplied to : (({type: \\"device\\", family: string, platform: Array<string> } &({isNative: true, platformCApiVersion: string} | Partial<{isNative: (true|undefined), platformCApiVersion: undefined}>)) | {type: \\"companion\\"})/0: ({type: \\"device\\", family: string, platform: Array<string> } &({isNative: true, platformCApiVersion: string} | Partial<{isNative: (true|undefined), platformCApiVersion: undefined}>))/0: {type: \\"device\\", family: string, platform: Array<string> }/platform: Array<string>"`;
280
333
281
-
exports[`emits an error if a component bundle tag has a device type but missing family 1`] = `"Unknown bundle component tag: Invalid value undefined supplied to : (({type: \\"device\\", family: string, platform: Array<string> } & Partial<{isNative: true}>) | {type: \\"companion\\"})/0: ({type: \\"device\\", family: string, platform: Array<string> } & Partial<{isNative: true}>)/0: {type: \\"device\\", family: string, platform: Array<string> }/family: string"`;
334
+
exports[`emits an error if a component bundle tag has a device type but missing family 1`] = `"Unknown bundle component tag: Invalid value undefined supplied to : (({type: \\"device\\", family: string, platform: Array<string> } &({isNative: true, platformCApiVersion: string} | Partial<{isNative: (true|undefined), platformCApiVersion: undefined}>)) | {type: \\"companion\\"})/0: ({type: \\"device\\", family: string, platform: Array<string> } &({isNative: true, platformCApiVersion: string} | Partial<{isNative: (true|undefined), platformCApiVersion: undefined}>))/0: {type: \\"device\\", family: string, platform: Array<string> }/family: string"`;
282
335
283
-
exports[`emits an error if a component bundle tag has a device type but missing platform 1`] = `"Unknown bundle component tag: Invalid value undefined supplied to : (({type: \\"device\\", family: string, platform: Array<string> } & Partial<{isNative: true}>) | {type: \\"companion\\"})/0: ({type: \\"device\\", family: string, platform: Array<string> } & Partial<{isNative: true}>)/0: {type: \\"device\\", family: string, platform: Array<string> }/platform: Array<string>"`;
336
+
exports[`emits an error if a component bundle tag has a device type but missing platform 1`] = `"Unknown bundle component tag: Invalid value undefined supplied to : (({type: \\"device\\", family: string, platform: Array<string> } &({isNative: true, platformCApiVersion: string} | Partial<{isNative: (true|undefined), platformCApiVersion: undefined}>)) | {type: \\"companion\\"})/0: ({type: \\"device\\", family: string, platform: Array<string> } &({isNative: true, platformCApiVersion: string} | Partial<{isNative: (true|undefined), platformCApiVersion: undefined}>))/0: {type: \\"device\\", family: string, platform: Array<string> }/platform: Array<string>"`;
284
337
285
-
exports[`emits an error if a component bundle tag has an invalid type field 1`] = `"Unknown bundle component tag: Invalid value {\\"type\\":\\"__invalid__\\"} supplied to : (({type: \\"device\\", family: string, platform: Array<string> } & Partial<{isNative: true}>) | {type: \\"companion\\"})"`;
338
+
exports[`emits an error if a component bundle tag has an invalid type field 1`] = `"Unknown bundle component tag: Invalid value {\\"type\\":\\"__invalid__\\"} supplied to : (({type: \\"device\\", family: string, platform: Array<string> } &({isNative: true, platformCApiVersion: string} | Partial<{isNative: (true|undefined), platformCApiVersion: undefined}>)) | {type: \\"companion\\"})"`;
286
339
287
340
exports[`emits an error if both JS and native device components are present 1`] = `"Cannot bundle mixed native/JS device components"`;
0 commit comments