Skip to content

Instantly share code, notes, and snippets.

@bayleedev
Created July 29, 2016 16:19
Show Gist options
  • Save bayleedev/68ad985d512d23eecebb55863334f60a to your computer and use it in GitHub Desktop.
Save bayleedev/68ad985d512d23eecebb55863334f60a to your computer and use it in GitHub Desktop.

Problem

We can release a new versin of Zazu with backwards incompatiable changes to themes OR/and plugins. A user has no built-in interface for updating dependencies.

Proposed Solution

Zazu can maintain a list of breaking changes by type:

themes: ['0.1.0 - 0.1.5', '1.0.0 - 0.2.0'],
plugins: ['0.1.0 - 0.1.5', '0.3.0 - 0.2.0', '1.0.0 - 1.3.0'],

Then, plugin developers can mark in their plugin what versions this code was tested on:

module.exports = {
  name: 'Clipboard',
  zazuVersions: ['0.2.0', '0.3.0', '1.0.0'],
}

Now, it can warn the user based on these things. We will NOT disable plugins based on these settings, just warn the user. These plugins could still be working just fine and we should lean on the side of the power user.

Philosophy

This enforces a fail forward type of design, where as a user the only interface I have is to update zazu or my plugins.

Given I download a version of zazu
When I install a plugin that works on my version
Then everything works as expected
Given I download a version of zazu
When I install a plugin that doesn't works on my version
Then it prompts me that the plugin is not compatiable
And gives me the option to check zazu for updates
And gives me the option to check plugins for updates
Given I have an old version of zazu
And I have plugins installed and working
When I update zazu
And I now have plugins that are not compatiable
Then it will prompt me that some plugins are not compatiable
And gives me the option to check my plugins for updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment