Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: reorproject/reor
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.2.10
Choose a base ref
...
head repository: reorproject/reor
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 23,203 additions and 17,465 deletions.
  1. +40 −32 .eslintrc.js
  2. +2 −0 .gitattributes
  3. +13 −28 .github/workflows/build.yml
  4. +14 −26 .github/workflows/release.yml
  5. +4 −0 .gitignore
  6. +2 −0 .husky/pre-commit
  7. +7 −21 .prettierrc
  8. +10 −1 .vscode/settings.json
  9. +27 −20 README.md
  10. +20 −0 components.json
  11. +1 −1 electron/electron-env.d.ts
  12. +0 −300 electron/main/Files/Filesystem.ts
  13. +0 −33 electron/main/Files/Types.ts
  14. +0 −72 electron/main/Files/filesystem.test.ts
  15. +0 −395 electron/main/Files/registerFilesHandler.ts
  16. +0 −15 electron/main/Generic/error.ts
  17. +0 −192 electron/main/Generic/network.ts
  18. +0 −14 electron/main/Generic/path.ts
  19. +0 −39 electron/main/Prompts/Prompts.ts
  20. +0 −69 electron/main/RAG/Chunking.ts
  21. +0 −90 electron/main/Store/storeConfig.ts
  22. +0 −257 electron/main/Store/storeHandlers.ts
  23. +0 −79 electron/main/Store/storeMigrator.ts
  24. +64 −0 electron/main/common/chunking.ts
  25. +16 −0 electron/main/common/error.ts
  26. +61 −0 electron/main/common/network.ts
  27. +202 −0 electron/main/common/windowManager.ts
  28. +0 −214 electron/main/database/Embeddings.ts
  29. +0 −62 electron/main/database/Lance.ts
  30. +0 −160 electron/main/database/LanceTableWrapper.ts
  31. +0 −89 electron/main/database/Schema.ts
  32. +0 −239 electron/main/database/TableHelperFunctions.ts
  33. +0 −20 electron/main/database/database.test.ts
  34. +0 −5 electron/main/database/dbSessionHandlerTypes.ts
  35. +0 −331 electron/main/database/dbSessionHandlers.ts
  36. +0 −74 electron/main/download/download.ts
  37. +237 −0 electron/main/electron-store/ipcHandlers.ts
  38. +85 −0 electron/main/electron-store/storeConfig.ts
  39. +151 −0 electron/main/electron-store/storeSchemaMigrator.ts
  40. +27 −0 electron/main/electron-utils/ipcHandlers.ts
  41. +74 −0 electron/main/filesystem/filesystem.test.ts
  42. +196 −0 electron/main/filesystem/filesystem.ts
  43. +154 −0 electron/main/filesystem/ipcHandlers.ts
  44. +33 −0 electron/main/filesystem/types.ts
  45. +67 −287 electron/main/index.ts
  46. +41 −37 electron/main/llm/contextLimit.ts
  47. +51 −0 electron/main/llm/ipcHandlers.ts
  48. +48 −77 electron/main/llm/llmConfig.ts
  49. +0 −146 electron/main/llm/llmSessionHandlers.ts
  50. +0 −94 electron/main/llm/models/Anthropic.ts
  51. +0 −245 electron/main/llm/models/Ollama.ts
  52. +0 −98 electron/main/llm/models/OpenAI.ts
  53. +215 −0 electron/main/llm/models/ollama.ts
  54. +10 −12 electron/main/llm/{Types.ts → types.ts}
  55. +17 −0 electron/main/llm/utils.ts
  56. +29 −0 electron/main/path/ipcHandlers.ts
  57. +16 −0 electron/main/path/path.ts
  58. +0 −84 electron/main/update.ts
  59. +17 −0 electron/main/vector-database/database.test.ts
  60. +66 −0 electron/main/vector-database/downloadModelsFromHF.ts
  61. +201 −0 electron/main/vector-database/embeddings.ts
  62. +81 −0 electron/main/vector-database/ipcHandlers.ts
  63. +49 −0 electron/main/vector-database/lance.ts
  64. +123 −0 electron/main/vector-database/lanceTableWrapper.ts
  65. +59 −0 electron/main/vector-database/schema.ts
  66. +231 −0 electron/main/vector-database/tableHelperFunctions.ts
  67. +0 −213 electron/main/windowManager.ts
  68. +140 −474 electron/preload/index.ts
  69. +5 −4 index.html
  70. +9,416 −5,852 package-lock.json
  71. +92 −14 package.json
  72. +0 −54 playwright.config.ts
  73. BIN public/favicon.ico
  74. BIN public/icon.png
  75. +0 −1 public/node.svg
  76. +0 −4 screenshots.md
  77. +191 −61 scripts/downloadOllama.js
  78. +9 −6 scripts/notarize.js
  79. +45 −0 shared/defaultLLMs.ts
  80. +25 −0 shared/utils.ts
  81. +63 −59 src/App.tsx
  82. +43 −0 src/assets/reor-logo.svg
  83. +0 −104 src/components/Chat/AddContextFiltersModal.tsx
  84. +0 −22 src/components/Chat/Chat-Prompts.tsx
  85. +0 −500 src/components/Chat/Chat.tsx
  86. +0 −22 src/components/Chat/ChatAction.tsx
  87. +60 −0 src/components/Chat/ChatConfigComponents/DBSearchFilters.tsx
  88. +54 −0 src/components/Chat/ChatConfigComponents/PromptEditor.tsx
  89. +106 −0 src/components/Chat/ChatConfigComponents/ToolSelector.tsx
  90. +99 −0 src/components/Chat/ChatConfigComponents/exampleAgents.ts
  91. +98 −50 src/components/Chat/ChatInput.tsx
  92. +154 −0 src/components/Chat/ChatMessages.tsx
  93. +23 −0 src/components/Chat/ChatPrompts.tsx
  94. +99 −0 src/components/Chat/ChatSidebar.tsx
  95. +0 −111 src/components/Chat/ChatsSidebar.tsx
  96. +0 −20 src/components/Chat/CustomLinkMarkdown.tsx
  97. +110 −0 src/components/Chat/MessageComponents/AssistantMessage.tsx
  98. +79 −0 src/components/Chat/MessageComponents/ChatSources.tsx
  99. +23 −0 src/components/Chat/MessageComponents/SystemMessage.tsx
  100. +133 −0 src/components/Chat/MessageComponents/ToolCalls.tsx
  101. +36 −0 src/components/Chat/MessageComponents/UserMessage.tsx
  102. +245 −0 src/components/Chat/StartChat.tsx
  103. +0 −82 src/components/Chat/hooks/use-chat-history.ts
  104. +144 −0 src/components/Chat/index.tsx
  105. +0 −8 src/components/Chat/utils.ts
  106. +26 −0 src/components/Common/CommonModals.tsx
  107. +39 −0 src/components/Common/EmptyPage.tsx
  108. +22 −0 src/components/Common/ExternalLink.tsx
  109. +61 −0 src/components/Common/IndexingProgress.tsx
  110. +20 −0 src/components/Common/MarkdownRenderer.tsx
  111. +66 −0 src/components/Common/Modal.tsx
  112. +78 −0 src/components/Common/ResizableComponent.tsx
  113. +114 −0 src/components/Common/Select.tsx
  114. +82 −121 src/components/Editor/BacklinkExtension.tsx
  115. +41 −42 src/components/Editor/BacklinkSuggestionsDisplay.tsx
  116. +270 −0 src/components/Editor/EditorContextMenu.tsx
  117. +116 −0 src/components/Editor/EditorManager.tsx
  118. +0 −88 src/components/Editor/FilesSuggestionsDisplay.tsx
  119. +18 −19 src/components/Editor/HighlightExtension.tsx
  120. +23 −29 src/components/Editor/RichTextLink.tsx
  121. +396 −0 src/components/Editor/Search/SearchAndReplaceExtension.tsx
  122. +80 −0 src/components/Editor/Search/SearchBar.tsx
  123. +14 −0 src/components/Editor/utils.ts
  124. +50 −81 src/components/File/DBResultPreview.tsx
  125. +0 −188 src/components/File/FileSideBar/FileHistoryBar.tsx
  126. +0 −115 src/components/File/FileSideBar/FileItem.tsx
  127. +0 −54 src/components/File/FileSideBar/fileOperations.ts
  128. +0 −107 src/components/File/FileSideBar/hooks/use-file-info-tree.tsx
  129. +0 −174 src/components/File/FileSideBar/index.tsx
  130. +95 −74 src/components/File/NewDirectory.tsx
  131. +0 −77 src/components/File/NewNote.tsx
  132. +77 −96 src/components/File/RenameDirectory.tsx
  133. +61 −98 src/components/File/RenameNote.tsx
  134. +0 −365 src/components/File/hooks/use-file-by-filepath.ts
  135. +0 −210 src/components/FileEditorContainer.tsx
  136. +0 −191 src/components/Flashcard/FlashcardCreateModal.tsx
  137. +0 −91 src/components/Flashcard/FlashcardMenuModal.tsx
  138. +0 −88 src/components/Flashcard/FlashcardReviewModal.tsx
  139. +0 −114 src/components/Flashcard/FlashcardsCore.tsx
  140. +0 −34 src/components/Flashcard/ProgressBar.tsx
  141. +0 −3 src/components/Flashcard/index.ts
  142. +0 −9 src/components/Flashcard/types.ts
  143. +0 −103 src/components/Flashcard/utils.ts
  144. +0 −24 src/components/Generic/ExternalLink.tsx
  145. +0 −61 src/components/Generic/Modal.tsx
  146. +0 −81 src/components/Generic/ResizableComponent.tsx
  147. +0 −101 src/components/Generic/SearchBarWithFilesSuggestion.tsx
  148. +0 −116 src/components/Generic/Select.tsx
  149. +0 −71 src/components/IndexingProgress.tsx
  150. +125 −0 src/components/MainPage.tsx
  151. +31 −35 src/components/Settings/AnalyticsSettings.tsx
  152. +37 −34 src/components/Settings/ChunkSizeSettings.tsx
  153. +0 −58 src/components/Settings/DefaultLLMSelector.tsx
  154. +24 −26 src/components/Settings/DirectorySelector.tsx
  155. +0 −144 src/components/Settings/EmbeddingSettings.tsx
  156. +35 −0 src/components/Settings/EmbeddingSettings/EmbeddingModelSelect.tsx
  157. +129 −0 src/components/Settings/EmbeddingSettings/EmbeddingSettings.tsx
  158. +81 −0 src/components/Settings/EmbeddingSettings/InitialEmbeddingSettings.tsx
  159. +90 −0 src/components/Settings/EmbeddingSettings/modals/NewRemoteEmbeddingModel.tsx
  160. +0 −142 src/components/Settings/ExtraModals/CloudLLMSetup.tsx
  161. +0 −97 src/components/Settings/ExtraModals/ContextLengthSettings.tsx
  162. +0 −150 src/components/Settings/ExtraModals/NewEmbeddingModelBothTypes.tsx
  163. +0 −92 src/components/Settings/ExtraModals/NewLocalEmbeddingModel.tsx
  164. 0 src/components/Settings/ExtraModals/NewLocalModel.tsx
  165. +0 −168 src/components/Settings/ExtraModals/NewOllamaModel.tsx
  166. +0 −90 src/components/Settings/ExtraModals/NewRemoteEmbeddingModel.tsx
  167. +0 −142 src/components/Settings/ExtraModals/RemoteLLMSetup.tsx
  168. +120 −0 src/components/Settings/GeneralSettings.tsx
  169. +0 −26 src/components/Settings/HardwareSettings.tsx
  170. +0 −117 src/components/Settings/InitialEmbeddingSettings.tsx
  171. +46 −52 src/components/Settings/InitialSettingsSinglePage.tsx
  172. +0 −255 src/components/Settings/LLMSettings.tsx
  173. +67 −0 src/components/Settings/LLMSettings/DefaultLLMSelector.tsx
  174. +59 −0 src/components/Settings/LLMSettings/InitialSetupLLMSettings.tsx
  175. +65 −0 src/components/Settings/LLMSettings/LLMSelectOrButton.tsx
  176. +77 −0 src/components/Settings/LLMSettings/LLMSettingsContent.tsx
  177. +172 −0 src/components/Settings/LLMSettings/modals/CustomLLMAPISetup.tsx
  178. +96 −0 src/components/Settings/LLMSettings/modals/DefaultLLMAPISetupModal.tsx
  179. +179 −0 src/components/Settings/LLMSettings/modals/NewOllamaModel.tsx
  180. +21 −0 src/components/Settings/LLMSettings/modals/utils.ts
  181. +0 −50 src/components/Settings/RagSettings.tsx
  182. +81 −130 src/components/Settings/Settings.tsx
  183. +29 −0 src/components/Settings/Shared/SettingsRow.tsx
  184. +0 −136 src/components/Settings/TextGenerationSettings.tsx
  185. +150 −0 src/components/Sidebars/FileSideBar/FileItemRows.tsx
  186. +89 −0 src/components/Sidebars/FileSideBar/FileSidebar.tsx
  187. +0 −89 src/components/Sidebars/FileSidebarSearch.tsx
  188. +71 −153 src/components/Sidebars/IconsSidebar.tsx
  189. +23 −88 src/components/Sidebars/MainSidebar.tsx
  190. +88 −0 src/components/Sidebars/SearchComponent.tsx
  191. +49 −0 src/components/Sidebars/SemanticSidebar/HighlightButton.tsx
  192. +92 −0 src/components/Sidebars/SemanticSidebar/SimilarEntriesComponent.tsx
  193. +117 −0 src/components/Sidebars/SimilarFilesSidebar.tsx
  194. +0 −312 src/components/Similarity/SimilarFilesSidebar.tsx
  195. +0 −81 src/components/TitleBar.tsx
  196. +163 −0 src/components/TitleBar/NavigationButtons.tsx
  197. +55 −0 src/components/TitleBar/TitleBar.tsx
  198. +153 −0 src/components/WritingAssistant/ConversationHistory.tsx
  199. +499 −0 src/components/WritingAssistant/WritingAssistant.tsx
  200. +60 −0 src/components/WritingAssistant/utils.ts
  201. +30 −0 src/components/ui/badge.tsx
  202. +48 −0 src/components/ui/button.tsx
  203. +55 −0 src/components/ui/calendar.tsx
  204. +45 −0 src/components/ui/card.tsx
  205. +36 −0 src/components/ui/checkbox.tsx
  206. +9 −0 src/components/ui/collapsible.tsx
  207. +135 −0 src/components/ui/command.tsx
  208. +179 −0 src/components/ui/context-menu.tsx
  209. +140 −0 src/components/ui/date-picker.tsx
  210. +97 −0 src/components/ui/dialog.tsx
  211. +89 −0 src/components/ui/drawer.tsx
  212. +181 −0 src/components/ui/dropdown-menu.tsx
  213. +29 −0 src/components/ui/hover-card.tsx
  214. +22 −0 src/components/ui/input.tsx
  215. +19 −0 src/components/ui/label.tsx
  216. +33 −0 src/components/ui/popover.tsx
  217. +25 −0 src/components/ui/progress.tsx
  218. +38 −0 src/components/ui/resizable.tsx
  219. +41 −0 src/components/ui/scroll-area.tsx
  220. +144 −0 src/components/ui/select.tsx
  221. +26 −0 src/components/ui/slider.tsx
  222. +20 −0 src/components/ui/suggestion-card.tsx
  223. +30 −0 src/components/ui/switch.tsx
  224. +22 −0 src/components/ui/textarea.tsx
  225. +30 −0 src/components/ui/tooltip.tsx
  226. +44 −0 src/components/ui/window-controls.tsx
  227. +99 −0 src/contexts/ChatContext.tsx
  228. +89 −0 src/contexts/ContentContext.tsx
  229. +395 −0 src/contexts/FileContext.tsx
  230. +41 −0 src/contexts/ModalContext.tsx
  231. +0 −15 src/functions/error.ts
  232. +0 −57 src/functions/strings.ts
  233. +13 −0 src/lib/animations.tsx
  234. +52 −0 src/lib/db.ts
  235. +15 −0 src/lib/error.ts
  236. +187 −0 src/lib/file.ts
  237. +31 −0 src/lib/hooks/use-agent-configs.ts
  238. +42 −0 src/lib/hooks/use-llm-configs.ts
  239. +39 −0 src/lib/hooks/use-ordered-set.tsx
  240. +18 −0 src/lib/hooks/use-outside-click.ts
  241. +20 −0 src/lib/hooks/use-resize-observer.tsx
  242. +277 −0 src/lib/llm/chat.ts
  243. +50 −0 src/lib/llm/client.ts
  244. +207 −0 src/lib/llm/tools/tool-definitions.ts
  245. +178 −0 src/lib/llm/tools/utils.ts
  246. +70 −0 src/lib/llm/types.ts
  247. +48 −0 src/lib/shortcuts/shortcutDefinitions.ts
  248. +75 −0 src/lib/shortcuts/use-shortcut.ts
  249. +7 −0 src/lib/ui.ts
  250. +37 −0 src/lib/welcome-note.ts
  251. +33 −8 src/main.tsx
  252. +47 −0 src/styles/chat.css
  253. +214 −16 src/styles/global.css
  254. +1 −2 src/{components/File → styles}/tiptap.scss
  255. +116 −14 tailwind.config.js
  256. +5 −6 tsconfig.json
  257. +55 −36 vite.config.ts
72 changes: 40 additions & 32 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -5,41 +5,49 @@ module.exports = {
node: true,
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
],
overrides: [
{
env: {
node: true,
},
files: [".eslintrc.{js,cjs}"],
parserOptions: {
sourceType: "script",
},
},
{
files: ["*.ts", "*.tsx"],
rules: {
"react/prop-types": "off",
},
},
{
// Applies to all files
files: ["*"],
rules: {
// "@typescript-eslint/no-unused-vars": "warn",
// "react/no-unescaped-entities": "warn",
// ... add other specific rules you want as warnings here ...
},
},
"airbnb",
"airbnb/hooks",
"airbnb-typescript",
"plugin:prettier/recommended",
"plugin:tailwindcss/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
project: "./tsconfig.json",
},
plugins: [
"@typescript-eslint",
"react",
"import",
"jsx-a11y",
"unused-imports",
"prettier",
"tailwindcss",
],
rules: {
"unused-imports/no-unused-imports": "error",
"prettier/prettier": "error",
"react/function-component-definition": [
"error",
{
namedComponents: "arrow-function",
unnamedComponents: "arrow-function",
},
],
"import/extensions": ["off", "ignorePackages"],
"jsx-a11y/no-static-element-interactions": "off",
"jsx-a11y/click-events-have-key-events": "off",
"react/require-default-props": "off",
"import/no-extraneous-dependencies": ["error", { "devDependencies": ["**/electron/**", "**/preload/**"] }],
},
ignorePatterns: ["vite.config.ts", ".eslintrc.js"],
settings: {
"import/resolver": {
node: {
extensions: [".js", ".jsx", ".ts", ".tsx"],
},
},
},
plugins: ["@typescript-eslint", "react"],
rules: {},
};
};
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text=auto eol=lf

41 changes: 13 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,104 +1,89 @@
name: Build and Package Electron App

on:
push:
branches:
- "*"
pull_request:
branches:
- "*"

jobs:
build_and_package:
strategy:
matrix:
include:
- os: macos-13
# arch: x64
- os: macos-latest
# arch: arm64
- os: windows-latest
- os: ubuntu-latest
arch: x64

fail-fast: false
continue-on-error: true
runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "20"

- name: Cache npm dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Cache TypeScript build
uses: actions/cache@v3
with:
path: ./dist
key: ${{ runner.os }}-tsc-${{ hashFiles('**/tsconfig.json') }}
restore-keys: |
${{ runner.os }}-tsc-
- name: Install dependencies
run: npm install

- name: Run Linter
run: npm run lint

- name: Run Tests
run: npm run test

- name: Set up environment for macOS build
if: matrix.os == 'macos-13' || matrix.os == 'macos-latest'
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If you use GitHub token for auto-update
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_OPTIONS: "--max-old-space-size=8192"
run: |
npm run build
- name: Build for non-macos
- name: Build for non-macOS
if: matrix.os != 'macos-13' && matrix.os != 'macos-latest'
env:
NODE_OPTIONS: "--max-old-space-size=8192"
run: |
npm run build
- name: Notarize macOS build
if: (matrix.os == 'macos-13' || matrix.os == 'macos-latest') && github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
run: npm run notarize
- name: Set version as env
run: echo "APP_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV

- name: Print APP_VERSION
run: echo "APP_VERSION=${{ env.APP_VERSION }}"

- name: List output files
if: matrix.os != 'macos-13' && matrix.os != 'macos-latest'
run: |
ls ./release/${{ env.APP_VERSION }}/
- name: Check runner architecture
if: matrix.os != 'macos-13' && matrix.os != 'macos-latest'
run: uname -m


- name: Rename artifacts for ARM architecture
if: matrix.os == 'macos-latest'
run: |
mv ./release/${{ env.APP_VERSION }}/*.dmg ./release/${{ env.APP_VERSION }}/Reor_${{ env.APP_VERSION }}-arm64.dmg
- name: Rename artifacts for Intel architecture
if: matrix.os == 'macos-13'
run: |
mv ./release/${{ env.APP_VERSION }}/*.dmg ./release/${{ env.APP_VERSION }}/Reor_${{ env.APP_VERSION }}-intel.dmg
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
40 changes: 14 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,89 +1,78 @@
name: Release script

on:
push:
tags:
- "v*"

jobs:
build_and_package:
runs-on: ${{ matrix.os }}

strategy:
matrix:
include:
- os: macos-13
# arch: x64
- os: macos-latest
# arch: arm64
- os: windows-latest
- os: ubuntu-latest
arch: x64
fail-fast: false

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "20"

- name: Cache npm dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Cache TypeScript build
uses: actions/cache@v3
with:
path: ./dist
key: ${{ runner.os }}-tsc-${{ hashFiles('**/tsconfig.json') }}
restore-keys: |
${{ runner.os }}-tsc-
- name: Install dependencies
run: npm install

- name: Run Linter
run: npm run lint

- name: Run Tests
run: npm run test

- name: Set up environment for macOS build
if: matrix.os == 'macos-latest' || matrix.os == 'macos-latest-xlarge'
if: matrix.os == 'macos-13' || matrix.os == 'macos-latest'
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If you use GitHub token for auto-update
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_OPTIONS: "--max-old-space-size=8192"
run: |
npm run build
- name: Build for non-macos
if: matrix.os != 'macos-latest' && matrix.os != 'macos-latest-xlarge'
- name: Notarize macOS build
if: matrix.os == 'macos-13' || matrix.os == 'macos-latest'
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
run: npm run notarize
- name: Build for non-macOS
if: matrix.os != 'macos-13' && matrix.os != 'macos-latest'
env:
NODE_OPTIONS: "--max-old-space-size=8192"
run: |
npm run build
- name: Set version as env
run: echo "APP_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV

- name: Rename artifacts for ARM architecture
if: matrix.os == 'macos-latest'
run: |
mv ./release/${{ env.APP_VERSION }}/*.dmg ./release/${{ env.APP_VERSION }}/Reor_${{ env.APP_VERSION }}-arm64.dmg
- name: Rename artifacts for Intel architecture
if: matrix.os == 'macos-13'
run: |
mv ./release/${{ env.APP_VERSION }}/*.dmg ./release/${{ env.APP_VERSION }}/Reor_${{ env.APP_VERSION }}-intel.dmg
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
@@ -101,7 +90,6 @@ jobs:
steps:
- name: Download all artifacts
uses: actions/download-artifact@v3

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
@@ -110,4 +98,4 @@ jobs:
**/*.AppImage
**/*.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -31,3 +31,7 @@ release

data
binaries
.env

# Sentry Config File
.env.sentry-build-plugin
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "\nRunning some lint checks on your (hopefully) beautiful code...\n"
npm run lint:fix && npm run type-check
28 changes: 7 additions & 21 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"endOfLine": "lf",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"singleAttributePerLine": false,
"bracketSameLine": false,
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"printWidth": 80,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": true,
"singleQuote": false,
"printWidth": 120,
"tslintintegration": true,
"trailingComma": "all",
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false,
"embeddedLanguageFormatting": "auto",
"vueIndentScriptAndStyle": false,
"parser": "typescript"
}
"semi": false,
"singleQuote": true,
"endOfLine": "lf"
}
11 changes: 10 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -9,5 +9,14 @@
],
"url": "https://json.schemastore.org/electron-builder"
}
]
],
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
// "source.organizeImports": "explicit"
},
"eslint.alwaysShowStatus": true,
"eslint.format.enable": false,
// "eslint.run": "",
"editor.formatOnSave": false,
"editor.codeActionsOnSaveMode": "explicit" // This is the updated setting
}
Loading