Skip to content

refactor: move money and nested value helpers to core - #1888

Open
gabrielseco wants to merge 2 commits into
chore/pnpm-workspace-core-packagefrom
refactor/core-money-and-nested-value-helpers
Open

gabrielseco wants to merge 2 commits into
chore/pnpm-workspace-core-packagefrom
refactor/core-money-and-nested-value-helpers

Conversation

@gabrielseco

@gabrielseco gabrielseco commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Moves four small, dependency-free helpers into the private core package. Behavior and the public API of @remoteoss/remote-flows are unchanged.

Why

Phase 2 of the Angular support plan (#1833) moves framework-neutral code into core in small refactor PRs. These are the leaf helpers with no framework or heavy-library dependencies, so they are the safest first move, and they are the first real code to go through the core package.

Stacked on #1887.

What changed

Toggle details
  • New packages/core/src/money.ts: round, convertToCents, convertFromCents, moved as they were.
  • New packages/core/src/object.ts: getNestedValue, moved as it was.
  • src/components/form/utils.ts and src/lib/utils.ts import and re-export them, so every existing import path keeps working. convertFromCents is still exported from src/index.tsx.
  • The two modules imported each other (getNestedValue and convertFromCents); this removes that dependency for these functions.
  • No test changes. The existing tests pass as they were.
  • Checked on a production build: no reference to the core package is left in the built JS or .d.ts files, and the public convertFromCents declaration is inlined.
  • Public API: no change.

Screenshots

N/A

Related Resources

Testing

Existing tests, unchanged: pnpm run type-check and the full vitest suite (132 files, 1726 tests) pass locally.

  • Tested against the example/ app in a browser
  • Feature flag: N/A

Note

Low Risk
Mechanical move and re-export of existing helpers with no logic changes; risk is limited to build/import wiring for the new core package.

Overview
Centralizes shared money helpers (round, convertToCents, convertFromCents) and object helper getNestedValue in the @remoteoss/remote-flows-core package instead of defining them in app modules.

Updates src/components/form/utils.ts and src/lib/utils.ts to import these helpers from core and re-export them where needed, so existing consumer import paths and behavior stay the same while removing the prior local implementations and the cross-module dependency between those files for these functions.

This is a structural refactor preparing framework-neutral utilities for reuse (e.g. Angular) with no intended API or runtime behavior change for @remoteoss/remote-flows consumers.

Reviewed by Cursor Bugbot for commit 400d93c. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

📦 Bundle Size Report

Metric Current Previous Change Status
Total (gzip) 246.81 kB 246.23 kB +585 B (+0.2%) 🔴
Total (raw) 679.72 kB 679.32 kB +403 B (+0.1%) 🔴
CSS (gzip) 22.03 kB 22.03 kB 0 B (0%) 🟢
CSS (raw) 114.89 kB 114.89 kB 0 B (0%) 🟢

Size Limits

  • ✅ Total gzipped: 246.81 kB / 350 kB (70.5%)
  • ✅ Total raw: 679.72 kB / 850 kB (80.0%)
  • ✅ CSS gzipped: 22.03 kB / 25 kB (88.1%)

Largest Files (Top 5)

  1. index.esm-wIkXrqU6.js - 11.4 kB (0 B (0%))
  2. styles.css - 11.02 kB (0 B (0%))
  3. index.css - 11.02 kB (0 B (0%))
  4. internals-CKEaMFOL.js - 6.14 kB (new)
  5. hooks-D6zhd6Av.js - 5.78 kB (new)
View All Files (317 total)
File Size (gzip) Change
index.esm-wIkXrqU6.js 11.4 kB 0 B (0%)
styles.css 11.02 kB 0 B (0%)
index.css 11.02 kB 0 B (0%)
internals-CKEaMFOL.js 6.14 kB new
hooks-D6zhd6Av.js 5.78 kB new
index.js 5.65 kB +22 B (+0.4%)
sdk.gen-D_5dqKZ5.js 5.63 kB 0 B (0%)
flows/Onboarding/hooks.js 4.68 kB +8 B (+0.2%)
FieldSetField-DA_zSUDs.js 4.57 kB new
EstimationResults-Deu8BcUd.js 3.78 kB new

✅ Bundle size check passed

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview for adp-cost-calculator ready!

Project:adp-cost-calculator
Status: ✅  Deploy successful!
Preview URL:https://adp-cost-calculator-2na50yvsl-remotecom.vercel.app
Latest Commit:400d93c

Deployed with vercel-action

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview for remote-flows ready!

Project:remote-flows
Status: ✅  Deploy successful!
Preview URL:https://remote-flows-hlxmg4zlj-remotecom.vercel.app
Latest Commit:400d93c

Deployed with vercel-action

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage Report

⚠️ Coverage decreased

Metric Current Previous Change Status
Lines 90.29% 90.29% 0% ⚪
Statements 90.17% 90.17% 0% ⚪
Functions 89.16% 89.19% -0.03% 🔴
Branches 81.89% 81.89% 0% ⚪

Detailed Breakdown

Lines Coverage
  • Covered: 5855 / 6485
  • Coverage: 90.29%
  • Change: 0% (-21 lines)
Statements Coverage
  • Covered: 5924 / 6570
  • Coverage: 90.17%
  • Change: 0% (-21 statements)
Functions Coverage
  • Covered: 1555 / 1744
  • Coverage: 89.16%
  • Change: -0.03% (-5 functions)
Branches Coverage
  • Covered: 3622 / 4423
  • Coverage: 81.89%
  • Change: 0% (-22 branches)

✅ Coverage check passed

This branch has not been deployed

No deployments
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.

1 participant