Skip to content

Commit

Permalink
Move getPlatformExtension and getAssetDataFromName into `Dependen…
Browse files Browse the repository at this point in the history
…cyResolver`

Reviewed By: martinbigio

Differential Revision: D2619690

fb-gh-sync-id: 04ca68a1fa2dc7b77a49c38ea1515d7afbdee603
  • Loading branch information
cpojer authored and facebook-github-bot-7 committed Nov 9, 2015
1 parent 145a72d commit 34f8a6e
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';

jest
.dontMock('../../lib/getPlatformExtension')
.dontMock('../../lib/getAssetDataFromName')
.dontMock('../../DependencyResolver/lib/getPlatformExtension')
.dontMock('../../DependencyResolver/lib/getAssetDataFromName')
.dontMock('../');

jest
Expand Down
2 changes: 1 addition & 1 deletion packager/react-packager/src/AssetServer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion packager/react-packager/src/Server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down

0 comments on commit 34f8a6e

Please sign in to comment.