@podlite/schema 0.0.7 → 0.0.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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # @podlite/schema
2
2
 
3
3
  ## Upcoming
4
+ ## 0.0.8
5
+ - fix null elements in AST
4
6
  ## 0.0.7
5
7
  - add ast interator module (ast-inerator)
6
8
  - add AST nodes for image and caption objects, add mkImage and mkCaption helpers
@@ -25,7 +25,7 @@ const makeInterator = (rule) => {
25
25
  let rules = [];
26
26
  function use(key, fn) {
27
27
  if (key instanceof Array) {
28
- console.warn(`[pod] Unsupported param for ${key}`);
28
+ console.warn(`[podlite-interator] Unsupported param for ${key}`);
29
29
  }
30
30
  if (key instanceof Object) {
31
31
  for (var prop in key) {
@@ -39,7 +39,7 @@ const makeInterator = (rule) => {
39
39
  }
40
40
  function visiter(node, context = {}) {
41
41
  if (node instanceof Array) {
42
- return flattenDeep(node.map(item => visiter(item, context)));
42
+ return flattenDeep(node.map(item => visiter(item, context))).filter(Boolean);
43
43
  }
44
44
  if ('string' === typeof node) {
45
45
  // convert string to lex node with type
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@podlite/schema",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "podlite schema",
5
5
  "main": "index.js",
6
6
  "types": "./lib/index.d.ts",