rudder-sdk-js
rudder-sdk-js copied to clipboard
feat: add utility to generate integration common names automatically
Description of the change
Added a utility to auto-generate the generic common names for an integration given its display name. For integrations where this default common names map is not enough, we can still define additional entries in the CNameMapping object in constants.js.
The default common name mapping is built by converting the display name to lowercase. Hence, when comparing any name from the integrations object, it is also first converted to lowercase.
This feature has two benefits:
- Reduced SDK size
- Less error prone w.r.t common names map definition.
It is currently implemented as an example for the "Adobe Analytics" destination.
Type of change
- [ ] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Related issues
Fix #1
Checklists
Development
- [ ] Lint rules pass locally
- [ ] The code changed/added as part of this pull request has been covered with tests
- [ ] All tests related to the changed code pass in development
Code review
- [ ] This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
- [ ] "Ready for review" label attached to the PR and reviewers mentioned in a comment
- [ ] Changes have been reviewed by at least one other engineer
- [ ] Issue from task tracker has a link to this pull request