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

WIP: rollup-plugin-node-builtins #51

Closed
wants to merge 2 commits into from

Conversation

wuweiweiwu
Copy link
Member

Rollup Plugin Name: rollup-plugin-node-builtins

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:
calvinmetcalf/rollup-plugin-node-builtins#58

Description

@shellscape
Copy link
Collaborator

@wuweiweiwu for plugins that are already in the Rollup org (e.g. github.com/rollup/xxxx), this is not a concern. But you should have a conversation with @calvinmetcalf before beginning the process, as it's completely and totally up to them if they'd like their plugin to move to the monorepo. If they would, they'll have to initiate it as we have to relicense it to the org.

@shellscape
Copy link
Collaborator

I just realized that this plugin is on our list in #2. This probably got pulled into the list from scraping the repository list and finding https://github.com/rollup/rollup-plugin-node-builtins, which is an empty repo. We'll still need to get buy-in from @calvinmetcalf to do this move, as they own the repo the plugin actually points to.

@wuweiweiwu
Copy link
Member Author

I see. Makes sense. Will communicate with @calvinmetcalf!

@shellscape
Copy link
Collaborator

@wuweiweiwu after some lengthy discussion and review of node-builtins and node-globals, the best course of action here is going to be to roll something ourselves. rollup-plugin-node-polyfills has a lot of promise, but that project's author has gone silent as well. If you'd like, I would be happy to keep you involved in the next steps.

For now, we're going to close this one. Thanks for your work getting it to this point.

@shellscape shellscape closed this Dec 9, 2019
@wuweiweiwu
Copy link
Member Author

@shellscape i would love that!

@FredKSchott
Copy link
Contributor

@shellscape any updates? We're looking into this as well for Snowpack and are having trouble with the existing plugin having out of date deps (~3 years since last update). We may be able to collaborate on building this for the Rollup org if there's still interest on your end.

@shellscape
Copy link
Collaborator

shellscape commented Feb 3, 2020

@FredKSchott rollup-plugin-node-polyfills is our best bet but I personally haven't been able to get anywhere with the owners on getting that into the rollup org. Everyone in the org is keen on the idea.

Forking that project to the rollup org would be another option if you all are interested in helping to maintain it. Would be a huge boost to the community.

@rreusser
Copy link

Any thoughts on this? This would be helpful, except there's an issue that currently seems to prevent rollup-plugin-node-polyfills from working, and I always hate to publish duplicate packages on my own namespaces for fixes that can't get merged into the official project. I have the availability to help make this happen, but it seems like perhaps as much of an administrative issue as a technical issue.

@FredKSchott
Copy link
Contributor

We are close to rolling our own fork of this for Snowpack. We have the resources to maintain it at least in the short/medium term until Rollup team feels they can take this on as an official plugin

@shellscape
Copy link
Collaborator

shellscape commented Dec 16, 2020

@FredKSchott we're willing to adopt it out of the gate, provided we've got a few folks dedicated to maintaining it. The issue with the plugins that do exist for this is that there's heavy enthusiasm and involvement early on, and they inevitably get dropped by maintainers for their heavy burden.

@FredKSchott
Copy link
Contributor

It's pretty instrumental for Snowpack's "migrate an old app with old packages to Snowpack" story, so our incentives are definitely aligned to help maintain more long term. But, one nice thing about us owning our own fork is that we could scope our support for the frontend usecase.

Maybe let us start our fork, and then check back in in a few months to see if we're still being good stewards / long term maintainers? Happy to transfer it over to the official org at that point

@shellscape
Copy link
Collaborator

@FredKSchott sounds like a good plan. please keep us posted, as I'd like to replace all of the links to the defunct attempts whenever it's remotely ready.

@FredKSchott
Copy link
Contributor

repo created and npm package published: https://github.com/snowpackjs/rollup-plugin-polyfill-node

Haven't fully tested this yet, but that's where work will continue. Updated all deps and fixed some some quick errors in the ionic polyfill.

@lukastaegert
Copy link
Member

Nice one. Once you feel good about the quality of your fork, we can update the Rollup docs to reference it instead of the ionic one https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency

@FredKSchott
Copy link
Contributor

Bump! saw the activity over in rollup/rollup#2881 and got pinged on twitter. I'm feeling good about where the plugin is now, and would be happy to move into the Rollup org if there's interest.

@juergba
Copy link

juergba commented Jul 2, 2021

Has there been any decision made? Which plugin finally is the recommended one:

  • rollup-plugin-polyfill-node
  • rollup-plugin-node-polyfills

@eliot-akira
Copy link

@juergba I recently spent some time figuring this out, so here is the answer: rollup-plugin-polyfill-node is the updated and maintained fork of rollup-plugin-node-polyfills, which is still being recommended in the Rollup documentation (rollup/rollup#2881).

@FredKSchott Thank you for the work on the updated fork!

I think all new users of Rollup who happen to need Node.js polyfills will appreciate if the new fork could be moved into the Rollup org as an official plugin - and also the docs updated to recommend it, since the other one has deprecated dependencies and other unaddressed issues.

@mercmobily
Copy link

It took me half an hour to figure out that this is "the" plugin... please do incorporate into rollup!

@FredKSchott
Copy link
Contributor

I'm doing my best to keep https://www.npmjs.com/package/rollup-plugin-polyfill-node up to date, but my time is limited and I'm only able to review and merge open PRs once every few months.

I'd love to see this merged into the official Rollup repo, now that its had time to bake.

cc @shellscape @lukastaegert

@shellscape
Copy link
Collaborator

I'd love to have it here. We face the same issues though; we only have a handful of transient maintainers, and lack funding for those of us who are willing but can't justify the time against paying gigs. Basically all of our current funding is to support Lukas on rollup core (and we're all more than happy to allocate it for him). We've had people step up to be the defacto maintainers of packages in the past, but they invariably get pulled away and fall off the radar. I do think funding would help those of us who are willing, but it's a bit of a race condition.

@FredKSchott
Copy link
Contributor

Of course, and to be clear I'm happy to keep maintaining with the time that I do have.

@mercmobily
Copy link

My humble 2c... the module seems to be the way forward regardless. Fred will presumably allocate the same amount of time for it, whether it's on his own repo or it's in rollup. The only practical difference at this stage between being part of @rollup or not is that people will find it harder to find it...

(Plus, I see there are 12 issues open. I would have loved to jump in and go through those, although I really, really don't know Rollup at all... but maybe we can look for funding to get those looked at?)

@dmnsgn
Copy link

dmnsgn commented Nov 9, 2023

I'm doing my best to keep https://www.npmjs.com/package/rollup-plugin-polyfill-node up to date, but my time is limited and I'm only able to review and merge open PRs once every few months.

I'd love to see this merged into the official Rollup repo, now that its had time to bake.

cc @shellscape @lukastaegert

This might have fallen off the radar as low priority (or understandably time constraints) so I am asking if it is still the plan to merge it into rollup/plugins? It might help keeping it up to date in the next major release of Rollup as at the moment the peerDependencies haven't been updated to rollup 4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants