Skip to content

Commit af437b0

Browse files
committed
some refactoring/renaming
1 parent a9a32b5 commit af437b0

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

packages/cubejs-schema-compiler/src/compiler/DataSchemaCompiler.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export class DataSchemaCompiler {
108108

109109
const transpile = async () => {
110110
let cubeNames;
111-
let cubeSymbolsNames;
111+
let cubeSymbols;
112112

113113
if (getEnv('transpilationWorkerThreads')) {
114114
cubeNames = Object.keys(this.cubeDictionary.byId);
@@ -118,7 +118,7 @@ export class DataSchemaCompiler {
118118
// Communication between main and worker threads uses
119119
// The structured clone algorithm (@see https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm)
120120
// which doesn't allow passing any function objects, so we need to sanitize the symbols.
121-
cubeSymbolsNames = Object.fromEntries(
121+
cubeSymbols = Object.fromEntries(
122122
Object.entries(this.cubeSymbols.symbols)
123123
.map(
124124
([key, value]) => [key, Object.fromEntries(
@@ -141,7 +141,7 @@ export class DataSchemaCompiler {
141141
(_, _i) => this.transpileJsFile(
142142
dummyFile,
143143
errorsReport,
144-
{ cubeNames, cubeSymbolsNames, transpilerNames, contextSymbols: CONTEXT_SYMBOLS }
144+
{ cubeNames, cubeSymbols, transpilerNames, contextSymbols: CONTEXT_SYMBOLS }
145145
),
146146
);
147147
await Promise.all(warmups);
@@ -205,15 +205,15 @@ export class DataSchemaCompiler {
205205
}
206206
}
207207

208-
async transpileJsFile(file, errorsReport, { cubeNames, cubeSymbolsNames, contextSymbols, transpilerNames }) {
208+
async transpileJsFile(file, errorsReport, { cubeNames, cubeSymbols, contextSymbols, transpilerNames }) {
209209
try {
210210
if (getEnv('transpilationWorkerThreads')) {
211211
const data = {
212212
fileName: file.fileName,
213213
content: file.content,
214214
transpilers: transpilerNames,
215215
cubeNames,
216-
cubeSymbolsNames,
216+
cubeSymbols,
217217
contextSymbols,
218218
};
219219

packages/cubejs-schema-compiler/src/compiler/transpilers/transpiler_worker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type TransferContent = {
88
content: string;
99
transpilers: string[];
1010
cubeNames: string[];
11-
cubeSymbolsNames: Record<string, Record<string, boolean>>;
11+
cubeSymbols: Record<string, Record<string, boolean>>;
1212
contextSymbols: Record<string, string>;
1313
};
1414

@@ -26,7 +26,7 @@ const transpilers = {
2626
CubePropContextTranspiler:
2727
(data: TransferContent): TranspilerPlugin => ['@cubejs-backend/cube-prop-ctx-transpiler-swc-plugin', {
2828
cubeNames: data.cubeNames,
29-
cubeSymbols: data.cubeSymbolsNames,
29+
cubeSymbols: data.cubeSymbols,
3030
contextSymbols: data.contextSymbols,
3131
}],
3232
};

0 commit comments

Comments
 (0)