docs/website/scripts: Control eval behavior via the rego.v1 import rather than setting the compatiblity flag

Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
This commit is contained in:
Ashutosh Narkar
2024-12-20 12:33:52 -08:00
parent bb10c564f5
commit 94118acc67
@@ -70,12 +70,6 @@ export default async function localEval(groups, groupName, opaVersion) {
async function prepEval(groups, groupName, opaVersion) {
const {module, package: pkg, query, input, included} = getGroupData(groups, groupName)
const base = ['eval', '--fail'] // Fail on undefined
// eval pre-1.0 policies in v0 compatible mode.
if (semver.valid(opaVersion) && semver.satisfies(semver.coerce(opaVersion), '<1.0.0')) {
base.push('--v0-compatible')
}
const rest = []
const moduleFilenameMap = {}