fix output path for the UNBUNDLE magic file

Summary: Fixed the UNBUNDLE magic file location to match what JniJSModulesUnbundle.cpp expects.

Reviewed By: sahrens

Differential Revision: D5821637

fbshipit-source-id: 4342e4bb4d139b4eba77dd92a53b1683041fc7e9
This commit is contained in:
Kevin Gozali 2017-09-12 22:31:46 -07:00 committed by Facebook Github Bot
parent 449e943d91
commit 8654b558ca
2 changed files with 8 additions and 3 deletions

View File

@ -70,9 +70,11 @@ it('creates a source map', () => {
it('creates a magic file with the number', () => { it('creates a magic file with the number', () => {
expect(extraFiles).toBeDefined(); expect(extraFiles).toBeDefined();
// $FlowFixMe "extraFiles" is always defined at this point. // $FlowFixMe "extraFiles" is always defined at this point.
expect(extraFiles.get('UNBUNDLE')).toBeDefined(); expect(extraFiles.get('js-modules/UNBUNDLE')).toBeDefined();
// $FlowFixMe "extraFiles" is always defined at this point. // $FlowFixMe "extraFiles" is always defined at this point.
expect(extraFiles.get('UNBUNDLE').readUInt32LE(0)).toBe(0xfb0bd1e5); expect(extraFiles.get('js-modules/UNBUNDLE').readUInt32LE(0)).toBe(
0xfb0bd1e5,
);
}); });
it('bundles each file separately', () => { it('bundles each file separately', () => {

View File

@ -50,7 +50,10 @@ function asMultipleFilesRamBundle({
// Prepare and write magic number file. // Prepare and write magic number file.
magicFileContents.writeUInt32LE(MAGIC_UNBUNDLE_NUMBER, 0); magicFileContents.writeUInt32LE(MAGIC_UNBUNDLE_NUMBER, 0);
extraFiles.set(MAGIC_UNBUNDLE_FILENAME, magicFileContents); extraFiles.set(
path.join(JS_MODULES, MAGIC_UNBUNDLE_FILENAME),
magicFileContents,
);
// Create the source map (with no module groups, as they are ignored). // Create the source map (with no module groups, as they are ignored).
const map = buildSourceMapWithMetaData({ const map = buildSourceMapWithMetaData({