Remove unused generateSourcemaps param

Reviewed By: jeanlauliac

Differential Revision: D6666060

fbshipit-source-id: e7786b3ed851f4952108ea80f96334f0fb25b034
This commit is contained in:
Rafael Oleza 2018-01-05 07:15:36 -08:00 committed by Facebook Github Bot
parent c4d319429c
commit de77f0340b
14 changed files with 0 additions and 31 deletions

View File

@ -104,7 +104,6 @@ Given a set of options that you would typically pass to a server, plus a set of
* `dev (boolean)`: optional boolean indicating if the bundle has to be built in development mode. Implies things like setting `__DEV__` to `true`. Defaults to `false`.
* `entryFile (string)`: entry point for bundling the file.
* `generateSourceMaps (boolean)`: whether source Maps should be generated or not. Defaults to `false`.
* `inlineSourceMap (boolean)`: indicates whether the source map is provided inlined with the bundle (as a bas64 encoded URL), or in a separate file. When provided as a separate file, the URL where it will be found can be customized with `sourceMapUrl`. Defaults to `false`.
* `minify (boolean)`: whether code should be minified. Defaults to `false`.
* `platform (string)`: if a list of platforms is provided, a particular platform can be passed.

View File

@ -161,7 +161,6 @@ class DeltaCalculator extends EventEmitter {
const transformOptionsForBlacklist = {
enableBabelRCLookup,
dev: this._options.dev,
generateSourceMaps: this._options.generateSourceMaps,
hot: this._options.hot,
inlineRequires: false,
minify: this._options.minify,

View File

@ -43,7 +43,6 @@ describe('DeltaCalculator', () => {
entryFile: 'bundle',
entryModuleOnly: false,
excludeSource: false,
generateSourceMaps: false,
hot: true,
inlineSourceMap: true,
isolateModuleIDs: false,
@ -301,7 +300,6 @@ describe('DeltaCalculator', () => {
expect(await deltaCalculator.getTransformerOptions()).toEqual({
dev: true,
enableBabelRCLookup: false,
generateSourceMaps: false,
hot: true,
inlineRequires: false,
minify: false,
@ -320,7 +318,6 @@ describe('DeltaCalculator', () => {
expect(await deltaCalculator.getTransformerOptions()).toEqual({
dev: true,
enableBabelRCLookup: false,
generateSourceMaps: false,
hot: true,
inlineRequires: true,
minify: false,
@ -339,7 +336,6 @@ describe('DeltaCalculator', () => {
expect(await deltaCalculator.getTransformerOptions()).toEqual({
dev: true,
enableBabelRCLookup: false,
generateSourceMaps: false,
hot: true,
inlineRequires: {blacklist: {'/bar': true, '/baz': true}},
minify: false,

View File

@ -39,7 +39,6 @@ module.exports = function getBundlingOptionsForHmr(
dev: true,
entryModuleOnly: false,
excludeSource: false,
generateSourceMaps: false,
inlineSourceMap: false,
isolateModuleIDs: false,
onProgress: null,

View File

@ -62,7 +62,6 @@ export type Transformer<ExtraOptions: {} = {}> = {
export type TransformOptionsStrict = {|
+enableBabelRCLookup: boolean,
+dev: boolean,
+generateSourceMaps: boolean,
+hot: boolean,
+inlineRequires: boolean,
+minify: boolean,
@ -73,7 +72,6 @@ export type TransformOptionsStrict = {|
export type TransformOptions = {
+enableBabelRCLookup?: boolean,
+dev?: boolean,
+generateSourceMaps?: boolean,
+hot?: boolean,
+inlineRequires: boolean,
+minify: boolean,

View File

@ -87,7 +87,6 @@ describe('transforming JS modules:', () => {
const defaults = {
dev: false,
generateSourceMaps: true,
hot: false,
inlineRequires: false,
minify: false,

View File

@ -49,7 +49,6 @@ export type TransformOptions<ExtraOptions> = {|
const NODE_MODULES = path.sep + 'node_modules' + path.sep;
const defaultTransformOptions = {
dev: false,
generateSourceMaps: true,
hot: false,
inlineRequires: false,
minify: false,

View File

@ -190,7 +190,6 @@ describe('processRequest', () => {
entryFile: 'index.ios.js',
entryModuleOnly: false,
excludeSource: false,
generateSourceMaps: false,
hot: true,
inlineSourceMap: false,
isolateModuleIDs: false,
@ -222,7 +221,6 @@ describe('processRequest', () => {
entryFile: 'index.js',
entryModuleOnly: false,
excludeSource: false,
generateSourceMaps: false,
hot: true,
inlineSourceMap: false,
isolateModuleIDs: false,
@ -254,7 +252,6 @@ describe('processRequest', () => {
entryFile: 'index.js',
entryModuleOnly: false,
excludeSource: false,
generateSourceMaps: false,
hot: true,
inlineSourceMap: false,
isolateModuleIDs: false,
@ -431,7 +428,6 @@ describe('processRequest', () => {
entryFile: 'foo file',
entryModuleOnly: false,
excludeSource: false,
generateSourceMaps: false,
hot: false,
inlineSourceMap: false,
isolateModuleIDs: false,

View File

@ -250,7 +250,6 @@ class Server {
+dev: boolean,
+platform: string,
+minify: boolean,
+generateSourceMaps: boolean,
}): Promise<Array<string>> {
const bundleOptions = {
...Server.DEFAULT_BUNDLE_OPTIONS,
@ -839,7 +838,6 @@ class Server {
'entryModuleOnly',
false,
),
generateSourceMaps: false,
assetPlugins,
onProgress: null,
unbundle: false,
@ -868,7 +866,6 @@ class Server {
dev: true,
entryModuleOnly: false,
excludeSource: false,
generateSourceMaps: false,
hot: false,
inlineSourceMap: false,
isolateModuleIDs: false,

View File

@ -237,7 +237,6 @@ exports.runBuild = async (options: RunBuildOptions) => {
const requestOptions: RequestOptions = {
dev: options.dev,
entryFile: options.entry,
generateSourceMaps: options.sourceMap || !!options.sourceMapUrl,
inlineSourceMap: options.sourceMap && !!options.sourceMapUrl,
minify: options.optimize || false,
platform: options.platform || `web`,

View File

@ -43,7 +43,6 @@ type Options = {|
type PublicBundleOptions = {
+dev?: boolean,
+entryFile: string,
+generateSourceMaps?: boolean,
+inlineSourceMap?: boolean,
+minify?: boolean,
+platform?: string,
@ -72,11 +71,6 @@ function assertPublicBundleOptions(bo: mixed): PublicBundleOptions {
typeof entryFile === 'string',
'bundle options must contain a string field `entryFile`',
);
invariant(
bo.generateSourceMaps === undefined ||
typeof bo.generateSourceMaps === 'boolean',
'bundle options field `generateSourceMaps` must be a boolean',
);
invariant(
bo.inlineSourceMap === undefined || typeof bo.inlineSourceMap === 'boolean',
'bundle options field `inlineSourceMap` must be a boolean',
@ -125,7 +119,6 @@ exports.getOrderedDependencyPaths = async function(
+dev: boolean,
+platform: string,
+minify: boolean,
+generateSourceMaps: boolean,
},
): Promise<Array<string>> {
var server = createNonPersistentServer(options);

View File

@ -440,7 +440,6 @@ class OptionsHasher {
): crypto$Hash {
const {
enableBabelRCLookup,
generateSourceMaps,
dev,
hot,
inlineRequires,
@ -461,7 +460,6 @@ class OptionsHasher {
hash.update(
new Buffer([
+dev |
(+generateSourceMaps << 1) |
(+hot << 2) |
(+inlineRequires << 3) |
(+enableBabelRCLookup << 4) |

View File

@ -45,7 +45,6 @@ describe('GlobalTransformCache', () => {
storeResults: null,
});
const transformOptions = {
generateSourceMaps: false,
dev: false,
hot: false,
inlineRequires: false,

View File

@ -34,7 +34,6 @@ export type BundleOptions = {
entryFile: string,
+entryModuleOnly: boolean,
+excludeSource: boolean,
+generateSourceMaps: boolean,
+hot: boolean,
+inlineSourceMap: boolean,
+isolateModuleIDs: boolean,
@ -109,7 +108,6 @@ export type OutputOptions = {
export type RequestOptions = {|
entryFile: string,
generateSourceMaps?: boolean,
inlineSourceMap?: boolean,
sourceMapUrl?: string,
dev?: boolean,