diff --git a/.github/workflows/stale-issues.yml b/.github/workflows/stale-issues.yml index f35b0230255..3f0739731e9 100644 --- a/.github/workflows/stale-issues.yml +++ b/.github/workflows/stale-issues.yml @@ -30,7 +30,7 @@ jobs: stale-issue-label: ':status/automatic-stale' close-issue-label: ':status/automatic-closing' # trunk-ignore(yamllint/line-length) - exempt-issue-labels: ':status/hold, :status/WIP, :type/enhancement, type/can-be-reproduced, priority-A' + exempt-issue-labels: 'hold, WIP, :type/enhancement, can-be-reproduced, priority-A, :type/bug, :type/feature-request' remove-stale-when-updated: true stale-issue-message: | Hi There! 👋 diff --git a/libs/yarn.lock b/libs/yarn.lock index fcd5f6092b6..d5336780484 100644 --- a/libs/yarn.lock +++ b/libs/yarn.lock @@ -2229,14 +2229,14 @@ schema-utils@^4.0.0: ajv-keywords "^5.0.0" semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== semver@^7.3.4: - version "7.3.5" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" - integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== dependencies: lru-cache "^6.0.0" diff --git a/package.json b/package.json index b0d95939158..74d64ea9079 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "d3-force": "3.0.0", "diff": "5.0.0", "dompurify": "2.4.0", - "electron": "25.2.0", + "electron": "24.6.2", "electron-dl": "3.3.0", "fs": "0.0.1-security", "fs-extra": "9.1.0", diff --git a/packages/amplify/yarn.lock b/packages/amplify/yarn.lock index bb359e8e540..92c4a99bd3f 100644 --- a/packages/amplify/yarn.lock +++ b/packages/amplify/yarn.lock @@ -5087,9 +5087,9 @@ scheduler@^0.20.2: object-assign "^4.1.1" semver@^5.7.0, semver@^5.7.1: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + version "5.7.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" + integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== sentence-case@^3.0.4: version "3.0.4" diff --git a/resources/package.json b/resources/package.json index fe5345bf066..dc0db4ff300 100644 --- a/resources/package.json +++ b/resources/package.json @@ -13,7 +13,7 @@ "electron:make": "electron-forge make", "electron:make-macos-arm64": "electron-forge make --platform=darwin --arch=arm64", "electron:publish:github": "electron-forge publish", - "rebuild:all": "electron-rebuild -v 25.2.0 -f", + "rebuild:all": "electron-rebuild -v 24.6.2 -f", "postinstall": "install-app-deps" }, "config": { @@ -52,12 +52,12 @@ "@electron-forge/maker-squirrel": "^6.0.4", "@electron-forge/maker-zip": "^6.0.4", "@electron/rebuild": "3.2.10", - "electron": "25.2.0", + "electron": "24.6.2", "electron-builder": "^22.11.7", "electron-forge-maker-appimage": "https://github.com/logseq/electron-forge-maker-appimage.git" }, "resolutions": { - "**/electron": "25.2.0", + "**/electron": "24.6.2", "**/node-gyp": "9.0.0" } } diff --git a/src/main/frontend/fs/diff_merge.cljs b/src/main/frontend/fs/diff_merge.cljs index 31131b8977d..77a87e5ff05 100644 --- a/src/main/frontend/fs/diff_merge.cljs +++ b/src/main/frontend/fs/diff_merge.cljs @@ -182,7 +182,7 @@ income-diffblocks (ast->diff-blocks-alt income-ast income format options) current-ast (->ast current) current-diffblocks (ast->diff-blocks-alt current-ast current format options) - branch-diffblocks [income-diffblocks current-diffblocks] + branch-diffblocks [current-diffblocks income-diffblocks] merged (.mergeBlocks merger (bean/->js base-diffblocks) (bean/->js branch-diffblocks)) ;; For extracting diff-merge test cases ;; _ (prn "input:") diff --git a/src/main/frontend/handler/editor.cljs b/src/main/frontend/handler/editor.cljs index 34908b84014..e4682cf939e 100644 --- a/src/main/frontend/handler/editor.cljs +++ b/src/main/frontend/handler/editor.cljs @@ -2698,7 +2698,8 @@ (delete-concat current-block))) :else - (delete-and-update input current-pos (inc current-pos)))))) + (delete-and-update + input current-pos (util/safe-inc-current-pos-from-start (.-value input) current-pos)))))) (defn keydown-backspace-handler [cut? e] diff --git a/src/main/frontend/handler/plugin.cljs b/src/main/frontend/handler/plugin.cljs index edac2513750..11515e8644d 100644 --- a/src/main/frontend/handler/plugin.cljs +++ b/src/main/frontend/handler/plugin.cljs @@ -376,7 +376,7 @@ (when-let [hook (and uuid (str "hook:db:block_" (string/replace (str uuid) "-" "_")))] (boolean (seq (get (get-installed-hooks) hook))))) -(def *fenced-code-providers (atom #{})) +(defonce *fenced-code-providers (atom #{})) (defn register-fenced-code-renderer [pid type {:keys [before subs render edit] :as _opts}] @@ -389,8 +389,10 @@ (defn hook-fenced-code-by-type [type] (when-let [key (and (seq @*fenced-code-providers) type (keyword type))] - (first (map #(state/get-plugin-resource % :fenced-code-renderers key) - @*fenced-code-providers)))) + (->> @*fenced-code-providers + (map #(state/get-plugin-resource % :fenced-code-renderers key)) + (remove nil?) + (first)))) (def *extensions-enhancer-providers (atom #{})) diff --git a/src/main/frontend/util/text.cljs b/src/main/frontend/util/text.cljs index 8ba35e3117c..5b4cd63b06a 100644 --- a/src/main/frontend/util/text.cljs +++ b/src/main/frontend/util/text.cljs @@ -142,14 +142,17 @@ [value nil nil]))) (defn get-graph-name-from-path - "Get `Dir/GraphName` style name for from repo-url" + "Get `Dir/GraphName` style name for from repo-url. + + On iOS, repo-url might be nil" [repo-url] - (let [path (config/get-local-dir repo-url) - path (if (path/is-file-url? path) - (path/url-to-path path) - path) - parts (->> (string/split path #"/") - (take-last 2))] - (if (not= (first parts) "0") - (util/string-join-path parts) - (last parts)))) + (when (not-empty repo-url) + (let [path (config/get-local-dir repo-url) + path (if (path/is-file-url? path) + (path/url-to-path path) + path) + parts (->> (string/split path #"/") + (take-last 2))] + (if (not= (first parts) "0") + (util/string-join-path parts) + (last parts))))) diff --git a/src/test/frontend/fs/diff_merge_test.cljs b/src/test/frontend/fs/diff_merge_test.cljs index 09b9b17fff5..e374237f190 100644 --- a/src/test/frontend/fs/diff_merge_test.cljs +++ b/src/test/frontend/fs/diff_merge_test.cljs @@ -120,7 +120,7 @@ :uuid "63e25526-3612-4fb1-8cf9-f66db1254a58" :level 1} {:body "b" :uuid nil :level 2} {:body "c" :uuid nil :level 3}] - + "alias:: ⭐️\nicon:: ⭐️" [{:body "alias:: ⭐️\nicon:: ⭐️", :level 1, :uuid nil}])) @@ -191,7 +191,7 @@ :uuid "63e25526-3612-4fb1-8cf9-f66db1254a58" :level 1 :meta {:raw-body "- a\n id:: 63e25526-3612-4fb1-8cf9-f66db1254a58"}} {:body "b" :uuid nil :level 2 :meta {:raw-body "\t- b"}} {:body "c" :uuid nil :level 3 :meta {:raw-body "\t\t- c"}}] - + "alias:: ⭐️\nicon:: ⭐️" [{:body "alias:: ⭐️\nicon:: ⭐️", :meta {:raw-body "alias:: ⭐️\nicon:: ⭐️"}, :level 1, :uuid nil}])) @@ -470,4 +470,18 @@ "- a\n id:: 648ab5e6-5e03-4c61-95d4-dd904a0a007f\n aaa:: 111\n- b" "- c" :markdown) - "- a\n id:: 648ab5e6-5e03-4c61-95d4-dd904a0a007f\n aaa:: 111\n- c"))) + "- a\n id:: 648ab5e6-5e03-4c61-95d4-dd904a0a007f\n aaa:: 111\n- c")) + + (is (= (fs-diff/three-way-merge + "- a\n- b\n- c" + "- a\n- b\n- c\n- d" + "- a\n\t- b\n- c" + :markdown) + "- a\n\t- b\n- c\n- d")) + + (is (= (fs-diff/three-way-merge + "- a\n- b\n- c" + "- a\n\t- b\n- c" + "- a\n- b\n- c\n- d" + :markdown) + "- a\n- b\n- c\n- d"))) diff --git a/static/yarn.lock b/static/yarn.lock index a47c6cdfd17..b708de37546 100644 --- a/static/yarn.lock +++ b/static/yarn.lock @@ -2086,10 +2086,10 @@ electron-winstaller@^5.0.0: lodash.template "^4.2.2" temp "^0.9.0" -electron@*, electron@25.2.0: - version "25.2.0" - resolved "https://registry.yarnpkg.com/electron/-/electron-25.2.0.tgz#ff832d88f78481a82cf9feb72e605ec43553d4ba" - integrity sha512-I/rhcW2sV2fyiveVSBr2N7v5ZiCtdGY0UiNCDZgk2fpSC+irQjbeh7JT2b4vWmJ2ogOXBjqesrN9XszTIG6DHg== +electron@*, electron@24.6.2: + version "24.6.2" + resolved "https://registry.yarnpkg.com/electron/-/electron-24.6.2.tgz#c7958fd05efcb6d4f9854862f8c6146791d1fdc2" + integrity sha512-HC0lE1u9GYfj82Tt60Y/T+ELTdBKlvfPwLCzB6mWsyqYvrb2mtBy5fBSNtlfT0MWZOMh6J2of/AEYaLitniNCQ== dependencies: "@electron/get" "^2.0.0" "@types/node" "^18.11.18" diff --git a/tldraw/yarn.lock b/tldraw/yarn.lock index 76ff8fd7a85..1d88823bb2e 100644 --- a/tldraw/yarn.lock +++ b/tldraw/yarn.lock @@ -4285,14 +4285,14 @@ scheduler@^0.20.2: object-assign "^4.1.1" semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== semver@^7.3.7: - version "7.3.7" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" - integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== dependencies: lru-cache "^6.0.0" diff --git a/yarn.lock b/yarn.lock index 7c89523b9ed..8018d37972d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2570,10 +2570,10 @@ electron-to-chromium@^1.4.251: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz#61046d1e4cab3a25238f6bf7413795270f125592" integrity sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA== -electron@25.2.0: - version "25.2.0" - resolved "https://registry.yarnpkg.com/electron/-/electron-25.2.0.tgz#ff832d88f78481a82cf9feb72e605ec43553d4ba" - integrity sha512-I/rhcW2sV2fyiveVSBr2N7v5ZiCtdGY0UiNCDZgk2fpSC+irQjbeh7JT2b4vWmJ2ogOXBjqesrN9XszTIG6DHg== +electron@24.6.2: + version "24.6.2" + resolved "https://registry.yarnpkg.com/electron/-/electron-24.6.2.tgz#c7958fd05efcb6d4f9854862f8c6146791d1fdc2" + integrity sha512-HC0lE1u9GYfj82Tt60Y/T+ELTdBKlvfPwLCzB6mWsyqYvrb2mtBy5fBSNtlfT0MWZOMh6J2of/AEYaLitniNCQ== dependencies: "@electron/get" "^2.0.0" "@types/node" "^18.11.18" @@ -6500,19 +6500,19 @@ semver-greatest-satisfied-range@^1.1.0: sver-compat "^1.5.0" "semver@2 || 3 || 4 || 5", semver@^5.5.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + version "5.7.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" + integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== semver@^6.2.0, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== semver@^7.3.2, semver@^7.3.4, semver@^7.3.7: - version "7.3.7" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" - integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== dependencies: lru-cache "^6.0.0"