Skip to content

Conversation

@wizardlyhel
Copy link

WHY are these changes introduced?

For some reason, certain dates converted to unsigned 32-bit representation doesn't generate a string of 8 characters. This caused Shopify session analytics missing for those dates due to token resulted in an unexpected format.

Screenshot 2023-08-31 at 2 19 11 PM

WHAT is this pull request doing?

HOW to test your changes?

Post-merge steps

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added tests to cover my changes
  • I've added or updated the documentation


return output.padStart(8 - output.length, '0');
// Ensure the output is exactly 8 characters
return output.padStart(8, '0');
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good to me, though it seems to me that whomever is consuming these values should be more defensive?

@wizardlyhel wizardlyhel merged commit 345f06a into main Aug 31, 2023
@wizardlyhel wizardlyhel deleted the hl-fix-shopify-analytics branch August 31, 2023 22:56
juanpprieto pushed a commit that referenced this pull request Sep 17, 2025
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.

2 participants