Browse Source

Merge branch 'master' into enhance/mobile-silk

charlie 3 months ago
parent
commit
6bbe6f97ab

+ 1 - 1
.github/workflows/build-android.yml

@@ -50,7 +50,7 @@ jobs:
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     steps:
     steps:
       - name: Check out Git repository
       - name: Check out Git repository
-        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c  # v3.3.0
+        uses: actions/checkout@v4
         with:
         with:
           ref: ${{ github.event.inputs.git-ref }}
           ref: ${{ github.event.inputs.git-ref }}
 
 

+ 1 - 1
.github/workflows/build-desktop-release.yml

@@ -62,7 +62,7 @@ jobs:
           exit 1
           exit 1
 
 
       - name: Check out Git repository
       - name: Check out Git repository
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
         with:
         with:
           ref: ${{ github.event.inputs.git-ref }}
           ref: ${{ github.event.inputs.git-ref }}
 
 

+ 1 - 1
.github/workflows/build-docker.yml

@@ -16,7 +16,7 @@ jobs:
 
 
     steps:
     steps:
       - name: Checkout
       - name: Checkout
-        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c  # v3.3.0
+        uses: actions/checkout@v4
         with:
         with:
           fetch-depth: 1
           fetch-depth: 1
           submodules: 'true'
           submodules: 'true'

+ 1 - 1
.github/workflows/build-ios-release.yml

@@ -20,7 +20,7 @@ jobs:
     runs-on: macos-15
     runs-on: macos-15
     steps:
     steps:
       - name: Check out Git repository
       - name: Check out Git repository
-        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c  # v3.3.0
+        uses: actions/checkout@v4
         with:
         with:
           ref: ${{ github.event.inputs.git-ref }}
           ref: ${{ github.event.inputs.git-ref }}
       - uses: maxim-lobanov/setup-xcode@v1
       - uses: maxim-lobanov/setup-xcode@v1

+ 1 - 1
.github/workflows/build-ios.yml

@@ -25,7 +25,7 @@ jobs:
     runs-on: macos-14
     runs-on: macos-14
     steps:
     steps:
       - name: Check out Git repository
       - name: Check out Git repository
-        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c  # v3.3.0
+        uses: actions/checkout@v4
 
 
       - name: Install Node.js, NPM and Yarn
       - name: Install Node.js, NPM and Yarn
         uses: actions/setup-node@v3
         uses: actions/setup-node@v3

+ 6 - 2
.github/workflows/db.yml

@@ -8,12 +8,16 @@ on:
       - 'deps/db/**'
       - 'deps/db/**'
       - '.github/workflows/db.yml'
       - '.github/workflows/db.yml'
       - '!deps/db/**.md'
       - '!deps/db/**.md'
+      # Deps that logseq/db depends on should trigger this workflow
+      - 'deps/common/**'
   pull_request:
   pull_request:
     branches: [master]
     branches: [master]
     paths:
     paths:
       - 'deps/db/**'
       - 'deps/db/**'
       - '.github/workflows/db.yml'
       - '.github/workflows/db.yml'
       - '!deps/db/**.md'
       - '!deps/db/**.md'
+      # Deps that logseq/db depends on should trigger this workflow
+      - 'deps/common/**'
 
 
 defaults:
 defaults:
   run:
   run:
@@ -32,7 +36,7 @@ jobs:
 
 
     steps:
     steps:
       - name: Checkout
       - name: Checkout
-        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c  # v3.3.0
+        uses: actions/checkout@v4
 
 
       - name: Set up Node
       - name: Set up Node
         uses: actions/setup-node@v3
         uses: actions/setup-node@v3
@@ -68,7 +72,7 @@ jobs:
 
 
     steps:
     steps:
       - name: Checkout
       - name: Checkout
-        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c  # v3
+        uses: actions/checkout@v4
 
 
       - name: Set up Java
       - name: Set up Java
         uses: actions/setup-java@v3
         uses: actions/setup-java@v3

+ 1 - 1
.github/workflows/deploy-db-test-pages.yml

@@ -14,7 +14,7 @@ jobs:
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
 
 
     steps:
     steps:
-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
 
 
       - name: Setup Java JDK
       - name: Setup Java JDK
         uses: actions/setup-java@v3
         uses: actions/setup-java@v3

+ 8 - 5
.github/workflows/graph-parser.yml

@@ -7,17 +7,20 @@ on:
     branches: [master]
     branches: [master]
     paths:
     paths:
       - 'deps/graph-parser/**'
       - 'deps/graph-parser/**'
-      # db is a local dep that could break functionality in this lib and should trigger this
-      - 'deps/db/**'
       - '.github/workflows/graph-parser.yml'
       - '.github/workflows/graph-parser.yml'
       - '!deps/graph-parser/**.md'
       - '!deps/graph-parser/**.md'
+      # Deps that logseq/graph-parser depends on should trigger this workflow
+      - 'deps/db/**'
+      - 'deps/common/**'
   pull_request:
   pull_request:
     branches: [master]
     branches: [master]
     paths:
     paths:
       - 'deps/graph-parser/**'
       - 'deps/graph-parser/**'
-      - 'deps/db/**'
       - '.github/workflows/graph-parser.yml'
       - '.github/workflows/graph-parser.yml'
       - '!deps/graph-parser/**.md'
       - '!deps/graph-parser/**.md'
+      # Deps that logseq/graph-parser depends on should trigger this workflow
+      - 'deps/db/**'
+      - 'deps/common/**'
 
 
 defaults:
 defaults:
   run:
   run:
@@ -37,7 +40,7 @@ jobs:
 
 
     steps:
     steps:
       - name: Checkout
       - name: Checkout
-        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c  # v3.3.0
+        uses: actions/checkout@v4
 
 
       - name: Set up Node
       - name: Set up Node
         uses: actions/setup-node@v3
         uses: actions/setup-node@v3
@@ -90,7 +93,7 @@ jobs:
 
 
     steps:
     steps:
       - name: Checkout
       - name: Checkout
-        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c  # v3.3.0
+        uses: actions/checkout@v4
 
 
       - name: Set up Java
       - name: Set up Java
         uses: actions/setup-java@v3
         uses: actions/setup-java@v3

+ 2 - 2
.github/workflows/logseq-common.yml

@@ -32,7 +32,7 @@ jobs:
 
 
     steps:
     steps:
       - name: Checkout
       - name: Checkout
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
 
 
       - name: Set up Node
       - name: Set up Node
         uses: actions/setup-node@v3
         uses: actions/setup-node@v3
@@ -85,7 +85,7 @@ jobs:
 
 
     steps:
     steps:
       - name: Checkout
       - name: Checkout
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
 
 
       - name: Set up Java
       - name: Set up Java
         uses: actions/setup-java@v3
         uses: actions/setup-java@v3

+ 10 - 5
.github/workflows/outliner.yml

@@ -7,17 +7,22 @@ on:
     branches: [master]
     branches: [master]
     paths:
     paths:
       - 'deps/outliner/**'
       - 'deps/outliner/**'
-      # db is a local dep that could break functionality in this lib and should trigger this
-      - 'deps/db/**'
       - '.github/workflows/outliner.yml'
       - '.github/workflows/outliner.yml'
       - '!deps/outliner/**.md'
       - '!deps/outliner/**.md'
+      # Deps that logseq/outliner depends on should trigger this workflow
+      - 'deps/graph-parser/**'
+      - 'deps/db/**'
+      - 'deps/common/**'
   pull_request:
   pull_request:
     branches: [master]
     branches: [master]
     paths:
     paths:
       - 'deps/outliner/**'
       - 'deps/outliner/**'
-      - 'deps/db/**'
       - '.github/workflows/outliner.yml'
       - '.github/workflows/outliner.yml'
       - '!deps/outliner/**.md'
       - '!deps/outliner/**.md'
+      # Deps that logseq/outliner depends on should trigger this workflow
+      - 'deps/graph-parser/**'
+      - 'deps/db/**'
+      - 'deps/common/**'
 
 
 defaults:
 defaults:
   run:
   run:
@@ -37,7 +42,7 @@ jobs:
 
 
     steps:
     steps:
       - name: Checkout
       - name: Checkout
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
 
 
       - name: Set up Node
       - name: Set up Node
         uses: actions/setup-node@v3
         uses: actions/setup-node@v3
@@ -74,7 +79,7 @@ jobs:
 
 
     steps:
     steps:
       - name: Checkout
       - name: Checkout
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
 
 
       - name: Set up Java
       - name: Set up Java
         uses: actions/setup-java@v3
         uses: actions/setup-java@v3

+ 8 - 5
.github/workflows/publishing.yml

@@ -7,17 +7,20 @@ on:
     branches: [master]
     branches: [master]
     paths:
     paths:
       - 'deps/publishing/**'
       - 'deps/publishing/**'
-      # db is a local dep that could break functionality in this lib and should trigger this
-      - 'deps/db/**'
       - '.github/workflows/publishing.yml'
       - '.github/workflows/publishing.yml'
       - '!deps/publishing/**.md'
       - '!deps/publishing/**.md'
+      # Deps that logseq/publishing depends on should trigger this workflow
+      - 'deps/db/**'
+      - 'deps/common/**'
   pull_request:
   pull_request:
     branches: [master]
     branches: [master]
     paths:
     paths:
       - 'deps/publishing/**'
       - 'deps/publishing/**'
-      - 'deps/db/**'
       - '.github/workflows/publishing.yml'
       - '.github/workflows/publishing.yml'
       - '!deps/publishing/**.md'
       - '!deps/publishing/**.md'
+      # Deps that logseq/publishing depends on should trigger this workflow
+      - 'deps/db/**'
+      - 'deps/common/**'
 
 
 defaults:
 defaults:
   run:
   run:
@@ -37,7 +40,7 @@ jobs:
 
 
     steps:
     steps:
       - name: Checkout
       - name: Checkout
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
 
 
       - name: Set up Node
       - name: Set up Node
         uses: actions/setup-node@v3
         uses: actions/setup-node@v3
@@ -74,7 +77,7 @@ jobs:
 
 
     steps:
     steps:
       - name: Checkout
       - name: Checkout
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
 
 
       - name: Set up Java
       - name: Set up Java
         uses: actions/setup-java@v3
         uses: actions/setup-java@v3

+ 2 - 2
src/main/logseq/api.cljs

@@ -965,7 +965,7 @@
             _ (db-async/<get-block (state/get-current-repo) block-uuid :children? false)
             _ (db-async/<get-block (state/get-current-repo) block-uuid :children? false)
             db? (config/db-based-graph? (state/get-current-repo))
             db? (config/db-based-graph? (state/get-current-repo))
             key-ns? (and (keyword? key) (namespace key))
             key-ns? (and (keyword? key) (namespace key))
-            key (if key-ns? key (-> (if (keyword? key) (name key) key) (util/safe-lower-case)))
+            key (if key-ns? key (if (keyword? key) (name key) key))
             key (if (and db? (not key-ns?))
             key (if (and db? (not key-ns?))
                   (api-block/get-db-ident-for-user-property-name
                   (api-block/get-db-ident-for-user-property-name
                     key (api-block/resolve-property-prefix-for-db this))
                     key (api-block/resolve-property-prefix-for-db this))
@@ -982,7 +982,7 @@
       (when-let [properties (some-> block-uuid (db-model/get-block-by-uuid) (:block/properties))]
       (when-let [properties (some-> block-uuid (db-model/get-block-by-uuid) (:block/properties))]
         (when (seq properties)
         (when (seq properties)
           (let [key (api-block/sanitize-user-property-name key)
           (let [key (api-block/sanitize-user-property-name key)
-                property-name (-> (if (keyword? key) (name key) key) (util/safe-lower-case))
+                property-name (if (keyword? key) (name key) key)
                 ident (api-block/get-db-ident-for-user-property-name
                 ident (api-block/get-db-ident-for-user-property-name
                         property-name (api-block/resolve-property-prefix-for-db this))
                         property-name (api-block/resolve-property-prefix-for-db this))
                 property-value (or (get properties key)
                 property-value (or (get properties key)

+ 3 - 1
src/main/logseq/api/block.cljs

@@ -34,7 +34,9 @@
     (-> k (string/trim)
     (-> k (string/trim)
       (string/replace " " "")
       (string/replace " " "")
       (string/replace #"^[:_\s]+" "")
       (string/replace #"^[:_\s]+" "")
-      (string/lower-case))
+      (#(cond-> %
+          (not (string/includes? % "/"))
+          (string/lower-case))))
     k))
     k))
 
 
 (defn resolve-property-prefix-for-db
 (defn resolve-property-prefix-for-db