Repository navigation
refactor: group the definitions package by domain - #139
Merged
Merged
Conversation
One folder per domain: command, docs, extension, profiles, scripts, sources and shared. Moves, splits along domain lines and import updates only; both entry points export the same names.
Deploying tack-website with
|
| Latest commit: |
c619caf
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a9e6f186.tack-ayg.pages.dev |
| Branch Preview URL: | https://refactor-definitions-dirs.tack-ayg.pages.dev |
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.
Why
packages/definitions/srcheld every contract in one flat folder of 35 files. File name prefixes were the only sign of a domain, and some files mixed two: the types every extension host shares were in the docs host, and one file held script declarations, runs, history and type files. Follow-up of #130, after #137 and #138.What
The package now has one folder per domain. This is structure only: moves, splits along domain lines and import updates. No CLI behaviour, output or schema changes.
commandholds the command builder. Write reach, help rows and the invocation issue leavecommand.ts, which is nowcommand/spec.ts.booleanFlagandpreviewApplyjoin the other grammar parts.extensionholds the extension list, manifests, state slices, slots, the extension host and the view kit. The extension IDs and the state slices are now files of their own.HostErrorandStateHandle, which both hosts use, leave the docs host.docsandscriptshold each extension's commands, host and payloads. The script payloads split into declaration, run, history and type files. The docs search and settings payloads have their own files.profilesholds each extension's part of a profile.sourcesholds the source root rules andSourceResource.sharedholds names and IDs, ordering, hashing and the published package name.The two entry points,
@tackup/definitionsand@tackup/definitions/source-edges, stay. They export the same names as before.The import cycles between the extension list, the slots and the docs host are gone: no file of the package imports itself through another. The
docsandextensionfolders still import each other, because the closed extension list names the docs slice and specs.The boundary test of the package now accepts an import of a sibling folder, and still refuses any import that leaves the package. The package README, two skills and the build scripts name the new paths.
Before:
After:
Related to
Follows #130.
Cleanups seen and left out of this change:
command/grammar.tslinksselectorFromin a comment, and the package has no such function.docs/reader-engine.tsdeclares its own, looserDocsResourceReferenceSchemabeside the one ofdocs/slice.ts.docs/settings.tsanddocs/slice.tseach build the key of a docs resource and check that attachments are unique.extension/doctor-checks.tsholds general text helpers,pluralandsorted, besideskippedCheck.Checks
@tackup/definitionsexports are the same before and after.AI assisted