From 0f7ad193c75183eeff1b356644ccf22b0813bb04 Mon Sep 17 00:00:00 2001 From: cpojer Date: Thu, 30 Nov 2017 11:56:25 +0000 Subject: [PATCH] Rename metro-bundler to metro Reviewed By: davidaurelio Differential Revision: D6413420 fbshipit-source-id: f13184b8157de2c3aeaa7f2647becc175f62cdbb --- .github/ISSUE_TEMPLATE.md | 4 ++-- .gitignore | 1 + CHANGELOG.md | 2 +- CONTRIBUTING.md | 12 ++++++------ LICENSE | 2 +- PATENTS | 2 +- README.md | 6 +++--- circle.yml | 14 +++++++------- docs/GettingStarted.md | 14 +++++++------- flow-typed/{console.js => console.js.flow} | 0 packages/{metro-bundler => metro}/.eslintrc | 0 packages/{metro-bundler => metro}/.npmignore | 0 packages/{metro-bundler => metro}/README.md | 2 +- packages/{metro-bundler => metro}/package.json | 4 ++-- packages/{metro-bundler => metro}/rn-babelrc.json | 0 .../src/AssetServer/__tests__/AssetServer-test.js | 0 .../src/AssetServer/index.js | 0 .../src/Bundler/__tests__/Bundler-test.js | 0 .../__tests__/__snapshots__/Bundler-test.js.snap | 0 .../__tests__/__snapshots__/util-test.js.snap | 0 .../src/Bundler/__tests__/util-test.js | 0 .../{metro-bundler => metro}/src/Bundler/index.js | 2 +- .../src/Bundler/source-map/B64Builder.js | 0 .../src/Bundler/source-map/Generator.js | 0 .../source-map/__tests__/B64Builder-test.js | 0 .../source-map/__tests__/Generator-test.js | 0 .../__snapshots__/source-map-test.js.snap | 0 .../source-map/__tests__/source-map-test.js | 0 .../src/Bundler/source-map/encode.js | 0 .../src/Bundler/source-map/package.json | 0 .../src/Bundler/source-map/source-map.js | 0 .../{metro-bundler => metro}/src/Bundler/util.js | 0 packages/{metro-bundler => metro}/src/Config.js | 2 +- .../src/DeltaBundler/DeltaCalculator.js | 0 .../src/DeltaBundler/DeltaPatcher.js | 0 .../src/DeltaBundler/DeltaTransformer.js | 0 .../src/DeltaBundler/Serializers.js | 0 .../DeltaBundler/__tests__/DeltaBundler-test.js | 0 .../__tests__/DeltaCalculator-test.js | 0 .../DeltaBundler/__tests__/DeltaPatcher-test.js | 0 .../DeltaBundler/__tests__/Serializers-test.js | 0 .../__snapshots__/DeltaPatcher-test.js.snap | 0 .../__snapshots__/Serializers-test.js.snap | 0 .../traverseDependencies-integration-test.js.snap | 0 .../traverseDependencies-integration-test.js | 0 .../__tests__/traverseDependencies-test.js | 0 .../src/DeltaBundler/index.js | 0 .../src/DeltaBundler/traverseDependencies.js | 0 .../src/HmrServer/__tests__/HmrServer-test.js | 0 .../src/HmrServer/getBundlingOptionsForHmr.js | 0 .../src/HmrServer/index.js | 0 .../src/JSTransformer/README.md | 0 .../src/JSTransformer/__mocks__/lodash.js | 0 .../src/JSTransformer/__mocks__/worker.js | 0 .../JSTransformer/__tests__/Transformer-test.js | 0 .../src/JSTransformer/index.js | 0 .../worker/__tests__/constant-folding-test.js | 0 .../worker/__tests__/extract-dependencies-test.js | 0 .../JSTransformer/worker/__tests__/inline-test.js | 0 .../JSTransformer/worker/__tests__/minify-test.js | 0 .../JSTransformer/worker/__tests__/worker-test.js | 0 .../src/JSTransformer/worker/constant-folding.js | 0 .../JSTransformer/worker/extract-dependencies.js | 0 .../src/JSTransformer/worker/index.js | 0 .../src/JSTransformer/worker/inline.js | 0 .../src/JSTransformer/worker/minify.js | 0 .../{metro-bundler => metro}/src/Logger/Types.js | 0 .../src/Logger/__mocks__/chalk.js | 0 .../src/Logger/__tests__/Logger-test.js | 0 .../{metro-bundler => metro}/src/Logger/index.js | 0 .../src/ModuleGraph/Graph.js | 0 .../src/ModuleGraph/ModuleGraph.js | 0 .../src/ModuleGraph/__tests__/Graph-test.js | 0 .../src/ModuleGraph/__tests__/ModuleGraph-test.js | 0 .../src/ModuleGraph/module.js | 0 .../src/ModuleGraph/node-haste/HasteFS.js | 0 .../src/ModuleGraph/node-haste/Module.js | 0 .../src/ModuleGraph/node-haste/ModuleCache.js | 0 .../src/ModuleGraph/node-haste/Package.js | 0 .../src/ModuleGraph/node-haste/node-haste.flow.js | 0 .../src/ModuleGraph/node-haste/node-haste.js | 0 .../src/ModuleGraph/node-haste/package.json | 0 .../output/__tests__/dependencies-dot.js | 0 .../output/__tests__/indexed-ram-bundle-test.js | 0 .../__tests__/multiple-files-ram-bundle-test.js | 0 .../src/ModuleGraph/output/__tests__/util-test.js | 0 .../src/ModuleGraph/output/dependencies-dot.js | 0 .../src/ModuleGraph/output/indexed-ram-bundle.js | 0 .../output/multiple-files-ram-bundle.js | 0 .../src/ModuleGraph/output/plain-bundle.js | 0 .../src/ModuleGraph/output/source-map.js | 0 .../src/ModuleGraph/output/util.js | 0 .../src/ModuleGraph/package.json | 0 .../src/ModuleGraph/silent-console.js | 0 .../src/ModuleGraph/test-helpers.js | 0 .../src/ModuleGraph/types.flow.js | 0 .../src/ModuleGraph/worker.js | 0 .../src/ModuleGraph/worker/JsFileWrapping.js | 0 .../src/ModuleGraph/worker/Platforms.js | 0 .../__snapshots__/transform-module-test.js.snap | 0 .../worker/__tests__/collect-dependencies-test.js | 0 .../worker/__tests__/optimize-module-test.js | 0 .../worker/__tests__/transform-module-test.js | 0 .../worker/__tests__/wrap-worker-fn-test.js | 0 .../ModuleGraph/worker/collect-dependencies.js | 0 .../src/ModuleGraph/worker/generate.js | 0 .../src/ModuleGraph/worker/optimize-module.js | 0 .../src/ModuleGraph/worker/transform-module.js | 0 .../src/ModuleGraph/worker/wrap-worker-fn.js | 0 .../src/Resolver/__tests__/Resolver-test.js | 0 .../src/Resolver/index.js | 0 .../Resolver/polyfills/__tests__/require-test.js | 0 .../src/Resolver/polyfills/prelude.js | 0 .../src/Resolver/polyfills/prelude_dev.js | 0 .../src/Resolver/polyfills/require.js | 4 ++-- .../src/Server/MultipartResponse.js | 0 .../Server/__tests__/MultipartResponse-test.js | 0 .../src/Server/__tests__/Server-test.js | 0 .../{metro-bundler => metro}/src/Server/index.js | 0 .../symbolicate/__tests__/symbolicate-test.js | 0 .../src/Server/symbolicate/__tests__/util-test.js | 0 .../Server/symbolicate/__tests__/worker-test.js | 0 .../src/Server/symbolicate/package.json | 0 .../src/Server/symbolicate/symbolicate.js | 2 +- .../src/Server/symbolicate/util.js | 0 .../src/Server/symbolicate/worker.js | 0 .../src/__mocks__/debug.js | 0 .../src/__tests__/index-test.js | 0 .../src/babelRegisterOnly.js | 4 ++-- .../{metro-bundler => metro}/src/blacklist.js | 0 .../{metro-bundler => metro}/src/cli-utils.js | 0 packages/{metro-bundler => metro}/src/cli.js | 0 .../src/commands/build.js | 0 .../src/commands/serve.js | 0 .../src/defaultTransform.js | 0 packages/{metro-bundler => metro}/src/defaults.js | 0 packages/{metro-bundler => metro}/src/index.js | 0 .../__snapshots__/basic_bundle-test.js.snap | 0 .../__tests__/basic_bundle-test.js | 0 .../basic_bundle/AssetRegistry.js | 0 .../src/integration_tests/basic_bundle/Bar.js | 0 .../src/integration_tests/basic_bundle/Foo.js | 0 .../integration_tests/basic_bundle/TestBundle.js | 0 .../integration_tests/basic_bundle/polyfill-1.js | 0 .../integration_tests/basic_bundle/polyfill-2.js | 0 .../src/integration_tests/basic_bundle/test.png | Bin packages/{metro-bundler => metro}/src/legacy.js | 0 .../src/lib/BatchProcessor.js | 0 .../src/lib/GlobalTransformCache.js | 0 .../src/lib/JsonReporter.js | 0 .../{metro-bundler => metro}/src/lib/SourceMap.js | 0 .../{metro-bundler => metro}/src/lib/Terminal.js | 0 .../src/lib/TerminalReporter.js | 0 .../src/lib/TransformCaching.js | 2 +- .../src/lib/__mocks__/GlobalTransformCache.js | 0 .../src/lib/__mocks__/TransformCaching.js | 0 .../src/lib/__mocks__/declareOpts.js | 0 .../src/lib/__tests__/BatchProcessor-test.js | 0 .../lib/__tests__/GlobalTransformCache-test.js | 0 .../src/lib/__tests__/Terminal-test.js | 0 .../src/lib/__tests__/TransformCaching-test.js | 0 .../GlobalTransformCache-test.js.snap | 0 .../lib/__tests__/addParamsToDefineCall-test.js | 0 .../src/lib/__tests__/getMaxWorkers-test.js | 0 .../__tests__/getOrderedDependencyPaths-test.js | 0 ...moveInlineRequiresBlacklistFromOptions-test.js | 0 .../src/lib/addParamsToDefineCall.js | 0 .../src/lib/createModuleIdFactory.js | 0 .../src/lib/formatBanner.js | 0 .../src/lib/formatBundlingError.js | 0 .../src/lib/getMaxWorkers.js | 0 .../src/lib/getOrderedDependencyPaths.js | 0 .../src/lib/relativizeSourceMap.js | 0 .../removeInlineRequiresBlacklistFromOptions.js | 0 .../{metro-bundler => metro}/src/lib/reporting.js | 0 .../{metro-bundler => metro}/src/lib/sleep.js | 0 .../src/node-haste/AssetModule.js | 0 .../src/node-haste/AssetResolutionCache.js | 0 .../src/node-haste/DependencyGraph.js | 2 +- .../DependencyGraph/DependencyGraphHelpers.js | 0 .../DependencyGraph/FileNameResolver.js | 0 .../DependencyGraph/ModuleResolution.js | 0 .../DependencyGraph/ResolutionRequest.js | 0 .../DependencyGraph/assets/empty-module.js | 0 .../src/node-haste/FilesByDirNameIndex.js | 0 .../src/node-haste/Module.js | 0 .../src/node-haste/ModuleCache.js | 0 .../src/node-haste/Package.js | 0 .../src/node-haste/Polyfill.js | 0 .../src/node-haste/__mocks__/fs.js | 0 .../src/node-haste/__mocks__/graceful-fs.js | 0 .../src/node-haste/__tests__/AssetModule-test.js | 0 .../__tests__/AssetResolutionCache-test.js | 0 .../src/node-haste/__tests__/Module-test.js | 0 .../src/node-haste/lib/AssetPaths.js | 0 .../src/node-haste/lib/MapWithDefaults.js | 0 .../node-haste/lib/__tests__/AssetPaths-test.js | 0 .../lib/__tests__/MapWithDefaults-test.js | 0 .../lib/__tests__/parsePlatformFilePath-test.js | 0 .../src/node-haste/lib/parsePlatformFilePath.js | 0 .../src/node-haste/lib/toLocalPath.js | 0 .../src/node-haste/types.js | 0 .../{metro-bundler => metro}/src/rn-cli.config.js | 2 +- .../src/setupNodePolyfills.js | 0 .../src/shared/output/bundle.js | 0 .../src/shared/output/meta.js | 0 .../src/shared/output/unbundle/as-assets.js | 0 .../src/shared/output/unbundle/as-indexed-file.js | 0 .../build-unbundle-sourcemap-with-metadata.js | 0 .../src/shared/output/unbundle/index.js | 0 .../src/shared/output/unbundle/magic-number.js | 0 .../src/shared/output/unbundle/util.js | 0 .../src/shared/output/unbundle/write-sourcemap.js | 0 .../src/shared/output/writeFile.js | 0 .../src/shared/types.flow.js | 0 .../{metro-bundler => metro}/src/transformer.js | 0 scripts/build.js | 2 +- scripts/setupJest.js | 2 +- website/README.md | 6 +++--- website/core/Footer.js | 8 ++++---- website/i18n/en.json | 4 ++-- website/pages/en/help.js | 10 +++++----- website/pages/en/index.js | 14 +++++++------- website/siteConfig.js | 12 ++++++------ website/static/img/metro.svg | 2 +- 225 files changed, 72 insertions(+), 71 deletions(-) rename flow-typed/{console.js => console.js.flow} (100%) rename packages/{metro-bundler => metro}/.eslintrc (100%) rename packages/{metro-bundler => metro}/.npmignore (100%) rename packages/{metro-bundler => metro}/README.md (97%) rename packages/{metro-bundler => metro}/package.json (95%) rename packages/{metro-bundler => metro}/rn-babelrc.json (100%) rename packages/{metro-bundler => metro}/src/AssetServer/__tests__/AssetServer-test.js (100%) rename packages/{metro-bundler => metro}/src/AssetServer/index.js (100%) rename packages/{metro-bundler => metro}/src/Bundler/__tests__/Bundler-test.js (100%) rename packages/{metro-bundler => metro}/src/Bundler/__tests__/__snapshots__/Bundler-test.js.snap (100%) rename packages/{metro-bundler => metro}/src/Bundler/__tests__/__snapshots__/util-test.js.snap (100%) rename packages/{metro-bundler => metro}/src/Bundler/__tests__/util-test.js (100%) rename packages/{metro-bundler => metro}/src/Bundler/index.js (99%) rename packages/{metro-bundler => metro}/src/Bundler/source-map/B64Builder.js (100%) rename packages/{metro-bundler => metro}/src/Bundler/source-map/Generator.js (100%) rename packages/{metro-bundler => metro}/src/Bundler/source-map/__tests__/B64Builder-test.js (100%) rename packages/{metro-bundler => metro}/src/Bundler/source-map/__tests__/Generator-test.js (100%) rename packages/{metro-bundler => metro}/src/Bundler/source-map/__tests__/__snapshots__/source-map-test.js.snap (100%) rename packages/{metro-bundler => metro}/src/Bundler/source-map/__tests__/source-map-test.js (100%) rename packages/{metro-bundler => metro}/src/Bundler/source-map/encode.js (100%) rename packages/{metro-bundler => metro}/src/Bundler/source-map/package.json (100%) rename packages/{metro-bundler => metro}/src/Bundler/source-map/source-map.js (100%) rename packages/{metro-bundler => metro}/src/Bundler/util.js (100%) rename packages/{metro-bundler => metro}/src/Config.js (99%) rename packages/{metro-bundler => metro}/src/DeltaBundler/DeltaCalculator.js (100%) rename packages/{metro-bundler => metro}/src/DeltaBundler/DeltaPatcher.js (100%) rename packages/{metro-bundler => metro}/src/DeltaBundler/DeltaTransformer.js (100%) rename packages/{metro-bundler => metro}/src/DeltaBundler/Serializers.js (100%) rename packages/{metro-bundler => metro}/src/DeltaBundler/__tests__/DeltaBundler-test.js (100%) rename packages/{metro-bundler => metro}/src/DeltaBundler/__tests__/DeltaCalculator-test.js (100%) rename packages/{metro-bundler => metro}/src/DeltaBundler/__tests__/DeltaPatcher-test.js (100%) rename packages/{metro-bundler => metro}/src/DeltaBundler/__tests__/Serializers-test.js (100%) rename packages/{metro-bundler => metro}/src/DeltaBundler/__tests__/__snapshots__/DeltaPatcher-test.js.snap (100%) rename packages/{metro-bundler => metro}/src/DeltaBundler/__tests__/__snapshots__/Serializers-test.js.snap (100%) rename packages/{metro-bundler => metro}/src/DeltaBundler/__tests__/__snapshots__/traverseDependencies-integration-test.js.snap (100%) rename packages/{metro-bundler => metro}/src/DeltaBundler/__tests__/traverseDependencies-integration-test.js (100%) rename packages/{metro-bundler => metro}/src/DeltaBundler/__tests__/traverseDependencies-test.js (100%) rename packages/{metro-bundler => metro}/src/DeltaBundler/index.js (100%) rename packages/{metro-bundler => metro}/src/DeltaBundler/traverseDependencies.js (100%) rename packages/{metro-bundler => metro}/src/HmrServer/__tests__/HmrServer-test.js (100%) rename packages/{metro-bundler => metro}/src/HmrServer/getBundlingOptionsForHmr.js (100%) rename packages/{metro-bundler => metro}/src/HmrServer/index.js (100%) rename packages/{metro-bundler => metro}/src/JSTransformer/README.md (100%) rename packages/{metro-bundler => metro}/src/JSTransformer/__mocks__/lodash.js (100%) rename packages/{metro-bundler => metro}/src/JSTransformer/__mocks__/worker.js (100%) rename packages/{metro-bundler => metro}/src/JSTransformer/__tests__/Transformer-test.js (100%) rename packages/{metro-bundler => metro}/src/JSTransformer/index.js (100%) rename packages/{metro-bundler => metro}/src/JSTransformer/worker/__tests__/constant-folding-test.js (100%) rename packages/{metro-bundler => metro}/src/JSTransformer/worker/__tests__/extract-dependencies-test.js (100%) rename packages/{metro-bundler => metro}/src/JSTransformer/worker/__tests__/inline-test.js (100%) rename packages/{metro-bundler => metro}/src/JSTransformer/worker/__tests__/minify-test.js (100%) rename packages/{metro-bundler => metro}/src/JSTransformer/worker/__tests__/worker-test.js (100%) rename packages/{metro-bundler => metro}/src/JSTransformer/worker/constant-folding.js (100%) rename packages/{metro-bundler => metro}/src/JSTransformer/worker/extract-dependencies.js (100%) rename packages/{metro-bundler => metro}/src/JSTransformer/worker/index.js (100%) rename packages/{metro-bundler => metro}/src/JSTransformer/worker/inline.js (100%) rename packages/{metro-bundler => metro}/src/JSTransformer/worker/minify.js (100%) rename packages/{metro-bundler => metro}/src/Logger/Types.js (100%) rename packages/{metro-bundler => metro}/src/Logger/__mocks__/chalk.js (100%) rename packages/{metro-bundler => metro}/src/Logger/__tests__/Logger-test.js (100%) rename packages/{metro-bundler => metro}/src/Logger/index.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/Graph.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/ModuleGraph.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/__tests__/Graph-test.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/__tests__/ModuleGraph-test.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/module.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/node-haste/HasteFS.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/node-haste/Module.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/node-haste/ModuleCache.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/node-haste/Package.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/node-haste/node-haste.flow.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/node-haste/node-haste.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/node-haste/package.json (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/output/__tests__/dependencies-dot.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/output/__tests__/indexed-ram-bundle-test.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/output/__tests__/multiple-files-ram-bundle-test.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/output/__tests__/util-test.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/output/dependencies-dot.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/output/indexed-ram-bundle.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/output/multiple-files-ram-bundle.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/output/plain-bundle.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/output/source-map.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/output/util.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/package.json (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/silent-console.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/test-helpers.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/types.flow.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/worker.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/worker/JsFileWrapping.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/worker/Platforms.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/worker/__tests__/__snapshots__/transform-module-test.js.snap (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/worker/__tests__/collect-dependencies-test.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/worker/__tests__/optimize-module-test.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/worker/__tests__/transform-module-test.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/worker/__tests__/wrap-worker-fn-test.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/worker/collect-dependencies.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/worker/generate.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/worker/optimize-module.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/worker/transform-module.js (100%) rename packages/{metro-bundler => metro}/src/ModuleGraph/worker/wrap-worker-fn.js (100%) rename packages/{metro-bundler => metro}/src/Resolver/__tests__/Resolver-test.js (100%) rename packages/{metro-bundler => metro}/src/Resolver/index.js (100%) rename packages/{metro-bundler => metro}/src/Resolver/polyfills/__tests__/require-test.js (100%) rename packages/{metro-bundler => metro}/src/Resolver/polyfills/prelude.js (100%) rename packages/{metro-bundler => metro}/src/Resolver/polyfills/prelude_dev.js (100%) rename packages/{metro-bundler => metro}/src/Resolver/polyfills/require.js (98%) rename packages/{metro-bundler => metro}/src/Server/MultipartResponse.js (100%) rename packages/{metro-bundler => metro}/src/Server/__tests__/MultipartResponse-test.js (100%) rename packages/{metro-bundler => metro}/src/Server/__tests__/Server-test.js (100%) rename packages/{metro-bundler => metro}/src/Server/index.js (100%) rename packages/{metro-bundler => metro}/src/Server/symbolicate/__tests__/symbolicate-test.js (100%) rename packages/{metro-bundler => metro}/src/Server/symbolicate/__tests__/util-test.js (100%) rename packages/{metro-bundler => metro}/src/Server/symbolicate/__tests__/worker-test.js (100%) rename packages/{metro-bundler => metro}/src/Server/symbolicate/package.json (100%) rename packages/{metro-bundler => metro}/src/Server/symbolicate/symbolicate.js (97%) rename packages/{metro-bundler => metro}/src/Server/symbolicate/util.js (100%) rename packages/{metro-bundler => metro}/src/Server/symbolicate/worker.js (100%) rename packages/{metro-bundler => metro}/src/__mocks__/debug.js (100%) rename packages/{metro-bundler => metro}/src/__tests__/index-test.js (100%) rename packages/{metro-bundler => metro}/src/babelRegisterOnly.js (95%) rename packages/{metro-bundler => metro}/src/blacklist.js (100%) rename packages/{metro-bundler => metro}/src/cli-utils.js (100%) rename packages/{metro-bundler => metro}/src/cli.js (100%) rename packages/{metro-bundler => metro}/src/commands/build.js (100%) rename packages/{metro-bundler => metro}/src/commands/serve.js (100%) rename packages/{metro-bundler => metro}/src/defaultTransform.js (100%) rename packages/{metro-bundler => metro}/src/defaults.js (100%) rename packages/{metro-bundler => metro}/src/index.js (100%) rename packages/{metro-bundler => metro}/src/integration_tests/__tests__/__snapshots__/basic_bundle-test.js.snap (100%) rename packages/{metro-bundler => metro}/src/integration_tests/__tests__/basic_bundle-test.js (100%) rename packages/{metro-bundler => metro}/src/integration_tests/basic_bundle/AssetRegistry.js (100%) rename packages/{metro-bundler => metro}/src/integration_tests/basic_bundle/Bar.js (100%) rename packages/{metro-bundler => metro}/src/integration_tests/basic_bundle/Foo.js (100%) rename packages/{metro-bundler => metro}/src/integration_tests/basic_bundle/TestBundle.js (100%) rename packages/{metro-bundler => metro}/src/integration_tests/basic_bundle/polyfill-1.js (100%) rename packages/{metro-bundler => metro}/src/integration_tests/basic_bundle/polyfill-2.js (100%) rename packages/{metro-bundler => metro}/src/integration_tests/basic_bundle/test.png (100%) rename packages/{metro-bundler => metro}/src/legacy.js (100%) rename packages/{metro-bundler => metro}/src/lib/BatchProcessor.js (100%) rename packages/{metro-bundler => metro}/src/lib/GlobalTransformCache.js (100%) rename packages/{metro-bundler => metro}/src/lib/JsonReporter.js (100%) rename packages/{metro-bundler => metro}/src/lib/SourceMap.js (100%) rename packages/{metro-bundler => metro}/src/lib/Terminal.js (100%) rename packages/{metro-bundler => metro}/src/lib/TerminalReporter.js (100%) rename packages/{metro-bundler => metro}/src/lib/TransformCaching.js (99%) rename packages/{metro-bundler => metro}/src/lib/__mocks__/GlobalTransformCache.js (100%) rename packages/{metro-bundler => metro}/src/lib/__mocks__/TransformCaching.js (100%) rename packages/{metro-bundler => metro}/src/lib/__mocks__/declareOpts.js (100%) rename packages/{metro-bundler => metro}/src/lib/__tests__/BatchProcessor-test.js (100%) rename packages/{metro-bundler => metro}/src/lib/__tests__/GlobalTransformCache-test.js (100%) rename packages/{metro-bundler => metro}/src/lib/__tests__/Terminal-test.js (100%) rename packages/{metro-bundler => metro}/src/lib/__tests__/TransformCaching-test.js (100%) rename packages/{metro-bundler => metro}/src/lib/__tests__/__snapshots__/GlobalTransformCache-test.js.snap (100%) rename packages/{metro-bundler => metro}/src/lib/__tests__/addParamsToDefineCall-test.js (100%) rename packages/{metro-bundler => metro}/src/lib/__tests__/getMaxWorkers-test.js (100%) rename packages/{metro-bundler => metro}/src/lib/__tests__/getOrderedDependencyPaths-test.js (100%) rename packages/{metro-bundler => metro}/src/lib/__tests__/removeInlineRequiresBlacklistFromOptions-test.js (100%) rename packages/{metro-bundler => metro}/src/lib/addParamsToDefineCall.js (100%) rename packages/{metro-bundler => metro}/src/lib/createModuleIdFactory.js (100%) rename packages/{metro-bundler => metro}/src/lib/formatBanner.js (100%) rename packages/{metro-bundler => metro}/src/lib/formatBundlingError.js (100%) rename packages/{metro-bundler => metro}/src/lib/getMaxWorkers.js (100%) rename packages/{metro-bundler => metro}/src/lib/getOrderedDependencyPaths.js (100%) rename packages/{metro-bundler => metro}/src/lib/relativizeSourceMap.js (100%) rename packages/{metro-bundler => metro}/src/lib/removeInlineRequiresBlacklistFromOptions.js (100%) rename packages/{metro-bundler => metro}/src/lib/reporting.js (100%) rename packages/{metro-bundler => metro}/src/lib/sleep.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/AssetModule.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/AssetResolutionCache.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/DependencyGraph.js (99%) rename packages/{metro-bundler => metro}/src/node-haste/DependencyGraph/DependencyGraphHelpers.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/DependencyGraph/FileNameResolver.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/DependencyGraph/ModuleResolution.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/DependencyGraph/ResolutionRequest.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/DependencyGraph/assets/empty-module.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/FilesByDirNameIndex.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/Module.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/ModuleCache.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/Package.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/Polyfill.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/__mocks__/fs.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/__mocks__/graceful-fs.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/__tests__/AssetModule-test.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/__tests__/AssetResolutionCache-test.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/__tests__/Module-test.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/lib/AssetPaths.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/lib/MapWithDefaults.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/lib/__tests__/AssetPaths-test.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/lib/__tests__/MapWithDefaults-test.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/lib/__tests__/parsePlatformFilePath-test.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/lib/parsePlatformFilePath.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/lib/toLocalPath.js (100%) rename packages/{metro-bundler => metro}/src/node-haste/types.js (100%) rename packages/{metro-bundler => metro}/src/rn-cli.config.js (94%) rename packages/{metro-bundler => metro}/src/setupNodePolyfills.js (100%) rename packages/{metro-bundler => metro}/src/shared/output/bundle.js (100%) rename packages/{metro-bundler => metro}/src/shared/output/meta.js (100%) rename packages/{metro-bundler => metro}/src/shared/output/unbundle/as-assets.js (100%) rename packages/{metro-bundler => metro}/src/shared/output/unbundle/as-indexed-file.js (100%) rename packages/{metro-bundler => metro}/src/shared/output/unbundle/build-unbundle-sourcemap-with-metadata.js (100%) rename packages/{metro-bundler => metro}/src/shared/output/unbundle/index.js (100%) rename packages/{metro-bundler => metro}/src/shared/output/unbundle/magic-number.js (100%) rename packages/{metro-bundler => metro}/src/shared/output/unbundle/util.js (100%) rename packages/{metro-bundler => metro}/src/shared/output/unbundle/write-sourcemap.js (100%) rename packages/{metro-bundler => metro}/src/shared/output/writeFile.js (100%) rename packages/{metro-bundler => metro}/src/shared/types.flow.js (100%) rename packages/{metro-bundler => metro}/src/transformer.js (100%) mode change 100755 => 100644 website/pages/en/help.js mode change 100755 => 100644 website/pages/en/index.js diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index b8484a49..7e454e96 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,4 +1,4 @@ - + **Do you want to request a *feature* or report a *bug*?** @@ -8,4 +8,4 @@ **What is the expected behavior?** -**Please provide your exact metro-bundler configuration and mention your metro-bundler, node, yarn/npm version and operating system.** +**Please provide your exact Metro configuration and mention your Metro, node, yarn/npm version and operating system.** diff --git a/.gitignore b/.gitignore index afc2a5e1..1172e8be 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /node_modules /packages/*/build/ /packages/*/node_modules/ +/packages/*/yarn.lock /coverage lerna-debug.log npm-debug.log* diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e467179..0bdea854 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ ## master -## metro-bundler 0.1.0 +## metro 0.1.0 * Initial Release diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4b2049fd..cd503325 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ -# Contributing to metro-bundler +# Contributing to Metro -metro-bundler is one of Facebook's open source projects that is both under very active development and is also being used to ship code to everybody on [facebook.com](https://www.facebook.com). We're still working out the kinks to make contributing to this project as easy and transparent as possible, but we're not quite there yet. Hopefully this document makes the process for contributing clear and answers some questions that you may have. +Metro is one of Facebook's open source projects that is both under very active development and is also being used to ship code to everybody on [facebook.com](https://www.facebook.com). We're still working out the kinks to make contributing to this project as easy and transparent as possible, but we're not quite there yet. Hopefully this document makes the process for contributing clear and answers some questions that you may have. ## [Code of Conduct](https://code.facebook.com/codeofconduct) @@ -23,8 +23,8 @@ The core team will be monitoring for pull requests. When we get one, we'll run s 1. Fork the repo and create your branch from `master`. ```sh - git clone https://github.com/facebook/metro-bundler - cd metro-bundler + git clone https://github.com/facebook/metro + cd metro git checkout -b my_branch ``` @@ -69,7 +69,7 @@ Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe ## How to Get in Touch -* Discord - [#metro-bundler](https://discordapp.com/channels/102860784329052160/103622435865104384) on [Reactiflux](http://www.reactiflux.com/) +* Discord - [#metro](https://discordapp.com/channels/102860784329052160/103622435865104384) on [Reactiflux](http://www.reactiflux.com/) ### Code Conventions @@ -85,4 +85,4 @@ Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe ## License -By contributing to metro-bundler, you agree that your contributions will be licensed under its BSD license. +By contributing to Metro, you agree that your contributions will be licensed under its BSD license. diff --git a/LICENSE b/LICENSE index 8319944d..6b6eba33 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ BSD License -For metro-bundler software +For Metro software Copyright (c) 2014-present, Facebook, Inc. All rights reserved. diff --git a/PATENTS b/PATENTS index 5a947c94..e137ee82 100644 --- a/PATENTS +++ b/PATENTS @@ -1,6 +1,6 @@ Additional Grant of Patent Rights Version 2 -"Software" means the metro-bundler software distributed by Facebook, Inc. +"Software" means the Metro software distributed by Facebook, Inc. Facebook, Inc. (“Facebook”) hereby grants to each recipient of the Software (“you”) a perpetual, worldwide, royalty-free, non-exclusive, irrevocable diff --git a/README.md b/README.md index e3843cff..f674c47c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Metro Bundler -[![CircleCI Build Status](https://circleci.com/gh/facebook/metro-bundler.svg?style=shield)](https://circleci.com/gh/facebook/metro-bundler) -[![npm version](https://badge.fury.io/js/metro-bundler.svg)](http://badge.fury.io/js/metro-bundler) +[![CircleCI Build Status](https://circleci.com/gh/facebook/metro.svg?style=shield)](https://circleci.com/gh/facebook/metro) +[![npm version](https://badge.fury.io/js/metro.svg)](http://badge.fury.io/js/metro) 🚇 The JavaScript bundler for React Native. @@ -13,4 +13,4 @@ This project was previously part of the [react-native](https://github.com/facebo ## Installation & Documentation -See [the Metro website](https://facebook.github.io/metro-bundler/) for documentation. +See [the Metro website](https://facebook.github.io/metro/) for documentation. diff --git a/circle.yml b/circle.yml index fa72ef91..107c85d0 100644 --- a/circle.yml +++ b/circle.yml @@ -13,7 +13,7 @@ aliases: version: 2 jobs: test-node-9: - working_directory: ~/metro-bundler/packager/metro-bundler + working_directory: ~/metro/packager/metro docker: - image: circleci/node:9 steps: @@ -24,7 +24,7 @@ jobs: - run: yarn run test-ci test-node-8: - working_directory: ~/metro-bundler/packager/metro-bundler + working_directory: ~/metro/packager/metro docker: - image: circleci/node:8 steps: @@ -35,7 +35,7 @@ jobs: - run: yarn run test-ci test-node-6: - working_directory: ~/metro-bundler/packager/metro-bundler + working_directory: ~/metro/packager/metro docker: - image: circleci/node:6 steps: @@ -47,21 +47,21 @@ jobs: - run: yarn run test-ci deploy: - working_directory: ~/metro-bundler/packager/metro-bundler + working_directory: ~/metro/packager/metro docker: - image: circleci/node:8 steps: - checkout - restore-cache: *restore-cache - run: - working_directory: packages/metro-bundler + working_directory: packages/metro command: yarn --no-progress - save-cache: *save-cache - run: - working_directory: ~/metro-bundler/ + working_directory: ~/metro/ run: yarn build - run: - working_directory: packages/metro-bundler + working_directory: packages/metro command: | yarn prepare-release npm publish diff --git a/docs/GettingStarted.md b/docs/GettingStarted.md index bdff6e40..5d7caecd 100644 --- a/docs/GettingStarted.md +++ b/docs/GettingStarted.md @@ -6,21 +6,21 @@ title: Getting Started Install Metro using `npm`: ``` -npm install --save-dev metro-bundler +npm install --save-dev metro ``` Or via [`yarn`](https://yarnpkg.com/en/package/jest): ``` -yarn add --dev metro-bundler +yarn add --dev metro ``` -## Running `metro-bundler` +## Running `metro` Right now, Metro Bundler cannot run by itself. Instead, some functions are exposed so that the configuration can be passed into it. First, require the module by doing: ```js -const metroBundler = require('metro-bundler'); +const metroBundler = require('metro'); ``` Within the object returned, two main methods are given: @@ -34,9 +34,9 @@ Given a set of options (same ones as the `build` method), a `metro-server` will 'use strict'; const http = require('http'); -const metroBundler = require('metro-bundler'); -const TerminalReporter = require('metro-bundler/src/lib/TerminalReporter'); -const Terminal = require('metro-bundler/src/lib/Terminal'); +const metroBundler = require('metro'); +const TerminalReporter = require('metro/src/lib/TerminalReporter'); +const Terminal = require('metro/src/lib/Terminal'); const metroBundlerServer = metroBundler.createServer({ assetRegistryPath: __dirname, diff --git a/flow-typed/console.js b/flow-typed/console.js.flow similarity index 100% rename from flow-typed/console.js rename to flow-typed/console.js.flow diff --git a/packages/metro-bundler/.eslintrc b/packages/metro/.eslintrc similarity index 100% rename from packages/metro-bundler/.eslintrc rename to packages/metro/.eslintrc diff --git a/packages/metro-bundler/.npmignore b/packages/metro/.npmignore similarity index 100% rename from packages/metro-bundler/.npmignore rename to packages/metro/.npmignore diff --git a/packages/metro-bundler/README.md b/packages/metro/README.md similarity index 97% rename from packages/metro-bundler/README.md rename to packages/metro/README.md index 08a093b3..d0bdfc3a 100644 --- a/packages/metro-bundler/README.md +++ b/packages/metro/README.md @@ -1,4 +1,4 @@ -# metro-bundler +# Metro 🚇 The JavaScript bundler for React Native. diff --git a/packages/metro-bundler/package.json b/packages/metro/package.json similarity index 95% rename from packages/metro-bundler/package.json rename to packages/metro/package.json index 21c5f943..e97bd352 100644 --- a/packages/metro-bundler/package.json +++ b/packages/metro/package.json @@ -1,12 +1,12 @@ { "version": "0.22.1", - "name": "metro-bundler", + "name": "metro", "description": "🚇 The JavaScript bundler for React Native.", "main": "src/index.js", "bin": "src/cli.js", "repository": { "type": "git", - "url": "git@github.com:facebook/metro-bundler.git" + "url": "git@github.com:facebook/metro.git" }, "scripts": { "prepare-release": "test -d build && rm -rf src.real && mv src src.real && mv build src", diff --git a/packages/metro-bundler/rn-babelrc.json b/packages/metro/rn-babelrc.json similarity index 100% rename from packages/metro-bundler/rn-babelrc.json rename to packages/metro/rn-babelrc.json diff --git a/packages/metro-bundler/src/AssetServer/__tests__/AssetServer-test.js b/packages/metro/src/AssetServer/__tests__/AssetServer-test.js similarity index 100% rename from packages/metro-bundler/src/AssetServer/__tests__/AssetServer-test.js rename to packages/metro/src/AssetServer/__tests__/AssetServer-test.js diff --git a/packages/metro-bundler/src/AssetServer/index.js b/packages/metro/src/AssetServer/index.js similarity index 100% rename from packages/metro-bundler/src/AssetServer/index.js rename to packages/metro/src/AssetServer/index.js diff --git a/packages/metro-bundler/src/Bundler/__tests__/Bundler-test.js b/packages/metro/src/Bundler/__tests__/Bundler-test.js similarity index 100% rename from packages/metro-bundler/src/Bundler/__tests__/Bundler-test.js rename to packages/metro/src/Bundler/__tests__/Bundler-test.js diff --git a/packages/metro-bundler/src/Bundler/__tests__/__snapshots__/Bundler-test.js.snap b/packages/metro/src/Bundler/__tests__/__snapshots__/Bundler-test.js.snap similarity index 100% rename from packages/metro-bundler/src/Bundler/__tests__/__snapshots__/Bundler-test.js.snap rename to packages/metro/src/Bundler/__tests__/__snapshots__/Bundler-test.js.snap diff --git a/packages/metro-bundler/src/Bundler/__tests__/__snapshots__/util-test.js.snap b/packages/metro/src/Bundler/__tests__/__snapshots__/util-test.js.snap similarity index 100% rename from packages/metro-bundler/src/Bundler/__tests__/__snapshots__/util-test.js.snap rename to packages/metro/src/Bundler/__tests__/__snapshots__/util-test.js.snap diff --git a/packages/metro-bundler/src/Bundler/__tests__/util-test.js b/packages/metro/src/Bundler/__tests__/util-test.js similarity index 100% rename from packages/metro-bundler/src/Bundler/__tests__/util-test.js rename to packages/metro/src/Bundler/__tests__/util-test.js diff --git a/packages/metro-bundler/src/Bundler/index.js b/packages/metro/src/Bundler/index.js similarity index 99% rename from packages/metro-bundler/src/Bundler/index.js rename to packages/metro/src/Bundler/index.js index 8de17cec..b6eb6669 100644 --- a/packages/metro-bundler/src/Bundler/index.js +++ b/packages/metro/src/Bundler/index.js @@ -145,7 +145,7 @@ class Bundler { }); const cacheKeyParts = [ - 'metro-bundler-cache', + 'metro-cache', VERSION, opts.cacheVersion, stableProjectRoots diff --git a/packages/metro-bundler/src/Bundler/source-map/B64Builder.js b/packages/metro/src/Bundler/source-map/B64Builder.js similarity index 100% rename from packages/metro-bundler/src/Bundler/source-map/B64Builder.js rename to packages/metro/src/Bundler/source-map/B64Builder.js diff --git a/packages/metro-bundler/src/Bundler/source-map/Generator.js b/packages/metro/src/Bundler/source-map/Generator.js similarity index 100% rename from packages/metro-bundler/src/Bundler/source-map/Generator.js rename to packages/metro/src/Bundler/source-map/Generator.js diff --git a/packages/metro-bundler/src/Bundler/source-map/__tests__/B64Builder-test.js b/packages/metro/src/Bundler/source-map/__tests__/B64Builder-test.js similarity index 100% rename from packages/metro-bundler/src/Bundler/source-map/__tests__/B64Builder-test.js rename to packages/metro/src/Bundler/source-map/__tests__/B64Builder-test.js diff --git a/packages/metro-bundler/src/Bundler/source-map/__tests__/Generator-test.js b/packages/metro/src/Bundler/source-map/__tests__/Generator-test.js similarity index 100% rename from packages/metro-bundler/src/Bundler/source-map/__tests__/Generator-test.js rename to packages/metro/src/Bundler/source-map/__tests__/Generator-test.js diff --git a/packages/metro-bundler/src/Bundler/source-map/__tests__/__snapshots__/source-map-test.js.snap b/packages/metro/src/Bundler/source-map/__tests__/__snapshots__/source-map-test.js.snap similarity index 100% rename from packages/metro-bundler/src/Bundler/source-map/__tests__/__snapshots__/source-map-test.js.snap rename to packages/metro/src/Bundler/source-map/__tests__/__snapshots__/source-map-test.js.snap diff --git a/packages/metro-bundler/src/Bundler/source-map/__tests__/source-map-test.js b/packages/metro/src/Bundler/source-map/__tests__/source-map-test.js similarity index 100% rename from packages/metro-bundler/src/Bundler/source-map/__tests__/source-map-test.js rename to packages/metro/src/Bundler/source-map/__tests__/source-map-test.js diff --git a/packages/metro-bundler/src/Bundler/source-map/encode.js b/packages/metro/src/Bundler/source-map/encode.js similarity index 100% rename from packages/metro-bundler/src/Bundler/source-map/encode.js rename to packages/metro/src/Bundler/source-map/encode.js diff --git a/packages/metro-bundler/src/Bundler/source-map/package.json b/packages/metro/src/Bundler/source-map/package.json similarity index 100% rename from packages/metro-bundler/src/Bundler/source-map/package.json rename to packages/metro/src/Bundler/source-map/package.json diff --git a/packages/metro-bundler/src/Bundler/source-map/source-map.js b/packages/metro/src/Bundler/source-map/source-map.js similarity index 100% rename from packages/metro-bundler/src/Bundler/source-map/source-map.js rename to packages/metro/src/Bundler/source-map/source-map.js diff --git a/packages/metro-bundler/src/Bundler/util.js b/packages/metro/src/Bundler/util.js similarity index 100% rename from packages/metro-bundler/src/Bundler/util.js rename to packages/metro/src/Bundler/util.js diff --git a/packages/metro-bundler/src/Config.js b/packages/metro/src/Config.js similarity index 99% rename from packages/metro-bundler/src/Config.js rename to packages/metro/src/Config.js index f892da9a..cadd9423 100644 --- a/packages/metro-bundler/src/Config.js +++ b/packages/metro/src/Config.js @@ -151,7 +151,7 @@ const DEFAULT = ({ getPlatforms: () => [], getPolyfillModuleNames: () => [], // We assume the default project path is two levels up from - // node_modules/metro-bundler/ + // node_modules/metro/ getProjectRoots: () => [path.resolve(__dirname, '../..')], getProvidesModuleNodeModules: () => providesModuleNodeModules.slice(), getSourceExts: () => [], diff --git a/packages/metro-bundler/src/DeltaBundler/DeltaCalculator.js b/packages/metro/src/DeltaBundler/DeltaCalculator.js similarity index 100% rename from packages/metro-bundler/src/DeltaBundler/DeltaCalculator.js rename to packages/metro/src/DeltaBundler/DeltaCalculator.js diff --git a/packages/metro-bundler/src/DeltaBundler/DeltaPatcher.js b/packages/metro/src/DeltaBundler/DeltaPatcher.js similarity index 100% rename from packages/metro-bundler/src/DeltaBundler/DeltaPatcher.js rename to packages/metro/src/DeltaBundler/DeltaPatcher.js diff --git a/packages/metro-bundler/src/DeltaBundler/DeltaTransformer.js b/packages/metro/src/DeltaBundler/DeltaTransformer.js similarity index 100% rename from packages/metro-bundler/src/DeltaBundler/DeltaTransformer.js rename to packages/metro/src/DeltaBundler/DeltaTransformer.js diff --git a/packages/metro-bundler/src/DeltaBundler/Serializers.js b/packages/metro/src/DeltaBundler/Serializers.js similarity index 100% rename from packages/metro-bundler/src/DeltaBundler/Serializers.js rename to packages/metro/src/DeltaBundler/Serializers.js diff --git a/packages/metro-bundler/src/DeltaBundler/__tests__/DeltaBundler-test.js b/packages/metro/src/DeltaBundler/__tests__/DeltaBundler-test.js similarity index 100% rename from packages/metro-bundler/src/DeltaBundler/__tests__/DeltaBundler-test.js rename to packages/metro/src/DeltaBundler/__tests__/DeltaBundler-test.js diff --git a/packages/metro-bundler/src/DeltaBundler/__tests__/DeltaCalculator-test.js b/packages/metro/src/DeltaBundler/__tests__/DeltaCalculator-test.js similarity index 100% rename from packages/metro-bundler/src/DeltaBundler/__tests__/DeltaCalculator-test.js rename to packages/metro/src/DeltaBundler/__tests__/DeltaCalculator-test.js diff --git a/packages/metro-bundler/src/DeltaBundler/__tests__/DeltaPatcher-test.js b/packages/metro/src/DeltaBundler/__tests__/DeltaPatcher-test.js similarity index 100% rename from packages/metro-bundler/src/DeltaBundler/__tests__/DeltaPatcher-test.js rename to packages/metro/src/DeltaBundler/__tests__/DeltaPatcher-test.js diff --git a/packages/metro-bundler/src/DeltaBundler/__tests__/Serializers-test.js b/packages/metro/src/DeltaBundler/__tests__/Serializers-test.js similarity index 100% rename from packages/metro-bundler/src/DeltaBundler/__tests__/Serializers-test.js rename to packages/metro/src/DeltaBundler/__tests__/Serializers-test.js diff --git a/packages/metro-bundler/src/DeltaBundler/__tests__/__snapshots__/DeltaPatcher-test.js.snap b/packages/metro/src/DeltaBundler/__tests__/__snapshots__/DeltaPatcher-test.js.snap similarity index 100% rename from packages/metro-bundler/src/DeltaBundler/__tests__/__snapshots__/DeltaPatcher-test.js.snap rename to packages/metro/src/DeltaBundler/__tests__/__snapshots__/DeltaPatcher-test.js.snap diff --git a/packages/metro-bundler/src/DeltaBundler/__tests__/__snapshots__/Serializers-test.js.snap b/packages/metro/src/DeltaBundler/__tests__/__snapshots__/Serializers-test.js.snap similarity index 100% rename from packages/metro-bundler/src/DeltaBundler/__tests__/__snapshots__/Serializers-test.js.snap rename to packages/metro/src/DeltaBundler/__tests__/__snapshots__/Serializers-test.js.snap diff --git a/packages/metro-bundler/src/DeltaBundler/__tests__/__snapshots__/traverseDependencies-integration-test.js.snap b/packages/metro/src/DeltaBundler/__tests__/__snapshots__/traverseDependencies-integration-test.js.snap similarity index 100% rename from packages/metro-bundler/src/DeltaBundler/__tests__/__snapshots__/traverseDependencies-integration-test.js.snap rename to packages/metro/src/DeltaBundler/__tests__/__snapshots__/traverseDependencies-integration-test.js.snap diff --git a/packages/metro-bundler/src/DeltaBundler/__tests__/traverseDependencies-integration-test.js b/packages/metro/src/DeltaBundler/__tests__/traverseDependencies-integration-test.js similarity index 100% rename from packages/metro-bundler/src/DeltaBundler/__tests__/traverseDependencies-integration-test.js rename to packages/metro/src/DeltaBundler/__tests__/traverseDependencies-integration-test.js diff --git a/packages/metro-bundler/src/DeltaBundler/__tests__/traverseDependencies-test.js b/packages/metro/src/DeltaBundler/__tests__/traverseDependencies-test.js similarity index 100% rename from packages/metro-bundler/src/DeltaBundler/__tests__/traverseDependencies-test.js rename to packages/metro/src/DeltaBundler/__tests__/traverseDependencies-test.js diff --git a/packages/metro-bundler/src/DeltaBundler/index.js b/packages/metro/src/DeltaBundler/index.js similarity index 100% rename from packages/metro-bundler/src/DeltaBundler/index.js rename to packages/metro/src/DeltaBundler/index.js diff --git a/packages/metro-bundler/src/DeltaBundler/traverseDependencies.js b/packages/metro/src/DeltaBundler/traverseDependencies.js similarity index 100% rename from packages/metro-bundler/src/DeltaBundler/traverseDependencies.js rename to packages/metro/src/DeltaBundler/traverseDependencies.js diff --git a/packages/metro-bundler/src/HmrServer/__tests__/HmrServer-test.js b/packages/metro/src/HmrServer/__tests__/HmrServer-test.js similarity index 100% rename from packages/metro-bundler/src/HmrServer/__tests__/HmrServer-test.js rename to packages/metro/src/HmrServer/__tests__/HmrServer-test.js diff --git a/packages/metro-bundler/src/HmrServer/getBundlingOptionsForHmr.js b/packages/metro/src/HmrServer/getBundlingOptionsForHmr.js similarity index 100% rename from packages/metro-bundler/src/HmrServer/getBundlingOptionsForHmr.js rename to packages/metro/src/HmrServer/getBundlingOptionsForHmr.js diff --git a/packages/metro-bundler/src/HmrServer/index.js b/packages/metro/src/HmrServer/index.js similarity index 100% rename from packages/metro-bundler/src/HmrServer/index.js rename to packages/metro/src/HmrServer/index.js diff --git a/packages/metro-bundler/src/JSTransformer/README.md b/packages/metro/src/JSTransformer/README.md similarity index 100% rename from packages/metro-bundler/src/JSTransformer/README.md rename to packages/metro/src/JSTransformer/README.md diff --git a/packages/metro-bundler/src/JSTransformer/__mocks__/lodash.js b/packages/metro/src/JSTransformer/__mocks__/lodash.js similarity index 100% rename from packages/metro-bundler/src/JSTransformer/__mocks__/lodash.js rename to packages/metro/src/JSTransformer/__mocks__/lodash.js diff --git a/packages/metro-bundler/src/JSTransformer/__mocks__/worker.js b/packages/metro/src/JSTransformer/__mocks__/worker.js similarity index 100% rename from packages/metro-bundler/src/JSTransformer/__mocks__/worker.js rename to packages/metro/src/JSTransformer/__mocks__/worker.js diff --git a/packages/metro-bundler/src/JSTransformer/__tests__/Transformer-test.js b/packages/metro/src/JSTransformer/__tests__/Transformer-test.js similarity index 100% rename from packages/metro-bundler/src/JSTransformer/__tests__/Transformer-test.js rename to packages/metro/src/JSTransformer/__tests__/Transformer-test.js diff --git a/packages/metro-bundler/src/JSTransformer/index.js b/packages/metro/src/JSTransformer/index.js similarity index 100% rename from packages/metro-bundler/src/JSTransformer/index.js rename to packages/metro/src/JSTransformer/index.js diff --git a/packages/metro-bundler/src/JSTransformer/worker/__tests__/constant-folding-test.js b/packages/metro/src/JSTransformer/worker/__tests__/constant-folding-test.js similarity index 100% rename from packages/metro-bundler/src/JSTransformer/worker/__tests__/constant-folding-test.js rename to packages/metro/src/JSTransformer/worker/__tests__/constant-folding-test.js diff --git a/packages/metro-bundler/src/JSTransformer/worker/__tests__/extract-dependencies-test.js b/packages/metro/src/JSTransformer/worker/__tests__/extract-dependencies-test.js similarity index 100% rename from packages/metro-bundler/src/JSTransformer/worker/__tests__/extract-dependencies-test.js rename to packages/metro/src/JSTransformer/worker/__tests__/extract-dependencies-test.js diff --git a/packages/metro-bundler/src/JSTransformer/worker/__tests__/inline-test.js b/packages/metro/src/JSTransformer/worker/__tests__/inline-test.js similarity index 100% rename from packages/metro-bundler/src/JSTransformer/worker/__tests__/inline-test.js rename to packages/metro/src/JSTransformer/worker/__tests__/inline-test.js diff --git a/packages/metro-bundler/src/JSTransformer/worker/__tests__/minify-test.js b/packages/metro/src/JSTransformer/worker/__tests__/minify-test.js similarity index 100% rename from packages/metro-bundler/src/JSTransformer/worker/__tests__/minify-test.js rename to packages/metro/src/JSTransformer/worker/__tests__/minify-test.js diff --git a/packages/metro-bundler/src/JSTransformer/worker/__tests__/worker-test.js b/packages/metro/src/JSTransformer/worker/__tests__/worker-test.js similarity index 100% rename from packages/metro-bundler/src/JSTransformer/worker/__tests__/worker-test.js rename to packages/metro/src/JSTransformer/worker/__tests__/worker-test.js diff --git a/packages/metro-bundler/src/JSTransformer/worker/constant-folding.js b/packages/metro/src/JSTransformer/worker/constant-folding.js similarity index 100% rename from packages/metro-bundler/src/JSTransformer/worker/constant-folding.js rename to packages/metro/src/JSTransformer/worker/constant-folding.js diff --git a/packages/metro-bundler/src/JSTransformer/worker/extract-dependencies.js b/packages/metro/src/JSTransformer/worker/extract-dependencies.js similarity index 100% rename from packages/metro-bundler/src/JSTransformer/worker/extract-dependencies.js rename to packages/metro/src/JSTransformer/worker/extract-dependencies.js diff --git a/packages/metro-bundler/src/JSTransformer/worker/index.js b/packages/metro/src/JSTransformer/worker/index.js similarity index 100% rename from packages/metro-bundler/src/JSTransformer/worker/index.js rename to packages/metro/src/JSTransformer/worker/index.js diff --git a/packages/metro-bundler/src/JSTransformer/worker/inline.js b/packages/metro/src/JSTransformer/worker/inline.js similarity index 100% rename from packages/metro-bundler/src/JSTransformer/worker/inline.js rename to packages/metro/src/JSTransformer/worker/inline.js diff --git a/packages/metro-bundler/src/JSTransformer/worker/minify.js b/packages/metro/src/JSTransformer/worker/minify.js similarity index 100% rename from packages/metro-bundler/src/JSTransformer/worker/minify.js rename to packages/metro/src/JSTransformer/worker/minify.js diff --git a/packages/metro-bundler/src/Logger/Types.js b/packages/metro/src/Logger/Types.js similarity index 100% rename from packages/metro-bundler/src/Logger/Types.js rename to packages/metro/src/Logger/Types.js diff --git a/packages/metro-bundler/src/Logger/__mocks__/chalk.js b/packages/metro/src/Logger/__mocks__/chalk.js similarity index 100% rename from packages/metro-bundler/src/Logger/__mocks__/chalk.js rename to packages/metro/src/Logger/__mocks__/chalk.js diff --git a/packages/metro-bundler/src/Logger/__tests__/Logger-test.js b/packages/metro/src/Logger/__tests__/Logger-test.js similarity index 100% rename from packages/metro-bundler/src/Logger/__tests__/Logger-test.js rename to packages/metro/src/Logger/__tests__/Logger-test.js diff --git a/packages/metro-bundler/src/Logger/index.js b/packages/metro/src/Logger/index.js similarity index 100% rename from packages/metro-bundler/src/Logger/index.js rename to packages/metro/src/Logger/index.js diff --git a/packages/metro-bundler/src/ModuleGraph/Graph.js b/packages/metro/src/ModuleGraph/Graph.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/Graph.js rename to packages/metro/src/ModuleGraph/Graph.js diff --git a/packages/metro-bundler/src/ModuleGraph/ModuleGraph.js b/packages/metro/src/ModuleGraph/ModuleGraph.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/ModuleGraph.js rename to packages/metro/src/ModuleGraph/ModuleGraph.js diff --git a/packages/metro-bundler/src/ModuleGraph/__tests__/Graph-test.js b/packages/metro/src/ModuleGraph/__tests__/Graph-test.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/__tests__/Graph-test.js rename to packages/metro/src/ModuleGraph/__tests__/Graph-test.js diff --git a/packages/metro-bundler/src/ModuleGraph/__tests__/ModuleGraph-test.js b/packages/metro/src/ModuleGraph/__tests__/ModuleGraph-test.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/__tests__/ModuleGraph-test.js rename to packages/metro/src/ModuleGraph/__tests__/ModuleGraph-test.js diff --git a/packages/metro-bundler/src/ModuleGraph/module.js b/packages/metro/src/ModuleGraph/module.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/module.js rename to packages/metro/src/ModuleGraph/module.js diff --git a/packages/metro-bundler/src/ModuleGraph/node-haste/HasteFS.js b/packages/metro/src/ModuleGraph/node-haste/HasteFS.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/node-haste/HasteFS.js rename to packages/metro/src/ModuleGraph/node-haste/HasteFS.js diff --git a/packages/metro-bundler/src/ModuleGraph/node-haste/Module.js b/packages/metro/src/ModuleGraph/node-haste/Module.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/node-haste/Module.js rename to packages/metro/src/ModuleGraph/node-haste/Module.js diff --git a/packages/metro-bundler/src/ModuleGraph/node-haste/ModuleCache.js b/packages/metro/src/ModuleGraph/node-haste/ModuleCache.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/node-haste/ModuleCache.js rename to packages/metro/src/ModuleGraph/node-haste/ModuleCache.js diff --git a/packages/metro-bundler/src/ModuleGraph/node-haste/Package.js b/packages/metro/src/ModuleGraph/node-haste/Package.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/node-haste/Package.js rename to packages/metro/src/ModuleGraph/node-haste/Package.js diff --git a/packages/metro-bundler/src/ModuleGraph/node-haste/node-haste.flow.js b/packages/metro/src/ModuleGraph/node-haste/node-haste.flow.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/node-haste/node-haste.flow.js rename to packages/metro/src/ModuleGraph/node-haste/node-haste.flow.js diff --git a/packages/metro-bundler/src/ModuleGraph/node-haste/node-haste.js b/packages/metro/src/ModuleGraph/node-haste/node-haste.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/node-haste/node-haste.js rename to packages/metro/src/ModuleGraph/node-haste/node-haste.js diff --git a/packages/metro-bundler/src/ModuleGraph/node-haste/package.json b/packages/metro/src/ModuleGraph/node-haste/package.json similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/node-haste/package.json rename to packages/metro/src/ModuleGraph/node-haste/package.json diff --git a/packages/metro-bundler/src/ModuleGraph/output/__tests__/dependencies-dot.js b/packages/metro/src/ModuleGraph/output/__tests__/dependencies-dot.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/output/__tests__/dependencies-dot.js rename to packages/metro/src/ModuleGraph/output/__tests__/dependencies-dot.js diff --git a/packages/metro-bundler/src/ModuleGraph/output/__tests__/indexed-ram-bundle-test.js b/packages/metro/src/ModuleGraph/output/__tests__/indexed-ram-bundle-test.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/output/__tests__/indexed-ram-bundle-test.js rename to packages/metro/src/ModuleGraph/output/__tests__/indexed-ram-bundle-test.js diff --git a/packages/metro-bundler/src/ModuleGraph/output/__tests__/multiple-files-ram-bundle-test.js b/packages/metro/src/ModuleGraph/output/__tests__/multiple-files-ram-bundle-test.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/output/__tests__/multiple-files-ram-bundle-test.js rename to packages/metro/src/ModuleGraph/output/__tests__/multiple-files-ram-bundle-test.js diff --git a/packages/metro-bundler/src/ModuleGraph/output/__tests__/util-test.js b/packages/metro/src/ModuleGraph/output/__tests__/util-test.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/output/__tests__/util-test.js rename to packages/metro/src/ModuleGraph/output/__tests__/util-test.js diff --git a/packages/metro-bundler/src/ModuleGraph/output/dependencies-dot.js b/packages/metro/src/ModuleGraph/output/dependencies-dot.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/output/dependencies-dot.js rename to packages/metro/src/ModuleGraph/output/dependencies-dot.js diff --git a/packages/metro-bundler/src/ModuleGraph/output/indexed-ram-bundle.js b/packages/metro/src/ModuleGraph/output/indexed-ram-bundle.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/output/indexed-ram-bundle.js rename to packages/metro/src/ModuleGraph/output/indexed-ram-bundle.js diff --git a/packages/metro-bundler/src/ModuleGraph/output/multiple-files-ram-bundle.js b/packages/metro/src/ModuleGraph/output/multiple-files-ram-bundle.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/output/multiple-files-ram-bundle.js rename to packages/metro/src/ModuleGraph/output/multiple-files-ram-bundle.js diff --git a/packages/metro-bundler/src/ModuleGraph/output/plain-bundle.js b/packages/metro/src/ModuleGraph/output/plain-bundle.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/output/plain-bundle.js rename to packages/metro/src/ModuleGraph/output/plain-bundle.js diff --git a/packages/metro-bundler/src/ModuleGraph/output/source-map.js b/packages/metro/src/ModuleGraph/output/source-map.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/output/source-map.js rename to packages/metro/src/ModuleGraph/output/source-map.js diff --git a/packages/metro-bundler/src/ModuleGraph/output/util.js b/packages/metro/src/ModuleGraph/output/util.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/output/util.js rename to packages/metro/src/ModuleGraph/output/util.js diff --git a/packages/metro-bundler/src/ModuleGraph/package.json b/packages/metro/src/ModuleGraph/package.json similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/package.json rename to packages/metro/src/ModuleGraph/package.json diff --git a/packages/metro-bundler/src/ModuleGraph/silent-console.js b/packages/metro/src/ModuleGraph/silent-console.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/silent-console.js rename to packages/metro/src/ModuleGraph/silent-console.js diff --git a/packages/metro-bundler/src/ModuleGraph/test-helpers.js b/packages/metro/src/ModuleGraph/test-helpers.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/test-helpers.js rename to packages/metro/src/ModuleGraph/test-helpers.js diff --git a/packages/metro-bundler/src/ModuleGraph/types.flow.js b/packages/metro/src/ModuleGraph/types.flow.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/types.flow.js rename to packages/metro/src/ModuleGraph/types.flow.js diff --git a/packages/metro-bundler/src/ModuleGraph/worker.js b/packages/metro/src/ModuleGraph/worker.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/worker.js rename to packages/metro/src/ModuleGraph/worker.js diff --git a/packages/metro-bundler/src/ModuleGraph/worker/JsFileWrapping.js b/packages/metro/src/ModuleGraph/worker/JsFileWrapping.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/worker/JsFileWrapping.js rename to packages/metro/src/ModuleGraph/worker/JsFileWrapping.js diff --git a/packages/metro-bundler/src/ModuleGraph/worker/Platforms.js b/packages/metro/src/ModuleGraph/worker/Platforms.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/worker/Platforms.js rename to packages/metro/src/ModuleGraph/worker/Platforms.js diff --git a/packages/metro-bundler/src/ModuleGraph/worker/__tests__/__snapshots__/transform-module-test.js.snap b/packages/metro/src/ModuleGraph/worker/__tests__/__snapshots__/transform-module-test.js.snap similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/worker/__tests__/__snapshots__/transform-module-test.js.snap rename to packages/metro/src/ModuleGraph/worker/__tests__/__snapshots__/transform-module-test.js.snap diff --git a/packages/metro-bundler/src/ModuleGraph/worker/__tests__/collect-dependencies-test.js b/packages/metro/src/ModuleGraph/worker/__tests__/collect-dependencies-test.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/worker/__tests__/collect-dependencies-test.js rename to packages/metro/src/ModuleGraph/worker/__tests__/collect-dependencies-test.js diff --git a/packages/metro-bundler/src/ModuleGraph/worker/__tests__/optimize-module-test.js b/packages/metro/src/ModuleGraph/worker/__tests__/optimize-module-test.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/worker/__tests__/optimize-module-test.js rename to packages/metro/src/ModuleGraph/worker/__tests__/optimize-module-test.js diff --git a/packages/metro-bundler/src/ModuleGraph/worker/__tests__/transform-module-test.js b/packages/metro/src/ModuleGraph/worker/__tests__/transform-module-test.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/worker/__tests__/transform-module-test.js rename to packages/metro/src/ModuleGraph/worker/__tests__/transform-module-test.js diff --git a/packages/metro-bundler/src/ModuleGraph/worker/__tests__/wrap-worker-fn-test.js b/packages/metro/src/ModuleGraph/worker/__tests__/wrap-worker-fn-test.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/worker/__tests__/wrap-worker-fn-test.js rename to packages/metro/src/ModuleGraph/worker/__tests__/wrap-worker-fn-test.js diff --git a/packages/metro-bundler/src/ModuleGraph/worker/collect-dependencies.js b/packages/metro/src/ModuleGraph/worker/collect-dependencies.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/worker/collect-dependencies.js rename to packages/metro/src/ModuleGraph/worker/collect-dependencies.js diff --git a/packages/metro-bundler/src/ModuleGraph/worker/generate.js b/packages/metro/src/ModuleGraph/worker/generate.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/worker/generate.js rename to packages/metro/src/ModuleGraph/worker/generate.js diff --git a/packages/metro-bundler/src/ModuleGraph/worker/optimize-module.js b/packages/metro/src/ModuleGraph/worker/optimize-module.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/worker/optimize-module.js rename to packages/metro/src/ModuleGraph/worker/optimize-module.js diff --git a/packages/metro-bundler/src/ModuleGraph/worker/transform-module.js b/packages/metro/src/ModuleGraph/worker/transform-module.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/worker/transform-module.js rename to packages/metro/src/ModuleGraph/worker/transform-module.js diff --git a/packages/metro-bundler/src/ModuleGraph/worker/wrap-worker-fn.js b/packages/metro/src/ModuleGraph/worker/wrap-worker-fn.js similarity index 100% rename from packages/metro-bundler/src/ModuleGraph/worker/wrap-worker-fn.js rename to packages/metro/src/ModuleGraph/worker/wrap-worker-fn.js diff --git a/packages/metro-bundler/src/Resolver/__tests__/Resolver-test.js b/packages/metro/src/Resolver/__tests__/Resolver-test.js similarity index 100% rename from packages/metro-bundler/src/Resolver/__tests__/Resolver-test.js rename to packages/metro/src/Resolver/__tests__/Resolver-test.js diff --git a/packages/metro-bundler/src/Resolver/index.js b/packages/metro/src/Resolver/index.js similarity index 100% rename from packages/metro-bundler/src/Resolver/index.js rename to packages/metro/src/Resolver/index.js diff --git a/packages/metro-bundler/src/Resolver/polyfills/__tests__/require-test.js b/packages/metro/src/Resolver/polyfills/__tests__/require-test.js similarity index 100% rename from packages/metro-bundler/src/Resolver/polyfills/__tests__/require-test.js rename to packages/metro/src/Resolver/polyfills/__tests__/require-test.js diff --git a/packages/metro-bundler/src/Resolver/polyfills/prelude.js b/packages/metro/src/Resolver/polyfills/prelude.js similarity index 100% rename from packages/metro-bundler/src/Resolver/polyfills/prelude.js rename to packages/metro/src/Resolver/polyfills/prelude.js diff --git a/packages/metro-bundler/src/Resolver/polyfills/prelude_dev.js b/packages/metro/src/Resolver/polyfills/prelude_dev.js similarity index 100% rename from packages/metro-bundler/src/Resolver/polyfills/prelude_dev.js rename to packages/metro/src/Resolver/polyfills/prelude_dev.js diff --git a/packages/metro-bundler/src/Resolver/polyfills/require.js b/packages/metro/src/Resolver/polyfills/require.js similarity index 98% rename from packages/metro-bundler/src/Resolver/polyfills/require.js rename to packages/metro/src/Resolver/polyfills/require.js index 87f3b10d..8167be31 100644 --- a/packages/metro-bundler/src/Resolver/polyfills/require.js +++ b/packages/metro/src/Resolver/polyfills/require.js @@ -197,8 +197,8 @@ function loadModuleImplementation(moduleId, module) { } // keep args in sync with with defineModuleCode in - // metro-bundler/src/Resolver/index.js - // and metro-bundler/src/ModuleGraph/worker.js + // metro/src/Resolver/index.js + // and metro/src/ModuleGraph/worker.js factory(global, require, moduleObject, exports, dependencyMap); // avoid removing factory in DEV mode as it breaks HMR diff --git a/packages/metro-bundler/src/Server/MultipartResponse.js b/packages/metro/src/Server/MultipartResponse.js similarity index 100% rename from packages/metro-bundler/src/Server/MultipartResponse.js rename to packages/metro/src/Server/MultipartResponse.js diff --git a/packages/metro-bundler/src/Server/__tests__/MultipartResponse-test.js b/packages/metro/src/Server/__tests__/MultipartResponse-test.js similarity index 100% rename from packages/metro-bundler/src/Server/__tests__/MultipartResponse-test.js rename to packages/metro/src/Server/__tests__/MultipartResponse-test.js diff --git a/packages/metro-bundler/src/Server/__tests__/Server-test.js b/packages/metro/src/Server/__tests__/Server-test.js similarity index 100% rename from packages/metro-bundler/src/Server/__tests__/Server-test.js rename to packages/metro/src/Server/__tests__/Server-test.js diff --git a/packages/metro-bundler/src/Server/index.js b/packages/metro/src/Server/index.js similarity index 100% rename from packages/metro-bundler/src/Server/index.js rename to packages/metro/src/Server/index.js diff --git a/packages/metro-bundler/src/Server/symbolicate/__tests__/symbolicate-test.js b/packages/metro/src/Server/symbolicate/__tests__/symbolicate-test.js similarity index 100% rename from packages/metro-bundler/src/Server/symbolicate/__tests__/symbolicate-test.js rename to packages/metro/src/Server/symbolicate/__tests__/symbolicate-test.js diff --git a/packages/metro-bundler/src/Server/symbolicate/__tests__/util-test.js b/packages/metro/src/Server/symbolicate/__tests__/util-test.js similarity index 100% rename from packages/metro-bundler/src/Server/symbolicate/__tests__/util-test.js rename to packages/metro/src/Server/symbolicate/__tests__/util-test.js diff --git a/packages/metro-bundler/src/Server/symbolicate/__tests__/worker-test.js b/packages/metro/src/Server/symbolicate/__tests__/worker-test.js similarity index 100% rename from packages/metro-bundler/src/Server/symbolicate/__tests__/worker-test.js rename to packages/metro/src/Server/symbolicate/__tests__/worker-test.js diff --git a/packages/metro-bundler/src/Server/symbolicate/package.json b/packages/metro/src/Server/symbolicate/package.json similarity index 100% rename from packages/metro-bundler/src/Server/symbolicate/package.json rename to packages/metro/src/Server/symbolicate/package.json diff --git a/packages/metro-bundler/src/Server/symbolicate/symbolicate.js b/packages/metro/src/Server/symbolicate/symbolicate.js similarity index 97% rename from packages/metro-bundler/src/Server/symbolicate/symbolicate.js rename to packages/metro/src/Server/symbolicate/symbolicate.js index d8e43b52..2d9088ef 100644 --- a/packages/metro-bundler/src/Server/symbolicate/symbolicate.js +++ b/packages/metro/src/Server/symbolicate/symbolicate.js @@ -29,7 +29,7 @@ export type Symbolicate = ( Iterable<[string, SourceMap]>, ) => Promise; -const affixes = {prefix: 'metro-bundler-symbolicate', suffix: '.sock'}; +const affixes = {prefix: 'metro-symbolicate', suffix: '.sock'}; const childPath = require.resolve('./worker'); exports.createWorker = (): Symbolicate => { diff --git a/packages/metro-bundler/src/Server/symbolicate/util.js b/packages/metro/src/Server/symbolicate/util.js similarity index 100% rename from packages/metro-bundler/src/Server/symbolicate/util.js rename to packages/metro/src/Server/symbolicate/util.js diff --git a/packages/metro-bundler/src/Server/symbolicate/worker.js b/packages/metro/src/Server/symbolicate/worker.js similarity index 100% rename from packages/metro-bundler/src/Server/symbolicate/worker.js rename to packages/metro/src/Server/symbolicate/worker.js diff --git a/packages/metro-bundler/src/__mocks__/debug.js b/packages/metro/src/__mocks__/debug.js similarity index 100% rename from packages/metro-bundler/src/__mocks__/debug.js rename to packages/metro/src/__mocks__/debug.js diff --git a/packages/metro-bundler/src/__tests__/index-test.js b/packages/metro/src/__tests__/index-test.js similarity index 100% rename from packages/metro-bundler/src/__tests__/index-test.js rename to packages/metro/src/__tests__/index-test.js diff --git a/packages/metro-bundler/src/babelRegisterOnly.js b/packages/metro/src/babelRegisterOnly.js similarity index 95% rename from packages/metro-bundler/src/babelRegisterOnly.js rename to packages/metro/src/babelRegisterOnly.js index e2d31688..2c741c37 100644 --- a/packages/metro-bundler/src/babelRegisterOnly.js +++ b/packages/metro/src/babelRegisterOnly.js @@ -47,5 +47,5 @@ function config(onlyList) { }; } -module.exports = exports = registerOnly; -exports.config = config; +module.exports = registerOnly; +module.exports.config = config; diff --git a/packages/metro-bundler/src/blacklist.js b/packages/metro/src/blacklist.js similarity index 100% rename from packages/metro-bundler/src/blacklist.js rename to packages/metro/src/blacklist.js diff --git a/packages/metro-bundler/src/cli-utils.js b/packages/metro/src/cli-utils.js similarity index 100% rename from packages/metro-bundler/src/cli-utils.js rename to packages/metro/src/cli-utils.js diff --git a/packages/metro-bundler/src/cli.js b/packages/metro/src/cli.js similarity index 100% rename from packages/metro-bundler/src/cli.js rename to packages/metro/src/cli.js diff --git a/packages/metro-bundler/src/commands/build.js b/packages/metro/src/commands/build.js similarity index 100% rename from packages/metro-bundler/src/commands/build.js rename to packages/metro/src/commands/build.js diff --git a/packages/metro-bundler/src/commands/serve.js b/packages/metro/src/commands/serve.js similarity index 100% rename from packages/metro-bundler/src/commands/serve.js rename to packages/metro/src/commands/serve.js diff --git a/packages/metro-bundler/src/defaultTransform.js b/packages/metro/src/defaultTransform.js similarity index 100% rename from packages/metro-bundler/src/defaultTransform.js rename to packages/metro/src/defaultTransform.js diff --git a/packages/metro-bundler/src/defaults.js b/packages/metro/src/defaults.js similarity index 100% rename from packages/metro-bundler/src/defaults.js rename to packages/metro/src/defaults.js diff --git a/packages/metro-bundler/src/index.js b/packages/metro/src/index.js similarity index 100% rename from packages/metro-bundler/src/index.js rename to packages/metro/src/index.js diff --git a/packages/metro-bundler/src/integration_tests/__tests__/__snapshots__/basic_bundle-test.js.snap b/packages/metro/src/integration_tests/__tests__/__snapshots__/basic_bundle-test.js.snap similarity index 100% rename from packages/metro-bundler/src/integration_tests/__tests__/__snapshots__/basic_bundle-test.js.snap rename to packages/metro/src/integration_tests/__tests__/__snapshots__/basic_bundle-test.js.snap diff --git a/packages/metro-bundler/src/integration_tests/__tests__/basic_bundle-test.js b/packages/metro/src/integration_tests/__tests__/basic_bundle-test.js similarity index 100% rename from packages/metro-bundler/src/integration_tests/__tests__/basic_bundle-test.js rename to packages/metro/src/integration_tests/__tests__/basic_bundle-test.js diff --git a/packages/metro-bundler/src/integration_tests/basic_bundle/AssetRegistry.js b/packages/metro/src/integration_tests/basic_bundle/AssetRegistry.js similarity index 100% rename from packages/metro-bundler/src/integration_tests/basic_bundle/AssetRegistry.js rename to packages/metro/src/integration_tests/basic_bundle/AssetRegistry.js diff --git a/packages/metro-bundler/src/integration_tests/basic_bundle/Bar.js b/packages/metro/src/integration_tests/basic_bundle/Bar.js similarity index 100% rename from packages/metro-bundler/src/integration_tests/basic_bundle/Bar.js rename to packages/metro/src/integration_tests/basic_bundle/Bar.js diff --git a/packages/metro-bundler/src/integration_tests/basic_bundle/Foo.js b/packages/metro/src/integration_tests/basic_bundle/Foo.js similarity index 100% rename from packages/metro-bundler/src/integration_tests/basic_bundle/Foo.js rename to packages/metro/src/integration_tests/basic_bundle/Foo.js diff --git a/packages/metro-bundler/src/integration_tests/basic_bundle/TestBundle.js b/packages/metro/src/integration_tests/basic_bundle/TestBundle.js similarity index 100% rename from packages/metro-bundler/src/integration_tests/basic_bundle/TestBundle.js rename to packages/metro/src/integration_tests/basic_bundle/TestBundle.js diff --git a/packages/metro-bundler/src/integration_tests/basic_bundle/polyfill-1.js b/packages/metro/src/integration_tests/basic_bundle/polyfill-1.js similarity index 100% rename from packages/metro-bundler/src/integration_tests/basic_bundle/polyfill-1.js rename to packages/metro/src/integration_tests/basic_bundle/polyfill-1.js diff --git a/packages/metro-bundler/src/integration_tests/basic_bundle/polyfill-2.js b/packages/metro/src/integration_tests/basic_bundle/polyfill-2.js similarity index 100% rename from packages/metro-bundler/src/integration_tests/basic_bundle/polyfill-2.js rename to packages/metro/src/integration_tests/basic_bundle/polyfill-2.js diff --git a/packages/metro-bundler/src/integration_tests/basic_bundle/test.png b/packages/metro/src/integration_tests/basic_bundle/test.png similarity index 100% rename from packages/metro-bundler/src/integration_tests/basic_bundle/test.png rename to packages/metro/src/integration_tests/basic_bundle/test.png diff --git a/packages/metro-bundler/src/legacy.js b/packages/metro/src/legacy.js similarity index 100% rename from packages/metro-bundler/src/legacy.js rename to packages/metro/src/legacy.js diff --git a/packages/metro-bundler/src/lib/BatchProcessor.js b/packages/metro/src/lib/BatchProcessor.js similarity index 100% rename from packages/metro-bundler/src/lib/BatchProcessor.js rename to packages/metro/src/lib/BatchProcessor.js diff --git a/packages/metro-bundler/src/lib/GlobalTransformCache.js b/packages/metro/src/lib/GlobalTransformCache.js similarity index 100% rename from packages/metro-bundler/src/lib/GlobalTransformCache.js rename to packages/metro/src/lib/GlobalTransformCache.js diff --git a/packages/metro-bundler/src/lib/JsonReporter.js b/packages/metro/src/lib/JsonReporter.js similarity index 100% rename from packages/metro-bundler/src/lib/JsonReporter.js rename to packages/metro/src/lib/JsonReporter.js diff --git a/packages/metro-bundler/src/lib/SourceMap.js b/packages/metro/src/lib/SourceMap.js similarity index 100% rename from packages/metro-bundler/src/lib/SourceMap.js rename to packages/metro/src/lib/SourceMap.js diff --git a/packages/metro-bundler/src/lib/Terminal.js b/packages/metro/src/lib/Terminal.js similarity index 100% rename from packages/metro-bundler/src/lib/Terminal.js rename to packages/metro/src/lib/Terminal.js diff --git a/packages/metro-bundler/src/lib/TerminalReporter.js b/packages/metro/src/lib/TerminalReporter.js similarity index 100% rename from packages/metro-bundler/src/lib/TerminalReporter.js rename to packages/metro/src/lib/TerminalReporter.js diff --git a/packages/metro-bundler/src/lib/TransformCaching.js b/packages/metro/src/lib/TransformCaching.js similarity index 99% rename from packages/metro-bundler/src/lib/TransformCaching.js rename to packages/metro/src/lib/TransformCaching.js index ce5f944d..9edac8f7 100644 --- a/packages/metro-bundler/src/lib/TransformCaching.js +++ b/packages/metro/src/lib/TransformCaching.js @@ -430,7 +430,7 @@ function useTempDir(): TransformCache { hash.update(process.getuid().toString()); } const tmpDir = tmpdir(); - const cacheName = 'metro-bundler-cache'; + const cacheName = 'metro-cache'; const rootPath = path.join(tmpDir, cacheName + '-' + hash.digest('hex')); mkdirp.sync(rootPath); return new FileBasedCache(rootPath); diff --git a/packages/metro-bundler/src/lib/__mocks__/GlobalTransformCache.js b/packages/metro/src/lib/__mocks__/GlobalTransformCache.js similarity index 100% rename from packages/metro-bundler/src/lib/__mocks__/GlobalTransformCache.js rename to packages/metro/src/lib/__mocks__/GlobalTransformCache.js diff --git a/packages/metro-bundler/src/lib/__mocks__/TransformCaching.js b/packages/metro/src/lib/__mocks__/TransformCaching.js similarity index 100% rename from packages/metro-bundler/src/lib/__mocks__/TransformCaching.js rename to packages/metro/src/lib/__mocks__/TransformCaching.js diff --git a/packages/metro-bundler/src/lib/__mocks__/declareOpts.js b/packages/metro/src/lib/__mocks__/declareOpts.js similarity index 100% rename from packages/metro-bundler/src/lib/__mocks__/declareOpts.js rename to packages/metro/src/lib/__mocks__/declareOpts.js diff --git a/packages/metro-bundler/src/lib/__tests__/BatchProcessor-test.js b/packages/metro/src/lib/__tests__/BatchProcessor-test.js similarity index 100% rename from packages/metro-bundler/src/lib/__tests__/BatchProcessor-test.js rename to packages/metro/src/lib/__tests__/BatchProcessor-test.js diff --git a/packages/metro-bundler/src/lib/__tests__/GlobalTransformCache-test.js b/packages/metro/src/lib/__tests__/GlobalTransformCache-test.js similarity index 100% rename from packages/metro-bundler/src/lib/__tests__/GlobalTransformCache-test.js rename to packages/metro/src/lib/__tests__/GlobalTransformCache-test.js diff --git a/packages/metro-bundler/src/lib/__tests__/Terminal-test.js b/packages/metro/src/lib/__tests__/Terminal-test.js similarity index 100% rename from packages/metro-bundler/src/lib/__tests__/Terminal-test.js rename to packages/metro/src/lib/__tests__/Terminal-test.js diff --git a/packages/metro-bundler/src/lib/__tests__/TransformCaching-test.js b/packages/metro/src/lib/__tests__/TransformCaching-test.js similarity index 100% rename from packages/metro-bundler/src/lib/__tests__/TransformCaching-test.js rename to packages/metro/src/lib/__tests__/TransformCaching-test.js diff --git a/packages/metro-bundler/src/lib/__tests__/__snapshots__/GlobalTransformCache-test.js.snap b/packages/metro/src/lib/__tests__/__snapshots__/GlobalTransformCache-test.js.snap similarity index 100% rename from packages/metro-bundler/src/lib/__tests__/__snapshots__/GlobalTransformCache-test.js.snap rename to packages/metro/src/lib/__tests__/__snapshots__/GlobalTransformCache-test.js.snap diff --git a/packages/metro-bundler/src/lib/__tests__/addParamsToDefineCall-test.js b/packages/metro/src/lib/__tests__/addParamsToDefineCall-test.js similarity index 100% rename from packages/metro-bundler/src/lib/__tests__/addParamsToDefineCall-test.js rename to packages/metro/src/lib/__tests__/addParamsToDefineCall-test.js diff --git a/packages/metro-bundler/src/lib/__tests__/getMaxWorkers-test.js b/packages/metro/src/lib/__tests__/getMaxWorkers-test.js similarity index 100% rename from packages/metro-bundler/src/lib/__tests__/getMaxWorkers-test.js rename to packages/metro/src/lib/__tests__/getMaxWorkers-test.js diff --git a/packages/metro-bundler/src/lib/__tests__/getOrderedDependencyPaths-test.js b/packages/metro/src/lib/__tests__/getOrderedDependencyPaths-test.js similarity index 100% rename from packages/metro-bundler/src/lib/__tests__/getOrderedDependencyPaths-test.js rename to packages/metro/src/lib/__tests__/getOrderedDependencyPaths-test.js diff --git a/packages/metro-bundler/src/lib/__tests__/removeInlineRequiresBlacklistFromOptions-test.js b/packages/metro/src/lib/__tests__/removeInlineRequiresBlacklistFromOptions-test.js similarity index 100% rename from packages/metro-bundler/src/lib/__tests__/removeInlineRequiresBlacklistFromOptions-test.js rename to packages/metro/src/lib/__tests__/removeInlineRequiresBlacklistFromOptions-test.js diff --git a/packages/metro-bundler/src/lib/addParamsToDefineCall.js b/packages/metro/src/lib/addParamsToDefineCall.js similarity index 100% rename from packages/metro-bundler/src/lib/addParamsToDefineCall.js rename to packages/metro/src/lib/addParamsToDefineCall.js diff --git a/packages/metro-bundler/src/lib/createModuleIdFactory.js b/packages/metro/src/lib/createModuleIdFactory.js similarity index 100% rename from packages/metro-bundler/src/lib/createModuleIdFactory.js rename to packages/metro/src/lib/createModuleIdFactory.js diff --git a/packages/metro-bundler/src/lib/formatBanner.js b/packages/metro/src/lib/formatBanner.js similarity index 100% rename from packages/metro-bundler/src/lib/formatBanner.js rename to packages/metro/src/lib/formatBanner.js diff --git a/packages/metro-bundler/src/lib/formatBundlingError.js b/packages/metro/src/lib/formatBundlingError.js similarity index 100% rename from packages/metro-bundler/src/lib/formatBundlingError.js rename to packages/metro/src/lib/formatBundlingError.js diff --git a/packages/metro-bundler/src/lib/getMaxWorkers.js b/packages/metro/src/lib/getMaxWorkers.js similarity index 100% rename from packages/metro-bundler/src/lib/getMaxWorkers.js rename to packages/metro/src/lib/getMaxWorkers.js diff --git a/packages/metro-bundler/src/lib/getOrderedDependencyPaths.js b/packages/metro/src/lib/getOrderedDependencyPaths.js similarity index 100% rename from packages/metro-bundler/src/lib/getOrderedDependencyPaths.js rename to packages/metro/src/lib/getOrderedDependencyPaths.js diff --git a/packages/metro-bundler/src/lib/relativizeSourceMap.js b/packages/metro/src/lib/relativizeSourceMap.js similarity index 100% rename from packages/metro-bundler/src/lib/relativizeSourceMap.js rename to packages/metro/src/lib/relativizeSourceMap.js diff --git a/packages/metro-bundler/src/lib/removeInlineRequiresBlacklistFromOptions.js b/packages/metro/src/lib/removeInlineRequiresBlacklistFromOptions.js similarity index 100% rename from packages/metro-bundler/src/lib/removeInlineRequiresBlacklistFromOptions.js rename to packages/metro/src/lib/removeInlineRequiresBlacklistFromOptions.js diff --git a/packages/metro-bundler/src/lib/reporting.js b/packages/metro/src/lib/reporting.js similarity index 100% rename from packages/metro-bundler/src/lib/reporting.js rename to packages/metro/src/lib/reporting.js diff --git a/packages/metro-bundler/src/lib/sleep.js b/packages/metro/src/lib/sleep.js similarity index 100% rename from packages/metro-bundler/src/lib/sleep.js rename to packages/metro/src/lib/sleep.js diff --git a/packages/metro-bundler/src/node-haste/AssetModule.js b/packages/metro/src/node-haste/AssetModule.js similarity index 100% rename from packages/metro-bundler/src/node-haste/AssetModule.js rename to packages/metro/src/node-haste/AssetModule.js diff --git a/packages/metro-bundler/src/node-haste/AssetResolutionCache.js b/packages/metro/src/node-haste/AssetResolutionCache.js similarity index 100% rename from packages/metro-bundler/src/node-haste/AssetResolutionCache.js rename to packages/metro/src/node-haste/AssetResolutionCache.js diff --git a/packages/metro-bundler/src/node-haste/DependencyGraph.js b/packages/metro/src/node-haste/DependencyGraph.js similarity index 99% rename from packages/metro-bundler/src/node-haste/DependencyGraph.js rename to packages/metro/src/node-haste/DependencyGraph.js index 3d3360bc..b1e36bc2 100644 --- a/packages/metro-bundler/src/node-haste/DependencyGraph.js +++ b/packages/metro/src/node-haste/DependencyGraph.js @@ -110,7 +110,7 @@ class DependencyGraph extends EventEmitter { ignorePattern: opts.ignorePattern, maxWorkers: opts.maxWorkers, mocksPattern: '', - name: 'metro-bundler-' + JEST_HASTE_MAP_CACHE_BREAKER, + name: 'metro-' + JEST_HASTE_MAP_CACHE_BREAKER, platforms: Array.from(opts.platforms), providesModuleNodeModules: opts.providesModuleNodeModules, resetCache: opts.resetCache, diff --git a/packages/metro-bundler/src/node-haste/DependencyGraph/DependencyGraphHelpers.js b/packages/metro/src/node-haste/DependencyGraph/DependencyGraphHelpers.js similarity index 100% rename from packages/metro-bundler/src/node-haste/DependencyGraph/DependencyGraphHelpers.js rename to packages/metro/src/node-haste/DependencyGraph/DependencyGraphHelpers.js diff --git a/packages/metro-bundler/src/node-haste/DependencyGraph/FileNameResolver.js b/packages/metro/src/node-haste/DependencyGraph/FileNameResolver.js similarity index 100% rename from packages/metro-bundler/src/node-haste/DependencyGraph/FileNameResolver.js rename to packages/metro/src/node-haste/DependencyGraph/FileNameResolver.js diff --git a/packages/metro-bundler/src/node-haste/DependencyGraph/ModuleResolution.js b/packages/metro/src/node-haste/DependencyGraph/ModuleResolution.js similarity index 100% rename from packages/metro-bundler/src/node-haste/DependencyGraph/ModuleResolution.js rename to packages/metro/src/node-haste/DependencyGraph/ModuleResolution.js diff --git a/packages/metro-bundler/src/node-haste/DependencyGraph/ResolutionRequest.js b/packages/metro/src/node-haste/DependencyGraph/ResolutionRequest.js similarity index 100% rename from packages/metro-bundler/src/node-haste/DependencyGraph/ResolutionRequest.js rename to packages/metro/src/node-haste/DependencyGraph/ResolutionRequest.js diff --git a/packages/metro-bundler/src/node-haste/DependencyGraph/assets/empty-module.js b/packages/metro/src/node-haste/DependencyGraph/assets/empty-module.js similarity index 100% rename from packages/metro-bundler/src/node-haste/DependencyGraph/assets/empty-module.js rename to packages/metro/src/node-haste/DependencyGraph/assets/empty-module.js diff --git a/packages/metro-bundler/src/node-haste/FilesByDirNameIndex.js b/packages/metro/src/node-haste/FilesByDirNameIndex.js similarity index 100% rename from packages/metro-bundler/src/node-haste/FilesByDirNameIndex.js rename to packages/metro/src/node-haste/FilesByDirNameIndex.js diff --git a/packages/metro-bundler/src/node-haste/Module.js b/packages/metro/src/node-haste/Module.js similarity index 100% rename from packages/metro-bundler/src/node-haste/Module.js rename to packages/metro/src/node-haste/Module.js diff --git a/packages/metro-bundler/src/node-haste/ModuleCache.js b/packages/metro/src/node-haste/ModuleCache.js similarity index 100% rename from packages/metro-bundler/src/node-haste/ModuleCache.js rename to packages/metro/src/node-haste/ModuleCache.js diff --git a/packages/metro-bundler/src/node-haste/Package.js b/packages/metro/src/node-haste/Package.js similarity index 100% rename from packages/metro-bundler/src/node-haste/Package.js rename to packages/metro/src/node-haste/Package.js diff --git a/packages/metro-bundler/src/node-haste/Polyfill.js b/packages/metro/src/node-haste/Polyfill.js similarity index 100% rename from packages/metro-bundler/src/node-haste/Polyfill.js rename to packages/metro/src/node-haste/Polyfill.js diff --git a/packages/metro-bundler/src/node-haste/__mocks__/fs.js b/packages/metro/src/node-haste/__mocks__/fs.js similarity index 100% rename from packages/metro-bundler/src/node-haste/__mocks__/fs.js rename to packages/metro/src/node-haste/__mocks__/fs.js diff --git a/packages/metro-bundler/src/node-haste/__mocks__/graceful-fs.js b/packages/metro/src/node-haste/__mocks__/graceful-fs.js similarity index 100% rename from packages/metro-bundler/src/node-haste/__mocks__/graceful-fs.js rename to packages/metro/src/node-haste/__mocks__/graceful-fs.js diff --git a/packages/metro-bundler/src/node-haste/__tests__/AssetModule-test.js b/packages/metro/src/node-haste/__tests__/AssetModule-test.js similarity index 100% rename from packages/metro-bundler/src/node-haste/__tests__/AssetModule-test.js rename to packages/metro/src/node-haste/__tests__/AssetModule-test.js diff --git a/packages/metro-bundler/src/node-haste/__tests__/AssetResolutionCache-test.js b/packages/metro/src/node-haste/__tests__/AssetResolutionCache-test.js similarity index 100% rename from packages/metro-bundler/src/node-haste/__tests__/AssetResolutionCache-test.js rename to packages/metro/src/node-haste/__tests__/AssetResolutionCache-test.js diff --git a/packages/metro-bundler/src/node-haste/__tests__/Module-test.js b/packages/metro/src/node-haste/__tests__/Module-test.js similarity index 100% rename from packages/metro-bundler/src/node-haste/__tests__/Module-test.js rename to packages/metro/src/node-haste/__tests__/Module-test.js diff --git a/packages/metro-bundler/src/node-haste/lib/AssetPaths.js b/packages/metro/src/node-haste/lib/AssetPaths.js similarity index 100% rename from packages/metro-bundler/src/node-haste/lib/AssetPaths.js rename to packages/metro/src/node-haste/lib/AssetPaths.js diff --git a/packages/metro-bundler/src/node-haste/lib/MapWithDefaults.js b/packages/metro/src/node-haste/lib/MapWithDefaults.js similarity index 100% rename from packages/metro-bundler/src/node-haste/lib/MapWithDefaults.js rename to packages/metro/src/node-haste/lib/MapWithDefaults.js diff --git a/packages/metro-bundler/src/node-haste/lib/__tests__/AssetPaths-test.js b/packages/metro/src/node-haste/lib/__tests__/AssetPaths-test.js similarity index 100% rename from packages/metro-bundler/src/node-haste/lib/__tests__/AssetPaths-test.js rename to packages/metro/src/node-haste/lib/__tests__/AssetPaths-test.js diff --git a/packages/metro-bundler/src/node-haste/lib/__tests__/MapWithDefaults-test.js b/packages/metro/src/node-haste/lib/__tests__/MapWithDefaults-test.js similarity index 100% rename from packages/metro-bundler/src/node-haste/lib/__tests__/MapWithDefaults-test.js rename to packages/metro/src/node-haste/lib/__tests__/MapWithDefaults-test.js diff --git a/packages/metro-bundler/src/node-haste/lib/__tests__/parsePlatformFilePath-test.js b/packages/metro/src/node-haste/lib/__tests__/parsePlatformFilePath-test.js similarity index 100% rename from packages/metro-bundler/src/node-haste/lib/__tests__/parsePlatformFilePath-test.js rename to packages/metro/src/node-haste/lib/__tests__/parsePlatformFilePath-test.js diff --git a/packages/metro-bundler/src/node-haste/lib/parsePlatformFilePath.js b/packages/metro/src/node-haste/lib/parsePlatformFilePath.js similarity index 100% rename from packages/metro-bundler/src/node-haste/lib/parsePlatformFilePath.js rename to packages/metro/src/node-haste/lib/parsePlatformFilePath.js diff --git a/packages/metro-bundler/src/node-haste/lib/toLocalPath.js b/packages/metro/src/node-haste/lib/toLocalPath.js similarity index 100% rename from packages/metro-bundler/src/node-haste/lib/toLocalPath.js rename to packages/metro/src/node-haste/lib/toLocalPath.js diff --git a/packages/metro-bundler/src/node-haste/types.js b/packages/metro/src/node-haste/types.js similarity index 100% rename from packages/metro-bundler/src/node-haste/types.js rename to packages/metro/src/node-haste/types.js diff --git a/packages/metro-bundler/src/rn-cli.config.js b/packages/metro/src/rn-cli.config.js similarity index 94% rename from packages/metro-bundler/src/rn-cli.config.js rename to packages/metro/src/rn-cli.config.js index fc6b34b8..f14a7d33 100644 --- a/packages/metro-bundler/src/rn-cli.config.js +++ b/packages/metro/src/rn-cli.config.js @@ -34,7 +34,7 @@ module.exports = { _getRoots() { // match on either path separator - if (__dirname.match(/node_modules[\/\\]metro-bundler$/)) { + if (__dirname.match(/node_modules[\/\\]metro(-bundler)?$/)) { // Metro Bundler is running from node_modules of another project return [path.resolve(__dirname, '../../..')]; } else if (__dirname.match(/Pods\/React\/packager$/)) { diff --git a/packages/metro-bundler/src/setupNodePolyfills.js b/packages/metro/src/setupNodePolyfills.js similarity index 100% rename from packages/metro-bundler/src/setupNodePolyfills.js rename to packages/metro/src/setupNodePolyfills.js diff --git a/packages/metro-bundler/src/shared/output/bundle.js b/packages/metro/src/shared/output/bundle.js similarity index 100% rename from packages/metro-bundler/src/shared/output/bundle.js rename to packages/metro/src/shared/output/bundle.js diff --git a/packages/metro-bundler/src/shared/output/meta.js b/packages/metro/src/shared/output/meta.js similarity index 100% rename from packages/metro-bundler/src/shared/output/meta.js rename to packages/metro/src/shared/output/meta.js diff --git a/packages/metro-bundler/src/shared/output/unbundle/as-assets.js b/packages/metro/src/shared/output/unbundle/as-assets.js similarity index 100% rename from packages/metro-bundler/src/shared/output/unbundle/as-assets.js rename to packages/metro/src/shared/output/unbundle/as-assets.js diff --git a/packages/metro-bundler/src/shared/output/unbundle/as-indexed-file.js b/packages/metro/src/shared/output/unbundle/as-indexed-file.js similarity index 100% rename from packages/metro-bundler/src/shared/output/unbundle/as-indexed-file.js rename to packages/metro/src/shared/output/unbundle/as-indexed-file.js diff --git a/packages/metro-bundler/src/shared/output/unbundle/build-unbundle-sourcemap-with-metadata.js b/packages/metro/src/shared/output/unbundle/build-unbundle-sourcemap-with-metadata.js similarity index 100% rename from packages/metro-bundler/src/shared/output/unbundle/build-unbundle-sourcemap-with-metadata.js rename to packages/metro/src/shared/output/unbundle/build-unbundle-sourcemap-with-metadata.js diff --git a/packages/metro-bundler/src/shared/output/unbundle/index.js b/packages/metro/src/shared/output/unbundle/index.js similarity index 100% rename from packages/metro-bundler/src/shared/output/unbundle/index.js rename to packages/metro/src/shared/output/unbundle/index.js diff --git a/packages/metro-bundler/src/shared/output/unbundle/magic-number.js b/packages/metro/src/shared/output/unbundle/magic-number.js similarity index 100% rename from packages/metro-bundler/src/shared/output/unbundle/magic-number.js rename to packages/metro/src/shared/output/unbundle/magic-number.js diff --git a/packages/metro-bundler/src/shared/output/unbundle/util.js b/packages/metro/src/shared/output/unbundle/util.js similarity index 100% rename from packages/metro-bundler/src/shared/output/unbundle/util.js rename to packages/metro/src/shared/output/unbundle/util.js diff --git a/packages/metro-bundler/src/shared/output/unbundle/write-sourcemap.js b/packages/metro/src/shared/output/unbundle/write-sourcemap.js similarity index 100% rename from packages/metro-bundler/src/shared/output/unbundle/write-sourcemap.js rename to packages/metro/src/shared/output/unbundle/write-sourcemap.js diff --git a/packages/metro-bundler/src/shared/output/writeFile.js b/packages/metro/src/shared/output/writeFile.js similarity index 100% rename from packages/metro-bundler/src/shared/output/writeFile.js rename to packages/metro/src/shared/output/writeFile.js diff --git a/packages/metro-bundler/src/shared/types.flow.js b/packages/metro/src/shared/types.flow.js similarity index 100% rename from packages/metro-bundler/src/shared/types.flow.js rename to packages/metro/src/shared/types.flow.js diff --git a/packages/metro-bundler/src/transformer.js b/packages/metro/src/transformer.js similarity index 100% rename from packages/metro-bundler/src/transformer.js rename to packages/metro/src/transformer.js diff --git a/scripts/build.js b/scripts/build.js index b6d4abf6..d71b7cc0 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -14,7 +14,7 @@ * * Example: * node ./scripts/build.js - * node ./scripts/build.js /user/c/metro-bundler/packages/metro-abc/src/abc.js + * node ./scripts/build.js /user/c/metro/packages/metro-abc/src/abc.js */ 'use strict'; diff --git a/scripts/setupJest.js b/scripts/setupJest.js index 8eebdaf2..b03ee3e6 100644 --- a/scripts/setupJest.js +++ b/scripts/setupJest.js @@ -11,4 +11,4 @@ 'use strict'; global.Promise = require('promise'); -require('../packages/metro-bundler/src/setupNodePolyfills'); +require('../packages/metro/src/setupNodePolyfills'); diff --git a/website/README.md b/website/README.md index e9e5709d..8bcf70d8 100644 --- a/website/README.md +++ b/website/README.md @@ -30,13 +30,13 @@ To deploy the website manually, run the following command as a Git user with write permissions: ``` -DEPLOY_USER=facebook GIT_USER=metro-bot CIRCLE_PROJECT_USERNAME=facebook CIRCLE_PROJECT_REPONAME=metro-bundler npm run gh-pages +DEPLOY_USER=facebook GIT_USER=metro-bot CIRCLE_PROJECT_USERNAME=facebook CIRCLE_PROJECT_REPONAME=metro npm run gh-pages ``` ## Staging -Run the above command against your own fork of `facebook/metro-bundler`: +Run the above command against your own fork of `facebook/metro`: ``` -DEPLOY_USER=YOUR_GITHUB_USERNAME GIT_USER=YOUR_GITHUB_USERNAME CIRCLE_PROJECT_USERNAME=YOUR_GITHUB_USERNAME CIRCLE_PROJECT_REPONAME=metro-bundler npm run gh-pages +DEPLOY_USER=YOUR_GITHUB_USERNAME GIT_USER=YOUR_GITHUB_USERNAME CIRCLE_PROJECT_USERNAME=YOUR_GITHUB_USERNAME CIRCLE_PROJECT_REPONAME=metro npm run gh-pages ``` diff --git a/website/core/Footer.js b/website/core/Footer.js index 03bfafb6..0991e6ed 100644 --- a/website/core/Footer.js +++ b/website/core/Footer.js @@ -7,10 +7,10 @@ const React = require('react'); const githubButton = ( @@ -70,7 +70,7 @@ class Footer extends React.Component {
More
Blog - GitHub + GitHub {githubButton}
diff --git a/website/i18n/en.json b/website/i18n/en.json index 902f4f84..f4af0468 100644 --- a/website/i18n/en.json +++ b/website/i18n/en.json @@ -19,11 +19,11 @@ "Guides": "Guides" }, "pages-strings": { - "Find what you're looking for in our detailed documentation and guides.\\n\\n- Learn how to [get started](/metro-bundler/docs/en/getting-started.html) with Metro.\\n- [Troubleshoot](/metro-bundler/docs/en/troubleshooting.html) problems with Metro.\\n- Learn how to [configure Metro](/metro-bundler/docs/en/configuration.html).\\n- Look at the full [API Reference](/metro-bundler/docs/en/api.html).|no description given": "Find what you're looking for in our detailed documentation and guides.\\n\\n- Learn how to [get started](/metro-bundler/docs/en/getting-started.html) with Metro.\\n- [Troubleshoot](/metro-bundler/docs/en/troubleshooting.html) problems with Metro.\\n- Learn how to [configure Metro](/metro-bundler/docs/en/configuration.html).\\n- Look at the full [API Reference](/metro-bundler/docs/en/api.html).", + "Find what you're looking for in our detailed documentation and guides.\\n\\n- Learn how to [get started](/metro/docs/en/getting-started.html) with Metro.\\n- [Troubleshoot](/metro/docs/en/troubleshooting.html) problems with Metro.\\n- Learn how to [configure Metro](/metro/docs/en/configuration.html).\\n- Look at the full [API Reference](/metro/docs/en/api.html).|no description given": "Find what you're looking for in our detailed documentation and guides.\\n\\n- Learn how to [get started](/metro/docs/en/getting-started.html) with Metro.\\n- [Troubleshoot](/metro/docs/en/troubleshooting.html) problems with Metro.\\n- Learn how to [configure Metro](/metro/docs/en/configuration.html).\\n- Look at the full [API Reference](/metro/docs/en/api.html).", "Browse the docs|no description given": "Browse the docs", "Ask questions and find answers from other Metro users like you.\\n\\n- Join the [#metro](https://discordapp.com/channels/102860784329052160/103622435865104384) channel on [Reactiflux](http://www.reactiflux.com/), a Discord community.\\n- Many members of the community use Stack Overflow. Read through the [existing questions](https://stackoverflow.com/questions/tagged/metrojs) tagged with **metrojs** or [ask your own](https://stackoverflow.com/questions/ask)!|no description given": "Ask questions and find answers from other Metro users like you.\\n\\n- Join the [#metro](https://discordapp.com/channels/102860784329052160/103622435865104384) channel on [Reactiflux](http://www.reactiflux.com/), a Discord community.\\n- Many members of the community use Stack Overflow. Read through the [existing questions](https://stackoverflow.com/questions/tagged/metrojs) tagged with **metrojs** or [ask your own](https://stackoverflow.com/questions/ask)!", "Join the community|no description given": "Join the community", - "Find out what's new with Metro.\\n\\n- Follow [Metro](https://twitter.com/MetroBundler) on Twitter.\\n- Subscribe to the [Metro blog](/metro-bundler/blog/).|no description given": "Find out what's new with Metro.\\n\\n- Follow [Metro](https://twitter.com/MetroBundler) on Twitter.\\n- Subscribe to the [Metro blog](/metro-bundler/blog/).", + "Find out what's new with Metro.\\n\\n- Follow [Metro](https://twitter.com/MetroBundler) on Twitter.\\n- Subscribe to the [Metro blog](/metro/blog/).|no description given": "Find out what's new with Metro.\\n\\n- Follow [Metro](https://twitter.com/MetroBundler) on Twitter.\\n- Subscribe to the [Metro blog](/metro/blog/).", "Stay up to date|no description given": "Stay up to date", "Need help?|no description given": "Need help?", "Metro Bundler is worked on full-time by Facebook's JavaScript Foundation team. Team members are often around and available for questions.|no description given": "Metro Bundler is worked on full-time by Facebook's JavaScript Foundation team. Team members are often around and available for questions.", diff --git a/website/pages/en/help.js b/website/pages/en/help.js old mode 100755 new mode 100644 index 149c19f6..3488ee8a --- a/website/pages/en/help.js +++ b/website/pages/en/help.js @@ -24,11 +24,11 @@ class Help extends React.Component { Find what you're looking for in our detailed documentation and guides.\n\n- Learn how to [get - started](/metro-bundler/docs/en/getting-started.html) with Metro.\n- - [Troubleshoot](/metro-bundler/docs/en/troubleshooting.html) problems with + started](/metro/docs/en/getting-started.html) with Metro.\n- + [Troubleshoot](/metro/docs/en/troubleshooting.html) problems with Metro.\n- Learn how to [configure - Metro](/metro-bundler/docs/en/configuration.html).\n- Look at the full [API - Reference](/metro-bundler/docs/en/api.html). + Metro](/metro/docs/en/configuration.html).\n- Look at the full [API + Reference](/metro/docs/en/api.html). ), title: Browse the docs, @@ -54,7 +54,7 @@ class Help extends React.Component { Find out what's new with Metro.\n\n- Follow [Metro](https://twitter.com/MetroBundler) on Twitter.\n- Subscribe to the - [Metro blog](/metro-bundler/blog/). + [Metro blog](/metro/blog/). ), title: Stay up to date, diff --git a/website/pages/en/index.js b/website/pages/en/index.js old mode 100755 new mode 100644 index ca76020c..3c8c31ae --- a/website/pages/en/index.js +++ b/website/pages/en/index.js @@ -22,12 +22,12 @@ const siteConfig = require(process.cwd() + '/siteConfig.js'); const githubButton = ( Star @@ -124,7 +124,7 @@ class Index extends React.Component { Metro aims for sub-second reload cycles, fast startup and quick bundling speeds. ), - image: '/metro-bundler/img/content/high-speed-train.png', + image: '/metro/img/content/high-speed-train.png', imageAlign: 'top', title: Fast, }, @@ -134,7 +134,7 @@ class Index extends React.Component { Works with thousands of modules in a single application. ), - image: '/metro-bundler/img/content/scales.png', + image: '/metro/img/content/scales.png', imageAlign: 'top', title: Scalable, }, @@ -144,7 +144,7 @@ class Index extends React.Component { Supports every React Native project out of the box. ), - image: '/metro-bundler/img/content/atom.png', + image: '/metro/img/content/atom.png', imageAlign: 'top', title: Integrated, }, diff --git a/website/siteConfig.js b/website/siteConfig.js index b2477863..0c7eea62 100644 --- a/website/siteConfig.js +++ b/website/siteConfig.js @@ -13,10 +13,10 @@ const siteConfig = { title: 'Metro', tagline: '🚇 The JavaScript bundler for React Native', url: 'https://facebook.github.io', - baseUrl: '/metro-bundler/', - projectName: 'metro-bundler', - repo: 'facebook/metro-bundler', - editUrl: 'https://github.com/facebook/metro-bundler/edit/master/docs/', + baseUrl: '/metro/', + projectName: 'metro', + repo: 'facebook/metro', + editUrl: 'https://github.com/facebook/metro/edit/master/docs/', headerLinks: [ {doc: 'getting-started', label: 'Docs'}, {doc: 'api', label: 'API'}, @@ -24,13 +24,13 @@ const siteConfig = { {blog: true, label: 'Blog'}, {languages: true}, {search: true}, - {href: 'https://github.com/facebook/metro-bundler', label: 'GitHub'}, + {href: 'https://github.com/facebook/metro', label: 'GitHub'}, ], headerIcon: 'img/metro.svg', footerIcon: 'img/metro.svg', favicon: 'img/favicon/favicon.ico', ogImage: 'img/opengraph.png', - recruitingLink: 'https://crowdin.com/project/metro-bundler', + recruitingLink: 'https://crowdin.com/project/metro', algolia: { apiKey: process.env.ALGOLIA_METRO_API_KEY, indexName: 'metro', diff --git a/website/static/img/metro.svg b/website/static/img/metro.svg index 8adf4ffd..ef4adc47 100644 --- a/website/static/img/metro.svg +++ b/website/static/img/metro.svg @@ -1 +1 @@ -Metro-Bundler_Logo_Final_2 \ No newline at end of file +Metro