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

feat: parse monthlyUsage.dailyServiceUsages[].date as Date #519

Merged
merged 3 commits into from
Feb 23, 2024

Conversation

tobice
Copy link
Contributor

@tobice tobice commented Feb 22, 2024

This field does not end with "At", which means it is ignored by the existing parseDateFields helper. This PR adjusts this helper to support parsing other fields as well.

To avoid accidental braking changes by applying the new parser on all existing data structures, the helper now has a new optional shouldParseField() param to identify other fields to be parsed. Without this param, the helper behaves just like before.

The actual user-facing change (typeof monthlyUsage.dailyServiceUsages[].date === Date) was tested manually and will be covered by the integration tests in apify-core.

This field does not end with "At", which means it is ignored by the
existing parseDateFields helper. This PR adjusts this helper to
support parsing other fields as well.

To avoid accidental braking changes by applying the new parser on all
existing data structures, the helper now has a new optional
shouldParseField() param to identify other fields to be parsed. Without
this param, the helper behaves just like before.
@github-actions github-actions bot added this to the 83rd sprint - Platform team milestone Feb 22, 2024
@github-actions github-actions bot added t-platform Issues with this label are in the ownership of the platform team. tested Temporary label used only programatically for some analytics. labels Feb 22, 2024
@tobice tobice requested review from B4nan and jirimoravcik February 22, 2024 17:03
@tobice
Copy link
Contributor Author

tobice commented Feb 23, 2024

I can see a 👍 from B4nan and an approval from Jirka, so resolving and merging to get unblocked 😊

Feel free to leave more feedback and I'll fix it in follow-up PRs.

@tobice tobice merged commit 980d958 into master Feb 23, 2024
6 checks passed
@tobice tobice deleted the tobik/feat/parse-date-as-date-in-daily-usage branch February 23, 2024 10:37
@drobnikj drobnikj added the validated Issues that are resolved and their solutions fulfill the acceptance criteria. label Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-platform Issues with this label are in the ownership of the platform team. tested Temporary label used only programatically for some analytics. validated Issues that are resolved and their solutions fulfill the acceptance criteria.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants