From 2939e942fa7685717961624ff20e4a931e848a37 Mon Sep 17 00:00:00 2001 From: Bhuwan Khattar Date: Mon, 6 Feb 2017 07:56:27 -0800 Subject: [PATCH] Random @providesModule related fixes Reviewed By: jeanlauliac Differential Revision: D4507885 fbshipit-source-id: 34d1a7be26febf7d93b65ba8fff635ab44e6459d --- packages/metro-bundler/defaults.js | 2 +- .../src/Resolver/__tests__/Resolver-test.js | 22 +++++++++---------- .../polyfills/{polyfills.js => Object.es6.js} | 0 3 files changed, 12 insertions(+), 12 deletions(-) rename packages/metro-bundler/src/Resolver/polyfills/{polyfills.js => Object.es6.js} (100%) diff --git a/packages/metro-bundler/defaults.js b/packages/metro-bundler/defaults.js index dedb41fd..11939697 100644 --- a/packages/metro-bundler/defaults.js +++ b/packages/metro-bundler/defaults.js @@ -22,7 +22,7 @@ exports.moduleSystem = require.resolve('./src/Resolver/polyfills/require.js'); exports.platforms = ['ios', 'android', 'windows', 'web']; exports.polyfills = [ - require.resolve('./src/Resolver/polyfills/polyfills.js'), + require.resolve('./src/Resolver/polyfills/Object.es6.js'), require.resolve('./src/Resolver/polyfills/console.js'), require.resolve('./src/Resolver/polyfills/error-guard.js'), require.resolve('./src/Resolver/polyfills/Number.es6.js'), diff --git a/packages/metro-bundler/src/Resolver/__tests__/Resolver-test.js b/packages/metro-bundler/src/Resolver/__tests__/Resolver-test.js index 1579ca68..33205179 100644 --- a/packages/metro-bundler/src/Resolver/__tests__/Resolver-test.js +++ b/packages/metro-bundler/src/Resolver/__tests__/Resolver-test.js @@ -149,27 +149,27 @@ describe('Resolver', function() { .calls .map((call) => call[0])) .toEqual([ - { id: 'polyfills/polyfills.js', - file: 'polyfills/polyfills.js', + { id: 'polyfills/Object.es6.js', + file: 'polyfills/Object.es6.js', dependencies: [] }, { id: 'polyfills/console.js', file: 'polyfills/console.js', dependencies: [ - 'polyfills/polyfills.js' + 'polyfills/Object.es6.js' ], }, { id: 'polyfills/error-guard.js', file: 'polyfills/error-guard.js', dependencies: [ - 'polyfills/polyfills.js', + 'polyfills/Object.es6.js', 'polyfills/console.js' ], }, { id: 'polyfills/Number.es6.js', file: 'polyfills/Number.es6.js', dependencies: [ - 'polyfills/polyfills.js', + 'polyfills/Object.es6.js', 'polyfills/console.js', 'polyfills/error-guard.js' ], @@ -177,7 +177,7 @@ describe('Resolver', function() { { id: 'polyfills/String.prototype.es6.js', file: 'polyfills/String.prototype.es6.js', dependencies: [ - 'polyfills/polyfills.js', + 'polyfills/Object.es6.js', 'polyfills/console.js', 'polyfills/error-guard.js', 'polyfills/Number.es6.js', @@ -186,7 +186,7 @@ describe('Resolver', function() { { id: 'polyfills/Array.prototype.es6.js', file: 'polyfills/Array.prototype.es6.js', dependencies: [ - 'polyfills/polyfills.js', + 'polyfills/Object.es6.js', 'polyfills/console.js', 'polyfills/error-guard.js', 'polyfills/Number.es6.js', @@ -196,7 +196,7 @@ describe('Resolver', function() { { id: 'polyfills/Array.es6.js', file: 'polyfills/Array.es6.js', dependencies: [ - 'polyfills/polyfills.js', + 'polyfills/Object.es6.js', 'polyfills/console.js', 'polyfills/error-guard.js', 'polyfills/Number.es6.js', @@ -207,7 +207,7 @@ describe('Resolver', function() { { id: 'polyfills/Object.es7.js', file: 'polyfills/Object.es7.js', dependencies: [ - 'polyfills/polyfills.js', + 'polyfills/Object.es6.js', 'polyfills/console.js', 'polyfills/error-guard.js', 'polyfills/Number.es6.js', @@ -219,7 +219,7 @@ describe('Resolver', function() { { id: 'polyfills/babelHelpers.js', file: 'polyfills/babelHelpers.js', dependencies: [ - 'polyfills/polyfills.js', + 'polyfills/Object.es6.js', 'polyfills/console.js', 'polyfills/error-guard.js', 'polyfills/Number.es6.js', @@ -300,7 +300,7 @@ describe('Resolver', function() { { file: 'some module', id: 'some module', dependencies: [ - 'polyfills/polyfills.js', + 'polyfills/Object.es6.js', 'polyfills/console.js', 'polyfills/error-guard.js', 'polyfills/Number.es6.js', diff --git a/packages/metro-bundler/src/Resolver/polyfills/polyfills.js b/packages/metro-bundler/src/Resolver/polyfills/Object.es6.js similarity index 100% rename from packages/metro-bundler/src/Resolver/polyfills/polyfills.js rename to packages/metro-bundler/src/Resolver/polyfills/Object.es6.js