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

Plugin Migration #2

Closed
27 of 39 tasks
shellscape opened this issue Aug 21, 2019 · 53 comments
Closed
27 of 39 tasks

Plugin Migration #2

shellscape opened this issue Aug 21, 2019 · 53 comments

Comments

@shellscape
Copy link
Collaborator

shellscape commented Aug 21, 2019

Below is the big-ass list of plugins that need migrating into this repo:

Done

  • rollup-plugin-alias
  • plugin-auto-install
  • rollup-plugin-buble
  • rollup-plugin-commonjs
  • rollup-plugin-dsv
  • rollup-plugin-image
  • rollup-plugin-inject
  • rollup-plugin-json
  • rollup-plugin-legacy
  • rollup-plugin-multi-entry
  • rollup-plugin-node-resolve
  • rollup-plugin-replace
  • rollup-plugin-run
  • rollup-plugin-strip
  • rollup-plugin-sucrase
  • rollup-plugin-typescript
  • rollup-plugin-url
  • rollup-plugin-virtual
  • rollup-plugin-wasm
  • rollup-plugin-yaml

Misc

  • rollup-pluginutils

In Progress

  • rollup-plugin-babel (in progress @Andarist)

Pending

Skip

  • rollup-starter-plugin
  • rollup-plugin-butternut (deprecated in favor of terser)
  • rollup-plugin-node-builtins (was an empty repo, plugin owned by third party)
  • rollup-plugin-ractive (Ractive is a dead project)
  • rollup-plugin-svelte (will be transferred to @sveltejs)

Before we move a plugin we should:

  • Follow up on any open issues.
  • Follow up on any pending Pull Requests.
  • Add note to the README about the move
  • Disable issues and Pull Requests

Give n number of days for response based on age of issue/PR, if there is a reproduction provided, etc.

For each plugin we should:

  • Assert there are tests
  • Apply linting and clean the code
  • Update aged dependencies
  • Remove unneeded metadata covered by the monorepo
  • Create an issue label for the plugin

After moving a plugin we should:

  • Put the plugin repo into an archived state
  • Add a deprecation notice to the README and provide URL to the monorepo path for the plugin
  • Publish a patch version with the deprecated property added to package.json.
@lukastaegert
Copy link
Member

Would we want to mandate TypeScript for the Monorepo? I know this would severely slow down the migration, but in the end it would make the monorepo more consistent.

Missing from the list IMO: rollup-pluginutils

@lukastaegert
Copy link
Member

It would also mean that people can expect all @rollup/ plugins to have types. Alternatively we could say: Monorepo plugins should either be TS or at least have TS types, what do you think?

@wesleygrimes
Copy link
Contributor

I think we should mandate TypeScript for all plugins. I need to get look at some of these plugins in more detail to get a feel for it, but we should be able to infer a lot of the types.

@wesleygrimes
Copy link
Contributor

I don’t like the idea of adding on types as these quickly get stale as new features are built and it’s another set of technical debt that must be maintained.

@lukastaegert
Copy link
Member

I think we should mandate TypeScript for all plugins. I need to get look at some of these plugins in more detail to get a feel for it, but we should be able to infer a lot of the types

Definitely my preferred option as well.

@lukastaegert
Copy link
Member

If we go for TypeScript, I would also throw in the suggestion to use TypeScript in tests as well. Just another safeguard that tests do not become stale.

@wesleygrimes
Copy link
Contributor

If we go for TypeScript, I would also throw in the suggestion to use TypeScript in tests as well. Just another safeguard that tests do not become stale.

Agreed! I’ve used Jest and Jasmine in the past. I prefer Jest, but it looks like everyone is preferring Ava here. I am fine with that if you all think it works well.

I do love how Jest has a lot of built in helpers like test.each, etc...

@lukastaegert
Copy link
Member

In the end, a lot of test are probably directory/sample based, meaning that the test file fs.readFileSyncs a directory where each folder corresponds to a test and has a special structure, usually with a _config.js file for fine-tuning. For those tests, helpers provided by the test framework will not help anyway. We could of course attempt to change the structure of those tests so that the config files become valid test files but the current approach reduces boilerplate to the minimum. As an example, you could check out the tests of rollup-plugin-commonjs.

What I am saying is: I love Jest as well, but in the end, it will probably not matter too much.

@wesleygrimes
Copy link
Contributor

Cool, I’m good with that. I will trust your judgment on these things as I am newer to the rollup ecosystem. Looking forward to learning Ava to be honest. It looks nice and clean.

@shellscape
Copy link
Collaborator Author

I would go so far as to say that I don't want to take on so much as to slow down this re-organization. That being said, a lot of these tasks can be delegated as long as we have a few folks poking at this (which it looks like we will). Converting non-TS plugins to TS should be the final step. No reason why plugins that don't already have tests (e.g. auto-install) shouldn't have theirs written using TS either.

Getting the ball rolling is more important than asserting TypeScript at every step imho, but I would not recommend we publish any new major versions until TS has been implemented.

@wesleygrimes
Copy link
Contributor

wesleygrimes commented Aug 22, 2019

That's the great thing about TypeScript too, we can just rename the files to .ts and immediately "profit", then as we see fit start adding types. This is because JavaScript is valid TypeScript.

@Andarist
Copy link
Member

I would be interested in migrating rollup-plugin-babel (which I maintain) to the monorepo. I'm wondering if there is a plan to create a bot or smth that would ping "code owners" of the particular plugin? With many plugins inside a monorepo it might be harder to tackle all issues - I would like to focus mainly on babel-related ones but getting notifications about whole repo and filtering them on my own is rather a blocker for me. I'm just having too many notifications from GitHub already and I can't handle more than that.

@shellscape
Copy link
Collaborator Author

@Andarist wonderful. I'll add you to the Plugin Maintainers team shortly. Please follow the same pattern of opening a PR that we've been using so far. The process is still very manual at the moment. I and the other maintainers will be happy to pitch in on the effort.

We're planning on tagging issues with plugin-specific tags, and all issues templates require the associated plugin's name, so hopefully it'll be easy to divine. A bot to manage notifications per plugin is a great idea. Alternatively, you could filter out any notification emails that didn't pertain to the plugin(s) you're interested in. That's relatively trivial to do with Gmail, not sure about other email providers.

@Andarist
Copy link
Member

I'll get to migrating in the following weeks - need to wrap up some other OSS work now though and handle all issues/PRs in the rollup-plugin-babel before migrating.

@btd
Copy link
Contributor

btd commented Oct 29, 2019

@shellscape i can help with rollup-plugin-inject.

@shellscape
Copy link
Collaborator Author

@btd that's great, thank you. I'll be adding you to the Plugin Maintainers shortly. Please follow the same patterns / procedures as the other Pull Requests for migrating.

@osdevisnot
Copy link

osdevisnot commented Oct 30, 2019

@shellscape I can help with plugin-auto-install. From auto install, here is the todo items filtered from your list:

  • Follow up on any open issues.
  • Follow up on any pending Pull Requests.
  • Add note to the README about the move
  • Disable issues and Pull Requests
  • Assert there are tests
  • Apply linting and clean the code
  • Update aged dependencies
  • Remove unneeded metadata covered by the monorepo
  • Create an issue label for the plugin
  • Put the plugin repo into an archived state
  • Add a deprecation notice to the README and provide URL to the monorepo path for the plugin
  • Publish a patch version with the deprecated property added to package.json.

Also, it seems plugin-auto-install is already published under @rollup namespace. So this package won't need a new publish.

@santoshyadavdev
Copy link

Anything I can help with?

@shellscape
Copy link
Collaborator Author

@santoshyadav198613 absolutely! If you'd like to help migrate a plugin, please choose one in Pending and follow the same pattern as our other migration Pull Requests (#6, #7, #11 or #15)

@santoshyadavdev
Copy link

santoshyadavdev commented Oct 30, 2019

Thanks @shellscape ,
I will start with plugin-auto-install, looks like already taken, will go with rollup-plugin-butternut.

@shellscape
Copy link
Collaborator Author

Great, I'll mark it down above.

@santoshyadavdev
Copy link

@shellscape will take rollup-plugin-commonjs next

@santoshyadavdev
Copy link

Hi, @shellscape As the earlier plugin is already deprecated will start working on rollup-plugin-commonjs please add it on my name.

@thgh
Copy link
Contributor

thgh commented Nov 9, 2019

I'm interested in migrating node-resolve, PR incoming

@shellscape
Copy link
Collaborator Author

@thgh many thanks for that!

@pnevares
Copy link
Contributor

I'd love to help migrate rollup-plugin-url!

@wuweiweiwu
Copy link
Member

wuweiweiwu commented Nov 17, 2019

I can pick up rollup-plugin-node-builtins and add rollup-plugin-terser to this list! cc @TrySound

@TrySound
Copy link
Member

I'm still processing this.

@shellscape
Copy link
Collaborator Author

shellscape commented Nov 17, 2019

@pnevares please do!

@wuweiweiwu that would be wonderful, thank you.

@TrySound no rush my friend 👍

@shellscape
Copy link
Collaborator Author

@NotWoods perfect. The recent yaml plugin PR is a great benchmark to compare against.

@Kocal
Copy link
Contributor

Kocal commented Nov 24, 2019

Can we add rollup-plugin-graphql to this repository?

I know that it's not an official (I mean not maintened by Rollup team) Rollup plugin, but GraphQL is a well used language and this plugin is not compatible with Rollup ^1, an PR has been opened since more than 1 year (kamilkisiela/rollup-plugin-graphql#7) but it's not merged.

So I've forked the package, applied @bennypowers's patch, added mutli-export support (Kocal/rollup-plugin-graphql@d699178), and published the package to @kocal/rollup-plugin-graphql.

But that's not an ideal solution... GraphQL is well used and I think it would be nice to import it here.

What do you think? Thanks!

@shellscape
Copy link
Collaborator Author

@Kocal (let's open new issues for questions like this in the future) this is tricky. We want to license all of the official plugins to the Rollup org, so to get any third party plugins into the org as an official, the author has to transfer it to the org and also update the LICENSE file. That's the only legit way to do it.

Now, that doesn't preclude us from writing a new plugin with similar functionality and crediting the original author for ideas. But that has to be a completely new, from scratch, original piece of work, even including tests. Rewrites often fall into this category. So I would track down the author on twitter and/or open an issue asking about transferring to Rollup and relicensing, or start a new work. Given the age and lack of activity on the project, a new work might make more sense.

@NotWoods
Copy link
Member

@shellscape I can work on migrating the code for rollup-plugin-typescript

@shellscape
Copy link
Collaborator Author

That's great news. I'll ping you when it's prudent to start. We've got to get that repo tidy before we start. Lots of pending PRs that I'd like to give people time to respond to. I'll start closing them as abandoned later in the week.

@evanplaice
Copy link

Are there any unclaimed plugins left? I'd like to help.

@shellscape
Copy link
Collaborator Author

@evanplaice awesome, thank you. yessir. sucrase and legacy are still pending, as is babel - even though those are "claimed." Until there's a PR for them, they're fair game.

@Andarist
Copy link
Member

I'm going to start working on babel migration soon - was occupied by some different stuff lately and also were iterating through a PR to the rollup-plugin-babel with Lukas, so it was not the right time to start preparing a migration.

@pajaydev
Copy link

pajaydev commented Dec 1, 2019

@shellscape Awesome work. This is great for ppl wants to contribute. Is there any pending plugins I can take ?. Happy to help 😃

@shellscape
Copy link
Collaborator Author

@pajaydev thank you, it's a team effort!

We pretty much have the migration down to the last few and in progress. We're migrating bugs and issues over from the old repos that are still relevant and would absolutely love some help with those!

@pajaydev
Copy link

pajaydev commented Dec 3, 2019

@shellscape Thanks. I will take a look.

@vladshcherbin
Copy link

Hey 👋

In after moving todo list there is "Publish a patch version with the deprecated property added to package.json", however I don't think this property is added.

For example, take node-resolve plugin:

  • from github readme you can find it's deprecated
  • from npm readme you can't see any deprecation because package was not updated and readme is from latest version
  • when you install this plugin, it also doesn't give you any deprecation info

It would be really great to actually have patched versions with deprecation notice 🙏

@shellscape
Copy link
Collaborator Author

@vladshcherbin we'll get there. Npm permissions for a lot of these plugins require author action, and it doesn't always happen fast. We ask for patience.

@shellscape
Copy link
Collaborator Author

@vladshcherbin would you be interested or open to moving rollup-plugin-copy here?

@vladshcherbin
Copy link

@shellscape sure

@mattpilott
Copy link

+1 for rollup-plugin-terser

@shellscape
Copy link
Collaborator Author

@matt3224 I think at this point that @TrySound prefers to keep that project under his personal account, and we respect that decision. That said, we'll always be open to hosting it here.

@wuweiweiwu
Copy link
Member

@vladshcherbin I can help migrate rollup-plugin-copy if you don't mind!

@abdonrd
Copy link

abdonrd commented Apr 18, 2020

There are any news about the @rollup/plugin-copy? Thanks in advance!

@shellscape
Copy link
Collaborator Author

@abdonrd use it at rollup-pugin-copy.

@shellscape
Copy link
Collaborator Author

Babel is migrated. We're done! Huge thank you to everyone that was involved in this effort!

This was referenced Sep 23, 2020
@shellscape shellscape mentioned this issue May 3, 2022
9 tasks
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

No branches or pull requests