Skip to content

fix: pin moment-timezone to exact version 0.6.2#6649

Merged
masenf merged 2 commits into
mainfrom
khaleel/pin-moment-timezone
Jun 10, 2026
Merged

fix: pin moment-timezone to exact version 0.6.2#6649
masenf merged 2 commits into
mainfrom
khaleel/pin-moment-timezone

Conversation

@adhami3310

Copy link
Copy Markdown
Member

Summary

Pin the moment-timezone dependency of rx.moment to the exact version 0.6.2 instead of an unpinned specifier, which previously resolved to a caret range (^0.6.2) in generated package.json files. This keeps frontend installs reproducible and consistent with the other pinned JS dependencies.

  • Moment.add_imports now declares moment-timezone@0.6.2 when tz is set
  • Regenerated docs/app/reflex.lock accordingly

@adhami3310 adhami3310 requested review from a team and Alek99 as code owners June 10, 2026 21:11
@greptile-apps

greptile-apps Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR pins moment-timezone to the exact version 0.6.2 in the rx.moment component, replacing the implicit caret range that was previously generated in package.json. The approach is consistent with how other JS dependencies are versioned in this codebase — using Reflex's "package@version" import-key convention, which strips the version for the JS import statement while preserving it for package resolution.

  • Moment.add_imports now emits "moment-timezone@0.6.2" as the import key, which Reflex correctly translates to an exact version pin in package.json and a bare import "moment-timezone" in generated JS.
  • The docs app's package.json and bun.lock are regenerated to match, moving from ^0.6.2 to 0.6.2.

Confidence Score: 5/5

Minimal risk — the change tightens a dependency specifier from a caret range to an exact version with no logic changes.

The Python change uses a well-established Reflex pattern that the framework already handles correctly for both JS import generation and package.json resolution. The lock and manifest files are regenerated consistently. No behavioral change is introduced beyond stricter version pinning.

No files require special attention.

Important Files Changed

Filename Overview
packages/reflex-components-moment/src/reflex_components_moment/moment.py Changed add_imports to use "moment-timezone@0.6.2" as the import key instead of "moment-timezone", pinning the exact version; Reflex strips the @version suffix for the JS import while using it for package.json dependency resolution.
docs/app/reflex.lock/package.json Regenerated to reflect the exact version pin: moment-timezone changed from ^0.6.2 to 0.6.2.
docs/app/reflex.lock/bun.lock Lock file updated to reflect the exact version pin: moment-timezone changed from ^0.6.2 to 0.6.2.

Reviews (1): Last reviewed commit: "add changelog fragment" | Re-trigger Greptile

@codspeed-hq

codspeed-hq Bot commented Jun 10, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 26 untouched benchmarks
⏩ 8 skipped benchmarks1


Comparing khaleel/pin-moment-timezone (5655536) with main (3c3bd91)

Open in CodSpeed

Footnotes

  1. 8 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@masenf masenf merged commit 6a91fbd into main Jun 10, 2026
106 of 107 checks passed
@masenf masenf deleted the khaleel/pin-moment-timezone branch June 10, 2026 21:55
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