You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feat: Expose a way to pass in custom fetch function (@W-19973347@) (#246)
* expose way to pass in custom fetch function
* add unit test
* update README
* update CHANGELOG.md
* remove unused import
* bump size
* update fetch implementation
* fix unit test
* update tests
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
### Enhancements
6
6
7
-
-Use native node fetch available in node 18+ instead of `node-fetch` polyfill [#214](https://github.com/SalesforceCommerceCloud/commerce-sdk-isomorphic/pull/214)
7
+
-Allow developers to pass in custom fetch implementation via `clientConfig`[#246](https://github.com/SalesforceCommerceCloud/commerce-sdk-isomorphic/pull/246)
8
8
- Support subpath imports for individual APIs and named imports [#219](https://github.com/SalesforceCommerceCloud/commerce-sdk-isomorphic/pull/219)
**Note:** While subpath imports reduce initial bundle size, using them for all APIs will result in a larger total bundle size due to duplicated dependencies required for standalone operation.
151
151
152
+
#### Custom Fetch function
153
+
154
+
You can provide your own custom fetch function to intercept, log, or modify all SDK requests. This is useful for:
155
+
-**Request/Response Logging**: Track all API calls for debugging and monitoring
You can configure how the SDK makes requests using the `fetchOptions`parameter. It is passed to [node-fetch](https://github.com/node-fetch/node-fetch/1#api) on the server and [whatwg-fetch](https://github.github.io/fetch/) on browser.
**NOTE: In the next major version release, path parameters will be single encoded by default**
342
381
382
+
## Unstable Releases
383
+
384
+
**⚠️ Important: Unstable/preview releases are experimental and not officially supported.**
385
+
386
+
Preview releases (e.g., preview, unstable, or pre-release versions) are provided for experimental purposes and early testing of upcoming features. These releases:
387
+
388
+
- **Are not intended for production use** - Do not use unstable releases in production environments
389
+
- **May contain breaking changes** - API signatures, behavior, and structure may change without notice
390
+
- **Are not officially supported** - No support, bug fixes, or security patches are guaranteed
391
+
- **May have incomplete features** - Functionality may be partially implemented or subject to change
392
+
393
+
**Use stable releases for production applications.** Only use unstable releases for:
394
+
- Testing upcoming features in development environments
395
+
- Providing feedback on new functionality before official release
396
+
- Experimental integrations that are not mission-critical
397
+
398
+
For production deployments, always use the latest stable release version available on npm.
399
+
343
400
## License Information
344
401
345
402
The Commerce SDK Isomorphic is licensed under BSD-3-Clause license. See the [license](./LICENSE.txt) for details.
0 commit comments