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

Remove sprintf third party library #9476

Merged
merged 1 commit into from
Apr 11, 2021
Merged

Conversation

ebogo1
Copy link
Contributor

@ebogo1 ebogo1 commented Apr 8, 2021

This is part of the effort to move third party dependencies to npm (or remove ones that are unneeded like sprintf - #9473

The changes here replace calls to sprintf with String.prototype.padStart(). This PR targets the npm staging branch because IE11 doesn't support this function.

@cesium-concierge
Copy link

Thanks for the pull request @ebogo1!

  • ✔️ Signed CLA found.
  • CHANGES.md was not updated.
    • If this change updates the public API in any way, please add a bullet point to CHANGES.md.
  • ❔ Changes to third party files were made.
    • Looks like a file in one of our ThirdParty folders (ThirdParty/, Source/ThirdParty/) has been added or modified. Please verify that it has a section in LICENSE.md and that its license information is up to date with this new version.
  • ❔ Unit tests were not updated.
    • Make sure you've updated tests to reflect your changes, added tests for any new code, and ran the code coverage tool.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
  • Works (or fails gracefully) in IE11.

second.toString().padStart(2, "0") +
"." +
millisecondStr +
"Z"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if it'd make more sense to wrap these in a separate function - I tried a small wrapper around padStart to avoid all the calls to toString() but since there were only two use cases and both have different syntax it didn't look much cleaner.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with your choice here, we don't really gain anything by string to add a helper function here.

@ebogo1 ebogo1 requested a review from mramato April 8, 2021 21:02
@ebogo1 ebogo1 changed the base branch from master to npm-third-party-staging April 8, 2021 21:07
@mramato
Copy link
Contributor

mramato commented Apr 11, 2021

Thanks @ebogo1!

@mramato mramato merged commit 267b98e into npm-third-party-staging Apr 11, 2021
@mramato mramato deleted the remove-sprintf branch April 11, 2021 16:41
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