octokit / octokit.js

The all-batteries-included GitHub SDK for Browsers, Node.js, and Deno.
MIT License
6.83k stars 1k forks source link

[FEAT]: Do we have the CJS version? If not, are we considering supporting CJS? #2668

Closed shen774411223d closed 2 months ago

shen774411223d commented 2 months ago

Describe the need

My project is based on CJS and I want to import octokit.js, but it is not compatible with ESM.

SDK Version

No response

API Version

No response

Relevant log output

No response

Code of Conduct

github-actions[bot] commented 2 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! 🚀

wolfy1339 commented 2 months ago

This package is still CJS, it hasn't moved to ESM yet. It will be the last major version to support CJS

shen774411223d commented 2 months ago

sorry, but i install lastest version. in octokit/core package.json, the type is module. why i install package not cjs? thank you answer!

octokit/core package.json

{
  "type": "module"
}
wolfy1339 commented 2 months ago

That is a different package, and a different repository.

You need to use the last CJS version, which is https://github.com/octokit/core.js/releases/tag/v5.2.0

shen774411223d commented 1 month ago

Thank you very much for your answer. This is exactly the package I want.