fix: hardcoded '/' in normalized options.fs, fixes #412, #408

Changes including:
- will not call fs.resolve when normalizing `fs`
- removed hardcoded `/`
- mandatory `fs.dirname` for relative reference
- mandatory `fs.sep`, defaults to '/'
This commit is contained in:
Harttle
2021-10-16 12:10:55 +08:00
committed by harttle
parent df6d62fd59
commit 9cfa43b8ae
17 changed files with 124 additions and 54 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ export class Expression {
this.postfix = [...toPostfix(tokens)]
}
public * evaluate (ctx: Context, lenient: boolean): any {
assert(ctx, () => 'unable to evaluate: context not defined')
assert(ctx, 'unable to evaluate: context not defined')
const operands: any[] = []
for (const token of this.postfix) {
if (TypeGuards.isOperatorToken(token)) {