Commit Graph

58 Commits (7dc9c41899e521f820770f255a943befb45e854a)

Author SHA1 Message Date
Tienson Qin 551122e839 Update .clj-kondo/hooks/regex_checks.clj
Co-authored-by: Gabriel Horner <97210743+logseq-cldwalker@users.noreply.github.com>
2023-03-30 13:56:20 +08:00
Junyi Du 770fdc5894 clj-kondo: check regex error prone double escaping 2023-03-30 13:56:20 +08:00
Gabriel Horner d4cbe248f0 Finish making node-path consistent with electron renames 2023-03-30 12:57:22 +08:00
Gabriel Horner 1e9fac25e4 Add aliase and replace an outdated alias
Also start making node-path consistent for frontend
2023-03-30 12:57:22 +08:00
Tienson Qin db6fc6b7ee
feat: simple query builder (#8774)
Simple query builder

---------

Co-authored-by: Gabriel Horner <gabriel@logseq.com>
Co-authored-by: charlie <xyhp915@qq.com>
2023-03-21 14:27:00 +08:00
rcmerci 974e91c995 dev(lint): set :path-invalid-construct/string-join level to :info 2023-03-01 11:59:00 -05:00
rcmerci 40a1f5b6cd dev(lint): add :path-invalid-construct/string-join linter 2023-03-01 11:59:00 -05:00
Gabriel Horner 04f1e0e076 Page command enhancements
Three file commands will work in journal page when they have been
edited. These commands will also explicitly warn if no action is taken.
Also developer page commands recognize navigation now
2023-02-02 22:22:50 +08:00
Gabriel Horner bcaec408e6 Introduce keyword :fn to commands
Allows commands to invoke namespaces that previously caused circular
dependency issues
2023-01-30 14:56:35 +08:00
Junyi Du 414fef6933
Merge branch 'master' into dev/malli-schema&kondo-config 2023-01-12 19:28:24 +08:00
rcmerci 08edcb76b4
feat: add frontend.pubsub ns (#8312)
* feat: add frontend.pubsub ns
* update clj-kondo config
2023-01-12 18:07:05 +08:00
rcmerci 21e8a2eab9 dev: add malli-schema & generate kondo config 2023-01-08 20:33:27 +08:00
Gabriel Horner 17f51c7b77 Make resolve-input nbb compatible
- Brought back Xd-{before,after}-ms and tested it
- Move it to its own ns in graph-parser
- Updated nbb-logseq in deps/
- Made db-utils alias consistent
- Organized resolve-input
2023-01-07 02:49:07 -05:00
Gabriel Horner 6e0dea3f2c Add routing test and make ns name consistent 2022-12-15 11:14:56 -05:00
Gabriel Horner 65955f2ba2 Address lint failures and rm unused spec dep
Spec dep is no longer needed since it ships with bb
2022-12-09 13:17:09 -05:00
Gabriel Horner 584f3b068a Api fns can be called in prod builds with `call-api`
Follow up to
https://github.com/logseq/logseq/pull/7287#issuecomment-1321139222:
- Replace :classes approach with approach that works in dev and prod
  builds
- Remove graph-parser as it is unused
- Make api calling available for all contexts
2022-11-21 14:34:30 -05:00
Gabriel Horner 2ed7d82a02 Fix startup error introduced in dd0169b068
uncaughtException TypeError:
module$electron$utils.safe_decode_uri_component is not a function

Interesting that kondo doesn't catch invalid fns from js requires
2022-11-07 10:59:30 -05:00
Gabriel Horner 5962e0621d Bump to latest kondo and enable new aliased-namespace-symbol linter 2022-10-19 21:24:54 +08:00
Gabriel Horner 0c570a0300 Fix more bugs, move plugins.edn and add enabled
- Move plugins.edn to config/ as it is user configuration
- Add plugin-config enabled flag and moved plugin enabled
- Fixed bugs with manual install
- Refactored plugin-config component to have its own listener
- Split out shared plugin fns to a common ns - plugin-config shouldn't
  need to depend on a component like plugin-handler
- Bump rewrite-edn to include upstream fix and avoid tons of cljs
  warnings with earlier versions
- Fix react warning introduced outside this PR in ui/icon
2022-10-17 10:13:27 -04:00
Gabriel Horner 784ad7cce3 Add unit tests for create-if-not-exists and misc test improvements
- Added unit test as it is used by several handlers
- Fixed test suite failing from last commit now that a test fs is used
- Fixed test stat implementation
- Extracted out Plugin schema to make usage of it less impl dependent
- Made test.helper alias consistent
- Made async testing consistent for export-test
2022-10-17 10:13:27 -04:00
Gabriel Horner c8cda90373 Fix plugin install bugs and add plugin-config tests
- Add validation for plugins.edn with malli
- Add bb task using malli schema
- Add first async test that interacts with frontend.fs
- Add test helpers to make future async testing easier
2022-10-17 10:13:27 -04:00
Charlie d53ac94bfc
Enhance/pdf improvements (#6475)
Full-text search, highlights and assets alias support 
It also exposes a plugin API for highlight context menu   
    ```ts
    /**
       * Current it's only available for pdf viewer
       * @param label - displayed name of command
       * @param action - callback for the clickable item
       * @param opts - clearSelection: clear highlight selection when callback invoked
       */
      registerHighlightContextMenuItem: (
        label: string,
        action: SimpleCommandCallback,
        opts?: {
          clearSelection: boolean
        }
      ) => unknown
    ```
2022-10-09 20:44:18 +08:00
Gabriel Horner 1f0e22275d Add ns docstrings for most ns in src/main
- Added to CI now that it passes
- Added no-doc for docstrings that don't add any more than what's in the
ns name or for ones where I didn't know the ns that well
2022-09-27 13:55:16 +08:00
Gabriel Horner 55ec6d6ce0 Remove kondo config for recently removed library 2022-09-13 11:35:03 -04:00
Gabriel Horner 51c318e2da Enable two disabled linters and bump kondo dep
All the fixes were on used-underscored-binding
2022-09-09 12:14:32 +08:00
Gabriel Horner b1d210d26b Merge configs and create global config file if not present
- Cleanup repo and global config with system components
- test merging
- fix edge cases
2022-09-08 12:34:27 +08:00
Gabriel Horner 4ec5827902 Move block-ref fns and vars to their own ns
Similar to page-ref to keep namespaces explicit
2022-08-04 17:25:29 +08:00
Gabriel Horner e0b1f6b2de Move common uses of page-ref to its own ns
By having a specific ns for page-ref utils, our code is more readable
and intention revealing. Also found that
text/{get-page-name,page-ref-un-brackets!} was getting called in
contexts that didn't make sense e.g. query layer was checking for
markdown and org page-refs
2022-08-04 17:25:29 +08:00
Gabriel Horner 7e5ba8d705 Upgrade to latest clj-kondo dep and pods
- Remove cljs 1.11 workarounds since latest includes those symbols
- Unique duplicate ns which intermittently show up in script-vars
  despite using :lang :cljs
- Able to use :format :progress since failing bug no longer shows up
- Remove unnecessary ignore and unused garden config
2022-05-27 10:07:22 -04:00
Gabriel Horner 15b8e5e9df Setup CI jobs that are only for graph-parser
Also move all non graph-parser fns to frontend thanks to carve lint
2022-05-26 18:04:45 -04:00
Gabriel Horner e999ebc149 Automatically set extract-options correctly
- Removed state paths [:config :text-formats], [:config :img-formats]
  and [:me :settins :date-formatter] as they have been unused since
  their introduction in 2020
- Converted incorrect js/Error refs
- Also merged db.config test helpers
2022-05-26 18:04:45 -04:00
Gabriel Horner 1d390f7bd4 Replace medley/{map-keys/map-vals} with {update-keys,update-vals} 2022-05-19 14:58:33 +08:00
Gabriel Horner 6f68d985bd Use core uuid fns where possible
No need for medley or personal util fns when core fns
are available. Also upgraded nbb-logseq to be 1.11.X cljs compatible

- uuid is the same as medley/uuid
- random-uuid is the same as medley/random-uuid
- uuid-string? and uuid is the same as parse-uuid
2022-05-19 14:58:33 +08:00
Gabriel Horner fec0b755a8 Upgrade cljs + shadow
- Upgraded shadow to keep goog compiler versions the same
- Converted some safe-parse-int's to parse-long
- Converted some safe-parse-float's to parse-double
- Simplified impl of safe-parse-* fns
2022-05-19 14:58:33 +08:00
Gabriel Horner b9bbd0c605 Finish migrating extract to nbb 2022-05-13 15:47:54 -04:00
Gabriel Horner b1e226745d Finish migration block ns to nbb 2022-05-12 16:58:26 -04:00
Gabriel Horner b83f6bbd19 Migrate half the block deps to be nbb compatible 2022-05-12 16:57:28 -04:00
Gabriel Horner 22ddae8998 Move graph-parser related block code to proper ns and nbb migration wip 2022-05-12 16:57:28 -04:00
Gabriel Horner b79b1ca36e Mldoc tests run under nbb 2022-05-10 20:22:48 -04:00
Gabriel Horner 657bb09591 Add mldoc integration test and start mldoc split 2022-05-10 20:22:48 -04:00
Gabriel Horner a58a411567 Move config fns and remaining util fns that mldoc depends on 2022-05-04 12:02:36 -04:00
Gabriel Horner 85bd1fecb2 Move first batch of util fns to graph-parser.util
Still need to fix external.roam
2022-05-04 12:02:36 -04:00
Gabriel Horner af4b55c870 Consistent aliasing for frontend.config 2022-05-04 12:02:36 -04:00
Gabriel Horner a3d60bf2a1 Consistent aliasing for frontend.util 2022-05-04 12:02:36 -04:00
Gabriel Horner 5635469d7a Split out command and category descs
Move them to a more appropriate ns that is just dictionary focused.
This _majorly_ slims down dependencies for the main translation ns
Also:
- add tests
- make medley requires consistent
- alter spec to reflect how command data is actually being used in
  command palette component
- add basic translation tests
2022-03-28 11:05:42 -04:00
Gabriel Horner 6a1bcec82c Make db/query react aliases consistent
These namespaces had conflicting aliases which led to confusing reading
2022-03-10 15:43:07 +08:00
Gabriel Horner f9cb132482 Fix simple queries not working in advanced query - close #4498
Also removed unused repo fn in query-dsl ns and configured custom-query
to throw exception
2022-03-09 14:10:38 +08:00
Gabriel Horner b0babf2232 Change export to not depend on printing - close #4211 2022-02-24 00:32:30 +08:00
Gabriel Horner 17a09f114a Remove last bits of with-context
Follow up to 982eba9396
2022-02-08 11:14:11 -05:00
Gabriel Horner b0d77e5d7f Use consistent datascript aliases to more easily see datascript usage 2022-02-08 14:54:17 +08:00