From e047f5f48ff7797bdfa697046b0ead3b08b4413d Mon Sep 17 00:00:00 2001 From: Jean Lauliac Date: Fri, 7 Sep 2018 12:32:20 -0700 Subject: [PATCH] local-cli: remove 'unbundle' naming in CLI (#21013) Summary: This also relink the require() onto `RamBundle.js` from Metro so we can remove `unbundle.js` from there completely. Pull Request resolved: https://github.com/facebook/react-native/pull/21013 Reviewed By: hramos Differential Revision: D9721443 Pulled By: jeanlauliac fbshipit-source-id: 3e42ebde4cb2c735ef0934ba3b1e20f1054440df --- local-cli/bundle/ramBundle.js | 2 +- local-cli/bundle/unbundle.js | 30 ------------------------------ local-cli/commands.js | 1 - 3 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 local-cli/bundle/unbundle.js diff --git a/local-cli/bundle/ramBundle.js b/local-cli/bundle/ramBundle.js index 1d85ba3c4c3292..9b7b6264aedc30 100644 --- a/local-cli/bundle/ramBundle.js +++ b/local-cli/bundle/ramBundle.js @@ -11,7 +11,7 @@ const bundleWithOutput = require('./bundle').withOutput; const bundleCommandLineArgs = require('./bundleCommandLineArgs'); -const outputUnbundle = require('metro/src/shared/output/unbundle'); +const outputUnbundle = require('metro/src/shared/output/RamBundle'); /** * Builds the bundle starting to look for dependencies at the given entry path. diff --git a/local-cli/bundle/unbundle.js b/local-cli/bundle/unbundle.js deleted file mode 100644 index dfc7fa2483b1ac..00000000000000 --- a/local-cli/bundle/unbundle.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (c) 2015-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -'use strict'; - -const bundleCommandLineArgs = require('./bundleCommandLineArgs'); - -module.exports = { - name: 'unbundle', - description: 'Deprecated. Renamed to `ram-bundle`.', - func: () => { - throw new Error( - 'The `unbundle` command has been renamed `ram-bundle` to better ' + - 'represent the actual functionality. `ram` mean "Random Access ' + - 'Module", this particular format of bundle. Functionality remained ' + - 'unchanged.', - ); - }, - options: bundleCommandLineArgs.concat({ - command: '--indexed-unbundle', - description: 'Deprecated. Renamed to `--indexed-ram-bundle`.', - default: false, - }), -}; diff --git a/local-cli/commands.js b/local-cli/commands.js index 2a704aa5d4465f..77534cbedf2f0a 100644 --- a/local-cli/commands.js +++ b/local-cli/commands.js @@ -41,7 +41,6 @@ const documentedCommands = [ require('./runAndroid/runAndroid'), require('./library/library'), require('./bundle/bundle'), - require('./bundle/unbundle'), require('./bundle/ramBundle'), require('./eject/eject'), require('./link/link'),