Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desktop: Fixes #9781: Extract default plugins to directories matching their IDs #9782

Conversation

personalizedrefrigerator
Copy link
Collaborator

Summary

Rather than storing default plugin JPL files in

    build/defaultPlugins/[[ plugin ID here ]]/plugin.jpl

this pull request stores default plugin JPL files in

    build/defaultPlugins/[[ plugin ID here ]].jpl

Because PluginService uses the name of the .jpl file to determine where to extract it, this change fixes #9781.

Testing

  1. Clear Joplin's cache directory (~/.config/joplin-desktop/cache).
  2. Start Joplin
  3. Inspect Joplin's cache directory
    • Verify that there exists a folder named io.github.jackgruber.backup/ and not a folder named plugin/

This has been tested successfully on Ubuntu 23.10.

Note: That the Simple Backup plugin starts successfully is tested by this set of automated tests.

@personalizedrefrigerator
Copy link
Collaborator Author

personalizedrefrigerator commented Jan 25, 2024

This pull request adjusts the default plugins tests so that they continue to pass.

Previously, the ${supportDir}/pluginRepo/plugins directory was used (which is also used for other tests). However, it has the following structure:

packages/app-cli/tests/support
| pluginRepo/
|   | plugins/
|   |   | joplin.plugin.ambrt.backlinksToNote/
|   |   |   | plugin.jpl
|   |   |   | manifest.json
|   |   | org.joplinapp.plugins.ToggleSidebars/
|   |   |   | plugin.jpl
|   |   |   | manifest.json
|   | ...

Because this pull request changes the format of the default plugins directory, a new ${supportDir}/testDefaultPlugins directory is created with the expected structure:

packages/app-cli/tests/support
| testDefaultPlugins/
|   | joplin.plugin.ambrt.backlinksToNote.jpl
|   | org.joplinapp.plugins.ToggleSidebars.jpl

@laurent22 laurent22 merged commit 13da286 into laurent22:dev Jan 26, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default plugins extracted to cache/plugin/ and not in cache/plugin.id.here/
2 participants