Skip to content

Commit

Permalink
chore(core,node): remove unused LavaMoatOpts props
Browse files Browse the repository at this point in the history
Removed `policy` and `policyOverride` which should be `policyPath` and `policyOverridePath`, respectively.
  • Loading branch information
boneskull committed Mar 8, 2024
1 parent a988bc5 commit 75a6d94
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
8 changes: 4 additions & 4 deletions packages/core/test/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,17 +500,17 @@ async function prepareScenarioOnDisk({
if (!scenario.opts?.writeAutoPolicy) {
const defaultPaths = getDefaultPaths(policyName)
const primaryPath =
typeof scenario.opts?.policy === 'string'
? scenario.opts.policy
typeof scenario.opts?.policyPath === 'string'
? scenario.opts.policyPath
: defaultPaths.primary
filesToWrite.push({
file: primaryPath,
content: stringify(scenario.config),
})
if (scenario.configOverride) {
const overridePath =
typeof scenario.opts?.policyOverride === 'string'
? scenario.opts.policyOverride
typeof scenario.opts?.policyOverridePath === 'string'
? scenario.opts.policyOverridePath
: defaultPaths.override
filesToWrite.push({
file: overridePath,
Expand Down
25 changes: 13 additions & 12 deletions packages/node/src/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,20 @@ const defaultPaths = getDefaultPaths('node')

/**
* @typedef LavaMoatOpts
* @property {LavaMoatScuttleOpts} [scuttleGlobalThis]
* @property {LavaMoatScuttleOpts} [scuttleGlobalThis] Enable or disable
* scuttling of `globalThis`
* @property {string[]} [scuttleGlobalThisExceptions]
* @property {boolean} [writeAutoPolicy]
* @property {boolean} [writeAutoPolicyDebug]
* @property {boolean} [writeAutoPolicyAndRun]
* @property {string} [policyPath]
* @property {string} [policyDebugPath]
* @property {string} [policyOverridePath]
* @property {string} [projectRoot]
* @property {boolean} [debugMode]
* @property {boolean} [statsMode]
* @property {string} [policy] - Alias for `policyPath`?
* @property {string} [policyOverride] - Alias for `policyOverridePath`?
* @property {boolean} [writeAutoPolicy] Automatically write a policy file
* @property {boolean} [writeAutoPolicyDebug] Automatically write a debug policy
* file
* @property {boolean} [writeAutoPolicyAndRun] Automatically write a policy file
* and run the application
* @property {string} [policyPath] Path to policy file
* @property {string} [policyDebugPath] Path to policy debug file
* @property {string} [policyOverridePath] Path to policy override file
* @property {string} [projectRoot] Path to project root
* @property {boolean} [debugMode] Enable debug mode
* @property {boolean} [statsMode] Enable stats mode
*/

/** @type {LavaMoatOpts} */
Expand Down

0 comments on commit 75a6d94

Please sign in to comment.