Remove node-fetch fallback and drop CJS support#641
Conversation
- Removed node-fetch from optionalDependencies and @types/node-fetch from devDependencies. - Refactored src/sagiri.ts to use native fetch and removed legacy fallback logic. - Dropped CommonJS (CJS) support, making the library ESM-only. - Updated package.json exports and removed Node.js specific scripts. - Deleted CJS test file test/node/commonjs.test.cjs. - Cleaned up unused devDependencies (mocha, nyc). - Updated CHANGELOG.md for version 4.3.0. Co-authored-by: sr229 <14976516+sr229@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Fixed Deno type check errors by using type-only import for IResult in util.ts. - Added Deno namespace reference to Deno tests. - Updated GitHub Actions test-node job to use bun for coverage instead of removed coverage:nodejs. Co-authored-by: sr229 <14976516+sr229@users.noreply.github.com>
The test-node job was failing because it tried to run `bun run coverage` without having Bun installed in that job's environment. Added `oven-sh/setup-bun@v2` to the `test-node` job. Co-authored-by: sr229 <14976516+sr229@users.noreply.github.com>
Since we are no longer running Node.js specific tests (dropped CJS/mocha), the `test-node` job was redundant and actually incorrect as it tried to use `bun`. We now rely on `test-bun` and `test-deno` jobs. - Removed `test-node` job from `.github/workflows/test.yml`. - Removed empty `test/node` directory. Co-authored-by: sr229 <14976516+sr229@users.noreply.github.com>
This PR removes the legacy
node-fetchfallback and drops CommonJS (CJS) support, as the latest Node.js LTS versions now natively support the Fetch API. The library is now ESM-only and has a leaner code base.Key changes:
node-fetchand@types/node-fetchdependencies.src/sagiri.tsto use the globalfetchAPI.mainfield andrequireexport frompackage.json.test/node/commonjs.test.cjs.CHANGELOG.mdwith version 4.3.0 notes.PR created automatically by Jules for task 4499436934085221465 started by @sr229