Repository navigation
refactor: group core into form and domains folders and narrow its exports - #1906
Open
gabrielseco wants to merge 4 commits into
Open
gabrielseco wants to merge 4 commits into
gabrielseco wants to merge 4 commits into
Conversation
Contributor
|
Deploy preview for remote-flows ready!
Deployed with vercel-action |
Contributor
|
Deploy preview for adp-cost-calculator ready!
Deployed with vercel-action |
Contributor
📊 Coverage Report✅ Coverage increased! 🎉
Detailed BreakdownLines Coverage
Statements Coverage
Functions Coverage
Branches Coverage
✅ Coverage check passed |
Contributor
📦 Bundle Size Report
Size Limits
Largest Files (Top 5)
View All Files (312 total)
✅ Bundle size check passed |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reorganizes the private core package into folders and trims what it exports. Behavior and the public API of
@remoteoss/remote-flowsare unchanged.Why
Follow-up to #1894 (Phase 2 of the Angular support plan, #1833). Core is growing flow by flow, so it needs a layout where each flow's code has its own folder. Its entry point also exported things nothing used, and nothing stopped that from happening again.
What changed
Toggle details
packages/core/src/invoiceSchedules/moves topackages/core/src/domains/invoice-schedule/. The test is renamed toinvoiceSchedule.test.ts.form.tsandheadlessForm.ts(with their tests) move intopackages/core/src/form/.object.tsonly heldgetNestedValue, used only byform.ts, so it is merged intoform/form.tsand deleted.money.ts,fieldHelpers.ts,fieldTypes.tsandtypes.tsstay where they are.index.tsnow exports only names the SDK imports. A new check,pnpm run check-core-exports, enforces it: it runs Knip onpackages/core(config inknip.json) and fails on any export nobody uses. It runs inpnpm run ciand in the lint job ofpr.yml. Knip is a new dev dependency, pinned at 6.44.1.createInvoiceScheduleSchema, a static schema with no users, is deleted.supportedTypes,findFieldsByType,FileConverter,parseFormValuesToAPIandparseSubmitValuesare no longer exported. Core still uses them internally.isMultiSelectis no longer exported. Its only consumer was an unused re-export insrc/components/form/utils.ts.src/components/form/utils.tsthat nothing called are deleted..oxlintrc.json: thecreateHeadlessFormimport exception followsheadlessForm.tsto its new path.src/index.tsxchanges.Screenshots
N/A
Related Resources
Testing
type-checkis clean andpnpm run check-core-exportspasses. The core,src/common,src/components/formand InvoiceSchedule tests pass locally (492 tests); CI runs the full suite.example/app in a browserNote
Medium Risk
Shrinks and relocates
@remoteoss/remote-flows-coreexports and paths; downstream direct imports of removed symbols would break, though the main package API is unchanged.Overview
Core layout and surface area
The private
@remoteoss/remote-flows-corepackage is reorganized: invoice schedule code lives underdomains/invoice-schedule/, and form logic (form,headlessForm, tests) moves undersrc/form/.getNestedValueis merged from deletedobject.tsintoform/form.ts.packages/core/src/index.tsre-exports only what downstream code still needs; several previously exported symbols are internal-only (parseFormValuesToAPI,parseSubmitValues,findFieldsByType,FileConverter,supportedTypes,isMultiSelect) and the unusedcreateInvoiceScheduleSchemaexport is removed.Tooling
Knip is added with
knip.json, acheck-core-exportsscript (knip --workspace packages/core --include exports), and it runs inpnpm ciand the PR lint workflow so stray core exports fail CI..oxlintrcupdates the no-restricted-imports exception path for the movedheadlessFormfile.App layer
src/components/form/utils.tsdrops the unusedparseFormValuesToAPI/parseSubmitValueswrappers and theisMultiSelectre-export; theparseJSFToValidatehelper with file conversion remains.The published
@remoteoss/remote-flowsentry is unchanged; risk is mainly for anything importing the workspace core package directly via removed exports.Reviewed by Cursor Bugbot for commit 4a86b16. Bugbot is set up for automated code reviews on this repo. Configure here.