diff --git a/react-packager/src/AssetServer/__tests__/AssetServer-test.js b/react-packager/src/AssetServer/__tests__/AssetServer-test.js index 17c752cf..7a544a27 100644 --- a/react-packager/src/AssetServer/__tests__/AssetServer-test.js +++ b/react-packager/src/AssetServer/__tests__/AssetServer-test.js @@ -1,8 +1,8 @@ 'use strict'; jest - .dontMock('../../lib/getPlatformExtension') - .dontMock('../../lib/getAssetDataFromName') + .dontMock('../../DependencyResolver/lib/getPlatformExtension') + .dontMock('../../DependencyResolver/lib/getAssetDataFromName') .dontMock('../'); jest diff --git a/react-packager/src/AssetServer/index.js b/react-packager/src/AssetServer/index.js index 41864486..bb411ce6 100644 --- a/react-packager/src/AssetServer/index.js +++ b/react-packager/src/AssetServer/index.js @@ -13,7 +13,7 @@ const Promise = require('promise'); const crypto = require('crypto'); const declareOpts = require('../lib/declareOpts'); const fs = require('fs'); -const getAssetDataFromName = require('../lib/getAssetDataFromName'); +const getAssetDataFromName = require('../DependencyResolver/lib/getAssetDataFromName'); const path = require('path'); const stat = Promise.denodeify(fs.stat); diff --git a/react-packager/src/DependencyResolver/AssetModule.js b/react-packager/src/DependencyResolver/AssetModule.js index 2e103159..1e5ff7d4 100644 --- a/react-packager/src/DependencyResolver/AssetModule.js +++ b/react-packager/src/DependencyResolver/AssetModule.js @@ -2,7 +2,7 @@ const Module = require('./Module'); const Promise = require('promise'); -const getAssetDataFromName = require('../lib/getAssetDataFromName'); +const getAssetDataFromName = require('./lib/getAssetDataFromName'); class AssetModule extends Module { constructor(...args) { diff --git a/react-packager/src/DependencyResolver/AssetModule_DEPRECATED.js b/react-packager/src/DependencyResolver/AssetModule_DEPRECATED.js index 19817d4b..a77d0aef 100644 --- a/react-packager/src/DependencyResolver/AssetModule_DEPRECATED.js +++ b/react-packager/src/DependencyResolver/AssetModule_DEPRECATED.js @@ -2,7 +2,7 @@ const Module = require('./Module'); const Promise = require('promise'); -const getAssetDataFromName = require('../lib/getAssetDataFromName'); +const getAssetDataFromName = require('./lib/getAssetDataFromName'); class AssetModule_DEPRECATED extends Module { constructor(...args) { diff --git a/react-packager/src/DependencyResolver/DependencyGraph/HasteMap.js b/react-packager/src/DependencyResolver/DependencyGraph/HasteMap.js index 6c8bdc0a..75cd43f9 100644 --- a/react-packager/src/DependencyResolver/DependencyGraph/HasteMap.js +++ b/react-packager/src/DependencyResolver/DependencyGraph/HasteMap.js @@ -9,7 +9,7 @@ 'use strict'; const path = require('path'); -const getPlatformExtension = require('../../lib/getPlatformExtension'); +const getPlatformExtension = require('../lib/getPlatformExtension'); const Promise = require('promise'); const GENERIC_PLATFORM = 'generic'; diff --git a/react-packager/src/DependencyResolver/DependencyGraph/ResolutionRequest.js b/react-packager/src/DependencyResolver/DependencyGraph/ResolutionRequest.js index e8396de6..951beaef 100644 --- a/react-packager/src/DependencyResolver/DependencyGraph/ResolutionRequest.js +++ b/react-packager/src/DependencyResolver/DependencyGraph/ResolutionRequest.js @@ -12,7 +12,7 @@ const debug = require('debug')('ReactNativePackager:DependencyGraph'); const util = require('util'); const path = require('path'); const isAbsolutePath = require('absolute-path'); -const getAssetDataFromName = require('../../lib/getAssetDataFromName'); +const getAssetDataFromName = require('../lib/getAssetDataFromName'); const Promise = require('promise'); class ResolutionRequest { diff --git a/react-packager/src/DependencyResolver/DependencyGraph/index.js b/react-packager/src/DependencyResolver/DependencyGraph/index.js index 3f1045b1..16ce50dd 100644 --- a/react-packager/src/DependencyResolver/DependencyGraph/index.js +++ b/react-packager/src/DependencyResolver/DependencyGraph/index.js @@ -13,7 +13,7 @@ const ModuleCache = require('../ModuleCache'); const Promise = require('promise'); const crawl = require('../crawlers'); const declareOpts = require('../../lib/declareOpts'); -const getPontentialPlatformExt = require('../../lib/getPlatformExtension'); +const getPlatformExtension = require('../lib/getPlatformExtension'); const isAbsolutePath = require('absolute-path'); const path = require('path'); const util = require('util'); @@ -173,7 +173,7 @@ class DependencyGraph { _getRequestPlatform(entryPath, platform) { if (platform == null) { - platform = getPontentialPlatformExt(entryPath); + platform = getPlatformExtension(entryPath); if (platform == null || this._opts.platforms.indexOf(platform) === -1) { platform = null; } diff --git a/react-packager/src/lib/__tests__/getAssetDataFromName-test.js b/react-packager/src/DependencyResolver/lib/__tests__/getAssetDataFromName-test.js similarity index 100% rename from react-packager/src/lib/__tests__/getAssetDataFromName-test.js rename to react-packager/src/DependencyResolver/lib/__tests__/getAssetDataFromName-test.js diff --git a/react-packager/src/lib/__tests__/getPotentialPlatformExt-test.js b/react-packager/src/DependencyResolver/lib/__tests__/getPlatformExtension-test.js similarity index 100% rename from react-packager/src/lib/__tests__/getPotentialPlatformExt-test.js rename to react-packager/src/DependencyResolver/lib/__tests__/getPlatformExtension-test.js diff --git a/react-packager/src/lib/getAssetDataFromName.js b/react-packager/src/DependencyResolver/lib/getAssetDataFromName.js similarity index 100% rename from react-packager/src/lib/getAssetDataFromName.js rename to react-packager/src/DependencyResolver/lib/getAssetDataFromName.js diff --git a/react-packager/src/lib/getPlatformExtension.js b/react-packager/src/DependencyResolver/lib/getPlatformExtension.js similarity index 100% rename from react-packager/src/lib/getPlatformExtension.js rename to react-packager/src/DependencyResolver/lib/getPlatformExtension.js diff --git a/react-packager/src/Server/index.js b/react-packager/src/Server/index.js index 49704f12..e163e261 100644 --- a/react-packager/src/Server/index.js +++ b/react-packager/src/Server/index.js @@ -11,7 +11,7 @@ const Activity = require('../Activity'); const AssetServer = require('../AssetServer'); const FileWatcher = require('../FileWatcher'); -const getPlatformExtension = require('../lib/getPlatformExtension'); +const getPlatformExtension = require('../DependencyResolver/lib/getPlatformExtension'); const Bundler = require('../Bundler'); const Promise = require('promise');