From 2f98a6ee610ffe87a4dbf8ec65ea993d8e9fa91c Mon Sep 17 00:00:00 2001 From: Rafael Oleza Date: Wed, 28 Feb 2018 04:07:24 -0800 Subject: [PATCH] Remove nested package.json files Reviewed By: cpojer Differential Revision: D7097285 fbshipit-source-id: 66b107632e3b84edf4f2c099b03ca590a7c6bb7b --- packages/metro-source-map/src/__tests__/source-map-test.js | 6 +++++- packages/metro-source-map/src/package.json | 1 - packages/metro/src/ModuleGraph/node-haste/package.json | 1 - packages/metro/src/Server/__tests__/Server-test.js | 4 ++-- packages/metro/src/Server/index.js | 4 ++-- .../src/Server/symbolicate/__tests__/symbolicate-test.js | 2 +- packages/metro/src/Server/symbolicate/package.json | 1 - 7 files changed, 10 insertions(+), 9 deletions(-) delete mode 100644 packages/metro-source-map/src/package.json delete mode 100644 packages/metro/src/ModuleGraph/node-haste/package.json delete mode 100644 packages/metro/src/Server/symbolicate/package.json diff --git a/packages/metro-source-map/src/__tests__/source-map-test.js b/packages/metro-source-map/src/__tests__/source-map-test.js index caff08a3..f435a047 100644 --- a/packages/metro-source-map/src/__tests__/source-map-test.js +++ b/packages/metro-source-map/src/__tests__/source-map-test.js @@ -13,7 +13,11 @@ const Generator = require('../Generator'); -const {toSegmentTuple, fromRawMappings, toBabelSegments} = require('..'); +const { + toSegmentTuple, + fromRawMappings, + toBabelSegments, +} = require('../source-map'); describe('flattening mappings / compacting', () => { it('flattens simple mappings', () => { diff --git a/packages/metro-source-map/src/package.json b/packages/metro-source-map/src/package.json deleted file mode 100644 index be5a9ee4..00000000 --- a/packages/metro-source-map/src/package.json +++ /dev/null @@ -1 +0,0 @@ -{"main": "source-map.js"} diff --git a/packages/metro/src/ModuleGraph/node-haste/package.json b/packages/metro/src/ModuleGraph/node-haste/package.json deleted file mode 100644 index f642436d..00000000 --- a/packages/metro/src/ModuleGraph/node-haste/package.json +++ /dev/null @@ -1 +0,0 @@ -{"main":"node-haste.js"} diff --git a/packages/metro/src/Server/__tests__/Server-test.js b/packages/metro/src/Server/__tests__/Server-test.js index b8624bae..37875786 100644 --- a/packages/metro/src/Server/__tests__/Server-test.js +++ b/packages/metro/src/Server/__tests__/Server-test.js @@ -14,7 +14,7 @@ jest .mock('jest-worker', () => ({})) .mock('metro-minify-uglify') .mock('crypto') - .mock('../symbolicate', () => ({ + .mock('../symbolicate/symbolicate', () => ({ createWorker: jest.fn().mockReturnValue(jest.fn()), })) .mock('../../Bundler') @@ -39,7 +39,7 @@ describe('processRequest', () => { Bundler = require('../../Bundler'); Server = require('../'); getAsset = require('../../Assets').getAsset; - symbolicate = require('../symbolicate'); + symbolicate = require('../symbolicate/symbolicate'); Serializers = require('../../DeltaBundler/Serializers/Serializers'); DeltaBundler = require('../../DeltaBundler'); }); diff --git a/packages/metro/src/Server/index.js b/packages/metro/src/Server/index.js index b0f179a2..336b4864 100644 --- a/packages/metro/src/Server/index.js +++ b/packages/metro/src/Server/index.js @@ -24,7 +24,7 @@ const nullthrows = require('fbjs/lib/nullthrows'); const parseCustomTransformOptions = require('../lib/parseCustomTransformOptions'); const parsePlatformFilePath = require('../node-haste/lib/parsePlatformFilePath'); const path = require('path'); -const symbolicate = require('./symbolicate'); +const symbolicate = require('./symbolicate/symbolicate'); const url = require('url'); const {getAsset} = require('../Assets'); @@ -46,7 +46,7 @@ import type { import type {CacheStore} from 'metro-cache'; import type {MetroSourceMap} from 'metro-source-map'; import type {TransformCache} from '../lib/TransformCaching'; -import type {Symbolicate} from './symbolicate'; +import type {Symbolicate} from './symbolicate/symbolicate'; import type {AssetData} from '../Assets'; import type {PostProcessModules} from '../DeltaBundler'; import type {TransformedCode} from '../JSTransformer/worker'; diff --git a/packages/metro/src/Server/symbolicate/__tests__/symbolicate-test.js b/packages/metro/src/Server/symbolicate/__tests__/symbolicate-test.js index a0063f9d..47bdf219 100644 --- a/packages/metro/src/Server/symbolicate/__tests__/symbolicate-test.js +++ b/packages/metro/src/Server/symbolicate/__tests__/symbolicate-test.js @@ -13,7 +13,7 @@ jest.mock('child_process').mock('net'); const EventEmitter = require('events'); const {Readable} = require('stream'); -const {createWorker} = require('../'); +const {createWorker} = require('../symbolicate'); let childProcess, socketResponse, socket, worker; diff --git a/packages/metro/src/Server/symbolicate/package.json b/packages/metro/src/Server/symbolicate/package.json deleted file mode 100644 index 901fd0b6..00000000 --- a/packages/metro/src/Server/symbolicate/package.json +++ /dev/null @@ -1 +0,0 @@ -{"main": "./symbolicate.js"}