Refactor to use version object #59

Enable writing safer version aware logic.
This commit is contained in:
undergroundwires
2022-02-26 17:15:30 +01:00
parent d6bc33ec86
commit eeb1d5b0c4
14 changed files with 198 additions and 35 deletions

View File

@@ -22,7 +22,7 @@ export class CodeSubstituter implements ICodeSubstituter {
const substitute = (name: string, value: string) => args
.addArgument(new FunctionCallArgument(name, value));
substitute('homepage', info.homepage);
substitute('version', info.version);
substitute('version', info.version.toString());
substitute('date', this.date.toUTCString());
const compiledCode = this.compiler.compileExpressions(code, args);
return compiledCode;