@malloydata/malloy 0.0.175-dev240820003228 → 0.0.175

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,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.DynamicSpace = void 0;
29
26
  const field_utils_1 = require("../../field-utils");
@@ -36,11 +33,10 @@ const space_seed_1 = require("../space-seed");
36
33
  const static_space_1 = require("./static-space");
37
34
  const struct_space_field_base_1 = require("./struct-space-field-base");
38
35
  const parameter_space_1 = require("./parameter-space");
39
- const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
40
36
  class DynamicSpace extends static_space_1.StaticSpace {
41
37
  constructor(extending) {
42
38
  const source = new space_seed_1.SpaceSeed(extending);
43
- super((0, cloneDeep_1.default)(source.structDef));
39
+ super(structuredClone(source.structDef));
44
40
  this.completions = [];
45
41
  this.complete = false;
46
42
  this.parameters = [];
@@ -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.RefinedSource = void 0;
29
26
  const malloy_types_1 = require("../../../model/malloy_types");
@@ -39,7 +36,6 @@ const timezone_statement_1 = require("../source-properties/timezone-statement");
39
36
  const annotation_elements_1 = require("../types/annotation-elements");
40
37
  const renames_1 = require("../source-properties/renames");
41
38
  const parameter_space_1 = require("../field-space/parameter-space");
42
- const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
43
39
  /**
44
40
  * A Source made from a source reference and a set of refinements
45
41
  */
@@ -97,9 +93,9 @@ class RefinedSource extends source_1.Source {
97
93
  }
98
94
  }
99
95
  const paramSpace = pList ? new parameter_space_1.ParameterSpace(pList) : undefined;
100
- const from = (0, cloneDeep_1.default)(this.source.structDef(paramSpace));
96
+ const from = structuredClone(this.source.structDef(paramSpace));
101
97
  // Note that this is explicitly not:
102
- // const from = cloneDeep(this.source.withParameters(parameterSpace, pList));
98
+ // const from = structuredClone(this.source.withParameters(parameterSpace, pList));
103
99
  // Because the parameters are added to the resulting struct, not the base struct
104
100
  if (primaryKey) {
105
101
  from.primaryKey = primaryKey.field.name;
@@ -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.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"));
30
26
  const dialect_1 = require("../../../dialect");
31
27
  const malloy_types_1 = require("../../../model/malloy_types");
32
28
  const tags_1 = require("../../../tags");
@@ -453,7 +449,7 @@ class Document extends MalloyElement {
453
449
  this.annotation.inherits = extendingModelDef.annotation;
454
450
  }
455
451
  for (const [nm, orig] of Object.entries(extendingModelDef.contents)) {
456
- const entry = (0, cloneDeep_1.default)(orig);
452
+ const entry = structuredClone(orig);
457
453
  if (entry.type === 'struct' ||
458
454
  entry.type === 'query' ||
459
455
  entry.type === 'function') {
@@ -517,7 +513,7 @@ class Document extends MalloyElement {
517
513
  if (this.documentModel[entry].exported) {
518
514
  def.exports.push(entry);
519
515
  }
520
- const newEntry = (0, cloneDeep_1.default)(entryDef);
516
+ const newEntry = structuredClone(entryDef);
521
517
  if (newEntry.modelAnnotation === undefined && def.annotation) {
522
518
  newEntry.modelAnnotation = def.annotation;
523
519
  }
package/dist/malloy.js CHANGED
@@ -797,6 +797,7 @@ class PreparedResult {
797
797
  const explore = this.inner.structs[this.inner.structs.length - 1];
798
798
  const namedExplore = {
799
799
  ...explore,
800
+ annotation: this.inner.annotation,
800
801
  name: this.inner.queryName || explore.name,
801
802
  };
802
803
  // TODO `sourceExplore` is not fully-implemented yet -- it cannot
@@ -21,16 +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
- };
27
24
  Object.defineProperty(exports, "__esModule", { value: true });
28
25
  exports.QueryModel = exports.Segment = void 0;
29
26
  const dialect_1 = require("../dialect");
30
27
  const standardsql_1 = require("../dialect/standardsql/standardsql");
31
28
  const malloy_types_1 = require("./malloy_types");
32
29
  const utils_1 = require("./utils");
33
- const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
34
30
  function pathToCol(path) {
35
31
  return path.map(el => encodeURIComponent(el)).join('/');
36
32
  }
@@ -3324,7 +3320,7 @@ class QueryStruct extends QueryNode {
3324
3320
  let pipeline = turtleDef.pipeline;
3325
3321
  const annotation = turtleDef.annotation;
3326
3322
  const addedFilters = turtleDef.filterList || [];
3327
- pipeline = (0, cloneDeep_1.default)(pipeline);
3323
+ pipeline = structuredClone(pipeline);
3328
3324
  pipeline[0].filterList = addedFilters.concat(pipeline[0].filterList || [], this.fieldDef.filterList || []);
3329
3325
  const flatTurtleDef = {
3330
3326
  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
@@ -255,7 +251,7 @@ class Tag {
255
251
  return this.properties;
256
252
  }
257
253
  clone() {
258
- return new Tag((0, cloneDeep_1.default)(this));
254
+ return new Tag(structuredClone(this));
259
255
  }
260
256
  }
261
257
  exports.Tag = Tag;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/malloy",
3
- "version": "0.0.175-dev240820003228",
3
+ "version": "0.0.175",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",