@malloydata/malloy 0.0.116-dev231218202606 → 0.0.116-dev231227010910

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.
@@ -61,7 +61,7 @@ class DuckDBDialect extends dialect_1.Dialect {
61
61
  this.hasFinalStage = false;
62
62
  this.divisionIsInteger = true;
63
63
  this.supportsSumDistinctFunction = true;
64
- this.unnestWithNumbers = true;
64
+ this.unnestWithNumbers = false;
65
65
  this.defaultSampling = { rows: 50000 };
66
66
  this.supportUnnestArrayAgg = true;
67
67
  this.supportsAggDistinct = true;
@@ -21,12 +21,8 @@
21
21
  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
22
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
23
  */
24
- var __importDefault = (this && this.__importDefault) || function (mod) {
25
- return (mod && mod.__esModule) ? mod : { "default": mod };
26
- };
27
24
  Object.defineProperty(exports, "__esModule", { value: true });
28
25
  exports.DynamicSpace = void 0;
29
- const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
30
26
  const field_utils_1 = require("../../field-utils");
31
27
  const error_factory_1 = require("../error-factory");
32
28
  const space_field_1 = require("../types/space-field");
@@ -39,7 +35,7 @@ const struct_space_field_base_1 = require("./struct-space-field-base");
39
35
  class DynamicSpace extends static_space_1.StaticSpace {
40
36
  constructor(extending) {
41
37
  const source = new space_seed_1.SpaceSeed(extending);
42
- super((0, cloneDeep_1.default)(source.structDef));
38
+ super(structuredClone(source.structDef));
43
39
  this.completions = [];
44
40
  this.complete = false;
45
41
  this.final = undefined;
@@ -21,12 +21,8 @@
21
21
  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
22
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
23
  */
24
- var __importDefault = (this && this.__importDefault) || function (mod) {
25
- return (mod && mod.__esModule) ? mod : { "default": mod };
26
- };
27
24
  Object.defineProperty(exports, "__esModule", { value: true });
28
25
  exports.RefinedSource = void 0;
29
- const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
30
26
  const malloy_types_1 = require("../../../model/malloy_types");
31
27
  const refined_space_1 = require("../field-space/refined-space");
32
28
  const declare_fields_1 = require("../query-properties/declare-fields");
@@ -95,7 +91,7 @@ class RefinedSource extends source_1.Source {
95
91
  errTo.log(`Unexpected source property: '${errTo.elementType}'`);
96
92
  }
97
93
  }
98
- const from = (0, cloneDeep_1.default)(this.source.structDef());
94
+ const from = structuredClone(this.source.structDef());
99
95
  if (primaryKey) {
100
96
  from.primaryKey = primaryKey.field.name;
101
97
  }
@@ -1,9 +1,4 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Document = exports.DocStatementList = exports.ListOf = exports.isDocStatementOrDocStatementList = exports.isDocStatement = exports.ExperimentalExperiment = exports.ModelEntryReference = exports.Unimplemented = exports.MalloyElement = void 0;
7
2
  /*
8
3
  * Copyright 2023 Google LLC
9
4
  *
@@ -26,7 +21,8 @@ exports.Document = exports.DocStatementList = exports.ListOf = exports.isDocStat
26
21
  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27
22
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
23
  */
29
- const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.Document = exports.DocStatementList = exports.ListOf = exports.isDocStatementOrDocStatementList = exports.isDocStatement = exports.ExperimentalExperiment = exports.ModelEntryReference = exports.Unimplemented = exports.MalloyElement = void 0;
30
26
  const malloy_types_1 = require("../../../model/malloy_types");
31
27
  const tags_1 = require("../../../tags");
32
28
  const global_name_space_1 = require("./global-name-space");
@@ -452,7 +448,7 @@ class Document extends MalloyElement {
452
448
  this.annotation.inherits = extendingModelDef.annotation;
453
449
  }
454
450
  for (const [nm, orig] of Object.entries(extendingModelDef.contents)) {
455
- const entry = (0, cloneDeep_1.default)(orig);
451
+ const entry = structuredClone(orig);
456
452
  if (entry.type === 'struct' ||
457
453
  entry.type === 'query' ||
458
454
  entry.type === 'function') {
@@ -516,7 +512,7 @@ class Document extends MalloyElement {
516
512
  if (this.documentModel[entry].exported) {
517
513
  def.exports.push(entry);
518
514
  }
519
- const newEntry = (0, cloneDeep_1.default)(entryDef);
515
+ const newEntry = structuredClone(entryDef);
520
516
  if (newEntry.modelAnnotation === undefined && def.annotation) {
521
517
  newEntry.modelAnnotation = def.annotation;
522
518
  }
@@ -21,12 +21,8 @@
21
21
  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
22
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
23
  */
24
- var __importDefault = (this && this.__importDefault) || function (mod) {
25
- return (mod && mod.__esModule) ? mod : { "default": mod };
26
- };
27
24
  Object.defineProperty(exports, "__esModule", { value: true });
28
25
  exports.QueryModel = exports.Segment = void 0;
29
- const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
30
26
  const dialect_1 = require("../dialect");
31
27
  const standardsql_1 = require("../dialect/standardsql/standardsql");
32
28
  const malloy_types_1 = require("./malloy_types");
@@ -1387,7 +1383,7 @@ class QueryQuery extends QueryField {
1387
1383
  // measures
1388
1384
  // let e: Expr;
1389
1385
  if (field instanceof QueryQuery) {
1390
- const newFieldDef = (0, cloneDeep_1.default)(field.fieldDef);
1386
+ const newFieldDef = structuredClone(field.fieldDef);
1391
1387
  newFieldDef.as = f.name;
1392
1388
  newFieldDef.filterList = f.filterList;
1393
1389
  field = QueryQuery.makeQuery(newFieldDef, this.parent, undefined, this.isJoinedSubquery);
@@ -3236,7 +3232,7 @@ class QueryStruct extends QueryNode {
3236
3232
  let pipeline = turtleDef.pipeline;
3237
3233
  const annotation = turtleDef.annotation;
3238
3234
  const addedFilters = turtleDef.filterList || [];
3239
- pipeline = (0, cloneDeep_1.default)(pipeline);
3235
+ pipeline = structuredClone(pipeline);
3240
3236
  pipeline[0].filterList = addedFilters.concat(pipeline[0].filterList || [], this.fieldDef.filterList || []);
3241
3237
  const flatTurtleDef = {
3242
3238
  type: 'turtle',
package/dist/tags.js CHANGED
@@ -21,9 +21,6 @@
21
21
  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
22
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
23
  */
24
- var __importDefault = (this && this.__importDefault) || function (mod) {
25
- return (mod && mod.__esModule) ? mod : { "default": mod };
26
- };
27
24
  Object.defineProperty(exports, "__esModule", { value: true });
28
25
  exports.Tag = void 0;
29
26
  const tree_1 = require("antlr4ts/tree");
@@ -31,7 +28,6 @@ const MalloyTagLexer_1 = require("./lang/lib/Malloy/MalloyTagLexer");
31
28
  const MalloyTagParser_1 = require("./lang/lib/Malloy/MalloyTagParser");
32
29
  const antlr4ts_1 = require("antlr4ts");
33
30
  const parse_utils_1 = require("./lang/parse-utils");
34
- const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
35
31
  /**
36
32
  * Class for interacting with the parsed output of an annotation
37
33
  * containing the Malloy tag language. Used by the parser to
@@ -245,7 +241,7 @@ class Tag {
245
241
  return this.properties;
246
242
  }
247
243
  clone() {
248
- return new Tag((0, cloneDeep_1.default)(this));
244
+ return new Tag(structuredClone(this));
249
245
  }
250
246
  }
251
247
  exports.Tag = Tag;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/malloy",
3
- "version": "0.0.116-dev231218202606",
3
+ "version": "0.0.116-dev231227010910",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",