Force update for Figma Plugins

With the release of Parrot I also stumbled upon the following problem as well:

In an attempt to implement a force update, I encountered CORS (Cross-Origin Resource Sharing) issues. The endpoint that should provide the necessary version information, https://www.figma.com/api/plugins/{versionId}/versions/ , seems to be blocked by CORS.

To address this challenge, I’ve come up with a workaround using a GitHub page and figcd. By updating a json file with the latest version and redeploy the GitHub page whenever a new release occurs, I can prompt users to refresh their plugin if they have an outdated version.

I do have a couple of questions for the Figma team:

  1. Is there a possibility of providing an endpoint to fetch all versions of the plugin, along with a changelog, that we can query directly from the plugin?
  2. Additionally, could you consider offering a function to clear the plugin cache and restart it without having to close and reopen the design file? It would greatly improve the user experience.

Looking forward to hearing your thoughts and any potential solutions.

Best Regards
Martin

1 Like

Thanks for the feedback @parrot!

For your 2 feedback items:

  1. To my knowledge we don’t have any plans for this at the moment, but I can bring it up to the team.
  2. We also don’t have any plans for this immediately. I will say that Figma itself updates on a daily basis and we also run into this problem of people not using the newest version. We are a bit worried about this because a new version of the plugin could use a new api that isn’t in the version of Figma that the user has downloaded, so there is a greater risk of breaking plugins if we allow this.
2 Likes

Thanks for your reply.
The solution I sketched above works pretty good so far.

In combination with an automatic build pipeline using figcd this also gives better control. I use it to set a minimum version for example.

For my setup both points are fine :wink: