-
Notifications
You must be signed in to change notification settings - Fork 33
Fix TypeScript errors for @wordpress/api-fetch 7.36.0 type changes #3875
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
Fix TypeScript errors for @wordpress/api-fetch 7.36.0 type changes #3875
Conversation
Bumps [@wordpress/api-fetch](https://github.com/WordPress/gutenberg/tree/HEAD/packages/api-fetch) from 7.29.0 to 7.36.0. - [Release notes](https://github.com/WordPress/gutenberg/releases) - [Changelog](https://github.com/WordPress/gutenberg/blob/trunk/packages/api-fetch/CHANGELOG.md) - [Commits](https://github.com/WordPress/gutenberg/commits/@wordpress/[email protected]/packages/api-fetch) --- updated-dependencies: - dependency-name: "@wordpress/api-fetch" dependency-version: 7.36.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. Comment |
22cae1c to
b84bc07
Compare
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
dd0a080
into
dependabot/npm_and_yarn/wordpress/api-fetch-7.36.0
Description
Fixes TypeScript build errors introduced by the
@wordpress/api-fetchupgrade from 7.29.0 to 7.36.0.The new version parameterizes
APIFetchOptionswith a genericParsetype to distinguish between:APIFetchOptions<true>- parsed JSON responses (default)APIFetchOptions<false>- rawResponseobjectsChanges:
base-provider.tsx: Cast toAPIFetchOptions<true>when callingapiFetchfor parsed responsesbase-wordpress-provider.tsx: Cast toAPIFetchOptions<false>when callingapiFetchwithparse: falseType assertions are used instead of changing method signatures to maintain class inheritance compatibility between
BaseProviderandBaseWordPressProvider.Motivation and context
Bumps @wordpress/api-fetch from 7.29.0 to 7.36.0.
The upgrade caused build failures due to stricter typing of the
APIFetchOptionsinterface.How has this been tested?
npm run buildnpm run test:unitnpm run lint:jsScreenshots (if appropriate)
N/A - no UI changes
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.