Move `getPlatformExtension` and `getAssetDataFromName` into `DependencyResolver`

Reviewed By: martinbigio

Differential Revision: D2619690

fb-gh-sync-id: 04ca68a1fa2dc7b77a49c38ea1515d7afbdee603
This commit is contained in:
Christoph Pojer 2015-11-09 13:32:45 -08:00 committed by facebook-github-bot-7
parent 0d1a442cff
commit 57fed218a8
12 changed files with 10 additions and 10 deletions

View File

@ -1,8 +1,8 @@
'use strict'; 'use strict';
jest jest
.dontMock('../../lib/getPlatformExtension') .dontMock('../../DependencyResolver/lib/getPlatformExtension')
.dontMock('../../lib/getAssetDataFromName') .dontMock('../../DependencyResolver/lib/getAssetDataFromName')
.dontMock('../'); .dontMock('../');
jest jest

View File

@ -13,7 +13,7 @@ const Promise = require('promise');
const crypto = require('crypto'); const crypto = require('crypto');
const declareOpts = require('../lib/declareOpts'); const declareOpts = require('../lib/declareOpts');
const fs = require('fs'); const fs = require('fs');
const getAssetDataFromName = require('../lib/getAssetDataFromName'); const getAssetDataFromName = require('../DependencyResolver/lib/getAssetDataFromName');
const path = require('path'); const path = require('path');
const stat = Promise.denodeify(fs.stat); const stat = Promise.denodeify(fs.stat);

View File

@ -2,7 +2,7 @@
const Module = require('./Module'); const Module = require('./Module');
const Promise = require('promise'); const Promise = require('promise');
const getAssetDataFromName = require('../lib/getAssetDataFromName'); const getAssetDataFromName = require('./lib/getAssetDataFromName');
class AssetModule extends Module { class AssetModule extends Module {
constructor(...args) { constructor(...args) {

View File

@ -2,7 +2,7 @@
const Module = require('./Module'); const Module = require('./Module');
const Promise = require('promise'); const Promise = require('promise');
const getAssetDataFromName = require('../lib/getAssetDataFromName'); const getAssetDataFromName = require('./lib/getAssetDataFromName');
class AssetModule_DEPRECATED extends Module { class AssetModule_DEPRECATED extends Module {
constructor(...args) { constructor(...args) {

View File

@ -9,7 +9,7 @@
'use strict'; 'use strict';
const path = require('path'); const path = require('path');
const getPlatformExtension = require('../../lib/getPlatformExtension'); const getPlatformExtension = require('../lib/getPlatformExtension');
const Promise = require('promise'); const Promise = require('promise');
const GENERIC_PLATFORM = 'generic'; const GENERIC_PLATFORM = 'generic';

View File

@ -12,7 +12,7 @@ const debug = require('debug')('ReactNativePackager:DependencyGraph');
const util = require('util'); const util = require('util');
const path = require('path'); const path = require('path');
const isAbsolutePath = require('absolute-path'); const isAbsolutePath = require('absolute-path');
const getAssetDataFromName = require('../../lib/getAssetDataFromName'); const getAssetDataFromName = require('../lib/getAssetDataFromName');
const Promise = require('promise'); const Promise = require('promise');
class ResolutionRequest { class ResolutionRequest {

View File

@ -13,7 +13,7 @@ const ModuleCache = require('../ModuleCache');
const Promise = require('promise'); const Promise = require('promise');
const crawl = require('../crawlers'); const crawl = require('../crawlers');
const declareOpts = require('../../lib/declareOpts'); const declareOpts = require('../../lib/declareOpts');
const getPontentialPlatformExt = require('../../lib/getPlatformExtension'); const getPlatformExtension = require('../lib/getPlatformExtension');
const isAbsolutePath = require('absolute-path'); const isAbsolutePath = require('absolute-path');
const path = require('path'); const path = require('path');
const util = require('util'); const util = require('util');
@ -173,7 +173,7 @@ class DependencyGraph {
_getRequestPlatform(entryPath, platform) { _getRequestPlatform(entryPath, platform) {
if (platform == null) { if (platform == null) {
platform = getPontentialPlatformExt(entryPath); platform = getPlatformExtension(entryPath);
if (platform == null || this._opts.platforms.indexOf(platform) === -1) { if (platform == null || this._opts.platforms.indexOf(platform) === -1) {
platform = null; platform = null;
} }

View File

@ -11,7 +11,7 @@
const Activity = require('../Activity'); const Activity = require('../Activity');
const AssetServer = require('../AssetServer'); const AssetServer = require('../AssetServer');
const FileWatcher = require('../FileWatcher'); const FileWatcher = require('../FileWatcher');
const getPlatformExtension = require('../lib/getPlatformExtension'); const getPlatformExtension = require('../DependencyResolver/lib/getPlatformExtension');
const Bundler = require('../Bundler'); const Bundler = require('../Bundler');
const Promise = require('promise'); const Promise = require('promise');