Resolved a JS function not confirmed to work with a new parser, falling back to old resolver

Serverless: Deprecation warning: Variables resolver reports following resolution errors:
- Cannot resolve variable at “custom.dynamicOpts”: Cannot resolve “dynamic” out of “serverless-helpers.js”: Resolved a JS function not confirmed to work with a new parser, falling back to old resolver
From a next major this will be communicated with a thrown error.
Set “variablesResolutionMode: 20210326” in your service config, to adapt to new behavior now
More Info: Serverless Framework Deprecations

Goal: the --stage argument should be a ‘-’ separated string like “{stackname}-{env}” and some custom variables code needs to split that into: (a) stackname, (b) env and (c) a title-case representation of the --stage like stacknameEnv

Current solution: use a helper.js function like the solution noted in Dynamic variables generated from CLI options

But now this serverless v2 deprecation warning suggests this will not work in serverless v3. What can be done about this? I’ve abandoned using custom options on the CLI and now I just need to “parse” the --stage argument to split(“-”) and titleCase the pieces of that split string array.