Remove isJSON() method from Module

Reviewed By: cpojer

Differential Revision: D6408739

fbshipit-source-id: 3f1b76ca54937fbc433d4e7a804a9703a3a2ccb7
This commit is contained in:
Rafael Oleza 2017-11-24 12:58:12 -08:00 committed by Facebook Github Bot
parent 75047399d8
commit 2d03a34bbc
7 changed files with 1 additions and 233 deletions

View File

@ -65,9 +65,6 @@ describe('DeltaCalculator', () => {
isAsset() {
return !!isAsset;
},
isJSON() {
return !!isAsset;
},
};
}

View File

@ -78,7 +78,6 @@ Array [
],
"id": "index",
"isAsset": false,
"isJSON": false,
"isPolyfill": false,
"path": "/root/index.js",
"resolution": undefined,
@ -87,7 +86,6 @@ Array [
"dependencies": Array [],
"id": "a",
"isAsset": false,
"isJSON": false,
"isPolyfill": false,
"path": "/root/a.js",
"resolution": undefined,
@ -96,7 +94,6 @@ Array [
"dependencies": Array [],
"id": "b",
"isAsset": false,
"isJSON": false,
"isPolyfill": false,
"path": "/root/b.js",
"resolution": undefined,

View File

@ -33,7 +33,7 @@ function deferred(value) {
return {promise, resolve: () => resolve(value)};
}
function createModule({path, name, isAsset, isJSON}) {
function createModule({path, name, isAsset}) {
return {
path,
name,
@ -43,9 +43,6 @@ function createModule({path, name, isAsset, isJSON}) {
isAsset() {
return !!isAsset;
},
isJSON() {
return !!isAsset;
},
};
}

View File

@ -61,10 +61,6 @@ class AssetModule extends Module {
return `AssetModule : ${this.path}`;
}
isJSON() {
return false;
}
isAsset() {
return true;
}

View File

@ -407,10 +407,6 @@ class Module {
return `Module : ${this.path}`;
}
isJSON() {
return extname(this.path) === '.json';
}
isAsset() {
return false;
}

View File

@ -47,10 +47,6 @@ class Polyfill extends Module {
return this._dependencies;
}
isJSON() {
return false;
}
isPolyfill() {
return true;
}