mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
Update build system lockdown parameter (#12556)
* Update build system lockdown parameter * Add @reduxjs/toolkit patch * Fix Mozilla lint syntax error * Standardize a thing * Remove redundant check for globalThis
This commit is contained in:
parent
1fa4b5c776
commit
5560b7c3e5
@ -83,7 +83,7 @@ try {
|
|||||||
})();
|
})();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Protecting intrinsics failed:', error);
|
console.error('Protecting intrinsics failed:', error);
|
||||||
if (globalThis?.sentry.captureException) {
|
if (globalThis.sentry && globalThis.sentry.captureException) {
|
||||||
globalThis.sentry.captureException(
|
globalThis.sentry.captureException(
|
||||||
new Error(`Protecting intrinsics failed: ${error.message}`),
|
new Error(`Protecting intrinsics failed: ${error.message}`),
|
||||||
);
|
);
|
||||||
|
@ -48,10 +48,10 @@ Options:
|
|||||||
Defaults to `false` if the entry task is `dev` or
|
Defaults to `false` if the entry task is `dev` or
|
||||||
`testDev`, and `true` otherwise.
|
`testDev`, and `true` otherwise.
|
||||||
[boolean] [default: <varies>]
|
[boolean] [default: <varies>]
|
||||||
--omit-lockdown Whether to omit SES lockdown files from the extension
|
--lockdown Whether to include SES lockdown files in the extension
|
||||||
bundle. Useful when linking dependencies that are
|
bundle. Setting this to `false` is useful e.g. when
|
||||||
incompatible with lockdown.
|
linking dependencies that are incompatible with lockdown.
|
||||||
[boolean] [default: false]
|
[boolean] [default: true]
|
||||||
--skip-stats Whether to refrain from logging build progress. Mostly
|
--skip-stats Whether to refrain from logging build progress. Mostly
|
||||||
used internally.
|
used internally.
|
||||||
[boolean] [default: false]
|
[boolean] [default: false]
|
||||||
|
@ -156,21 +156,21 @@ function parseArgv() {
|
|||||||
const NamedArgs = {
|
const NamedArgs = {
|
||||||
BuildType: 'build-type',
|
BuildType: 'build-type',
|
||||||
LintFenceFiles: 'lint-fence-files',
|
LintFenceFiles: 'lint-fence-files',
|
||||||
OmitLockdown: 'omit-lockdown',
|
Lockdown: 'lockdown',
|
||||||
SkipStats: 'skip-stats',
|
SkipStats: 'skip-stats',
|
||||||
};
|
};
|
||||||
|
|
||||||
const argv = minimist(process.argv.slice(2), {
|
const argv = minimist(process.argv.slice(2), {
|
||||||
boolean: [
|
boolean: [
|
||||||
NamedArgs.LintFenceFiles,
|
NamedArgs.LintFenceFiles,
|
||||||
NamedArgs.OmitLockdown,
|
NamedArgs.Lockdown,
|
||||||
NamedArgs.SkipStats,
|
NamedArgs.SkipStats,
|
||||||
],
|
],
|
||||||
string: [NamedArgs.BuildType],
|
string: [NamedArgs.BuildType],
|
||||||
default: {
|
default: {
|
||||||
[NamedArgs.BuildType]: BuildType.main,
|
[NamedArgs.BuildType]: BuildType.main,
|
||||||
[NamedArgs.LintFenceFiles]: true,
|
[NamedArgs.LintFenceFiles]: true,
|
||||||
[NamedArgs.OmitLockdown]: false,
|
[NamedArgs.Lockdown]: true,
|
||||||
[NamedArgs.SkipStats]: false,
|
[NamedArgs.SkipStats]: false,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@ -202,7 +202,7 @@ function parseArgv() {
|
|||||||
buildType,
|
buildType,
|
||||||
entryTask,
|
entryTask,
|
||||||
isLavaMoat: process.argv[0].includes('lavamoat'),
|
isLavaMoat: process.argv[0].includes('lavamoat'),
|
||||||
shouldIncludeLockdown: argv[NamedArgs.OmitLockdown],
|
shouldIncludeLockdown: argv[NamedArgs.Lockdown],
|
||||||
shouldLintFenceFiles,
|
shouldLintFenceFiles,
|
||||||
skipStats: argv[NamedArgs.SkipStats],
|
skipStats: argv[NamedArgs.SkipStats],
|
||||||
};
|
};
|
||||||
|
4871
patches/@reduxjs+toolkit+1.6.2.patch
Normal file
4871
patches/@reduxjs+toolkit+1.6.2.patch
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user