mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 01:47:00 +01:00
Fix testDev
builds with LavaMoat enabled (#19506)
* Fix `devTest` build that have LavaMoat enabled The build script compiles the LavaMoat runtime during each root task, but it was not recognizing `testDev` as a root task. As a result, all `testDev` builds were broken unless LavaMoat was disabled. The list of root tasks has been updated to include `testDev`. It should now be complete. * Use BUILD_TARGETS constant, and enable scuttling in start:test
This commit is contained in:
parent
6bc6cba6d5
commit
8a85d220e2
@ -14,7 +14,7 @@ const difference = require('lodash/difference');
|
||||
const { intersection } = require('lodash');
|
||||
const { getVersion } = require('../lib/get-version');
|
||||
const { loadBuildTypesConfig } = require('../lib/build-type');
|
||||
const { TASKS } = require('./constants');
|
||||
const { BUILD_TARGETS, TASKS } = require('./constants');
|
||||
const {
|
||||
createTask,
|
||||
composeSeries,
|
||||
@ -28,7 +28,6 @@ const createStaticAssetTasks = require('./static');
|
||||
const createEtcTasks = require('./etc');
|
||||
const { getBrowserVersionMap, getEnvironment } = require('./utils');
|
||||
const { getConfig } = require('./config');
|
||||
const { BUILD_TARGETS } = require('./constants');
|
||||
|
||||
// Packages required dynamically via browserify configuration in dependencies
|
||||
// Required for LavaMoat policy generation
|
||||
@ -76,11 +75,11 @@ async function defineAndRunBuildTasks() {
|
||||
platform,
|
||||
} = await parseArgv();
|
||||
|
||||
const isRootTask = ['dist', 'prod', 'test', 'dev'].includes(entryTask);
|
||||
const isRootTask = Object.values(BUILD_TARGETS).includes(entryTask);
|
||||
|
||||
if (isRootTask) {
|
||||
// scuttle on production/tests environment only
|
||||
const shouldScuttle = ['dist', 'prod', 'test'].includes(entryTask);
|
||||
const shouldScuttle = entryTask !== BUILD_TARGETS.DEV;
|
||||
|
||||
console.log(
|
||||
`Building lavamoat runtime file`,
|
||||
|
Loading…
Reference in New Issue
Block a user