Skip to content

Commit

Permalink
Merge pull request #884 from Hi-Windom/v0.35
Browse files Browse the repository at this point in the history
V0.35
  • Loading branch information
Soltus authored Jul 16, 2024
2 parents f4eb011 + 6350d6c commit 54deb61
Show file tree
Hide file tree
Showing 32 changed files with 495 additions and 243 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,12 @@ jobs:
suffix: "apk"

steps:
- name: ✅ Enable long paths for windows # 如果路径超过了 260 个字符(对于 .pnpm 几乎不可避免),可能会遇到问题。GitHub Actions 的 windows-latest 已经支持长路径。
if: contains( matrix.config.goos, 'windows')
run: |
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled'
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1
# - name: ✅ Enable long paths for windows # 如果路径超过了 260 个字符(对于 .pnpm 几乎不可避免),可能会遇到问题。
# # GitHub Actions 的 windows-latest 默认已经支持长路径。
# if: contains( matrix.config.goos, 'windows')
# run: |
# Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled'
# Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1

- name: ☄️ Checkout repository and submodules
uses: actions/checkout@v4
Expand Down
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# https://pnpm.nodejs.cn/cli/run/#shell-emulator
# 根路径设置 shell-emulator=true 会导致部分命令失败,具体暂不不深究
shell-emulator=false
# virtual-store-dir-max-length 解决路径过长导致失败的问题,工作区在根路径设置即可
virtual-store-dir-max-length=80
# registry=http://mirrors.cloud.tencent.com/npm/
# 已使用 nrm 管理 npm 源 `nrm test` && `nrm use taobao` (换源后需要删除 node_modules 和 lockfile 重新安装)
# 在 Github Action 中通过 `pnpm config set registry https://registry.npmjs.org/ --location project` 改写从而避免镜像问题
Expand Down
2 changes: 1 addition & 1 deletion .vscode/extensions/Sillot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "sillot",
"displayName": "汐洛 Sillot",
"description": "汐洛彖夲肜矩阵(Sillot T☳Converbenk Matrix)为智慧新彖务服务。此插件为汐洛官方插件,提供多功能一体化集成。",
"version": "0.35.24071423",
"version": "0.35.24071614",
"preview": true,
"repository": "https://github.com/Hi-Windom/Sillot",
"publisher": "Hi-Windom",
Expand Down
1 change: 0 additions & 1 deletion app/.npmrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
shell-emulator=true
virtual-store-dir-max-length=80
# registry=http://mirrors.cloud.tencent.com/npm/
# 已使用 nrm 管理 npm 源 `nrm test` && `nrm use taobao` (换源后需要删除 node_modules 和 lockfile 重新安装)
# 在 Github Action 中通过 `pnpm config set registry https://registry.npmjs.org/ --location project` 改写从而避免镜像问题
1 change: 1 addition & 0 deletions app/appearance/langs/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
"strong": "Bold",
"inlineMath": "Inline formula",
"inlineMemo": "Inline memo",
"blockRef": "Ref anchor text",
"kbd": "Keyboard",
"mark": "Mark",
"s": "Strikethrough",
Expand Down
1 change: 1 addition & 0 deletions app/appearance/langs/es_ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
"strong": "negrita",
"inlineMath": "Fórmula en línea",
"inlineMemo": "Nota en línea",
"blockRef": "texto de anclaje de referencia",
"kbd": "Teclado",
"mark": "Marca",
"s": "Tachado",
Expand Down
1 change: 1 addition & 0 deletions app/appearance/langs/fr_FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
"strong": "Audacieux",
"inlineMath": "Formule en ligne",
"inlineMemo": "Mémo en ligne",
"blockRef": "texte d'ancrage de référence",
"kbd": "Clavier",
"mark": "Marquer",
"s": "Barré",
Expand Down
1 change: 1 addition & 0 deletions app/appearance/langs/ja_JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
"strong": "太字",
"inlineMath": "インライン数式",
"inlineMemo": "インラインメモ",
"blockRef": "アンカー テキストを引用する",
"kbd": "キーボード",
"mark": "ハイライト",
"s": "取り消し線",
Expand Down
1 change: 1 addition & 0 deletions app/appearance/langs/zh_CHT.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
"strong": "粗體",
"inlineMath": "行級公式",
"inlineMemo": "行級備註",
"blockRef": "引用錨文本",
"kbd": "鍵盤",
"mark": "高亮",
"s": "刪除",
Expand Down
1 change: 1 addition & 0 deletions app/appearance/langs/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
"strong": "粗体",
"inlineMath": "行级公式",
"inlineMemo": "行级备注",
"blockRef": "引用锚文本",
"kbd": "键盘",
"mark": "高亮",
"s": "删除",
Expand Down
2 changes: 1 addition & 1 deletion app/appx/AppxManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Identity Name="89C2A984.SiYuan"
ProcessorArchitecture="x64"
Publisher="CN=087C656E-C1D9-42D8-8807-CED45A74FC0F"
Version="3.1.0.0"/>
Version="3.1.1.0"/>
<Properties>
<DisplayName>SiYuan</DisplayName>
<PublisherDisplayName>云南链滴科技有限公司</PublisherDisplayName>
Expand Down
38 changes: 38 additions & 0 deletions app/changelogs/v3.1.1/v3.1.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## Overview

This version mainly improves performance and fixes an issue where data syncing could not be performed on some devices.

## Changelogs

Below are the detailed changes in this version.

### Enhancement

* [Improve database asset field exporting](https://github.com/siyuan-note/siyuan/issues/11903)
* [Improve spaced repetition loading performance](https://github.com/siyuan-note/siyuan/issues/11927)
* [Improve embed block exporting](https://github.com/siyuan-note/siyuan/issues/11932)
* [Improve database text field exporting](https://github.com/siyuan-note/siyuan/issues/11945)
* [The images in the databases are not uploaded to the community hosting](https://github.com/siyuan-note/siyuan/issues/11948)
* [Improve block ref searching performance](https://github.com/siyuan-note/siyuan/issues/11951)
* [Improve recent docs loading performance](https://github.com/siyuan-note/siyuan/issues/11977)
* [Support find replace block ref anchor text](https://github.com/siyuan-note/siyuan/issues/11978)

### Bugfix

* [After changing the `History Retention Days`, the file history cannot be displayed](https://github.com/siyuan-note/siyuan/issues/11935)
* [Data syncing not working on some devices](https://github.com/siyuan-note/siyuan/issues/11943)
* [Non-desktop ends cannot export Markdown](https://github.com/siyuan-note/siyuan/issues/11953)
* [Abnormal heading block update time](https://github.com/siyuan-note/siyuan/issues/11985)

### Refactor

* [Upgrade to Electron v31.2.1](https://github.com/siyuan-note/siyuan/issues/11936)

### Development

* [Fixed the issue of WebSocket asynchronous initialization](https://github.com/siyuan-note/siyuan/pull/11946)

## Download

* [B3log](https://b3log.org/siyuan/en/download.html)
* [GitHub](https://github.com/siyuan-note/siyuan/releases)
38 changes: 38 additions & 0 deletions app/changelogs/v3.1.1/v3.1.1_zh_CHT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## 概述

此版本主要改進了效能,並修復了在某些裝置上無法進行資料同步的問題。

## 變更記錄

以下是此版本中的詳細變更。

### 改進功能

* [改進資料庫資源欄位匯出](https://github.com/siyuan-note/siyuan/issues/11903)
* [改進閃卡間隔重複載入效能](https://github.com/siyuan-note/siyuan/issues/11927)
* [改進嵌入塊導出](https://github.com/siyuan-note/siyuan/issues/11932)
* [改進資料庫文字欄位匯出](https://github.com/siyuan-note/siyuan/issues/11945)
* [資料庫中的資源圖片支援上傳至社區圖床](https://github.com/siyuan-note/siyuan/issues/11948)
* [改進區塊引用搜尋效能](https://github.com/siyuan-note/siyuan/issues/11951)
* [改進最近的文件載入效能](https://github.com/siyuan-note/siyuan/issues/11977)
* [支援搜尋替換區塊引用錨文本](https://github.com/siyuan-note/siyuan/issues/11978)

### 修復缺陷

* [修改 `歷史保留天數` 後文件歷史不顯示](https://github.com/siyuan-note/siyuan/issues/11935)
* [某些裝置上無法進行資料同步](https://github.com/siyuan-note/siyuan/issues/11943)
* [非桌面端無法匯出 Markdown](https://github.com/siyuan-note/siyuan/issues/11953)
* [標題區塊更新時間異常](https://github.com/siyuan-note/siyuan/issues/11985)

### 開發重構

* [升級 Electron v31.2.1](https://github.com/siyuan-note/siyuan/issues/11936)

### 開發者

* [解決 WebSocket 非同步初始化問題](https://github.com/siyuan-note/siyuan/pull/11946)

## 下載

* [B3log](https://b3log.org/siyuan/download.html)
* [GitHub](https://github.com/siyuan-note/siyuan/releases)
38 changes: 38 additions & 0 deletions app/changelogs/v3.1.1/v3.1.1_zh_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## 概述

该版本主要改进了性能,并修复了在某些设备上无法进行数据同步的问题。

## 变更记录

以下是此版本中的详细变更。

### 改进功能

* [改进数据库资源字段导出](https://github.com/siyuan-note/siyuan/issues/11903)
* [改进闪卡间隔重复加载性能](https://github.com/siyuan-note/siyuan/issues/11927)
* [改进嵌入块导出](https://github.com/siyuan-note/siyuan/issues/11932)
* [改进数据库文本字段导出](https://github.com/siyuan-note/siyuan/issues/11945)
* [数据库中的资源图片支持上传到社区图床](https://github.com/siyuan-note/siyuan/issues/11948)
* [改进块引用搜索性能](https://github.com/siyuan-note/siyuan/issues/11951)
* [改进最近的文档加载性能](https://github.com/siyuan-note/siyuan/issues/11977)
* [支持搜索替换块引用锚文本](https://github.com/siyuan-note/siyuan/issues/11978)

### 修复缺陷

* [修改 `历史保留天数` 后文件历史不显示](https://github.com/siyuan-note/siyuan/issues/11935)
* [某些设备上无法进行数据同步](https://github.com/siyuan-note/siyuan/issues/11943)
* [非桌面端无法导出 Markdown](https://github.com/siyuan-note/siyuan/issues/11953)
* [标题块更新时间异常](https://github.com/siyuan-note/siyuan/issues/11985)

### 开发重构

* [升级 Electron v31.2.1](https://github.com/siyuan-note/siyuan/issues/11936)

### 开发者

* [解决 WebSocket 异步初始化问题](https://github.com/siyuan-note/siyuan/pull/11946)

## 下载

* [B3log](https://b3log.org/siyuan/download.html)
* [GitHub](https://github.com/siyuan-note/siyuan/releases)
6 changes: 3 additions & 3 deletions app/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "sillot",
"version": "0.35.24071423",
"syv": "3.1.1",
"sypv": "[3.0.16, 3.0.17, 3.1.0]",
"version": "0.35.24071614",
"syv": "3.1.2",
"sypv": "[3.0.16, 3.0.17, 3.1.0, 3.1.1]",
"description": "Build Your Eternal Digital Garden",
"homepage": "https://sillot.db.sc.cn",
"repository": "https://github.com/Hi-Windom/Sillot",
Expand Down
1 change: 1 addition & 0 deletions app/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,7 @@ export abstract class Constants extends SConst { // Sillot extend
"strong": true,
"inlineMath": false,
"inlineMemo": true,
"blockRef": false,
"kbd": true,
"mark": true,
"s": true,
Expand Down
5 changes: 5 additions & 0 deletions app/src/types/config.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2105,6 +2105,11 @@ declare namespace Config {
* @default true
*/
inlineMemo?: boolean;
/**
* Replace block refs
* @default false
*/
blockRef?: boolean;
/**
* Replace kdb elements
* @default true
Expand Down
2 changes: 1 addition & 1 deletion docs/starlight/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "starlight",
"type": "module",
"version": "0.35.24071423",
"version": "0.35.24071614",
"scripts": {
"test": "echo 'Test your sister day by day'",
"dev": "astro dev",
Expand Down
5 changes: 2 additions & 3 deletions kernel/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/siyuan-note/siyuan/kernel

go 1.22
go 1.22.0

// [$ g install x.yy.z] or [$ g use x.yy.z] # ref https://github.com/voidint/g
// VSCode 的GO工具链安装/升级失败导致报错多半是因为:golang.org 在国内由于一些 众所周知的 原因无法直接访问,可以先运行下面的命令
Expand Down Expand Up @@ -58,6 +58,7 @@ require (
github.com/sashabaranov/go-openai v1.26.2
github.com/shirou/gopsutil/v3 v3.24.5
github.com/siyuan-note/dejavu v0.0.0-20240710114654-4025d0084e9d
github.com/siyuan-note/encryption v0.0.0-20231219001248-1e028a4d13b4
github.com/siyuan-note/eventbus v0.0.0-20240627125516-396fdb0f0f97
github.com/siyuan-note/filelock v0.0.0-20240629145917-7545564cf0a4
github.com/siyuan-note/httpclient v0.0.0-20240626145026-29585d45a51c
Expand Down Expand Up @@ -175,8 +176,6 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

require github.com/siyuan-note/encryption v0.0.0-20231219001248-1e028a4d13b4

replace github.com/mattn/go-sqlite3 => github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950

//replace github.com/88250/lute => F:\golang\gopath\src\github.com\88250\lute
Expand Down
9 changes: 7 additions & 2 deletions kernel/model/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -2010,8 +2010,13 @@ func exportTree(tree *parse.Tree, wysiwyg, keepFold bool,
n.InsertBefore(blockRefLink)
unlinks = append(unlinks, n)
case 3: // 仅锚文本
blockRefLink := &ast.Node{Type: ast.NodeTextMark, TextMarkType: "text", TextMarkTextContent: linkText}
blockRefLink.KramdownIAL = n.KramdownIAL
var blockRefLink *ast.Node
if 0 < len(n.KramdownIAL) {
blockRefLink = &ast.Node{Type: ast.NodeTextMark, TextMarkType: "text", TextMarkTextContent: linkText}
blockRefLink.KramdownIAL = n.KramdownIAL
} else {
blockRefLink = &ast.Node{Type: ast.NodeText, Tokens: []byte(linkText)}
}
n.InsertBefore(blockRefLink)
unlinks = append(unlinks, n)
case 4: // 脚注
Expand Down
16 changes: 16 additions & 0 deletions kernel/model/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,22 @@ func FindReplace(keyword, replacement string, replaceTypes map[string]bool, ids
}

replaceNodeTextMarkTextContent(n, method, keyword, replacement, r, "text")
} else if n.IsTextMarkType("block-ref") {
if !replaceTypes["blockRef"] {
return ast.WalkContinue
}

if 0 == method {
if strings.Contains(n.TextMarkTextContent, keyword) {
n.TextMarkTextContent = strings.ReplaceAll(n.TextMarkTextContent, keyword, replacement)
n.TextMarkBlockRefSubtype = "s"
}
} else if 3 == method {
if nil != r && r.MatchString(n.TextMarkTextContent) {
n.TextMarkTextContent = r.ReplaceAllString(n.TextMarkTextContent, replacement)
n.TextMarkBlockRefSubtype = "s"
}
}
}
}
return ast.WalkContinue
Expand Down
15 changes: 9 additions & 6 deletions kernel/treenode/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ package treenode

import (
"bytes"
"strings"
"sync"

"github.com/88250/gulu"
"github.com/88250/lute"
"github.com/88250/lute/ast"
Expand All @@ -26,12 +29,9 @@ import (
"github.com/88250/lute/parse"
"github.com/88250/lute/render"
"github.com/88250/vitess-sqlparser/sqlparser"
"github.com/emirpasic/gods/sets/hashset"
"github.com/siyuan-note/logging"
"github.com/siyuan-note/siyuan/kernel/cache"
"github.com/siyuan-note/siyuan/kernel/util"
"strings"
"sync"
)

func GetEmbedBlockRef(embedNode *ast.Node) (blockRefID string) {
Expand Down Expand Up @@ -229,7 +229,6 @@ func CountBlockNodes(node *ast.Node) (ret int) {
func ParentNodesWithHeadings(node *ast.Node) (parents []*ast.Node) {
const maxDepth = 255
i := 0
headingIDs := hashset.New()
for n := node; nil != n; n = n.Parent {
parent := n.Parent
if maxDepth < i {
Expand All @@ -246,9 +245,13 @@ func ParentNodesWithHeadings(node *ast.Node) (parents []*ast.Node) {
// The heading block update time is refreshed after editing the blocks under the heading https://github.com/siyuan-note/siyuan/issues/11374
parentHeadingLevel := 7
for prev := n.Previous; nil != prev; prev = prev.Previous {
if ast.NodeHeading == prev.Type && prev.HeadingLevel < parentHeadingLevel && !headingIDs.Contains(prev.ID) {
if ast.NodeHeading == prev.Type {
if prev.HeadingLevel >= parentHeadingLevel {
break
}

parents = append(parents, prev)
headingIDs.Add(prev.ID)
parentHeadingLevel = prev.HeadingLevel
}
}

Expand Down
2 changes: 1 addition & 1 deletion kernel/util/working.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ var Mode = "prod"
const (
Ver = "0.35"
VerC = Ver + ".999" // 用于检查版本更新
VerSY = "3.1.1" // 思源版本号
VerSY = "3.1.2" // 思源版本号
IsInsider = true
)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Sillot-workspace",
"version": "0.35.24071423",
"version": "0.35.24071614",
"description": "汐洛 pnpm 工作区",
"packageManager": "pnpm@9.5.0",
"scripts": {
Expand Down
Loading

0 comments on commit 54deb61

Please sign in to comment.