@dataform/core 2.6.7 → 2.6.8

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 +10 -7
  2. package/package.json +1 -1
package/bundle.js CHANGED
@@ -16603,6 +16603,9 @@ function baseFilename(fullPath) {
16603
16603
  .slice(-1)[0]
16604
16604
  .split(".")[0];
16605
16605
  }
16606
+ function getEscapedFileName(path) {
16607
+ return baseFilename(path).replace(/\\/g, '\\\\');
16608
+ }
16606
16609
  function getCallerFile(rootDir) {
16607
16610
  let lastfile;
16608
16611
  const stack = getCurrentStack();
@@ -18353,7 +18356,7 @@ class SyntaxTreeNode {
18353
18356
  lexer.reset(code);
18354
18357
  for (const token of lexer) {
18355
18358
  if (!token.type) {
18356
- continue;
18359
+ throw new Error('Undefined token type encountered.');
18357
18360
  }
18358
18361
  if (START_TOKEN_NODE_MAPPINGS.has(token.type)) {
18359
18362
  const childType = START_TOKEN_NODE_MAPPINGS.get(token.type);
@@ -18390,7 +18393,7 @@ class SyntaxTreeNode {
18390
18393
  return this.allChildren
18391
18394
  .map(child => {
18392
18395
  if (typeof child === "string") {
18393
- return (mutator === null || mutator === void 0 ? void 0 : mutator(child)) || "";
18396
+ return mutator(child);
18394
18397
  }
18395
18398
  return child.concatenate();
18396
18399
  })
@@ -18640,7 +18643,7 @@ function compileTableSql(code, path) {
18640
18643
  const { sql, js } = extractJsBlocks(code);
18641
18644
  const functionsBindings = getFunctionPropertyNames(TableContext.prototype).map(name => `const ${name} = ${safelyBindCtxFunction(name)};`);
18642
18645
  return `
18643
- publish("${baseFilename(path)}").query(ctx => {
18646
+ publish("${getEscapedFileName(path)}").query(ctx => {
18644
18647
  ${functionsBindings.join("\n")}
18645
18648
  ${js}
18646
18649
  return \`${sql}\`;
@@ -18650,7 +18653,7 @@ function compileOperationSql(code, path) {
18650
18653
  const { sql, js } = extractJsBlocks(code);
18651
18654
  const functionsBindings = getFunctionPropertyNames(OperationContext.prototype).map(name => `const ${name} = ${safelyBindCtxFunction(name)};`);
18652
18655
  return `
18653
- operate("${baseFilename(path)}").queries(ctx => {
18656
+ operate("${getEscapedFileName(path)}").queries(ctx => {
18654
18657
  ${functionsBindings.join("\n")}
18655
18658
  ${js}
18656
18659
  return \`${sql}\`.split("\\n---\\n");
@@ -18660,7 +18663,7 @@ function compileAssertionSql(code, path) {
18660
18663
  const { sql, js } = extractJsBlocks(code);
18661
18664
  const functionsBindings = getFunctionPropertyNames(AssertionContext.prototype).map(name => `const ${name} = ${safelyBindCtxFunction(name)};`);
18662
18665
  return `
18663
- assert("${baseFilename(path)}").query(ctx => {
18666
+ assert("${getEscapedFileName(path)}").query(ctx => {
18664
18667
  ${functionsBindings.join("\n")}
18665
18668
  ${js}
18666
18669
  return \`${sql}\`;
@@ -18717,7 +18720,7 @@ function compileSqlx(rootNode, path) {
18717
18720
  .join("\n");
18718
18721
  return `dataform.sqlxAction({
18719
18722
  sqlxConfig: {
18720
- name: "${baseFilename(path)}",
18723
+ name: "${getEscapedFileName(path)}",
18721
18724
  type: "operations",
18722
18725
  ...${config || "{}"}
18723
18726
  },
@@ -19321,7 +19324,7 @@ class RefReplacingContext {
19321
19324
  }
19322
19325
  }
19323
19326
 
19324
- const version = "2.6.7";
19327
+ const version = "2.6.8";
19325
19328
 
19326
19329
  const SQL_DATA_WAREHOUSE_DIST_HASH_REGEXP = new RegExp("HASH\\s*\\(\\s*\\w*\\s*\\)\\s*");
19327
19330
  const DEFAULT_CONFIG = {
package/package.json CHANGED
@@ -49,7 +49,7 @@
49
49
  "publishConfig": {
50
50
  "access": "public"
51
51
  },
52
- "version": "2.6.7",
52
+ "version": "2.6.8",
53
53
  "name": "@dataform/core",
54
54
  "description": "Dataform core API.",
55
55
  "main": "bundle.js",