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(Timestamp) - timestamp can be f64, u64 or string #9

Merged
merged 2 commits into from
Mar 5, 2025

Conversation

nudded
Copy link
Contributor

@nudded nudded commented Mar 5, 2025

No description provided.

@nudded nudded force-pushed the fix-timestamp-value-parsing branch from 4881628 to f68bb43 Compare March 5, 2025 11:55
@nudded nudded requested a review from Copilot March 5, 2025 13:47
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

PR Overview

This PR implements support for multiple timestamp formats (f64, u64, or string) by updating the conversion logic and tests across Rust and Ruby components, and it bumps the version of the packages.

  • Added a new From implementation for ExpressionValue.
  • Modified Event.timestamp to use PropertyValue instead of a raw u64 and added From conversion.
  • Updated tests and package versions in JavaScript and Ruby integrations.

Reviewed Changes

File Description
expression-core/src/evaluate.rs Adds conversion from PropertyValue to ExpressionValue and updates timestamp handling.
expression-core/src/event.rs Changes Event.timestamp to PropertyValue, adds From impl, and updates tests.
expression-js/Cargo.toml Bumps package version.
expression-core/Cargo.toml Bumps package version.
expression-ruby/lib/lago-expression.rb Bumps gem version.
expression-js/src/lib.rs Updates timestamp conversion for the JS binding.
expression-ruby/ext/lago_expression/src/lib.rs Updates timestamp conversion for the Ruby extension.
expression-ruby/lago-expression.gemspec Bumps gem version.

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

@jdenquin
Copy link
Contributor

jdenquin commented Mar 5, 2025

Just for my knowledge, we now ensure that we support conversion from String that can be an Integer or a Float right?

@nudded
Copy link
Contributor Author

nudded commented Mar 5, 2025

Just for my knowledge, we now ensure that we support conversion from String that can be an Integer or a Float right?

Yes indeed.

@nudded nudded merged commit 2b4d5a3 into main Mar 5, 2025
2 checks passed
@nudded nudded deleted the fix-timestamp-value-parsing branch March 5, 2025 14:04
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