File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
packages/cubejs-schema-compiler/src/compiler Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -483,7 +483,7 @@ export class DataSchemaCompiler {
483483
484484 return file ;
485485 } else if ( file . fileName . endsWith ( '.yml' ) || file . fileName . endsWith ( '.yaml' ) ) {
486- return file ;
486+ return this . yamlCompiler . transpileYamlFile ( file , errorsReport ) ;
487487 } else if ( file . fileName . endsWith ( '.js' ) ) {
488488 return this . transpileJsFile ( file , errorsReport , options ) ;
489489 } else {
@@ -678,10 +678,8 @@ export class DataSchemaCompiler {
678678 this . pythonContext !
679679 ) ) ;
680680 } else if ( file . fileName . endsWith ( '.yml' ) || file . fileName . endsWith ( '.yaml' ) ) {
681- const transpiledFile = this . yamlCompiler . compileYamlFile ( file , errorsReport ) ;
682- if ( transpiledFile ) {
683- this . compileJsFile ( transpiledFile , errorsReport ) ;
684- }
681+ // original yaml file was already transpiled into js
682+ this . compileJsFile ( file , errorsReport ) ;
685683 }
686684 }
687685
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ export class YamlCompiler {
7171 ) {
7272 const renderedFile = await this . renderTemplate ( file , compileContext , pythonContext ) ;
7373
74- const transpiledFile = this . compileYamlFile ( renderedFile , errorsReport ) ;
74+ const transpiledFile = this . transpileYamlFile ( renderedFile , errorsReport ) ;
7575
7676 if ( ! transpiledFile ) {
7777 return ;
@@ -80,7 +80,7 @@ export class YamlCompiler {
8080 this . dataSchemaCompiler ?. compileJsFile ( transpiledFile , errorsReport ) ;
8181 }
8282
83- public compileYamlFile (
83+ public transpileYamlFile (
8484 file : FileContent ,
8585 errorsReport : ErrorReporter ,
8686 ) : FileContent | undefined {
You can’t perform that action at this time.
0 commit comments