1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-30 20:39:46 +02:00

Compare commits

...

131 Commits

Author SHA1 Message Date
Laurent Cozic
9d4e250f6b Electron release v1.0.230 2020-07-24 17:45:14 +01:00
Laurent Cozic
c19cc1b39a Merge branch 'master' of github.com:laurent22/joplin 2020-07-24 17:28:55 +01:00
Laurent Cozic
73bd6f9776 Update turndown 2020-07-24 17:28:28 +01:00
WhiredPlanck
6fef55398f All: Translation: Update zh_CN.po (#3542)
* [trans] Update zh_CN.po

* [trans] Give the specific names of AWS secret and AWS key
2020-07-24 11:58:09 -04:00
Laurent Cozic
d209d5036b Desktop, Cli: Security: Fixed a path traversal vulnerability in clipper server API that could allow an attacker to read or write an arbitrary file (CVE-2020-15844) 2020-07-24 00:45:15 +00:00
Laurent Cozic
4be02bc33c Desktop: Fixed save issue in Rich Text editor when making a change to a note and quickly switching to a different notebook 2020-07-23 23:55:01 +00:00
Laurent Cozic
d6daa34e0a Linter 2020-07-23 23:06:58 +00:00
Laurent Cozic
9cebbbe7cf Desktop, Cli: Fixed attachments being out of order when importing Enex file 2020-07-23 18:43:01 +01:00
Laurent Cozic
71e5304298 Desktop: Fixes #3534: Undoing changes multiple time on an existing note could result in a blank note 2020-07-23 19:56:53 +00:00
Laurent Cozic
8f8d11c9b3 Desktop: Fixes #3510: Note links would be broken after saving a note in Rich Text editor 2020-07-23 19:38:42 +00:00
Laurent Cozic
1cd86fd3ea Cli: Fixes #3548: Desktop-only scripts were incorrectly being loaded in CLI server tool 2020-07-23 19:04:04 +00:00
Laurent Cozic
7f1f5a8c3d Desktop: Fixes #3503: Editor window was no longer being resized with the main window 2020-07-22 23:26:45 +01:00
Caleb John
9dfb0642da Desktop: Split Codemirror setOptions into different effects (#3522) 2020-07-22 23:18:52 +01:00
Caleb John
0fa8dfa063 Desktop: Enforce that whitespace check for unindent checks the begining of a (#3515) 2020-07-22 23:17:49 +01:00
Caleb John
1d79dedf6d Fix architecture check to only search within machine details (#3512) 2020-07-22 23:16:42 +01:00
Caleb John
a274a56e65 Desktop: CodeMirror: Change rootSize parameters to prevent collision with styles.editor (#3505) 2020-07-22 23:16:06 +01:00
Caleb John
44d3a4213f Desktop: Enable searching in editor rather than the viewer for CodeMirror (#3360) 2020-07-22 23:13:23 +01:00
Laurent Cozic
e68eb196b7 Removed debug code 2020-07-22 19:09:20 +01:00
Laurent Cozic
4bef79cd71 Desktop: Fixes #3407: In some cases, changes made to an attachment would not be saved. Also added banner to show that an attachment is being edited 2020-07-22 19:03:31 +01:00
Laurent Cozic
f3dc3602c8 Desktop: Fixes #3366: Revealing file in Windows did not work 2020-07-22 17:24:01 +01:00
Vaidotas Šimkus
17e140ba56 Api: Fixes #3539: Fixes nested tag API to handle calls with no 'fields' query key 2020-07-22 10:38:49 +01:00
Laurent Cozic
89d0575ccd All: Security: Upgrade packages to fix minor vulnerabilities 2020-07-21 22:22:58 +01:00
Helmut K. C. Tessarek
ca0197a319 fix linter error (#3518) 2020-07-20 00:19:08 +01:00
Helmut K. C. Tessarek
62bc296abe Update translations 2020-07-19 15:18:42 -04:00
Gen Neko
e58dc809ec All: Translation: Update ja_JP.po (#3526)
Translate new strings for the nested tag and note properties.
2020-07-19 14:41:40 -04:00
Arda Kılıçdağı
abd57ad384 All: Translation: Update tr_TR.po (#3523)
Turkish translations updated
2020-07-18 13:42:48 -04:00
Tim Mundt
bada9286d0 All: Translation: Update de_DE.po (#3517) 2020-07-17 19:34:14 -04:00
Roman Musin
3807317e66 Mobile: Increase max resource size to 100mb (#3431) 2020-07-15 18:29:16 +01:00
Vaidotas Šimkus
10ff43f4f0 Desktop: Regression: Fix sort tags alphabetically in side-menu (#3489) 2020-07-15 18:28:40 +01:00
Caleb John
282f6de1a9 Desktop: Load more CodeMirror modes for syntax highlighting (#3401) 2020-07-15 11:46:14 +01:00
alexchee
9a55afec01 All: Add support for AWS S3 synchronisation (Beta) (#2815) 2020-07-15 10:22:55 +01:00
Robert
c8c4bb3245 Update nl_NL.po (#3498) 2020-07-15 10:14:21 +01:00
Chen Yuyang
e1f831af62 Update translation zh_CN.po (#3490) 2020-07-15 10:13:39 +01:00
Laurent Cozic
657cebfda9 Desktop: Improved GotoAnything speed and made it safer
Previously we'd use the remove-markdown package to create the note
preview however this function would freeze on certain notes, and was
probably unsafe as it used regex to parse Markdown. Replaced this in
favour of Markdown-it along with htmlparser2 to strip all markup from a
note.
2020-07-14 23:27:45 +01:00
Laurent Cozic
7f1c25793a Desktop: Fixes #3449: Fixed style caching 2020-07-14 19:17:25 +00:00
Laurent Cozic
b770ffda4d Desktop: Regression: Fixed adding a new sub-notebook to a notebook 2020-07-14 18:56:02 +00:00
Laurent Cozic
d0b3e15999 Electron release v1.0.229 2020-07-14 15:33:20 +01:00
Laurent Cozic
20433b0282 Desktop: Fixed alarms on macOS 2020-07-14 15:32:49 +01:00
Caleb John
452b41de0f Desktop: Fixes #3440: Improve Markdown rendering in CodeMirror, in particular for math expressions (#3448) 2020-07-12 19:42:19 +01:00
Helmut K. C. Tessarek
b69008225f Update translations 2020-07-12 14:33:09 -04:00
yaozeye
b3a778e983 All: Translation: Update zh_TW.po (#3470) 2020-07-12 14:22:26 -04:00
yaozeye
a57c6e9155 All: Translation: Update zh_CN.po (#3468) 2020-07-12 14:22:07 -04:00
Laurent Cozic
3fbfba2c03 Merge branch 'master' of github.com:laurent22/joplin 2020-07-12 19:20:32 +01:00
Laurent Cozic
8a5e6875f0 Desktop, Cli: Fixes #3473: Fix filename when exporting notebook as Markdown 2020-07-12 19:13:08 +01:00
Vaidotas Šimkus
e11e57f1d8 All: Added support for hierarchical/nested tags (#2572)
The implementation uses / symbol as a nesting separator. I.e. tag/subtag is a nested tag, where tag is the parent tag and subtag is its child. Creating a tag named tag/subtag/subsubtag creates three tags, one for each level. The tags are associated using parent_id field.

In the app, viewing notes with a tag will also show all notes that are associated with any of the tag's descendant tags (same for the note count). Deleting a tag will also delete all its descendant tags.

In the desktop app the tags are shown nested just like the notebooks.
2020-07-12 18:09:07 +01:00
Laurent Cozic
073bd80f89 Electron release v1.0.228 2020-07-12 18:05:06 +01:00
Laurent Cozic
e3aaee738a Desktop: Fixes #3482: Fixed regression when moving note to notebook from menu 2020-07-12 17:27:56 +01:00
Laurent Cozic
f1b2b7b86b Desktop: Fixes #3481: Crash when applying tags to multiple notes from within another tag 2020-07-12 17:15:17 +01:00
Laurent Cozic
e0a87d6253 Revert "All: Add support for sync target lock"
This reverts commit 51235f191d.

Not ready yet, moving to a branch
2020-07-12 16:38:54 +01:00
Laurent Cozic
a7eae2e033 Update donate.md 2020-07-11 14:27:35 +01:00
Laurent Cozic
51235f191d All: Add support for sync target lock
The goal is to allow locking a sync target so that maintenance
operations, such as upgrading the target to a more efficient format,
can be done. For now, only the lock mechanism is in place, as a way to
evaluate it, and to see if it can cause any issue.
2020-07-10 23:42:03 +01:00
Laurent Cozic
003ead2511 Clean up 2020-07-10 19:54:29 +01:00
Laurent Cozic
8dc8527fdc CLI v1.0.165 2020-07-10 19:52:58 +01:00
Laurent Cozic
985dcc2605 Update stale.yml
30 days should be enough - either we tag the issue or it gets closed, and it's likely all issues will be checked by at least one mod within 30 days.
2020-07-10 18:02:35 +01:00
WhiredPlanck
4063cdba11 All: Translation: Update zh_CN.po (#3451)
* branch off from master

* fix typo and improve translations
2020-07-07 15:14:52 -04:00
WhiredPlanck
c96c591fa9 All: Translation: Update zh_TW.po (#3450)
* Update zh_TW.po

* fix typo and improve translations
2020-07-07 15:14:27 -04:00
Laurent Cozic
4913fdb800 Electron release v1.0.227 2020-07-07 19:18:03 +01:00
Laurent Cozic
24bc7f153a Desktop: Fixes #3461: Fixed regression which could cause a crash after deleting a notebook 2020-07-07 19:17:33 +01:00
Laurent Cozic
8732c97dcd Desktop: Fixed GotoAnything rendering issue with HTML notes 2020-07-07 19:17:33 +01:00
Damien MASCRÉ
e092eaef6f Updates to the french translation (#3466)
* Update french translation.

* Update french translation.
2020-07-07 15:09:30 +01:00
cadolphs
4ade1bf65f Desktop: Add approximate reading time to note statistics (#3373)
* First stab at a reading time calculator

* Use ceil instead of floor for rounding

* Fix variable names to camelCase

* Up wpm to 250, add source
2020-07-07 00:39:36 +01:00
Laurent Cozic
77a03599de Desktop: WYSIWYG: Fixed inserting date time and other content inside header 2020-07-04 12:17:30 +01:00
Laurent Cozic
9c057071b5 Electron release v1.0.226 2020-07-04 10:47:04 +01:00
Laurent Cozic
ee3f4beeaf Desktop: Dev fix: Better handling of command props 2020-07-04 10:46:22 +01:00
Laurent Cozic
7035b1f9f6 Desktop: Dev fix: Added back title on header buttons 2020-07-04 10:46:22 +01:00
Deep Majumder
3aea55ee63 Tools: Generates SHA-256 sum of AppImage for Linux (#3410) 2020-07-03 22:46:20 +01:00
Laurent Cozic
28acb4eca6 Electron release v1.0.225 2020-07-03 22:43:19 +01:00
Laurent Cozic
c63c6370b5 Desktop: Refactored command system
The goal is to make the command system more modular, so each command can
be defined as a single object that includes a declaration (name, label,
etc.) and a runtime (to execute the command, test if it should be
enabled, etc.)

Utility methods are provided to convert a command to a menu item or a
toolbar button, thus reducing duplicated and boiler plate code across the
codebase (often the menu item logic was duplicated in the toolbar
button logic and vice versa).

The goal is to make it easier to add new commands (and associated menu
item and toolbar buttons) and to call them from
anywhere. This is also useful for plugins, which can also easily define
new commands.

Could also allow creating a command palette.
2020-07-03 22:32:39 +01:00
Laurent Cozic
6046f40e45 Tools: Fixed tests following highlight.js upgrade (changed in HTML escape mode) 2020-07-03 22:30:33 +01:00
Caleb John
262159cf73 Desktop: Codemirror: Remove cancelled keys in favour of explicit keymaps (#3417) 2020-07-02 23:00:56 +01:00
Caleb John
8eb94bc8ab Desktop: Manually refresh codemirror whenever the window size changes (#3388)
* Manually refresh codemirror whenever the parent div size changes

* Set editor width through style rather than adding an extra property

* use Memo for editorStyle
2020-07-02 22:45:43 +01:00
WhiredPlanck
a9390affaa All: Translation: Update zh_CN.po (#3430)
* Update zh_CN.po

* Correct typo

* Correct typo: NextCloud --> Nextcloud; Improved translation

* Improved translation (2)
2020-06-30 10:30:09 -04:00
Arda Kılıçdağı
66392b4e8a Yandex disk removed from supported WEBDAV clients (#3432)
Yandex.disk recently removed file upload support from WebDAV

https://ru.stackoverflow.com/questions/1043523/После-загрузки-файла-на-Яндекс-Диск-по-webdav-происходят-паузы-по-60-секунд-на-к
https://qna.habr.com/q/677787

So this makes Yandex.disk unusable at the moment.

Here's a similar issue, please see recent comments: https://github.com/PhilippC/keepass2android/issues/506

I've personally tried, and cannot even access to Yandex.disk at the moment through WebDAV.

This PR simply removes yandex.disk line from the ReadMe.

Thanks,
2020-06-30 10:26:30 -04:00
Laurent Cozic
3283f34c79 ios-v10.0.50 2020-06-28 20:17:13 +01:00
Laurent Cozic
fd4e5d7d30 Android release v1.0.333 2020-06-28 19:57:33 +01:00
Laurent Cozic
5bbf9d87c2 Desktop: Fixes #3412: Fixed custom order when note title is changed 2020-06-28 19:10:35 +01:00
Laurent Cozic
acf1ff6d1d Desktop, Cli: Fixes #3402: Fixed import of checkboxes in ENEX files 2020-06-28 18:55:47 +01:00
Laurent Cozic
05acc51054 Desktop, Mobile: Fixes #3281: Prevent code highlighting from freezing the app in some cases 2020-06-28 18:31:43 +01:00
Laurent Cozic
eb8841379c Desktop, Cli: Fixes #2331: Only de-duplicate imported notebook titles when needed 2020-06-28 18:00:51 +01:00
Laurent Cozic
d601575549 Doc: Updated sponsors 2020-06-27 10:05:19 +01:00
Arda Kılıçdağı
0d2f253218 All: Translation: Update tr_TR.po (#3415) 2020-06-25 22:29:35 -04:00
rnbastos
349d020da2 All: Translation: Update pt_BR.po (#3408) 2020-06-25 22:28:28 -04:00
Laurent Cozic
87ccb86f54 All: Reducer should not mutate state 2020-06-25 20:27:14 +01:00
Anjula Karunarathne
20482b2f14 Update README.md (#3414)
Fixed typo: Xfcxe -> Xfce
2020-06-24 23:54:16 +01:00
Laurent Cozic
47a05fb4ba Tools: Fixed build 2020-06-24 23:13:32 +01:00
Laurent Cozic
ac0a89625a Tools: Fixed build issues 2020-06-24 23:11:42 +01:00
Caleb John
a07638239b Tools: Use ensureDir instead of mkdir in utils (#3409)
* Use ensureDir instead of mkdir in utils

* switch to mkdirp
2020-06-23 21:38:52 +01:00
Laurent Cozic
5143870d3b Tools: Improve building and testing app on Windows 2020-06-22 23:06:47 +01:00
Gen Neko
f61c4c1374 All: Translation: Update ja_JP.po (#3394) 2020-06-21 12:14:59 -04:00
Laurent Cozic
254735fcae Desktop: WYSIWYG: Fix undo issue 2020-06-21 14:37:04 +01:00
Laurent Cozic
44024371ff Merge branch 'master' of github.com:laurent22/joplin 2020-06-21 14:01:53 +01:00
Laurent Cozic
be232fa34b Tools: Add no-array-constructor eslint rule 2020-06-21 13:58:54 +01:00
Helmut K. C. Tessarek
1a90165255 Desktop, Mobile: Fix link color for dark theme (#3391) 2020-06-21 00:47:19 +01:00
Helmut K. C. Tessarek
13417d15b7 Update en_US.po 2020-06-20 18:22:01 -04:00
Helmut K. C. Tessarek
9fe1f6acfc Update translations 2020-06-20 18:21:11 -04:00
Laurent Cozic
1899d86641 Electron release v1.0.224 2020-06-20 23:12:06 +01:00
Laurent Cozic
6ca63ca56b Merge branch 'master' of github.com:laurent22/joplin 2020-06-20 23:11:38 +01:00
Derviš T
e796968ec0 All: Translation: Update bs_BA.po (#3390)
Finished translating new strings. Corrected the old ones that have changed since the last translation update.
2020-06-20 18:11:25 -04:00
Laurent Cozic
7b64c8dbe3 Desktop: Fixed API issue 2020-06-20 23:11:18 +01:00
Laurent Cozic
2377f7bc07 Desktop: Make sure search engine can keep working when index is corrupted 2020-06-20 19:21:35 +01:00
Laurent Cozic
47fdcef182 Electron release v1.0.223 2020-06-20 12:34:49 +01:00
Laurent Cozic
d27b658392 Desktop: API: Improved error handling on service end-point 2020-06-20 12:34:05 +01:00
Laurent Cozic
07720ed6f8 Electron release v1.0.222 2020-06-20 12:21:31 +01:00
rnbastos
a9cdecf599 Update pt_BR.po (#3382) 2020-06-20 12:21:05 +01:00
yaozeye
c6b5a5c328 Update zh_CN.po (#3387) 2020-06-20 12:20:40 +01:00
Laurent Cozic
e7f3aa3764 Updated British spelling 2020-06-20 12:18:41 +01:00
Laurent Cozic
89ca8e08d6 Desktop: API: Fixed externalEditWatcher/noteIsWatched call, fixed tests 2020-06-20 12:03:22 +01:00
Laurent Cozic
6350506ce7 Mobile: Fixes OneDribe login screen 2020-06-20 11:14:01 +01:00
Laurent Cozic
d5ed611920 Update website 2020-06-20 02:57:32 +01:00
Laurent Cozic
acc10ccac4 Electron release v1.0.221 2020-06-20 02:31:12 +01:00
Laurent Cozic
45160a2e73 Desktop: API: Add support for external editing from API 2020-06-20 02:30:09 +01:00
Laurent Cozic
e38794171a Tools: Fix desktop build issue on Windows 2020-06-20 01:18:46 +01:00
Laurent Cozic
c2d6da83c0 All: Fixes #3381: Prevent desktop.ini file from breaking sync lock 2020-06-20 01:15:56 +01:00
Caleb John
77005fc495 Tools: Try to add codemirror types again (#3380)
* Try add codemirror type again

* Add global typedef for codemirror

* Add comment
2020-06-18 18:58:11 +01:00
Deep Majumder
0273e58783 Doc: Corrected info on supported Linux dsitros. (#3378)
Added list of supported desktop environments
2020-06-18 18:55:41 +01:00
Laurent Cozic
3e88a24753 Desktop: Reduce database logging statements 2020-06-17 23:46:47 +01:00
Laurent Cozic
1205908233 Revert "Desktop: Change codemirror to user import syntax (#3375)"
This reverts commit 3a7a068196.
2020-06-17 23:45:36 +01:00
Caleb John
3a7a068196 Desktop: Change codemirror to user import syntax (#3375) 2020-06-17 18:47:11 +01:00
Caleb John
845ecfe742 Desktop: Add default filename for jex export (#3034)
* Add default filename for jex export

* Restructure date as default filename
2020-06-17 18:35:13 +01:00
Laurent Cozic
53355aaad3 Clipper: Do not export invisible elements 2020-06-17 00:03:40 +01:00
Laurent Cozic
7cd0e25538 Merge branch 'master' of github.com:laurent22/joplin 2020-06-16 18:10:04 +01:00
Caleb John
2f15178ff6 Desktop: Remove auto-indent for in note html/xml for Code Mirror (#3374)
html/xml inside of a codeblock will still benefit from auto-indent
2020-06-16 13:00:58 +01:00
Caleb John
a4b13be0d1 Desktop: Fix getLineSpan logic and list token regex logic (#3365)
- previously getLineSpan was included line text as a token (dumb
oversight)
- the regex was updated to include a space after a OL element (was
missing for some reason)
2020-06-16 13:00:17 +01:00
Caleb John
23ae4fb790 Desktop: Add swapLineUp and swapLineDown keys to Code Mirror editor (#3363) 2020-06-16 12:59:33 +01:00
Laurent Cozic
cff036d08b Desktop: Do not expand the leaft notebook when following a link to a note 2020-06-15 22:59:42 +00:00
Laurent Cozic
7826cc0b03 Doc: Added sponsor 2020-06-15 23:03:09 +01:00
Alexander van der Berg
2bfa28a311 Doc: Fix sponsors table layout in the GitHub README.md (#3362)
The table was displayed correctly only on https://joplinapp.org/
2020-06-15 23:00:50 +01:00
Laurent Cozic
780c5c80ae Revert "Desktop: Fixes #3302: Prevent drag and dropping of text in editor as it can lead to data loss"
This reverts commit a75db94da5.

It turns out people often drag and drop text, so restoring the functionality.

See https://discourse.joplinapp.org/t/9406
2020-06-15 19:16:22 +01:00
Laurent Cozic
fcd00b3212 Desktop, Cli: Fixed various bugs related to the import of ENEX files as HTML 2020-06-15 17:10:51 +01:00
Laurent Cozic
6a41d6e85a Cli: Allow importing ENEX files as HTML 2020-06-14 16:45:17 +00:00
Laurent Cozic
3733858145 Desktop, Cli: Fixed issue with importing resources from ENEX files 2020-06-14 16:26:35 +00:00
357 changed files with 36997 additions and 29052 deletions

View File

@@ -61,8 +61,39 @@ Modules/TinyMCE/IconPack/postinstall.js
Modules/TinyMCE/langs/
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD
ElectronClient/commands/focusElement.js
ElectronClient/commands/startExternalEditing.js
ElectronClient/commands/stopExternalEditing.js
ElectronClient/global.d.js
ElectronClient/gui/ErrorBoundary.js
ElectronClient/gui/Header/commands/focusSearch.js
ElectronClient/gui/MainScreen/commands/editAlarm.js
ElectronClient/gui/MainScreen/commands/exportPdf.js
ElectronClient/gui/MainScreen/commands/hideModalMessage.js
ElectronClient/gui/MainScreen/commands/moveToFolder.js
ElectronClient/gui/MainScreen/commands/newNote.js
ElectronClient/gui/MainScreen/commands/newNotebook.js
ElectronClient/gui/MainScreen/commands/newTodo.js
ElectronClient/gui/MainScreen/commands/print.js
ElectronClient/gui/MainScreen/commands/renameFolder.js
ElectronClient/gui/MainScreen/commands/renameTag.js
ElectronClient/gui/MainScreen/commands/search.js
ElectronClient/gui/MainScreen/commands/selectTemplate.js
ElectronClient/gui/MainScreen/commands/setTags.js
ElectronClient/gui/MainScreen/commands/showModalMessage.js
ElectronClient/gui/MainScreen/commands/showNoteContentProperties.js
ElectronClient/gui/MainScreen/commands/showNoteProperties.js
ElectronClient/gui/MainScreen/commands/showShareNoteDialog.js
ElectronClient/gui/MainScreen/commands/toggleNoteList.js
ElectronClient/gui/MainScreen/commands/toggleSidebar.js
ElectronClient/gui/MainScreen/commands/toggleVisiblePanes.js
ElectronClient/gui/MultiNoteActions.js
ElectronClient/gui/NoteContentPropertiesDialog.js
ElectronClient/gui/NoteEditor/commands/editorCommandDeclarations.js
ElectronClient/gui/NoteEditor/commands/focusElementNoteBody.js
ElectronClient/gui/NoteEditor/commands/focusElementNoteTitle.js
ElectronClient/gui/NoteEditor/commands/showLocalSearch.js
ElectronClient/gui/NoteEditor/commands/showRevisions.js
ElectronClient/gui/NoteEditor/NoteBody/AceEditor/AceEditor.js
ElectronClient/gui/NoteEditor/NoteBody/AceEditor/styles/index.js
ElectronClient/gui/NoteEditor/NoteBody/AceEditor/Toolbar.js
@@ -76,6 +107,8 @@ ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/Toolbar.js
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/index.js
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/types.js
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useCursorUtils.js
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useEditorSearch.js
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useJoplinMode.js
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useLineSorting.js
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useListIdent.js
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useScrollUtils.js
@@ -94,12 +127,18 @@ ElectronClient/gui/NoteEditor/utils/useMessageHandler.js
ElectronClient/gui/NoteEditor/utils/useNoteSearchBar.js
ElectronClient/gui/NoteEditor/utils/useSearchMarkers.js
ElectronClient/gui/NoteEditor/utils/useWindowCommandHandler.js
ElectronClient/gui/NoteList/commands/focusElementNoteList.js
ElectronClient/gui/NoteListItem.js
ElectronClient/gui/NoteToolbar/NoteToolbar.js
ElectronClient/gui/ResourceScreen.js
ElectronClient/gui/ShareNoteDialog.js
ElectronClient/gui/SideBar/commands/focusElementSideBar.js
ReactNativeClient/lib/AsyncActionQueue.js
ReactNativeClient/lib/checkPermissions.js
ReactNativeClient/lib/commands/historyBackward.js
ReactNativeClient/lib/commands/historyForward.js
ReactNativeClient/lib/commands/synchronize.js
ReactNativeClient/lib/hooks/useEffectDebugger.js
ReactNativeClient/lib/hooks/useImperativeHandlerDebugger.js
ReactNativeClient/lib/hooks/usePrevious.js
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/checkbox.js
@@ -107,12 +146,16 @@ ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/fence.js
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/mermaid.js
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/sanitize_html.js
ReactNativeClient/lib/JoplinServerApi.js
ReactNativeClient/lib/services/CommandService.js
ReactNativeClient/lib/services/keychain/KeychainService.js
ReactNativeClient/lib/services/keychain/KeychainServiceDriver.dummy.js
ReactNativeClient/lib/services/keychain/KeychainServiceDriver.mobile.js
ReactNativeClient/lib/services/keychain/KeychainServiceDriver.node.js
ReactNativeClient/lib/services/keychain/KeychainServiceDriverBase.js
ReactNativeClient/lib/services/ResourceEditWatcher.js
ReactNativeClient/lib/services/ResourceEditWatcher/index.js
ReactNativeClient/lib/services/ResourceEditWatcher/reducer.js
ReactNativeClient/lib/services/rest/actionApi.desktop.js
ReactNativeClient/lib/services/rest/errors.js
ReactNativeClient/lib/services/SettingUtils.js
ReactNativeClient/lib/services/UndoRedoService.js
ReactNativeClient/lib/ShareExtension.js

View File

@@ -60,6 +60,7 @@ module.exports = {
"no-new-func": ["error"],
"import/prefer-default-export": ["error"],
"import/first": ["error"],
"no-array-constructor": ["error"],
// Checks rules of Hooks
"react-hooks/rules-of-hooks": "error",

2
.github/stale.yml vendored
View File

@@ -1,6 +1,6 @@
# Configuration for probot-stale - https://github.com/probot/stale
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 45
daysUntilStale: 30
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale

46
.gitignore vendored
View File

@@ -37,6 +37,7 @@ _mydocs
Assets/DownloadBadges*.psd
node_modules
Tools/github_oauth_token.txt
CliClient/tests/support/amazon-s3-auth.json
_releases
ReactNativeClient/lib/csstojs/
ReactNativeClient/lib/rnInjectedJs/
@@ -51,8 +52,39 @@ Tools/commit_hook.txt
*.map
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD
ElectronClient/commands/focusElement.js
ElectronClient/commands/startExternalEditing.js
ElectronClient/commands/stopExternalEditing.js
ElectronClient/global.d.js
ElectronClient/gui/ErrorBoundary.js
ElectronClient/gui/Header/commands/focusSearch.js
ElectronClient/gui/MainScreen/commands/editAlarm.js
ElectronClient/gui/MainScreen/commands/exportPdf.js
ElectronClient/gui/MainScreen/commands/hideModalMessage.js
ElectronClient/gui/MainScreen/commands/moveToFolder.js
ElectronClient/gui/MainScreen/commands/newNote.js
ElectronClient/gui/MainScreen/commands/newNotebook.js
ElectronClient/gui/MainScreen/commands/newTodo.js
ElectronClient/gui/MainScreen/commands/print.js
ElectronClient/gui/MainScreen/commands/renameFolder.js
ElectronClient/gui/MainScreen/commands/renameTag.js
ElectronClient/gui/MainScreen/commands/search.js
ElectronClient/gui/MainScreen/commands/selectTemplate.js
ElectronClient/gui/MainScreen/commands/setTags.js
ElectronClient/gui/MainScreen/commands/showModalMessage.js
ElectronClient/gui/MainScreen/commands/showNoteContentProperties.js
ElectronClient/gui/MainScreen/commands/showNoteProperties.js
ElectronClient/gui/MainScreen/commands/showShareNoteDialog.js
ElectronClient/gui/MainScreen/commands/toggleNoteList.js
ElectronClient/gui/MainScreen/commands/toggleSidebar.js
ElectronClient/gui/MainScreen/commands/toggleVisiblePanes.js
ElectronClient/gui/MultiNoteActions.js
ElectronClient/gui/NoteContentPropertiesDialog.js
ElectronClient/gui/NoteEditor/commands/editorCommandDeclarations.js
ElectronClient/gui/NoteEditor/commands/focusElementNoteBody.js
ElectronClient/gui/NoteEditor/commands/focusElementNoteTitle.js
ElectronClient/gui/NoteEditor/commands/showLocalSearch.js
ElectronClient/gui/NoteEditor/commands/showRevisions.js
ElectronClient/gui/NoteEditor/NoteBody/AceEditor/AceEditor.js
ElectronClient/gui/NoteEditor/NoteBody/AceEditor/styles/index.js
ElectronClient/gui/NoteEditor/NoteBody/AceEditor/Toolbar.js
@@ -66,6 +98,8 @@ ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/Toolbar.js
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/index.js
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/types.js
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useCursorUtils.js
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useEditorSearch.js
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useJoplinMode.js
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useLineSorting.js
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useListIdent.js
ElectronClient/gui/NoteEditor/NoteBody/CodeMirror/utils/useScrollUtils.js
@@ -84,12 +118,18 @@ ElectronClient/gui/NoteEditor/utils/useMessageHandler.js
ElectronClient/gui/NoteEditor/utils/useNoteSearchBar.js
ElectronClient/gui/NoteEditor/utils/useSearchMarkers.js
ElectronClient/gui/NoteEditor/utils/useWindowCommandHandler.js
ElectronClient/gui/NoteList/commands/focusElementNoteList.js
ElectronClient/gui/NoteListItem.js
ElectronClient/gui/NoteToolbar/NoteToolbar.js
ElectronClient/gui/ResourceScreen.js
ElectronClient/gui/ShareNoteDialog.js
ElectronClient/gui/SideBar/commands/focusElementSideBar.js
ReactNativeClient/lib/AsyncActionQueue.js
ReactNativeClient/lib/checkPermissions.js
ReactNativeClient/lib/commands/historyBackward.js
ReactNativeClient/lib/commands/historyForward.js
ReactNativeClient/lib/commands/synchronize.js
ReactNativeClient/lib/hooks/useEffectDebugger.js
ReactNativeClient/lib/hooks/useImperativeHandlerDebugger.js
ReactNativeClient/lib/hooks/usePrevious.js
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/checkbox.js
@@ -97,12 +137,16 @@ ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/fence.js
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/mermaid.js
ReactNativeClient/lib/joplin-renderer/MdToHtml/rules/sanitize_html.js
ReactNativeClient/lib/JoplinServerApi.js
ReactNativeClient/lib/services/CommandService.js
ReactNativeClient/lib/services/keychain/KeychainService.js
ReactNativeClient/lib/services/keychain/KeychainServiceDriver.dummy.js
ReactNativeClient/lib/services/keychain/KeychainServiceDriver.mobile.js
ReactNativeClient/lib/services/keychain/KeychainServiceDriver.node.js
ReactNativeClient/lib/services/keychain/KeychainServiceDriverBase.js
ReactNativeClient/lib/services/ResourceEditWatcher.js
ReactNativeClient/lib/services/ResourceEditWatcher/index.js
ReactNativeClient/lib/services/ResourceEditWatcher/reducer.js
ReactNativeClient/lib/services/rest/actionApi.desktop.js
ReactNativeClient/lib/services/rest/errors.js
ReactNativeClient/lib/services/SettingUtils.js
ReactNativeClient/lib/services/UndoRedoService.js
ReactNativeClient/lib/ShareExtension.js

View File

@@ -70,6 +70,8 @@ You can specify additional parameters when running the desktop or CLI applicatio
Most of the application is written in JavaScript, however new classes and files should generally be written in [TypeScript](https://www.typescriptlang.org/). All TypeScript files are generated next to the .ts or .tsx file. So for example, if there's a file "lib/MyClass.ts", there will be a generated "lib/MyClass.js" next to it. It is implemented that way as it requires minimal changes to integrate TypeScript in the existing JavaScript code base.
In the current setup, `tsc` is executed from the root of the project, and will compile everything in CliClient, ElectronClient, etc. This is more convenient to have just one place to compile everything, and it also means there's only one watch command to run. However, one drawback is that TypeScript doesn't find types defined in node_modules folders in sub-directories. For example, if you install `immer` in ElectronClient, then try to use the package, TypeScript will report that it cannot find this module. In theory using `typeRoots`, it should be possible to make it find the right modules but it doesn't seem to work in this case. Currently the workaround is to install any such package at the root of the project. By doing so, TypeScript will find the type definitions and compilation will work. It's not ideal since the module is installed at the root even though it's not used, but for now that will work.
## Hot reload
If you'd like to auto-reload the desktop app on changes rather than having to quit and restart it manually each time, you can use [watchman-make](https://facebook.github.io/watchman/docs/watchman-make.html):

View File

@@ -95,8 +95,8 @@ async function handleAutocompletionPromise(line) {
}
if (argName == 'tag') {
const tags = await Tag.search({ titlePattern: `${next}*` });
l.push(...tags.map(n => n.title));
const tags = await Tag.search({ fullTitleRegex: `${next}.*` });
l.push(...tags.map(tag => Tag.getCachedFullTitle(tag.id)));
}
if (argName == 'file') {

View File

@@ -21,7 +21,11 @@ class Command extends BaseCommand {
.filter(m => m.type === 'importer')
.map(m => m.format);
return [['--format <format>', _('Source format: %s', ['auto'].concat(formats).join(', '))], ['-f, --force', _('Do not ask for confirmation.')]];
return [
['--format <format>', _('Source format: %s', ['auto'].concat(formats).join(', '))],
['-f, --force', _('Do not ask for confirmation.')],
['--output-format <output-format>', _('Output format: %s', 'md, html')],
];
}
async action(args) {
@@ -55,9 +59,9 @@ class Command extends BaseCommand {
this.stdout(s);
};
app()
.gui()
.showConsole();
if (args.options.outputFormat) importOptions.outputFormat = args.options.outputFormat;
app().gui().showConsole();
this.stdout(_('Importing notes...'));
const service = new InteropService();
const result = await service.import(importOptions);

View File

@@ -18,7 +18,8 @@ class Command extends BaseCommand {
const command = args.command;
const ClipperServer = require('lib/ClipperServer');
const stdoutFn = (s) => this.stdout(s);
ClipperServer.instance().initialize();
const stdoutFn = (...s) => this.stdout(s.join(' '));
const clipperLogger = new Logger();
clipperLogger.addTarget('file', { path: `${Setting.value('profileDir')}/log-clipper.txt` });
clipperLogger.addTarget('console', { console: {

View File

@@ -174,7 +174,7 @@ class Command extends BaseCommand {
this.stdout(_('Synchronisation target: %s (%s)', Setting.enumOptionLabel('sync.target', this.syncTargetId_), this.syncTargetId_));
if (!sync) throw new Error(_('Cannot initialize synchroniser.'));
if (!sync) throw new Error(_('Cannot initialise synchroniser.'));
this.stdout(_('Starting synchronisation...'));

View File

@@ -34,7 +34,7 @@ class Command extends BaseCommand {
if (command == 'add') {
if (!notes.length) throw new Error(_('Cannot find "%s".', args.note));
if (!tag) tag = await Tag.save({ title: args.tag }, { userSideValidation: true });
if (!tag) tag = await Tag.saveNested({}, args.tag, { userSideValidation: true });
for (let i = 0; i < notes.length; i++) {
await Tag.addNote(tag.id, notes[i].id);
}
@@ -72,7 +72,7 @@ class Command extends BaseCommand {
} else {
const tags = await Tag.all();
tags.map(tag => {
this.stdout(tag.title);
this.stdout(Tag.getCachedFullTitle(tag.id));
});
}
} else if (command == 'notetags') {

View File

@@ -52,8 +52,6 @@ BaseItem.loadClass('Revision', Revision);
Setting.setConstant('appId', `net.cozic.joplin${env === 'dev' ? 'dev' : ''}-cli`);
Setting.setConstant('appType', 'cli');
console.info(Setting.value('appId'));
shimInit();
const application = app();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -38,42 +38,42 @@ locales['tr_TR'] = require('./tr_TR.json');
locales['vi'] = require('./vi.json');
locales['zh_CN'] = require('./zh_CN.json');
locales['zh_TW'] = require('./zh_TW.json');
stats['ar'] = {"percentDone":84};
stats['ar'] = {"percentDone":82};
stats['eu'] = {"percentDone":35};
stats['bs_BA'] = {"percentDone":78};
stats['bg_BG'] = {"percentDone":70};
stats['ca'] = {"percentDone":55};
stats['hr_HR'] = {"percentDone":29};
stats['cs_CZ'] = {"percentDone":86};
stats['da_DK'] = {"percentDone":78};
stats['de_DE'] = {"percentDone":97};
stats['et_EE'] = {"percentDone":69};
stats['bs_BA'] = {"percentDone":85};
stats['bg_BG'] = {"percentDone":68};
stats['ca'] = {"percentDone":54};
stats['hr_HR'] = {"percentDone":28};
stats['cs_CZ'] = {"percentDone":84};
stats['da_DK'] = {"percentDone":76};
stats['de_DE'] = {"percentDone":99};
stats['et_EE'] = {"percentDone":68};
stats['en_GB'] = {"percentDone":100};
stats['en_US'] = {"percentDone":100};
stats['es_ES'] = {"percentDone":94};
stats['eo'] = {"percentDone":40};
stats['fr_FR'] = {"percentDone":99};
stats['gl_ES'] = {"percentDone":45};
stats['id_ID'] = {"percentDone":97};
stats['it_IT'] = {"percentDone":95};
stats['nl_NL'] = {"percentDone":89};
stats['nl_BE'] = {"percentDone":36};
stats['nb_NO'] = {"percentDone":92};
stats['fa'] = {"percentDone":35};
stats['pl_PL'] = {"percentDone":88};
stats['pt_PT'] = {"percentDone":93};
stats['pt_BR'] = {"percentDone":99};
stats['ro'] = {"percentDone":36};
stats['sl_SI'] = {"percentDone":45};
stats['sv'] = {"percentDone":75};
stats['th_TH'] = {"percentDone":55};
stats['vi'] = {"percentDone":90};
stats['es_ES'] = {"percentDone":91};
stats['eo'] = {"percentDone":39};
stats['fr_FR'] = {"percentDone":97};
stats['gl_ES'] = {"percentDone":44};
stats['id_ID'] = {"percentDone":95};
stats['it_IT'] = {"percentDone":93};
stats['nl_NL'] = {"percentDone":99};
stats['nl_BE'] = {"percentDone":35};
stats['nb_NO'] = {"percentDone":91};
stats['fa'] = {"percentDone":34};
stats['pl_PL'] = {"percentDone":87};
stats['pt_PT'] = {"percentDone":91};
stats['pt_BR'] = {"percentDone":98};
stats['ro'] = {"percentDone":35};
stats['sl_SI'] = {"percentDone":44};
stats['sv'] = {"percentDone":73};
stats['th_TH'] = {"percentDone":54};
stats['vi'] = {"percentDone":88};
stats['tr_TR'] = {"percentDone":99};
stats['el_GR'] = {"percentDone":95};
stats['ru_RU'] = {"percentDone":92};
stats['sr_RS'] = {"percentDone":76};
stats['zh_CN'] = {"percentDone":98};
stats['zh_TW'] = {"percentDone":93};
stats['ja_JP'] = {"percentDone":97};
stats['ko'] = {"percentDone":91};
stats['el_GR'] = {"percentDone":93};
stats['ru_RU'] = {"percentDone":90};
stats['sr_RS'] = {"percentDone":74};
stats['zh_CN'] = {"percentDone":99};
stats['zh_TW'] = {"percentDone":98};
stats['ja_JP'] = {"percentDone":99};
stats['ko'] = {"percentDone":89};
module.exports = { locales: locales, stats: stats };

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "joplin",
"version": "1.0.164",
"version": "1.0.165",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -33,9 +33,9 @@
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
},
"acorn": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz",
"integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ=="
"version": "7.3.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.3.1.tgz",
"integrity": "sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA=="
},
"acorn-globals": {
"version": "4.3.4",
@@ -368,6 +368,34 @@
"resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
"integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg=="
},
"aws-sdk": {
"version": "2.641.0",
"resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.641.0.tgz",
"integrity": "sha512-9GYrBWR7ygIwwFBr0L+P+6tecNGsDuSe1mB18rv7CXSDLDdg6VPYwma1PSw5bUBs4wix9ganK6QLfW8D8ztBEQ==",
"requires": {
"buffer": "4.9.1",
"events": "1.1.1",
"ieee754": "1.1.13",
"jmespath": "0.15.0",
"querystring": "0.2.0",
"sax": "1.2.1",
"url": "0.10.3",
"uuid": "3.3.2",
"xml2js": "0.4.19"
},
"dependencies": {
"sax": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz",
"integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o="
},
"uuid": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
}
}
},
"aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
@@ -455,6 +483,11 @@
"resolved": "https://registry.npmjs.org/base-64/-/base-64-0.1.0.tgz",
"integrity": "sha1-eAqZyE59YAJgNhURxId2E78k9rs="
},
"base64-js": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
"integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g=="
},
"base64-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/base64-stream/-/base64-stream-1.0.0.tgz",
@@ -573,6 +606,16 @@
"resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz",
"integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow=="
},
"buffer": {
"version": "4.9.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz",
"integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=",
"requires": {
"base64-js": "^1.0.2",
"ieee754": "^1.1.4",
"isarray": "^1.0.0"
}
},
"buffer-equal": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz",
@@ -1594,9 +1637,9 @@
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
},
"escodegen": {
"version": "1.14.2",
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.2.tgz",
"integrity": "sha512-InuOIiKk8wwuOFg6x9BQXbzjrQhtyXh46K9bqVTPzSo2FnyMBaYGBMC6PhQy7yxxil9vIedFBweQBMK74/7o8A==",
"version": "1.14.3",
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz",
"integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==",
"requires": {
"esprima": "^4.0.1",
"estraverse": "^4.2.0",
@@ -1628,6 +1671,11 @@
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="
},
"events": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz",
"integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ="
},
"execa": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz",
@@ -3039,9 +3087,9 @@
"integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0="
},
"highlight.js": {
"version": "9.18.1",
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.1.tgz",
"integrity": "sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg=="
"version": "10.1.1",
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.1.1.tgz",
"integrity": "sha512-b4L09127uVa+9vkMgPpdUQP78ickGbHEQTWeBrQFTJZ4/n2aihWOGS0ZoUqAwjVmfjhq/C76HRzkqwZhK4sBbg=="
},
"homedir-polyfill": {
"version": "1.0.3",
@@ -3137,6 +3185,11 @@
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz",
"integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ=="
},
"ieee754": {
"version": "1.1.13",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz",
"integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg=="
},
"ignore-walk": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz",
@@ -3748,10 +3801,15 @@
"integrity": "sha512-nCeAiw37MIMA9w9IXso7bRaLl+c/ef3wnxsoSAlYrzS+Ot0zTG6nU8G/cIfGkqpkjX2wNaIW9RFG0TwIFnG6bA==",
"dev": true
},
"jmespath": {
"version": "0.15.0",
"resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz",
"integrity": "sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc="
},
"joplin-turndown": {
"version": "4.0.28",
"resolved": "https://registry.npmjs.org/joplin-turndown/-/joplin-turndown-4.0.28.tgz",
"integrity": "sha512-wQP9OUBAkWq/VPPCJcY1EI6tSXWlGs/BJ7Ce8BZYRF/1vEk/TRHOdKmCObQrXz/0nRoLiP5xeqNvHE1nK4XbRQ==",
"version": "4.0.29",
"resolved": "https://registry.npmjs.org/joplin-turndown/-/joplin-turndown-4.0.29.tgz",
"integrity": "sha512-rVGu8u4TpSRETo59/jiVW9iaXnpdxxpBHjb7nyCflkDfWhg1Kska4uagBQGw7cD2yxw7mB2YUIB/fAgtlIzcDQ==",
"requires": {
"css": "^2.2.4",
"html-entities": "^1.2.1",
@@ -5355,6 +5413,11 @@
"strict-uri-encode": "^1.0.0"
}
},
"querystring": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
"integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA="
},
"querystringify": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz",
@@ -5554,11 +5617,6 @@
"through2": "^2.0.3"
}
},
"remove-markdown": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/remove-markdown/-/remove-markdown-0.3.0.tgz",
"integrity": "sha1-XktmdJOpNXlyjz1S7MHbnKUF3Jg="
},
"remove-trailing-separator": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
@@ -5708,19 +5766,26 @@
}
},
"request-promise-core": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.3.tgz",
"integrity": "sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ==",
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz",
"integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==",
"requires": {
"lodash": "^4.17.15"
"lodash": "^4.17.19"
},
"dependencies": {
"lodash": {
"version": "4.17.19",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ=="
}
}
},
"request-promise-native": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.8.tgz",
"integrity": "sha512-dapwLGqkHtwL5AEbfenuzjTYg35Jd6KPytsC2/TLkVMz8rm+tNt72MGUWT1RP/aYawMpN6HqbNGBQaRcBtjQMQ==",
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz",
"integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==",
"requires": {
"request-promise-core": "1.1.3",
"request-promise-core": "1.1.4",
"stealthy-require": "^1.1.1",
"tough-cookie": "^2.3.3"
},
@@ -7038,6 +7103,22 @@
"resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
"integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI="
},
"url": {
"version": "0.10.3",
"resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz",
"integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=",
"requires": {
"punycode": "1.3.2",
"querystring": "0.2.0"
},
"dependencies": {
"punycode": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
"integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0="
}
}
},
"url-parse": {
"version": "1.4.7",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz",
@@ -7302,9 +7383,9 @@
}
},
"ws": {
"version": "7.3.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.3.0.tgz",
"integrity": "sha512-iFtXzngZVXPGgpTlP1rBqsUK82p9tKqsWRPg5L56egiljujJT3vGAYnHANvFxBieXrTFavhzhxW52jnaWV+w2w=="
"version": "7.3.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz",
"integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA=="
},
"xdg-basedir": {
"version": "3.0.0",

View File

@@ -27,7 +27,7 @@
],
"owner": "Laurent Cozic"
},
"version": "1.0.164",
"version": "1.0.165",
"bin": {
"joplin": "./main.js"
},
@@ -37,6 +37,7 @@
"dependencies": {
"app-module-path": "^2.2.0",
"async-mutex": "^0.1.3",
"aws-sdk": "^2.588.0",
"base-64": "^0.1.0",
"base64-stream": "^1.0.0",
"clean-html": "^1.5.0",
@@ -49,13 +50,13 @@
"font-awesome-filetypes": "^2.1.0",
"form-data": "^2.1.4",
"fs-extra": "^5.0.0",
"highlight.js": "^9.17.1",
"highlight.js": "10.1.1",
"html-entities": "^1.2.1",
"html-minifier": "^3.5.15",
"htmlparser2": "^4.1.0",
"image-data-uri": "^2.0.0",
"image-type": "^3.0.0",
"joplin-turndown": "^4.0.28",
"joplin-turndown": "^4.0.29",
"joplin-turndown-plugin-gfm": "^1.0.12",
"json-stringify-safe": "^5.0.1",
"jssha": "^2.3.0",
@@ -91,7 +92,6 @@
"read-chunk": "^2.1.0",
"redux": "^3.7.2",
"relative": "^3.0.2",
"remove-markdown": "^0.3.0",
"request": "^2.88.0",
"sax": "^1.2.4",
"server-destroy": "^1.0.1",

View File

@@ -89,20 +89,20 @@ describe('EnexToHtml', function() {
}],
});
it('fails when not given a matching resource', asyncTest(async () => {
// To test the promise-unexpectedly-resolved case, add `audioResource` to the array.
const resources = [];
const inputFile = fileWithPath('en-media--image.enex');
const enexInput = await shim.fsDriver().readFile(inputFile);
const promisedOutput = enexXmlToHtml(enexInput, resources);
// it('fails when not given a matching resource', asyncTest(async () => {
// // To test the promise-unexpectedly-resolved case, add `audioResource` to the array.
// const resources = [];
// const inputFile = fileWithPath('en-media--image.enex');
// const enexInput = await shim.fsDriver().readFile(inputFile);
// const promisedOutput = enexXmlToHtml(enexInput, resources);
promisedOutput.then(() => {
// Promise should not be resolved
expect(false).toEqual(true);
}, (reason) => {
expect(reason)
.toBe('Hash with no associated resource: 89ce7da62c6b2832929a6964237e98e9');
});
}));
// promisedOutput.then(() => {
// // Promise should not be resolved
// expect(false).toEqual(true);
// }, (reason) => {
// expect(reason)
// .toBe('Hash with no associated resource: 89ce7da62c6b2832929a6964237e98e9');
// });
// }));
});

View File

@@ -0,0 +1,45 @@
require('app-module-path').addPath(__dirname);
const { asyncTest } = require('test-utils.js');
const MarkupToHtml = require('lib/joplin-renderer/MarkupToHtml');
describe('MarkupToHtml', function() {
it('should strip markup', asyncTest(async () => {
const service = new MarkupToHtml();
const testCases = {
[MarkupToHtml.MARKUP_LANGUAGE_MARKDOWN]: [
['', ''],
['## hello', 'hello'],
['## hello **hello!**', 'hello hello!'],
['*hi!*', 'hi!'],
['Some `code` here', 'Some code here'],
['Some <s>html</s> here', 'Some html here'],
['Some &amp; here', 'Some & here'],
['Some & here', 'Some & here'],
['[![image alt](:/fe9ea7fa727e4375b2e7d8a1b873314d)](https://example.com)', ''],
],
[MarkupToHtml.MARKUP_LANGUAGE_HTML]: [
['<h1>hello</h1>', 'hello'],
['Some <b>strong</b> text', 'Some strong text'],
['<b>M&amp;Ms</b>', 'M&Ms'],
['<style>BODY{margin:0;padding:0;background:#f0f0f0}</style>', ''],
],
};
for (const markup in testCases) {
for (const t of testCases[markup]) {
const input = t[0];
const expected = t[1];
const actual = service.stripMarkup(Number(markup), input);
expect(actual).toBe(expected, `Markup: ${markup}`);
}
}
expect(service.stripMarkup(1, 'one line\n\ntwo line', { collapseWhiteSpaces: true })).toBe('one line two line');
expect(service.stripMarkup(1, 'one line two line', { collapseWhiteSpaces: true })).toBe('one line two line');
expect(service.stripMarkup(1, 'one line\n two line', { collapseWhiteSpaces: true })).toBe('one line two line');
}));
});

View File

@@ -140,7 +140,7 @@ describe('MdToHtml', function() {
// The style is instead in the cssStrings property.
const result = await mdToHtml.render('just **testing**', null, { bodyOnly: true });
expect(result.cssStrings.length).toBe(1);
expect(result.html.trim()).toBe('<p>just <strong>testing</strong></p>');
expect(result.html.trim()).toBe('just <strong>testing</strong>');
}));
it('should split HTML and CSS', asyncTest(async () => {

View File

@@ -2,6 +2,5 @@
<div><a href="joplin://21ca2b948f222a38802940ec7e2e5de3" hash="21ca2b948f222a38802940ec7e2e5de3" type="application/pdf" style="cursor:pointer;" alt="attachment-1">attachment-1</a></div>
<div>
<br>
<br>
</div>
</en-note>

View File

@@ -3,7 +3,7 @@
<p>For example, consider an exported Evernote list with todo checkboxes like this:</p>
<ul>
<li>
<div><input type="checkbox" onclick="return false;">Foo</div>
<div><input checked="checked" type="checkbox" onclick="return false;">Foo</div>
</li>
<li>
<div><input type="checkbox" onclick="return false;"><b>Bar</b></div>

View File

@@ -8,6 +8,5 @@
</div>
<div>
<br>
<br>
</div>
</en-note>

View File

@@ -4,11 +4,9 @@
<div>
<input type="checkbox" onclick="return false;">A test for <i>italic</i>
<br>
<br>
</div>
<div>
<br>
<br>
</div>
<div><i><img src=":/89ce7da62c6b2832929a6964237e98e9" hash="89ce7da62c6b2832929a6964237e98e9" type="image/jpeg" alt=""></i></div>
</en-note>

View File

@@ -0,0 +1,126 @@
/* eslint-disable no-unused-vars */
require('app-module-path').addPath(__dirname);
const { uuid } = require('lib/uuid.js');
const { time } = require('lib/time-utils.js');
const { asyncTest, sleep, fileApi, fileContentEqual, checkThrowAsync } = require('test-utils.js');
const { shim } = require('lib/shim.js');
const fs = require('fs-extra');
const Setting = require('lib/models/Setting.js');
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
process.on('unhandledRejection', (reason, p) => {
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
});
let api = null;
// To test out an FileApi implementation:
// * add a SyncTarget for your driver in `test-utils.js`
// * set `syncTargetId_` to your New SyncTarget:
// `const syncTargetId_ = SyncTargetRegistry.nameToId('memory');`
describe('fileApi', function() {
beforeEach(async (done) => {
api = new fileApi();
api.clearRoot();
done();
});
describe('list', function() {
it('should return items with relative path', asyncTest(async () => {
await api.mkdir('.subfolder');
await api.put('1', 'something on root 1');
await api.put('.subfolder/1', 'something subfolder 1');
await api.put('.subfolder/2', 'something subfolder 2');
await api.put('.subfolder/3', 'something subfolder 3');
sleep(0.8);
const response = await api.list('.subfolder');
const items = response.items;
expect(items.length).toBe(3);
expect(items[0].path).toBe('1');
}));
it('should default to only files on root directory', asyncTest(async () => {
await api.mkdir('.subfolder');
await api.put('.subfolder/1', 'something subfolder 1');
await api.put('file1', 'something 1');
await api.put('file2', 'something 2');
sleep(0.6);
const response = await api.list();
expect(response.items.length).toBe(2);
}));
}); // list
describe('delete', function() {
it('should not error if file does not exist', asyncTest(async () => {
const hasThrown = await checkThrowAsync(async () => await api.delete('nonexistant_file'));
expect(hasThrown).toBe(false);
}));
it('should delete specific file given full path', asyncTest(async () => {
await api.mkdir('deleteDir');
await api.put('deleteDir/1', 'something 1');
await api.put('deleteDir/2', 'something 2');
sleep(0.4);
await api.delete('deleteDir/1');
let response = await api.list('deleteDir');
expect(response.items.length).toBe(1);
response = await api.list('deleteDir/1');
expect(response.items.length).toBe(0);
}));
}); // delete
describe('get', function() {
it('should return null if object does not exist', asyncTest(async () => {
const response = await api.get('nonexistant_file');
expect(response).toBe(null);
}));
it('should return UTF-8 encoded string by default', asyncTest(async () => {
await api.put('testnote.md', 'something 2');
const response = await api.get('testnote.md');
expect(response).toBe('something 2');
}));
it('should return a Response object and writes file to options.path, if options.target is "file"', asyncTest(async () => {
const localFilePath = `${Setting.value('tempDir')}/${uuid.create()}.md`;
await api.put('testnote.md', 'something 2');
sleep(0.2);
const response = await api.get('testnote.md', { target: 'file', path: localFilePath });
expect(typeof response).toBe('object');
// expect(response.path).toBe(localFilePath);
expect(fs.existsSync(localFilePath)).toBe(true);
expect(fs.readFileSync(localFilePath, 'utf8')).toBe('something 2');
}));
}); // get
describe('put', function() {
it('should create file to remote path and content', asyncTest(async () => {
await api.put('putTest.md', 'I am your content');
sleep(0.2);
const response = await api.get('putTest.md');
expect(response).toBe('I am your content');
}));
it('should upload file in options.path to remote path, if options.source is "file"', asyncTest(async () => {
const localFilePath = `${Setting.value('tempDir')}/${uuid.create()}.md`;
fs.writeFileSync(localFilePath, 'I am the local file.');
await api.put('testfile', 'ignore me', { source: 'file', path: localFilePath });
sleep(0.2);
const response = await api.get('testfile');
expect(response).toBe('I am the local file.');
}));
}); // put
});

View File

@@ -100,41 +100,4 @@ describe('markdownUtils', function() {
}
}));
it('should remove Markdown syntax elements from the text', asyncTest(async () => {
const inputStrings = [
'', // Empty string
'This is some plain text', // Plain text
'## This is a header', // Header syntax
'This is a text with **bold** and *italicized* text', // Text with annotations
'This is a text with __bold__ and _italicized_ text', // Text with annotations alternate form
'[link to google](https://www.google.com/)', // Link
'> This is a blockquote\n And another line', // Blockquote
'* List item\n* List item', // Unordered list
'- List item\n- List item', // Unordered list
'1. List item\n2. List item', // Ordered list
'This is some `inline code`', // Inlined code
];
const expectedOutputStrings = [
'',
'This is some plain text',
'This is a header',
'This is a text with bold and italicized text',
'This is a text with bold and italicized text',
'link to google',
'This is a blockquote\n And another line',
'List item\nList item',
'List item\nList item',
'List item\nList item',
'This is some inline code',
];
expect(inputStrings.length).toBe(expectedOutputStrings.length);
for (let i = 0; i < inputStrings.length; i++) {
const outputString = markdownUtils.stripMarkdown(inputStrings[i]);
expect(outputString).toBe(expectedOutputStrings[i]);
}
}));
});

View File

@@ -1,5 +1,5 @@
<div class="joplin-editable"><pre class="joplin-source" data-joplin-language="javascript" data-joplin-source-open="```javascript&#10;" data-joplin-source-close="&#10;```">function() {
console.info('bonjour');
}</pre><pre class="hljs"><code><span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
<span class="hljs-built_in">console</span>.info(<span class="hljs-string">'bonjour'</span>);
<span class="hljs-built_in">console</span>.info(<span class="hljs-string">&#x27;bonjour&#x27;</span>);
}</code></pre></div>

Some files were not shown because too many files have changed in this diff Show More