@dataform/core 2.4.1 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bundle.js +6 -2
  2. package/package.json +1 -2
package/bundle.js CHANGED
@@ -18544,7 +18544,7 @@ function compileStandaloneSqlxQuery(code) {
18544
18544
  }
18545
18545
  function compileSqlx(rootNode, path) {
18546
18546
  const { config, js, sql, incremental, preOperations, postOperations, inputs } = extractSqlxParts(rootNode);
18547
- const contextFunctions = ["self", "ref", "resolve", "name", "when", "incremental"]
18547
+ const contextFunctions = ["self", "ref", "resolve", "name", "when", "incremental", "schema", "database"]
18548
18548
  .map(name => `const ${name} = ctx.${name} ? ctx.${name}.bind(ctx) : undefined;`)
18549
18549
  .join("\n");
18550
18550
  return `dataform.sqlxAction({
@@ -19152,7 +19152,7 @@ class RefReplacingContext {
19152
19152
  }
19153
19153
  }
19154
19154
 
19155
- const version = "2.4.1";
19155
+ const version = "2.5.0";
19156
19156
 
19157
19157
  const SQL_DATA_WAREHOUSE_DIST_HASH_REGEXP = new RegExp("HASH\\s*\\(\\s*\\w*\\s*\\)\\s*");
19158
19158
  const DEFAULT_CONFIG = {
@@ -19361,6 +19361,10 @@ class Session {
19361
19361
  if (this.config.warehouse === "bigquery" && !this.config.defaultLocation) {
19362
19362
  this.compileError("A defaultLocation is required for BigQuery. This can be configured in dataform.json.", "dataform.json");
19363
19363
  }
19364
+ if (!!this.config.vars &&
19365
+ !Object.values(this.config.vars).every((value) => typeof value === 'string')) {
19366
+ throw new Error("Custom variables defined in dataform.json can only be strings.");
19367
+ }
19364
19368
  const compiledGraph = dataform.CompiledGraph.create({
19365
19369
  projectConfig: this.config,
19366
19370
  tables: this.compileGraphChunk(this.actions.filter(action => action instanceof Table), dataform.Table.verify),
package/package.json CHANGED
@@ -10,7 +10,6 @@
10
10
  "**/object-path": "^0.11.5",
11
11
  "**/http-proxy": "^1.18.1",
12
12
  "**/serialize-javascript": "^3.1.0",
13
- "webpack/**/acorn": "^5.7.4",
14
13
  "**/lodash": "^4.17.21",
15
14
  "**/ssri": "^7.1.1",
16
15
  "**/postcss": "^8.2.10",
@@ -50,7 +49,7 @@
50
49
  "publishConfig": {
51
50
  "access": "public"
52
51
  },
53
- "version": "2.4.1",
52
+ "version": "2.5.0",
54
53
  "name": "@dataform/core",
55
54
  "description": "Dataform core API.",
56
55
  "main": "bundle.js",