Skip to content

Commit

Permalink
Use absolute paths from repo root
Browse files Browse the repository at this point in the history
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
  • Loading branch information
davidaurelio authored and Martin Konicek committed Dec 12, 2016
1 parent 7b5a51e commit 37edcb2
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export type FastFS = {
};

type HasteMapOptions = {|
allowRelativePaths: boolean,
extensions: Extensions,
files: Array<string>,
helpers: DependencyGraphHelpers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ exports.createResolveFn = function(options: ResolveOptions): ResolveFn {
getTransformedFile,
);
const hasteMap = new HasteMap({
allowRelativePaths: true,
extensions: ['js', 'json'],
files,
helpers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const PACKAGE_JSON = path.sep + 'package.json';

class HasteMap extends EventEmitter {
constructor({
allowRelativePaths,
extensions,
files,
moduleCache,
Expand All @@ -29,7 +28,6 @@ class HasteMap extends EventEmitter {
platforms,
}) {
super();
this._allowRelativePaths = allowRelativePaths;
this._extensions = extensions;
this._files = files;
this._helpers = helpers;
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 37edcb2

Please sign in to comment.