Skip to content
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

refactor: request headers include x-nacelle-sdk-version #385

Merged

Conversation

NWRichmond
Copy link
Contributor

@NWRichmond NWRichmond commented May 1, 2023

Why are these changes introduced?

Addresses ENG-9576

Send package version in 'x-nacelle-sdk-version' header

What is this pull request doing?

  1. Adds an x-nacelle-sdk-version header to requests. This matches @nacelle/storefront-sdk@1.x behavior.
  2. Moves the handling of endpoint query params and headers to new static methods. This allows us to simplify the constructor and the setConfig method.

How to Test

  1. Check out the ENG-9576/send-package-version-in-x-nacelle-sdk-version-header branch
  2. Navigate to packages/storefront-sdk
  3. npm run build - the package should build without errors
  4. npm run coverage - all test should pass with 100% coverage

Checklist

  • This Pull Request aligns with nacelle-js' Code of Conduct.
  • You can follow your own "How to Test" instructions and get the expected result.
  • Created a changeset (if the change should appear in a changelog).

@NWRichmond NWRichmond requested a review from KrisQ May 1, 2023 14:27
@changeset-bot
Copy link

changeset-bot bot commented May 1, 2023

🦋 Changeset detected

Latest commit: 3f84197

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

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

@vercel
Copy link

vercel bot commented May 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nacelle-gatsby-reference-store ✅ Ready (Inspect) Visit Preview May 1, 2023 2:28pm
nacelle-gatsby-starter ✅ Ready (Inspect) Visit Preview May 1, 2023 2:28pm
nacelle-next-reference-store ✅ Ready (Inspect) Visit Preview May 1, 2023 2:28pm
nacelle-next-starter ✅ Ready (Inspect) Visit Preview May 1, 2023 2:28pm
nacelle-nuxt-reference-store ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 1, 2023 2:28pm
nacelle-nuxt-starter ✅ Ready (Inspect) Visit Preview May 1, 2023 2:28pm

Copy link
Contributor

@KrisQ KrisQ left a comment

Choose a reason for hiding this comment

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

Looks good!

@NWRichmond NWRichmond merged commit f3a05ca into main May 1, 2023
@NWRichmond NWRichmond deleted the ENG-9576/send-package-version-in-x-nacelle-sdk-version-header branch May 1, 2023 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants