PlasmoHQ / docs

📘 Documentation site
https://docs.plasmo.com
10 stars 45 forks source link

[RFC] Plasmo Upgrade Helper #35

Open vantezzen opened 1 year ago

vantezzen commented 1 year ago

How do you envision this feature/change to look/work like?

Development of an upgrade helper similar to React Native's one that allows inputting the currently installed Plasmo version and desired version and shows what steps are needed to make the codebase compatible with it.

The upgrade helper outputs the exact set of instructions needed for that version jump, including all versions in between.

Currently, the only information about updating Plasmo seems to be at https://docs.plasmo.com/framework/workflows/faq#how-do-i-update-plasmo-to-the-latest-version.

I don't know if this belongs in the issues for this repo or the docs repo so feel free to move it.

What is the purpose of this change/feature? Why?

With Plasmo's APIs and feature set being very volatile, it can be difficult to know what to change when upgrading versions (especially with larger upgrades). This is especially true as more and more extension get build with Plasmo but won't get updates as frequently as Plasmo does.

Looking at the Plasmo releases, there are breaking changes from time to time and other changes of the recommended way to do things. To keep codebases up-to-date with Plasmo's features, one currently has to go through the changelog manually and find out what to change. Creating an upgrade helper would help increase the lifetime of Plasmo extensions and potentially help the spread of newer Plasmo versions.

(OPTIONAL) Example implementations

https://react-native-community.github.io/upgrade-helper/

(OPTIONAL) Contact Details

No response

Verify canary release

Code of Conduct

louisgv commented 1 year ago

Thanks for the RFC!

I dream of a day when we have something like this:

pnpm dlx plasmo codemod

^ go through all the deprecated files and auto-fix.

I think for this RFC, we can implement something similar to the React Native one directly in our docs project, perhaps under a https://docs.plasmo.com/framework/upgrade docs. We can very easily reimplement the React Native upgrade guide's component and put it in the MDX file.

I think we can start with the following entry files:

popup.tsx content.tsx background/index.ts background/messages/test.ts tsconfig.json

I'm a bit behind on Sandler atm, but if anyone can contribute the base code for each file above in a certain version, that'd get the ball rolling quickly to build out the upgrade guide!