Commit Graph

334 Commits

Author SHA1 Message Date
Tienson Qin
9bede53a34 fix: tests 2025-06-29 15:21:09 +08:00
Gabriel Horner
42f0519797 fix: import property that changes from :node to :default
on same page :as :node property is defined. Also affects :date ->
:default. Fixes https://github.com/logseq/db-test/issues/340
2025-06-23 14:02:28 -04:00
Gabriel Horner
58d3abbafb fix: use ast blocks for simple queries conversions
Fixes cases where {{query nested in BEGIN_* blocks were incorrectly
being converted to queries. Also made ast block handling faster
by only doing one prewalk and cleaned up handling of queries
2025-06-23 19:04:03 +08:00
Gabriel Horner
cc05518ea5 fix: use ast blocks for advanced queries conversion
Fixes cases where BEGIN_QUERY nested in BEGIN_SRC were incorrectly
being converted to queries e.g. most queries in
https://docs.logseq.com/#/page/advanced%20queries
2025-06-23 19:04:03 +08:00
Gabriel Horner
507ff3ce29 enhance: import page and block embeds
One embed per block as that's what DB version supports.
Fixes https://github.com/logseq/db-test/issues/198
2025-06-23 19:04:03 +08:00
Gabriel Horner
fdff75cdf8 fix: import not handling scheduled and deadline property
on same block. Fixes https://github.com/logseq/db-test/issues/318
2025-06-20 17:06:52 -04:00
Gabriel Horner
8c6146a00d enhance: import markdown quotes
Went ahead and implemented ast block to string
as regex version of this would've been to buggy
2025-06-18 13:54:48 -04:00
Gabriel Horner
5b4f43d6f4 enhance: import quotes as #Quote
Can only support one quote per block so text around quotes
and multiple quotes aren't possible
Fixes https://github.com/logseq/db-test/issues/195
2025-06-18 13:54:48 -04:00
Tienson Qin
7b46076170 Merge branch 'master' into refactor/page-parent 2025-06-17 19:44:34 +08:00
Gabriel Horner
ace71b2b25 enhance: asset import supports multiple assets
per block and preserves text around assets.
These were both enabled by moving asset blocks to Asset page
2025-06-17 19:36:05 +08:00
Gabriel Horner
501063e625 fix: importing assets for more complex blocks like paragraphs with links
Used extract-blocks to group ast blocks for each block instead of
previous buggy version. Also renamed bindings that were all confusingly
`block`
2025-06-17 19:36:05 +08:00
Gabriel Horner
f318d68530 enhance: import assets handles
unused assets by still copying them by name and handles
existing assets
2025-06-17 19:36:05 +08:00
Gabriel Horner
bb31c4e6f1 fix: importing assets in subdirectories
Also fix lint
2025-06-17 19:36:05 +08:00
Gabriel Horner
4524fc8370 enhance: import asset metadata
Also handle multiple assets per block and displaying that to user
2025-06-17 19:36:05 +08:00
Gabriel Horner
90c7fc5775 enhance: UI imports assets as #Asset
Also made importer and db asset creation use same helper fns
2025-06-17 19:36:05 +08:00
Gabriel Horner
38734bde40 enhance: CLI imports assets as #Asset
Had to split assets into two steps now that asset naming is dependent
on uuids. Also add explicit asserts in exporter to catch silent
failure in tests
2025-06-17 19:36:05 +08:00
Tienson Qin
92ec65d61d Merge branch 'master' into refactor/page-parent 2025-06-15 08:27:33 +08:00
Tienson Qin
88216d2992 fix: able to convert an existing page to a property (#11940)
* enhance: use page as property

* fix: ensures block/uuid doesn't change after converting to property
2025-06-14 13:17:33 +08:00
Gabriel Horner
7cc9ddc26b chore: bump docs graph being tested
Hadn't been updated in over a year
2025-06-13 10:43:42 -04:00
Tienson Qin
d7f0c248ff fix: bring back :ref/default-open-blocks-level 2025-06-02 11:19:10 +08:00
Tienson Qin
33b6433dc9 wip: move file parse to worker 2025-05-29 00:39:51 +08:00
Gabriel Horner
471889729e fix: graphs with existing Library page are imported
incorrectly and merged with new built-in page when :property-classes
option is used
2025-05-21 14:31:12 -04:00
Tienson Qin
6c12676a08 fix: check pages only 2025-05-17 05:46:23 +08:00
Tienson Qin
42163df4b3 Merge branch 'feat/db' into refactor/page-parent 2025-05-17 05:36:58 +08:00
Tienson Qin
7dbb3eb3bd wip: fix graph-parser tests 2025-05-17 02:49:42 +08:00
Gabriel Horner
6c07d8838e fix: invalid keywords can be created by user
In https://github.com/logseq/db-test/issues/278, user has graph that
contains invalid edn keyword caused by name part of keyword starting
with a number e.g. :user.property/2ndsomething. Added thorough tests
based on reference doc for both nbb and cljs versions of buggy fn. For
cljs version, allowed a few more special characters in as they've
all been confirmed to be valid edn
2025-05-16 14:02:17 -04:00
Gabriel Horner
a16eb2eb10 chore: bump exporter test time
exporter taking little longer on docs graph with recent
change where advanced query rewrite is included in test
2025-05-16 13:46:26 -04:00
Tienson Qin
42778d36ae Merge branch 'feat/db' into refactor/page-parent 2025-05-16 23:27:20 +08:00
Tienson Qin
dca6ef95ee add migration 2025-05-16 21:31:06 +08:00
Gabriel Horner
dda13d61b9 enhance: improved config.edn for new db graphs
New db config.edn don't include any of the file graph keys or comments.
Previously all comments were confusingly left lying around.
Also moved conversion of imported config.edn so that CLI can use it.
Also temporarily moved one dep to
https://github.com/nextjournal/nbb-test-runner/pull/2 until the PR is
merged
2025-05-15 12:14:46 -04:00
Gabriel Horner
f34a8d57a0 fix: whitespace on advanced query string import
Fixes https://github.com/logseq/db-test/issues/193
2025-05-14 16:06:23 -04:00
Tienson Qin
61d5aa3605 Rename :logseq.property/parent to :logseq.property.class/extends 2025-05-14 17:56:35 +08:00
Tienson Qin
5e1a968530 Merge branch 'master' into feat/db 2025-05-13 18:22:20 +08:00
Gabriel Horner
4f65a00c68 refactor: rename :logseq.task properties to :logseq.property
These are the only built-in properties that don't start with
:logseq.property
2025-05-06 12:29:09 +08:00
Gabriel Horner
6a635ecb49 refactor: mv common ns out of db ns
Also move common and file fns out of db ns. Cleanup allows
for better separation linting
2025-04-28 10:37:13 -04:00
Tienson Qin
4169f20a28 Merge branch 'feat/db' into perf/app-start 2025-04-07 20:06:45 +08:00
Gabriel Horner
f4c5e6b0bb Add time assertion on largest test import to prevent regression 2025-04-04 08:34:31 -04:00
Gabriel Horner
a3dfa00ccf chore: Add optional verbose test runner for graph-parser dep 2025-04-02 12:12:31 -04:00
Tienson Qin
20d483fa30 Merge branch 'feat/db' into enhance/reference-view 2025-02-20 17:39:46 +08:00
Gabriel Horner
73cff9db44 chore: mv file-specific vars in db dep
to their own file-based.* namespaces. logseq.db.frontend
can now be linted
2025-02-19 16:29:26 -05:00
Gabriel Horner
753abd2732 fix: importer failing when property-pages/* config present
Fixes https://github.com/logseq/db-test/issues/220. Also removed
unused :extract-refs-from-property-value-fn
2025-02-19 10:03:53 -05:00
Gabriel Horner
8550b48f17 enhance(dev): add test helper for ent properties
Was using them across namespaces and they were needlessly different
2025-01-28 16:00:38 -05:00
Gabriel Horner
ef93609df0 enhance(dev): build EDN supports logseq idents for :build/tags
Also cleanup more more tests that have been simplified by recent test
helper improvement
2025-01-27 17:03:26 -05:00
Gabriel Horner
63184bc3cc fix: lint and test broken by previous commit 2025-01-27 16:28:51 -05:00
Gabriel Horner
57b4376425 enhance(dev): test helper returns entity
instead of harder to inspect and use d/q results
2025-01-27 15:48:12 -05:00
Gabriel Horner
88d74cb71f fix: importing namespaced tags with spaces
Fixes https://github.com/logseq/db-test/issues/210. Also fix invalid
EDN class db-ident related to this
2025-01-23 14:21:26 -05:00
Tienson Qin
20fad17f5d Merge branch 'feat/db' into refactor/block-schema 2025-01-16 01:01:06 +08:00
Tienson Qin
a7e9d073cd chore: rename :property/* to :logseq.property/* 2025-01-15 14:59:08 +08:00
Gabriel Horner
04aa88b43e fix: importer fails when misconfigure journal ref is a property value
Fixes failure Ramses graph is seeing. Also fix typo in test graph
causing blank journal ref
2025-01-14 11:58:37 -05:00
Gabriel Horner
2a4f49e541 enhance: importer can import :logseq.task/scheduled
Follow up to #11654. Fixes
https://test.logseq.com/#/page/677d36f0-5d8f-4b82-85ad-486d81a46e7e
2025-01-14 08:43:21 -05:00