mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +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 { intersection } = require('lodash');
|
||||||
const { getVersion } = require('../lib/get-version');
|
const { getVersion } = require('../lib/get-version');
|
||||||
const { loadBuildTypesConfig } = require('../lib/build-type');
|
const { loadBuildTypesConfig } = require('../lib/build-type');
|
||||||
const { TASKS } = require('./constants');
|
const { BUILD_TARGETS, TASKS } = require('./constants');
|
||||||
const {
|
const {
|
||||||
createTask,
|
createTask,
|
||||||
composeSeries,
|
composeSeries,
|
||||||
@ -28,7 +28,6 @@ const createStaticAssetTasks = require('./static');
|
|||||||
const createEtcTasks = require('./etc');
|
const createEtcTasks = require('./etc');
|
||||||
const { getBrowserVersionMap, getEnvironment } = require('./utils');
|
const { getBrowserVersionMap, getEnvironment } = require('./utils');
|
||||||
const { getConfig } = require('./config');
|
const { getConfig } = require('./config');
|
||||||
const { BUILD_TARGETS } = require('./constants');
|
|
||||||
|
|
||||||
// Packages required dynamically via browserify configuration in dependencies
|
// Packages required dynamically via browserify configuration in dependencies
|
||||||
// Required for LavaMoat policy generation
|
// Required for LavaMoat policy generation
|
||||||
@ -76,11 +75,11 @@ async function defineAndRunBuildTasks() {
|
|||||||
platform,
|
platform,
|
||||||
} = await parseArgv();
|
} = await parseArgv();
|
||||||
|
|
||||||
const isRootTask = ['dist', 'prod', 'test', 'dev'].includes(entryTask);
|
const isRootTask = Object.values(BUILD_TARGETS).includes(entryTask);
|
||||||
|
|
||||||
if (isRootTask) {
|
if (isRootTask) {
|
||||||
// scuttle on production/tests environment only
|
// scuttle on production/tests environment only
|
||||||
const shouldScuttle = ['dist', 'prod', 'test'].includes(entryTask);
|
const shouldScuttle = entryTask !== BUILD_TARGETS.DEV;
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
`Building lavamoat runtime file`,
|
`Building lavamoat runtime file`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user