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

Fix/cljs update #977

Merged
merged 3 commits into from
Feb 24, 2025
Merged

Fix/cljs update #977

merged 3 commits into from
Feb 24, 2025

Conversation

dpetran
Copy link
Contributor

@dpetran dpetran commented Feb 24, 2025

A collection of cljs fixes from #915

For some reason the regex #":(?!.*:)" was producing a different result on the browser
and in nodejs than on the jvm:

; clj:
(split-address "fluree:memory://testledger")
["fluree:memory" "//testledger"]

; cljs:
(split-address "fluree:memory://testledger")
["fluree" "memory://testledger"]

All the documentation I could find indicates that this regex should in fact work
cross-platform, but for some reason it reliably did not. I have replaced its use with an
alternate implementation that safely avoids the issue.
@dpetran dpetran requested a review from a team February 24, 2025 18:08
Copy link
Contributor

@zonotope zonotope left a comment

Choose a reason for hiding this comment

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

🫃

@dpetran dpetran merged commit ec5667e into main Feb 24, 2025
6 checks passed
@dpetran dpetran deleted the fix/cljs-update branch February 24, 2025 18:11
datetime)))))
:cljs (.getTimeZoneOffset ^js/Date (if (string? x)
(datatype/coerce (:value x) (:datatype-iri x))
x)))))
Copy link
Contributor

Choose a reason for hiding this comment

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

I think above still has an error in it...

If x is a string?, then I don't think (:value x), etc. would work.

Should it be (map? x), or maybe (string? (:value x))?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, it should be (string? (:value x))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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