From c8962a1d9bfcedcc7674a63f47abbbe362d412e7 Mon Sep 17 00:00:00 2001 From: David Aurelio Date: Fri, 13 Jan 2017 09:23:45 -0800 Subject: [PATCH] Fix packager breakages on node4 Summary: This fixes issues that only surface when running with node4 / npm2. Closes https://github.com/facebook/react-native/pull/11888 Differential Revision: D4415021 Pulled By: bestander fbshipit-source-id: 8672cd892c9dae41cc7b5b7b3227eb24dd780d22 --- react-packager/react-packager.js | 2 +- react-packager/src/JSTransformer/worker/inline.js | 2 +- react-packager/src/JSTransformer/worker/worker.js | 2 +- react-packager/src/lib/GlobalTransformCache.js | 2 +- react-packager/src/node-haste/Module.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/react-packager/react-packager.js b/react-packager/react-packager.js index 9291c540..86e5b929 100644 --- a/react-packager/react-packager.js +++ b/react-packager/react-packager.js @@ -14,7 +14,7 @@ const Logger = require('./src/Logger'); const debug = require('debug'); -const invariant = require('invariant'); +const invariant = require('fbjs/lib/invariant'); import type {Reporter} from './src/lib/reporting'; diff --git a/react-packager/src/JSTransformer/worker/inline.js b/react-packager/src/JSTransformer/worker/inline.js index 5636e8e4..c9bdee03 100644 --- a/react-packager/src/JSTransformer/worker/inline.js +++ b/react-packager/src/JSTransformer/worker/inline.js @@ -12,7 +12,7 @@ 'use strict'; const babel = require('babel-core'); -const invariant = require('invariant'); +const invariant = require('fbjs/lib/invariant'); import type {Ast, SourceMap} from 'babel-core'; const t = babel.types; diff --git a/react-packager/src/JSTransformer/worker/worker.js b/react-packager/src/JSTransformer/worker/worker.js index 8ae8bc99..d97714dc 100644 --- a/react-packager/src/JSTransformer/worker/worker.js +++ b/react-packager/src/JSTransformer/worker/worker.js @@ -14,7 +14,7 @@ const constantFolding = require('./constant-folding'); const extractDependencies = require('./extract-dependencies'); const inline = require('./inline'); -const invariant = require('invariant'); +const invariant = require('fbjs/lib/invariant'); const minify = require('./minify'); import type {LogEntry} from '../../Logger/Types'; diff --git a/react-packager/src/lib/GlobalTransformCache.js b/react-packager/src/lib/GlobalTransformCache.js index b327dbfc..e9df7757 100644 --- a/react-packager/src/lib/GlobalTransformCache.js +++ b/react-packager/src/lib/GlobalTransformCache.js @@ -13,7 +13,7 @@ const crypto = require('crypto'); const imurmurhash = require('imurmurhash'); -const invariant = require('invariant'); +const invariant = require('fbjs/lib/invariant'); const jsonStableStringify = require('json-stable-stringify'); const path = require('path'); const request = require('request'); diff --git a/react-packager/src/node-haste/Module.js b/react-packager/src/node-haste/Module.js index d0d2b044..e612ed15 100644 --- a/react-packager/src/node-haste/Module.js +++ b/react-packager/src/node-haste/Module.js @@ -17,7 +17,7 @@ const TransformCache = require('../lib/TransformCache'); const crypto = require('crypto'); const docblock = require('./DependencyGraph/docblock'); const fs = require('fs'); -const invariant = require('invariant'); +const invariant = require('fbjs/lib/invariant'); const isAbsolutePath = require('absolute-path'); const jsonStableStringify = require('json-stable-stringify');