UNPKG

lookml-parser

Version:
61 lines (58 loc) 3.78 kB
# Changelog ⚡ indicates a breaking change - v2 - ⚡ removed the `_name` property on objects. - Added a `_type` property on all objects - As a replacement for `_name`, added multiple `_<type>: <name>` properties (e.g. `{ ... , "_type": "join", "_join": "users", "_explore": "orders"}` ) - Added a `_n` property which gives the lexical position of the object in the original text - v2.2 - The return now contains model objects which have recursively included other referenced files' contents - In interactive mode, the output is slightly more compact - v3.0 - ⚡ yesno fields are now mapped to true/false - Added conditional comment feature. The CLI flag is --conditional-comment=FOO or -c FOO - v4.0 - ⚡ The grammar now recognizes attributes whose type starts with 'expr' as doubleSemiBlock-valued. If you were previously using such a naming convention in conditional-comment based LookML, you will need to use a new naming convention, or use doubleSemiBlock syntax. E.g. `expression_custom_filter: ${field} ;;` - ⚡ The grammar no longer ignores leading whitespace in a doubleSemiBlock. - v5.0 - ⚡⚡⚡ For simplicity and reduced output size, the output no longer includes the array version of collections of named objects. Only the object version, keyed by name, is returned. - v5.1 - Added the ability to control the output format of the files collection - v6.0 - ⚡ The _file_rel property has changed slightly and no longer includes the file's extension - Added a 'none' file output mode for use cases that only care about assembled models - Added support for subdirectories and corresponding include statements (Does not yet support remote imports) - v6.1 - Added a `cwd` parameter to conveniently run the parser relative to a specified working directory - v6.2 - More consistent handling of manifest file across `file-output` modes - v6.3 - Support for new LookML syntax: refinements, and maplists (e.g. `filters:[field:">0"]`) - v6.4 (should have been major change) - ⚡ "metadata" naming convention changed. Metadata properties now start with `$` rather than `_` - ⚡ Nodes in the JSON representation no longer contain their own name in a variadic property name, it is now always in `$name` - The parser can now capture text metadata into the `$strings` property, supporting use cases such as comment analysis, whitespace analysis and round-tripping/generation. Strings metadata is removed by default for the CLI, but can be exposed with the `transform` parameter. - [beta] Ability to generate LookML strings from JSON data containing the captured string metadata. Only exposed as a module export from the `generate` subdirectory - v6.5 - More permissive model file naming. Any character now accepted in model names. - Added guards against prototype pollution - v6.6 - NPM ignore test-projects, which was growing in size and is normally not useful to consumers of the package - Added the ability to resolve extensions/refinements within models, by passing `transformations:{applyRefinementsExtensions:true}` to parseFiles - Update tests which were broken by a change in a dev dependency (deep-object-diff) - v6.8 - Add support for `include: "//..."`, a.k.a. imported projects - v6.8.2 - Fix handling of '..' in include patterns - Fix error when including one model file into another model file - v6.9 - Support reading YAML-based LookML Dashboard files - v6.9.1 - YAML-based LookML Dashboard files correctly includable in model objects - YAML parsing documentation - v6.10 - Compact conditional comments (without linebreak on first line) - v6.11 - Whitespace preservation in front of conditional comments - v6.11.1 - Project-root imports (single leading slash) from context of imported projects now resolve correctly