Browse Source

Add 3 missing built-in-properties

Also fix carve linter and make nbb test invocation easier
Gabriel Horner 3 years ago
parent
commit
abd7e0becb

+ 1 - 1
.github/workflows/graph-parser.yml

@@ -83,7 +83,7 @@ jobs:
         run: clojure -M:test
 
       - name: Run nbb-logseq tests
-        run: yarn nbb-logseq -cp src:test:../db/src -m logseq.graph-parser.nbb-test-runner/run-tests
+        run: yarn test
 
       # In this job because it depends on an npm package
       - name: Load namespaces into nbb-logseq

+ 2 - 0
deps/graph-parser/.carve/ignore

@@ -2,3 +2,5 @@
 logseq.graph-parser.cli/parse-graph
 ;; For CLI
 logseq.graph-parser.mldoc/ast-export-markdown
+;; API
+logseq.graph-parser.property/register-built-in-properties

+ 1 - 1
deps/graph-parser/README.md

@@ -49,7 +49,7 @@ To see available options that can run specific tests or namespaces: `clojure -M:
 
 To run nbb-logseq tests:
 ```
-yarn nbb-logseq -cp src:test -m logseq.graph-parser.nbb-test-runner/run-tests
+yarn test
 ```
 
 ### Managing dependencies

+ 3 - 0
deps/graph-parser/package.json

@@ -7,5 +7,8 @@
   },
   "dependencies": {
     "mldoc": "^1.3.9"
+  },
+  "scripts": {
+    "test": "nbb-logseq -cp src:test:../db/src -m logseq.graph-parser.nbb-test-runner/run-tests"
   }
 }

+ 4 - 2
deps/graph-parser/src/logseq/graph_parser/property.cljs

@@ -26,8 +26,10 @@
   "Properties that should only be used by logseq"
   []
   (set/union
-   #{:id :custom-id :background-color :heading :collapsed :created-at :updated-at :last-modified-at :created_at :last_modified_at :query-table :query-properties :query-sort-by :query-sort-desc
-     :ls-type :hl-type :hl-page :hl-stamp}
+   #{:id :custom-id :background-color :heading :collapsed :created-at :updated-at
+     :last-modified-at :created_at :last_modified_at :query-table
+     :query-properties :query-sort-by :query-sort-desc :ls-type :hl-type
+     :hl-page :hl-stamp :template-including-parent :icon :filters}
    (set (map keyword markers))
    @built-in-extended-properties))
 

+ 1 - 1
deps/graph-parser/src/logseq/graph_parser/test/docs_graph_helper.cljs

@@ -142,7 +142,7 @@
   ;; only increase over time as the docs graph rarely has deletions
   (testing "Counts"
     (is (= 211 (count files)) "Correct file count")
-    (is (= 42648 (count (d/datoms db :eavt))) "Correct datoms count")
+    (is (= 42638 (count (d/datoms db :eavt))) "Correct datoms count")
 
     (is (= 3600
            (ffirst