Repository navigation
refactor: organise src into one folder per pipeline stage - #82
Merged
Merged
Conversation
Move the 27 root files and the misplaced diagram/, layout/, ops/ and platform/ modules into shared/, model/, ids/, xml/, platform/profiles/, ops/, diagram/, layout/, format/, render/, validate/, query/, pipeline/ and report/. Pure moves: imports and path references follow, no logic changes. CONTRIBUTING documents the folders and where new code goes.
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
src/had 27 loose files at its root, and several folders held modules that belonged elsewhere: format ops and the renderer lived indiagram/, the clean engine's types inlayout/, and C7/C8 defaults inops/. The folder names did not say where code lives or where new code should go.This PR gives each pipeline stage its own folder:
shared/,model/,ids/,xml/,platform/profiles/,ops/,diagram/,layout/(clean/,incremental.ts),format/,render/,validate/,query/,pipeline/,report/. Only the three entriesindex.ts,api.tsandcli.tsstay at the root.log --followkeep working.docs/,CONTRIBUTING.mdand the PR template.HANDOVER.md,CHANGELOG.mdand the October audit are history and keep their old paths.src/index.tsandsrc/node/index.tsexport the same names.CONTRIBUTING.mdnow has a table of the folders and a rule for where new code goes.Import-direction violations remain (e.g.
ops/set.ts→layout/index.ts). This PR doesn't add the architecture test that would fix and enforce them.Checklist
npm run typecheckpassesnpm run gatepasses (from an emptydist/: 2317 tests, iso check, regress budget, fuzz 0 errors)src/report/guide.tsand the matching page indocs/are updated (only if a command, option or output changed)Linked issue
None.