Skip to content

Conversation

@WojtekTheWebDev
Copy link
Collaborator

@WojtekTheWebDev WojtekTheWebDev commented Feb 22, 2024

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme or JSDoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Fix the issue with extensions and new module.
Additionally, rename getHttpClient into getRequestSender to avoid conflicts.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@WojtekTheWebDev WojtekTheWebDev requested a review from a team as a code owner February 22, 2024 13:02
@changeset-bot
Copy link

changeset-bot bot commented Feb 22, 2024

🦋 Changeset detected

Latest commit: 212aa87

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@vue-storefront/sdk Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Base automatically changed from refactor/IN-3860-tsdocs to feat/moduleFromEndpoints March 5, 2024 08:44
* Generates a `RequestSender` function configured according to the provided options.
*
* @remarks
* This function abstracts away the details of constructing request URLs, merging configurations,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just link to the RequestSender interface docs? I feel like you're repeating here what you've just written there

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imo this function might be used directly by the developers so it would be good to have it in here as well :)

Co-authored-by: Łukasz Śliwa <39009379+lsliwaradioluz@users.noreply.github.com>
@WojtekTheWebDev WojtekTheWebDev merged commit a6a7d3d into feat/moduleFromEndpoints Mar 6, 2024
@WojtekTheWebDev WojtekTheWebDev deleted the fix/IN-3860-extensions branch March 6, 2024 08:47
WojtekTheWebDev added a commit that referenced this pull request Mar 11, 2024
* refactor: rename module dir to modules

* feat: new SDK module - moduleFromEndpoints

* Update packages/sdk/src/__tests__/integration/modules/moduleFromEndpoints.spec.ts

Co-authored-by: Tomasz Góral <tomasz.gl69@gmail.com>

* feat: HTTP Client for moduleForEndpoints (#7053)

* feat: default behaviour of HTTP Client

* remove isomorphic-fetch from depts

* full implementation of HTTP client

* test: update tests based on the review

* fix issue with URL class and urls as paths

* add test for axios

* add computed headers to http client

* update tsdocs

* feat: add customizable error handler (#7054)

* feat: default behaviour of HTTP Client

* remove isomorphic-fetch from depts

* full implementation of HTTP client

* feat: add customizable error handler

* await error handler

* update error handler due to feedback

* update tsdocs

* refactor default http client

* use unknown instead of any

* add method name to error handler

* update tsdocs

* apply review suggestions

* refactor: simplification & improve tsdocs (#7055)

* feat: default behaviour of HTTP Client

* remove isomorphic-fetch from depts

* full implementation of HTTP client

* feat: add customizable error handler

* await error handler

* refactor: improve tsdocs

* test non-object params

* add comment

* add module types to api extractor

* fix: issue with custom methods in new module (#7056)

* feat: default behaviour of HTTP Client

* remove isomorphic-fetch from depts

* full implementation of HTTP client

* feat: add customizable error handler

* await error handler

* refactor: improve tsdocs

* fix: issue with custom methods in new module

* test: additonal tests

* fix issue with losing tsdocs

* rename file

* missing import

* include credentials

* Update packages/sdk/src/modules/moduleFromEndpoints/types.ts

Co-authored-by: Łukasz Śliwa <39009379+lsliwaradioluz@users.noreply.github.com>

---------

Co-authored-by: Łukasz Śliwa <39009379+lsliwaradioluz@users.noreply.github.com>

* update tsdocs

* rename module to middlewareModule

---------

Co-authored-by: Tomasz Góral <tomasz.gl69@gmail.com>
Co-authored-by: Łukasz Śliwa <39009379+lsliwaradioluz@users.noreply.github.com>
WojtekTheWebDev added a commit that referenced this pull request Mar 12, 2024
* refactor: rename module dir to modules

* feat: new SDK module - moduleFromEndpoints

* feat: default behaviour of HTTP Client

* remove isomorphic-fetch from depts

* full implementation of HTTP client

* feat: add customizable error handler

* await error handler

* refactor: improve tsdocs

* fix: issue with custom methods in new module

* test: additonal tests

* fix issue with losing tsdocs

* prerelease

* fix header type

* revert last fix

* chore: bump package

* refactor: use moduleFromEndpoints in next

* refactor: update shared

* refactor: update nuxt package

* refactor: easeier setup

* chore: fix version

* Update packages/sdk/src/__tests__/integration/modules/moduleFromEndpoints.spec.ts

Co-authored-by: Tomasz Góral <tomasz.gl69@gmail.com>

* feat: HTTP Client for moduleForEndpoints (#7053)

* feat: default behaviour of HTTP Client

* remove isomorphic-fetch from depts

* full implementation of HTTP client

* test: update tests based on the review

* fix issue with URL class and urls as paths

* add test for axios

* add computed headers to http client

* update tsdocs

* feat: add customizable error handler (#7054)

* feat: default behaviour of HTTP Client

* remove isomorphic-fetch from depts

* full implementation of HTTP client

* feat: add customizable error handler

* await error handler

* update error handler due to feedback

* update tsdocs

* refactor default http client

* use unknown instead of any

* add method name to error handler

* update tsdocs

* apply review suggestions

* refactor: simplification & improve tsdocs (#7055)

* feat: default behaviour of HTTP Client

* remove isomorphic-fetch from depts

* full implementation of HTTP client

* feat: add customizable error handler

* await error handler

* refactor: improve tsdocs

* test non-object params

* add comment

* add module types to api extractor

* fix: issue with custom methods in new module (#7056)

* feat: default behaviour of HTTP Client

* remove isomorphic-fetch from depts

* full implementation of HTTP client

* feat: add customizable error handler

* await error handler

* refactor: improve tsdocs

* fix: issue with custom methods in new module

* test: additonal tests

* fix issue with losing tsdocs

* rename file

* missing import

* include credentials

* Update packages/sdk/src/modules/moduleFromEndpoints/types.ts

Co-authored-by: Łukasz Śliwa <39009379+lsliwaradioluz@users.noreply.github.com>

---------

Co-authored-by: Łukasz Śliwa <39009379+lsliwaradioluz@users.noreply.github.com>

* bump version

* use new version

* refactor: use getRequestHeaders naming for both nuxt and next

* update tsdocs

* rename module to middlewareModule

* bump sdk package

* use middlewareModule naming

* use strict mode in storefront packages

* deprecate getCookieHeader

* refactor

* first try to fix the yarn.lock

* add prettier

* revert

* update sdk package

* exit pre mode and refactor

* add prettier

* add changelogs and bump packages

* apply review suggestions

* apply review suggestions pt2

---------

Co-authored-by: Tomasz Góral <tomasz.gl69@gmail.com>
Co-authored-by: Łukasz Śliwa <39009379+lsliwaradioluz@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants