Skip to content

Conversation

@cloudinary-pkoniu
Copy link
Contributor

Brief Summary of Changes

Previously added urlAnalytics is not consistent with the naming convention we had so far in the repo. I added analytics side by side. If someone used urlAnalytics earlier and is also using analytics, the older takes precedence.

What Does This PR Address?

  • GitHub issue (Add reference - #XX)
  • Refactoring
  • New feature
  • Bug fix
  • Adds more tests

Are Tests Included?

  • Yes
  • No

Reviewer, Please Note:

techVersion: techVersionDefault,
product: productDefault
} = getSDKVersions();
const sdkCode = ensureOption(options, 'sdkCode', ensureOption(options, 'sdk_code', sdkCodeDefault));
Copy link

@const-cloudinary const-cloudinary Jul 16, 2024

Choose a reason for hiding this comment

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

@cloudinary-pkoniu Maybe it's worth introducing a new helper function, like ensureOptionWithFallback or something like that. Or make this function more generic, instead of single name to get a list of names.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it'd be more like "ensureOptionWithFallbackWithFallback", I can try to see if function currying accomplishes the same thing and is readable but for now let's merge and have that released

Choose a reason for hiding this comment

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

it's approved from my side, let's see what @magdakwiecien says

Copy link
Contributor

Choose a reason for hiding this comment

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

I see no problem in "nesting" it like this, I understood how it works quickly, IMO it's even better to use composition here instead of introduce additional helpers.

@cloudinary-pkoniu cloudinary-pkoniu merged commit cb6acab into master Jul 16, 2024
@cloudinary-pkoniu cloudinary-pkoniu deleted the fix/url-analytics-property-name branch July 16, 2024 15:01
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.

4 participants