replace legacy dependency #23
Conversation
Replace mock.module calls for 'cross-fetch' with direct globalThis.fetch assignments. This simplifies test setup and improves compatibility with modern fetch implementations. Rename resetMockFetchTracking to cleanupMockFetch for clarity and update imports accordingly.
Improve mock fetch cleanup by resetting originalFetch to undefined after restoration. Add guard to prevent overwriting originalFetch on subsequent calls. Wrap manual fetch mocks in try-finally blocks to ensure proper cleanup. Simplify variable declarations in mock fetch setup.
Add automated changelog version updates to the release workflow. The workflow now updates the CHANGELOG.md version string to match the new package version during releases. This ensures the changelog stays synchronized with package.json and reduces manual version management errors. The git commit now includes both package.json and CHANGELOG.md files.
refactor: replace cross-fetch mocks with globalThis.fetch
Remove manual-testing.md and manual-validation.js files as these testing guides and scripts are no longer maintained or needed for the current development workflow. These files contained outdated curl commands and SDK smoke test examples that have been superseded by automated testing infrastructure.
docs: remove manual testing documentation
Confidence Score: 4/5Safe to merge after fixing the sed range issue in the release workflow. The core cross-fetch → native fetch migration is correct and well-tested. One P1 defect exists: the CHANGELOG sed command will corrupt historical entries on the second release. .github/workflows/release.yml – the sed substitution needs a 0,/pattern/ range guard.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c3c56db995
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| run: npm version $VERSION --no-git-tag-version | ||
|
|
||
| - name: Update CHANGELOG version | ||
| run: sed -i "s/^## [0-9]\+\.[0-9]\+\.[0-9]\+/## $VERSION/" CHANGELOG.md |
There was a problem hiding this comment.
Limit changelog version bump to the latest entry
The sed command currently replaces every matching ## x.y.z heading in CHANGELOG.md, so once the changelog has more than one release section, running this workflow rewrites historical headings to the new $VERSION as well. This silently corrupts version history (e.g., multiple sections end up labeled with the same version) and can produce misleading changelog/release metadata; the substitution should target only the first matching heading.
Useful? React with 👍 / 👎.
chore: replace legacy dependency and update to build in node fetch