Skip to content

Commit dab20bc

Browse files
committed
revert some [dangerous] changes
1 parent d8b61df commit dab20bc

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

packages/cubejs-schema-compiler/src/compiler/YamlCompiler.ts

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -206,26 +206,12 @@ export class YamlCompiler {
206206
} else if (typeof obj === 'string') {
207207
let code = obj;
208208

209-
if (obj === '') {
210-
return t.nullLiteral();
211-
}
212-
213-
if (code.match(PY_TEMPLATE_SYNTAX)) {
214-
if (!nonStringFields.has(propertyPath[propertyPath.length - 1])) {
215-
code = `f"${this.escapeDoubleQuotes(obj)}"`;
216-
}
217-
218-
const parsePythonAndTranspileToJsTimer225 = perfTracker.start('parsePythonAndTranspileToJs call 225');
219-
const ast = this.parsePythonAndTranspileToJs(code, errorsReport);
220-
parsePythonAndTranspileToJsTimer225.end();
221-
return this.extractProgramBodyIfNeeded(ast);
222-
}
223-
224209
if (!nonStringFields.has(propertyPath[propertyPath.length - 1])) {
225-
return t.templateLiteral([t.templateElement({ raw: code, cooked: code })], []);
210+
code = `f"${this.escapeDoubleQuotes(obj)}"`;
226211
}
227212

228-
return t.identifier(code);
213+
const ast = this.parsePythonAndTranspileToJs(code, errorsReport);
214+
return this.extractProgramBodyIfNeeded(ast);
229215
} else if (typeof obj === 'boolean') {
230216
return t.booleanLiteral(obj);
231217
} else if (typeof obj === 'number') {

0 commit comments

Comments
 (0)