react-native/local-cli/server/util
Alexandre Kirszenberg e81adb99f3 DeltaClient: split DeltaBundle's modules into added and modified
Summary:
The reasoning behind this change is that right now, having both added and modified modules inside of a single `modules` field doesn't allow for basic operations like combining two deltas.

For instance, say I have three different bundle revisions: A, B and C.

Module 42 was added in B, and then removed in C.

A->B = `{modules: [42, "..."], deleted: []}`
B->C = `{modules: [], deleted: [42]}`
A->C = `{modules: [], deleted: []}`

However, were we to compute A->C as the combination of A->B and B->C, it would result in `{modules: [], deleted: [42]}` because we have no way of knowing that module 42 was only just added in B.

This means that the `deleted` field of delta X->Y might eventually contain module ids that were never present in revision X, because they were added and then removed between revisions X and Y.

The last time I changed the delta format, we had a few bug reports pop out from people who had desync issues between their version of React Native and their version of Metro. As such, I've tried to make this change backwards compatible in at least one direction (new RN, old Metro). However, this will still break if someone is using a newer version of Metro and an older version of RN. I created T37123645 to follow up on this.

Reviewed By: rafeca, fromcelticpark

Differential Revision: D13156514

fbshipit-source-id: 4a4ee3b6cc0cdff5dca7368a46d7bf663769e281
2018-11-28 02:50:56 -08:00
..
debugger-ui DeltaClient: split DeltaBundle's modules into added and modified 2018-11-28 02:50:56 -08:00
external Make copy button work on android emulator in Linux using xsel 2017-04-04 10:20:19 -07:00
copyToClipBoard.js JS: Switch from `new Buffer` to `Buffer.from` 2018-11-15 12:13:05 -08:00
jsPackagerClient.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
launchChrome.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
launchEditor.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
messageSocket.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
webSocketProxy.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00