diff --git a/.mocharc.js b/.mocharc.js index 0eb106b1300..7659d56b29a 100644 --- a/.mocharc.js +++ b/.mocharc.js @@ -1,4 +1,4 @@ -const IS_BAZEL = !!(process.env.BAZEL_BINDIR || process.env.BAZEL_TEST) +const IS_BAZEL = !!(process.env.JS_BINARY__TARGET || process.env.BAZEL_TEST) const rootDir = IS_BAZEL ? process.cwd() : __dirname module.exports = { diff --git a/babel.config.jest.js b/babel.config.jest.js index e85d8ead46f..865fa52d2dd 100644 --- a/babel.config.jest.js +++ b/babel.config.jest.js @@ -8,7 +8,7 @@ const path = require('path') const logger = require('signale') // TODO(bazel): drop when non-bazel removed. -if (!(process.env.BAZEL_BINDIR || process.env.BAZEL_TEST)) { +if (!(process.env.JS_BINARY__TARGET || process.env.BAZEL_TEST)) { throw new Error(__filename + ' is only for use with Bazel') } diff --git a/client/build-config/src/paths.ts b/client/build-config/src/paths.ts index ed058dcd64d..77988a12c50 100644 --- a/client/build-config/src/paths.ts +++ b/client/build-config/src/paths.ts @@ -3,7 +3,7 @@ import fs from 'fs' import path from 'path' // TODO(bazel): drop when non-bazel removed. -const IS_BAZEL = !!(process.env.BAZEL_BINDIR || process.env.BAZEL_TEST) +const IS_BAZEL = !!(process.env.JS_BINARY__TARGET || process.env.BAZEL_TEST) // NOTE: use fs.realpathSync() in addition to path.resolve() to resolve // symlinks to the real path. This is required for webpack plugins using diff --git a/client/build-config/src/webpack/getCacheConfig.ts b/client/build-config/src/webpack/getCacheConfig.ts index 331794c9f6d..b69872e713a 100644 --- a/client/build-config/src/webpack/getCacheConfig.ts +++ b/client/build-config/src/webpack/getCacheConfig.ts @@ -5,7 +5,7 @@ import webpack from 'webpack' import { ROOT_PATH } from '../paths' // TODO(bazel): drop when non-bazel removed. -const IS_BAZEL = !!process.env.BAZEL_BINDIR +const IS_BAZEL = !!process.env.JS_BINARY__TARGET interface CacheConfigOptions { invalidateCacheFiles?: string[] diff --git a/jest.config.base.js b/jest.config.base.js index 6f1070eacb1..ebaa300e840 100644 --- a/jest.config.base.js +++ b/jest.config.base.js @@ -3,7 +3,7 @@ const path = require('path') // TODO(bazel): drop when non-bazel removed. -const IS_BAZEL = !!(process.env.BAZEL_BINDIR || process.env.BAZEL_TEST) +const IS_BAZEL = !!(process.env.JS_BINARY__TARGET || process.env.BAZEL_TEST) const SRC_EXT = IS_BAZEL ? 'js' : 'ts' const rootDir = IS_BAZEL ? process.cwd() : __dirname