It might be useful to present a set of feature flags by Factorio version, for example, something like the following:
local version = require("version")
local factorio_version = version(script.active_mods["base"].version)
local SCRIPT_RAISED_BUILT_HAS_FILTER = false
if factorio_version > version("0.18.27") then
SCRIPT_RAISED_BUILT_HAS_FILTER = true
end
This would allow the choice of implementing the old way or the new way, rather than strictly requiring the very latest version, and picking which to use on load.