@malloydata/malloy 0.0.170-dev240819175515 → 0.0.170-dev240819192212

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.
@@ -21,6 +21,9 @@
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
+ };
24
27
  Object.defineProperty(exports, "__esModule", { value: true });
25
28
  exports.DynamicSpace = void 0;
26
29
  const field_utils_1 = require("../../field-utils");
@@ -33,10 +36,11 @@ const space_seed_1 = require("../space-seed");
33
36
  const static_space_1 = require("./static-space");
34
37
  const struct_space_field_base_1 = require("./struct-space-field-base");
35
38
  const parameter_space_1 = require("./parameter-space");
39
+ const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
36
40
  class DynamicSpace extends static_space_1.StaticSpace {
37
41
  constructor(extending) {
38
42
  const source = new space_seed_1.SpaceSeed(extending);
39
- super(structuredClone(source.structDef));
43
+ super((0, cloneDeep_1.default)(source.structDef));
40
44
  this.completions = [];
41
45
  this.complete = false;
42
46
  this.parameters = [];
@@ -21,6 +21,9 @@
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
+ };
24
27
  Object.defineProperty(exports, "__esModule", { value: true });
25
28
  exports.RefinedSource = void 0;
26
29
  const malloy_types_1 = require("../../../model/malloy_types");
@@ -36,6 +39,7 @@ const timezone_statement_1 = require("../source-properties/timezone-statement");
36
39
  const annotation_elements_1 = require("../types/annotation-elements");
37
40
  const renames_1 = require("../source-properties/renames");
38
41
  const parameter_space_1 = require("../field-space/parameter-space");
42
+ const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
39
43
  /**
40
44
  * A Source made from a source reference and a set of refinements
41
45
  */
@@ -93,9 +97,9 @@ class RefinedSource extends source_1.Source {
93
97
  }
94
98
  }
95
99
  const paramSpace = pList ? new parameter_space_1.ParameterSpace(pList) : undefined;
96
- const from = structuredClone(this.source.structDef(paramSpace));
100
+ const from = (0, cloneDeep_1.default)(this.source.structDef(paramSpace));
97
101
  // Note that this is explicitly not:
98
- // const from = structuredClone(this.source.withParameters(parameterSpace, pList));
102
+ // const from = cloneDeep(this.source.withParameters(parameterSpace, pList));
99
103
  // Because the parameters are added to the resulting struct, not the base struct
100
104
  if (primaryKey) {
101
105
  from.primaryKey = primaryKey.field.name;
@@ -21,8 +21,12 @@
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
+ };
24
27
  Object.defineProperty(exports, "__esModule", { value: true });
25
28
  exports.Document = exports.DocStatementList = exports.ListOf = exports.isDocStatementOrDocStatementList = exports.isDocStatement = exports.ExperimentalExperiment = exports.ModelEntryReference = exports.Unimplemented = exports.MalloyElement = void 0;
29
+ const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
26
30
  const dialect_1 = require("../../../dialect");
27
31
  const malloy_types_1 = require("../../../model/malloy_types");
28
32
  const tags_1 = require("../../../tags");
@@ -449,7 +453,7 @@ class Document extends MalloyElement {
449
453
  this.annotation.inherits = extendingModelDef.annotation;
450
454
  }
451
455
  for (const [nm, orig] of Object.entries(extendingModelDef.contents)) {
452
- const entry = structuredClone(orig);
456
+ const entry = (0, cloneDeep_1.default)(orig);
453
457
  if (entry.type === 'struct' ||
454
458
  entry.type === 'query' ||
455
459
  entry.type === 'function') {
@@ -513,7 +517,7 @@ class Document extends MalloyElement {
513
517
  if (this.documentModel[entry].exported) {
514
518
  def.exports.push(entry);
515
519
  }
516
- const newEntry = structuredClone(entryDef);
520
+ const newEntry = (0, cloneDeep_1.default)(entryDef);
517
521
  if (newEntry.modelAnnotation === undefined && def.annotation) {
518
522
  newEntry.modelAnnotation = def.annotation;
519
523
  }
@@ -21,12 +21,16 @@
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
+ };
24
27
  Object.defineProperty(exports, "__esModule", { value: true });
25
28
  exports.QueryModel = exports.Segment = void 0;
26
29
  const dialect_1 = require("../dialect");
27
30
  const standardsql_1 = require("../dialect/standardsql/standardsql");
28
31
  const malloy_types_1 = require("./malloy_types");
29
32
  const utils_1 = require("./utils");
33
+ const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
30
34
  function pathToCol(path) {
31
35
  return path.map(el => encodeURIComponent(el)).join('/');
32
36
  }
@@ -3320,7 +3324,7 @@ class QueryStruct extends QueryNode {
3320
3324
  let pipeline = turtleDef.pipeline;
3321
3325
  const annotation = turtleDef.annotation;
3322
3326
  const addedFilters = turtleDef.filterList || [];
3323
- pipeline = structuredClone(pipeline);
3327
+ pipeline = (0, cloneDeep_1.default)(pipeline);
3324
3328
  pipeline[0].filterList = addedFilters.concat(pipeline[0].filterList || [], this.fieldDef.filterList || []);
3325
3329
  const flatTurtleDef = {
3326
3330
  type: 'turtle',
package/dist/tags.js CHANGED
@@ -21,6 +21,9 @@
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
+ };
24
27
  Object.defineProperty(exports, "__esModule", { value: true });
25
28
  exports.Tag = void 0;
26
29
  const tree_1 = require("antlr4ts/tree");
@@ -28,6 +31,7 @@ const MalloyTagLexer_1 = require("./lang/lib/Malloy/MalloyTagLexer");
28
31
  const MalloyTagParser_1 = require("./lang/lib/Malloy/MalloyTagParser");
29
32
  const antlr4ts_1 = require("antlr4ts");
30
33
  const parse_utils_1 = require("./lang/parse-utils");
34
+ const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
31
35
  /**
32
36
  * Class for interacting with the parsed output of an annotation
33
37
  * containing the Malloy tag language. Used by the parser to
@@ -251,7 +255,7 @@ class Tag {
251
255
  return this.properties;
252
256
  }
253
257
  clone() {
254
- return new Tag(structuredClone(this));
258
+ return new Tag((0, cloneDeep_1.default)(this));
255
259
  }
256
260
  }
257
261
  exports.Tag = Tag;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/malloy",
3
- "version": "0.0.170-dev240819175515",
3
+ "version": "0.0.170-dev240819192212",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",
@@ -39,10 +39,11 @@
39
39
  "prepublishOnly": "npm run clean && npm run build"
40
40
  },
41
41
  "dependencies": {
42
+ "@malloydata/malloy": "file:",
42
43
  "antlr4ts": "^0.5.0-alpha.4",
43
44
  "assert": "^2.0.0",
44
45
  "jest-diff": "^29.6.2",
45
- "lodash": "^4.17.20",
46
+ "lodash": "^4.17.21",
46
47
  "luxon": "^2.4.0",
47
48
  "uuid": "^8.3.2"
48
49
  },