Closed manchicken closed 5 months ago
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs
. You & others like you are the reason all of this works! So thank you & happy coding! 🚀
This is expected. This package has migrated to only ESM.
- "@octokit/plugin-paginate-rest": "^9.1.5", - "@octokit/plugin-rest-endpoint-methods": "^10.2.0", - "@octokit/plugin-throttling": "^8.1.3", - "@octokit/rest": "^20.0.2", + "@octokit/plugin-paginate-rest": "^11.3.0", + "@octokit/plugin-rest-endpoint-methods": "^13.2.1", + "@octokit/plugin-throttling": "^9.3.0", + "@octokit/rest": "^20.1.1",
you shouldn't need to import the paginate and rest endpoint methods plugins, they are all included in @octokit/rest
:
https://github.com/octokit/rest.js/blob/main/src/index.ts
Just update @octokit/plugin-throttling
, but stay below v9 which migrated to ESM
This is expected. This package has migrated to only ESM.
That's disappointing. This breaks a bunch of stuff.
Every major version contains breaking changes. Updating without reading the release notes is bad
Unfortunately, this is the way the ecosystem is going, and has been a direction we were planning to pursue for a while
you shouldn't need to import the paginate and rest endpoint methods plugins, they are all included in
@octokit/rest
: https://github.com/octokit/rest.js/blob/main/src/index.ts
I'll look into that.
Just update
@octokit/plugin-throttling
, but stay below v9 which migrated to ESM
I don't think they've so much migrated to ESM so much as they've just made the choice to require their users to do so.
We have to migrate to ESM as the ecosystem is migrating to ESM. You should upgrade as well in order to avoid to get stuck with dependencies that have known security problems.
Your last comment confusing and unnecessarily confrontational. I understand the ESM transition is causing friction like it does for everyone.
If you are stuck with CommonJS for a while, that's ok. We will backport security fixes to the older versions, and you are free to submit pull requests against these older versions.
We have to migrate to ESM as the ecosystem is migrating to ESM. You should upgrade as well in order to avoid to get stuck with dependencies that have known security problems.
Why do y'all keep saying that the ecosystem is migrating to ESM when most major modules still support CJS, and all major runtimes still maintain support for CJS? While I understand some folks have a preference for one over the other, I haven't seen anybody adopting the stance that this project now is.
What happened?
I just upgraded, and it looks like the updated version (13.2.1) breaks compatibility with CommonJS
require()
.This line of code:
Results in this exception:
Typically modules like this would have a version which is suitable for both ESM and CJS, and this used to have that (in 10.2.0).
Versions
I'm on Node v22.2.0, and here's the diff in the
package-lock.json
:Relevant log output
No response
Code of Conduct