Conversation
There was a problem hiding this comment.
Pull request overview
This PR expands README family/template support and adds Git-oriented merge-driver tooling around the StructuredMerge TypeScript packages.
Changes:
- Adds README style/family section helpers and generated package README templates.
- Introduces new
ast-crispr,ast-merge-git, andsmorg-tspackages with fixture-backed tests. - Exposes additional tree-haver/ast-merge contracts and updates test/type resolution config.
Reviewed changes
Copilot reviewed 41 out of 43 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
README.md |
Documents smorg-ts command usage and coverage caveats. |
tsconfig.json |
Adds paths for new package imports. |
vitest.config.ts |
Adds test aliases for new package imports. |
pnpm-lock.yaml |
Adds workspace importer entries. |
packages/ast-crispr/package.json |
Defines new ast-crispr package. |
packages/ast-crispr/src/index.ts |
Adds ast-crispr boundary/profile helpers. |
packages/ast-crispr/test/boundary.test.ts |
Adds fixture conformance tests. |
packages/ast-merge/src/index.ts |
Re-exports expanded contract surface. |
packages/ast-merge/test/compact-ruleset.test.ts |
Adds compact ruleset profile fixture test. |
packages/ast-merge-git/package.json |
Defines new ast-merge-git package. |
packages/ast-merge-git/src/index.ts |
Adds JSON merge3 and comment delta helpers. |
packages/ast-merge-git/test/fixtures.integration.test.ts |
Adds merge3/comment fixture tests. |
packages/ast-template/src/index.ts |
Adds README family section rendering/application helpers. |
packages/ast-template/test/session.integration.test.ts |
Adds README family section fixture tests. |
packages/kettle-nodule/src/index.ts |
Adds README style planning/application and template README support. |
packages/kettle-nodule/test/thin-slice.test.ts |
Extends thin-slice tests for README generation. |
packages/smorg-ts/package.json |
Defines new CLI package. |
packages/smorg-ts/src/cli.ts |
Adds merge/diff/conflict/language CLI commands. |
packages/smorg-ts/test/cli.test.ts |
Adds CLI fixture and behavior tests. |
packages/tree-haver/src/contracts.ts |
Adds backend/profile/edit-projection contracts and helpers. |
packages/tree-haver/src/index.ts |
Re-exports new tree-haver contracts/helpers. |
packages/ast-merge/README.md |
Adds generated package README. |
packages/ast-template/README.md |
Adds generated package README. |
packages/binary-merge/README.md |
Adds generated package README. |
packages/go-merge/README.md |
Adds generated package README. |
packages/js-yaml-merge/README.md |
Adds generated package README. |
packages/json-merge/README.md |
Adds generated package README. |
packages/kettle-nodule/README.md |
Adds generated package README. |
packages/markdown-it-merge/README.md |
Adds generated package README. |
packages/markdown-merge/README.md |
Adds generated package README. |
packages/peggy-toml-merge/README.md |
Adds generated package README. |
packages/plain-merge/README.md |
Adds generated package README. |
packages/ruby-merge/README.md |
Adds generated package README. |
packages/rust-merge/README.md |
Adds generated package README. |
packages/toml-merge/README.md |
Adds generated package README. |
packages/tree-haver/README.md |
Adds generated package README. |
packages/typescript-compiler-merge/README.md |
Adds generated package README. |
packages/typescript-merge/README.md |
Adds generated package README. |
packages/yaml-merge/README.md |
Adds generated package README. |
packages/zip-merge/README.md |
Adds generated package README. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+421
to
+427
| function jsonKeyByteRange(source: string, key: string): SourceRange { | ||
| const needle = `"${key}"`; | ||
| const start = source.indexOf(needle); | ||
| if (start < 0) return { start: 0, end: source.length }; | ||
| let end = start + needle.length; | ||
| while (end < source.length && source[end] !== ',' && source[end] !== '}') end += 1; | ||
| return { start, end }; |
Comment on lines
+623
to
+644
| switch (normalizeLanguage(language, pathName)) { | ||
| case 'go': | ||
| return mergeGo(otherSource, currentSource, 'go'); | ||
| case 'json': | ||
| return merge3Result( | ||
| merge3({ | ||
| base_source: ancestorSource, | ||
| ours_source: currentSource, | ||
| theirs_source: otherSource, | ||
| path_name: pathName, | ||
| language: 'json', | ||
| dialect: 'json', | ||
| profile_id: 'json.keyed-object', | ||
| fallback_policy: fallbackPolicy, | ||
| conflict_marker_size: conflictMarkerSize, | ||
| render_policy: 'canonical' | ||
| }) | ||
| ); | ||
| case 'jsonc': | ||
| return mergeJson(otherSource, currentSource, 'jsonc'); | ||
| default: | ||
| return mergeText(otherSource, currentSource); |
| } | ||
|
|
||
| function readmeLicense(config: ReadmeConfig, facts: PackageFacts): string { | ||
| return config.license?.spdx?.join(' OR ') || facts.package.licenseExpression || 'MIT'; |
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.
No description provided.