Use absolute paths from repo root

Summary: Rather than using relative paths from the build root, this switches all paths to absolute paths from the build root. This makes integration with a lot of tooling easier.

Reviewed By: jeanlauliac

Differential Revision: D4285474

fbshipit-source-id: 80d20e0f6dc61a310e72112b9654628bff81a4f0
This commit is contained in:
David Aurelio 2016-12-06 16:48:18 -08:00 committed by Facebook Github Bot
parent c00e669cf5
commit 548733e7e0
3 changed files with 0 additions and 7 deletions

View File

@ -56,7 +56,6 @@ export type FastFS = {
};
type HasteMapOptions = {|
allowRelativePaths: boolean,
extensions: Extensions,
files: Array<string>,
helpers: DependencyGraphHelpers,

View File

@ -61,7 +61,6 @@ exports.createResolveFn = function(options: ResolveOptions): ResolveFn {
getTransformedFile,
);
const hasteMap = new HasteMap({
allowRelativePaths: true,
extensions: ['js', 'json'],
files,
helpers,

View File

@ -20,7 +20,6 @@ const PACKAGE_JSON = path.sep + 'package.json';
class HasteMap extends EventEmitter {
constructor({
allowRelativePaths,
extensions,
files,
moduleCache,
@ -29,7 +28,6 @@ class HasteMap extends EventEmitter {
platforms,
}) {
super();
this._allowRelativePaths = allowRelativePaths;
this._extensions = extensions;
this._files = files;
this._helpers = helpers;
@ -128,9 +126,6 @@ class HasteMap extends EventEmitter {
}
_processHastePackage(file, previousName) {
if (!this._allowRelativePaths) {
file = path.resolve(file);
}
const p = this._moduleCache.getPackage(file);
return p.isHaste()
.then(isHaste => isHaste && p.getName()